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
52eb9e95
Commit
52eb9e95
authored
Apr 19, 2019
by
Memorydoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#
parent
b4f46aa9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
AnalysisJobServiceImpl.java
...pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
+1
-1
AnalysisServiceImpl.java
...va/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
+25
-8
international-data-import.ctrl.js
...ternational-data-import/international-data-import.ctrl.js
+2
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
View file @
52eb9e95
...
...
@@ -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 @
52eb9e95
...
...
@@ -307,6 +307,15 @@ public class AnalysisServiceImpl extends BaseService {
return
null
;
}
public
Organization
getOrg
(
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
;
}
private
void
importAnalysisReturnTaxExcelFile
(
MultipartFile
file
,
String
periodDate
)
{
try
{
...
...
@@ -521,7 +530,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 +551,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
(
getOrg
(
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 +582,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 +601,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 +624,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 +866,6 @@ public class AnalysisServiceImpl extends BaseService {
jdbcTemplate
.
update
(
sql
);
}
//e.createCriteria().andIsActiveEqualTo(true);
List
<
Organization
>
orgs
=
organizationMapper
.
selectByExample
(
e
);
//首先要先初始化master表数据,所有的数据要依赖master表
...
...
atms-web/src/main/webapp/app/analysis/data-import/international-data-import/international-data-import.ctrl.js
View file @
52eb9e95
...
...
@@ -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
;
...
...
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