Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
3230b2bb
Commit
3230b2bb
authored
Apr 19, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
6badbf04
41515c6b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
16 deletions
+64
-16
ErrorMessage.java
...in/java/pwc/taxtech/atms/common/message/ErrorMessage.java
+1
-1
AnalysisJobServiceImpl.java
...pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
+3
-3
AnalysisServiceImpl.java
...va/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
+40
-8
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+14
-3
organization-manage.ctrl.js
...astructure/organizationManage/organization-manage.ctrl.js
+0
-0
international-data-import.ctrl.js
...ternational-data-import/international-data-import.ctrl.js
+2
-0
cit-import-asset-list.html
...t/import/cit-import-asset-list/cit-import-asset-list.html
+4
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/message/ErrorMessage.java
View file @
3230b2bb
...
...
@@ -12,7 +12,7 @@ public class ErrorMessage {
public
static
final
String
NoSelectSheet
=
"NoSelectSheet"
;
public
static
final
String
DIDNOTSELECTPERIOD
=
"You should select period!"
;
public
static
final
String
ImportFailed
=
"
ImportFailed
!"
;
public
static
final
String
ImportFailed
=
"
导入失败
!"
;
public
static
final
String
ImportNotMatch
=
"导入文件与选择机构或期间不匹配!"
;
public
static
final
String
ExportFailed
=
"ExportFailed!"
;
public
static
final
String
NoData
=
"无数据!"
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
View file @
3230b2bb
...
...
@@ -105,8 +105,8 @@ public class AnalysisJobServiceImpl extends BaseService {
private
final
static
String
MONEYTYPE
=
"CNY"
;
private
final
static
List
<
Integer
>
YEAR_LIST
=
Lists
.
newArrayList
(
2017
,
2018
,
2019
);
private
static
List
<
Integer
>
periodInit
=
Lists
.
newArrayList
();
private
static
final
String
ZZSNSSBB
=
"增值税纳税申报表"
;
//增值税申报表(一般纳税人)
private
static
final
String
QYSDSYJB
=
"
企业所得税预缴表"
;
//企业所得税预缴表
private
static
final
String
ZZSNSSBB
=
"增值税纳税申报表"
;
//增值税申报表(一般纳税人)
todo 模板名称改的话这里也要改
private
static
final
String
QYSDSYJB
=
"
预缴纳税申报表"
;
//企业所得税预缴表 todo 模板名称改的话这里也要改
private
String
gzzscode
=
null
;
//一般纳税人
private
String
szzscode
=
null
;
//小规模纳税人
...
...
@@ -847,7 +847,7 @@ public class AnalysisJobServiceImpl extends BaseService {
private
String
qysdscode
=
null
;
public
void
analysisTax
(
List
<
Organization
>
orgs
,
Integer
period
,
Integer
type
)
{
qysdscode
=
projectMapper
.
getTemplateCode
(
"1"
,
QYSDSYJB
).
get
(
0
).
getName
()
;
//一般纳税人
qysdscode
=
projectMapper
.
getTemplateCode
(
"1"
,
QYSDSYJB
).
size
()
!=
0
?
projectMapper
.
getTemplateCode
(
"1"
,
QYSDSYJB
).
get
(
0
).
getName
()
:
null
;
//一般纳税人
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
Organization:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
type
.
equals
(
EnumTbImportType
.
CoverImport
.
getCode
()))
{
AnalysisTaxExample
example
=
new
AnalysisTaxExample
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
View file @
3230b2bb
...
...
@@ -307,6 +307,24 @@ public class AnalysisServiceImpl extends BaseService {
return
null
;
}
public
Organization
getOrgById
(
String
organizationId
)
{
OrganizationExample
organizationExample
=
new
OrganizationExample
();
organizationExample
.
createCriteria
().
andIdEqualTo
(
organizationId
);
List
<
Organization
>
organizations
=
organizationMapper
.
selectByExample
(
organizationExample
);
if
(
organizations
.
size
()
!=
0
)
return
organizations
.
get
(
0
);
return
null
;
}
public
Organization
getOrgByCompanyName
(
String
companyName
)
{
OrganizationExample
organizationExample
=
new
OrganizationExample
();
organizationExample
.
createCriteria
().
andNameEqualTo
(
companyName
);
List
<
Organization
>
organizations
=
organizationMapper
.
selectByExample
(
organizationExample
);
if
(
organizations
.
size
()
!=
0
)
return
organizations
.
get
(
0
);
return
null
;
}
private
void
importAnalysisReturnTaxExcelFile
(
MultipartFile
file
,
String
periodDate
)
{
try
{
...
...
@@ -392,6 +410,12 @@ public class AnalysisServiceImpl extends BaseService {
continue
;
}
model
.
setCompanyName
(
getCellStringValue
(
sheet
.
getRow
(
j
).
getCell
(
0
)));
try
{
model
.
setSeqNo
(
getSeqNoByPeriod
(
getOrgByCompanyName
(
getCellStringValue
(
sheet
.
getRow
(
j
).
getCell
(
0
))).
getId
(),
selectedPer
));
}
catch
(
Exception
e
)
{
logger
.
warn
(
getCellStringValue
(
sheet
.
getRow
(
j
).
getCell
(
0
))
+
"公司名称匹配不成功"
);
continue
;
}
model
.
setFullTimeAmount
(
getCellBigDecimalValue
(
sheet
.
getRow
(
j
).
getCell
(
1
)));
model
.
setInternAmount
(
getCellBigDecimalValue
(
sheet
.
getRow
(
j
).
getCell
(
2
)));
model
.
setVendorAmount
(
getCellBigDecimalValue
(
sheet
.
getRow
(
j
).
getCell
(
3
)));
...
...
@@ -521,7 +545,7 @@ public class AnalysisServiceImpl extends BaseService {
}
private
void
importAnalysisInterTaxDataExcelFile
(
MultipartFile
file
,
String
periodDate
,
String
companyName
,
String
country
)
{
String
organizationId
,
String
country
)
{
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
...
...
@@ -542,15 +566,22 @@ public class AnalysisServiceImpl extends BaseService {
AnalysisInternationalTaxData
model
=
new
AnalysisInternationalTaxData
();
model
.
setId
(
idService
.
nextId
());
model
.
setPeriod
(
selectedPer
);
model
.
setCompanyName
(
companyName
);
model
.
setOrganizationId
(
organizationId
);
model
.
setCompanyName
(
getOrgById
(
organizationId
).
getName
());
model
.
setCountry
(
country
);
try
{
model
.
setSeqNo
(
getSeqNoByPeriod
(
organizationId
,
DateUtils
.
strToPeriod
(
periodDate
)));
}
catch
(
Exception
e
)
{
continue
;
}
model
.
setTaxCategory
(
getCellStringValue
(
sheet
.
getRow
(
j
).
getCell
(
0
)));
model
.
setTaxType
(
getCellStringValue
(
sheet
.
getRow
(
j
).
getCell
(
1
)));
model
.
setTaxAmount
(
getCellBigDecimalValue
(
sheet
.
getRow
(
j
).
getCell
(
2
)));
lists
.
add
(
model
);
}
AnalysisInternationalTaxDataExample
example
=
new
AnalysisInternationalTaxDataExample
();
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
).
andCountryEqualTo
(
country
).
and
CompanyNameEqualTo
(
companyName
);
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
).
andCountryEqualTo
(
country
).
and
OrganizationIdEqualTo
(
organizationId
);
analysisInternationalTaxDataMapper
.
deleteByExample
(
example
);
lists
.
forEach
(
l
->
{
analysisInternationalTaxDataMapper
.
insertSelective
(
l
);
...
...
@@ -566,7 +597,7 @@ public class AnalysisServiceImpl extends BaseService {
}
private
void
importAnalysisInterBuDataExcelFile
(
MultipartFile
file
,
String
periodDate
,
String
companyName
,
String
country
)
{
String
organizationId
,
String
country
)
{
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
...
...
@@ -585,10 +616,12 @@ public class AnalysisServiceImpl extends BaseService {
AnalysisInternationalBusinessData
model
=
new
AnalysisInternationalBusinessData
();
model
.
setId
(
idService
.
nextId
());
model
.
setPeriod
(
selectedPer
);
model
.
set
CompanyName
(
companyName
);
model
.
set
OrganizationId
(
organizationId
);
model
.
setCountry
(
country
);
Cell
cell1
=
sheet
.
getRow
(
j
).
getCell
(
0
);
if
(
null
==
cell1
||
StringUtils
.
isEmpty
(
getCellStringValue
(
cell1
)))
{
try
{
model
.
setSeqNo
(
getSeqNoByPeriod
(
organizationId
,
DateUtils
.
strToPeriod
(
periodDate
)));
}
catch
(
Exception
e
)
{
continue
;
}
model
.
setGmv
(
getCellBigDecimalValue
(
cell1
));
...
...
@@ -606,7 +639,7 @@ public class AnalysisServiceImpl extends BaseService {
lists
.
add
(
model
);
}
AnalysisInternationalBusinessDataExample
example
=
new
AnalysisInternationalBusinessDataExample
();
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
).
andCountryEqualTo
(
country
).
and
CompanyNameEqualTo
(
companyName
);
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
).
andCountryEqualTo
(
country
).
and
OrganizationIdEqualTo
(
organizationId
);
analysisInternationalBusinessDataMapper
.
deleteByExample
(
example
);
lists
.
forEach
(
l
->
{
analysisInternationalBusinessDataMapper
.
insertSelective
(
l
);
...
...
@@ -848,7 +881,6 @@ public class AnalysisServiceImpl extends BaseService {
jdbcTemplate
.
update
(
sql
);
}
//e.createCriteria().andIsActiveEqualTo(true);
List
<
Organization
>
orgs
=
organizationMapper
.
selectByExample
(
e
);
//首先要先初始化master表数据,所有的数据要依赖master表
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
3230b2bb
...
...
@@ -962,10 +962,13 @@ public class DataImportService extends BaseService {
rlits
.
stream
().
collect
(
Collectors
.
groupingBy
(
RedLetterInfoTable:
:
getSubjectNum
));
atsGroupRes
.
forEach
((
k
,
v
)
->
processRlits
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
addDataImportLog
(
dataImportLogs
);
int
isSuccess
=
(
int
)
dataImportLogs
.
stream
().
filter
(
di
->
Boolean
.
TRUE
.
equals
(
di
.
getImportResult
())).
count
();
if
(
isSuccess
<
1
)
{
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
return
OperationResultDto
.
error
(
ErrorMessage
.
ImportNotMatch
);
}
return
operationResultDto
.
success
();
}
catch
(
Exception
e
)
{
...
...
@@ -1068,6 +1071,8 @@ public class DataImportService extends BaseService {
atsGroupRes
.
forEach
((
k
,
v
)
->
processAts
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
addDataImportLog
(
dataImportLogs
);
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
int
isSuccess
=
(
int
)
dataImportLogs
.
stream
().
filter
(
di
->
Boolean
.
TRUE
.
equals
(
di
.
getImportResult
())).
count
();
if
(
isSuccess
<
1
)
{
return
OperationResultDto
.
error
(
ErrorMessage
.
ImportNotMatch
);
...
...
@@ -1172,9 +1177,12 @@ public class DataImportService extends BaseService {
atsGroupRes
.
forEach
((
k
,
v
)
->
processCprs
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
int
isSuccess
=
(
int
)
dataImportLogs
.
stream
().
filter
(
di
->
Boolean
.
TRUE
.
equals
(
di
.
getImportResult
())).
count
();
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
addDataImportLog
(
dataImportLogs
);
if
(
isSuccess
<
1
)
{
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
return
OperationResultDto
.
error
(
ErrorMessage
.
ImportNotMatch
);
}
return
OperationResultDto
.
success
();
}
catch
(
ServiceException
e
)
{
...
...
@@ -1458,10 +1466,13 @@ public class DataImportService extends BaseService {
irs
.
stream
().
collect
(
Collectors
.
groupingBy
(
InvoiceRecord:
:
getBillingBody
));
atsGroupRes
.
forEach
((
k
,
v
)
->
processIrs
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
int
isSuccess
=
(
int
)
dataImportLogs
.
stream
().
filter
(
di
->
Boolean
.
TRUE
.
equals
(
di
.
getImportResult
())).
count
();
addDataImportLog
(
dataImportLogs
);
if
(
isSuccess
<
1
)
{
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
return
OperationResultDto
.
error
(
ErrorMessage
.
ImportNotMatch
);
}
return
OperationResultDto
.
success
();
}
catch
(
ServiceException
e
)
{
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.ctrl.js
View file @
3230b2bb
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/analysis/data-import/international-data-import/international-data-import.ctrl.js
View file @
3230b2bb
...
...
@@ -397,6 +397,7 @@
};
var
getImportInternationalBUData
=
function
()
{
param
.
type
=
$scope
.
importType
;
vatImportService
.
displayAnalysisInternationalImportData
(
param
).
success
(
function
(
data
)
{
if
(
data
.
data
)
{
$scope
.
internationalBUDataGridSource
=
data
.
data
;
...
...
@@ -475,6 +476,7 @@
};
var
getImportInternationalTaxData
=
function
()
{
param
.
type
=
$scope
.
importType
;
vatImportService
.
displayAnalysisInternationalImportData
(
param
).
success
(
function
(
data
)
{
if
(
data
.
data
)
{
$scope
.
internationalTaxDataGridSource
=
data
.
data
;
...
...
atms-web/src/main/webapp/app/cit/import/cit-import-asset-list/cit-import-asset-list.html
View file @
3230b2bb
...
...
@@ -229,8 +229,11 @@
<
/div
>
<
/div
>
<
div
class
=
"modal-footer"
>
<!--
<
button
style
=
"margin-left: 22px;"
type
=
"button"
class
=
"btn btn-primary"
ng
-
click
=
"saveAssetGroupInfo()"
-->
<!--
ng
-
disabled
=
"!hasEditPermission"
>
{{
'Confirm'
|
translate
}}
-->
<!--
<
/button>--
>
<
button
style
=
"margin-left: 22px;"
type
=
"button"
class
=
"btn btn-primary"
ng
-
click
=
"saveAssetGroupInfo()"
ng
-
disabled
=
"!hasEditPermission"
>
{{
'Confirm'
|
translate
}}
>
{{
'Confirm'
|
translate
}}
<
/button
>
<
button
type
=
"button"
class
=
"btn btn-third"
ng
-
click
=
"cancelAsset()"
ng
-
if
=
"!isDisabled"
ng
-
disabled
=
"isDisabled"
>
{{
'ButtonCancel'
|
translate
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment