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
a4498e97
Commit
a4498e97
authored
Jul 22, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] ImportCustomsInvoice impl
parent
ccaa0add
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
CustomsInvoiceServiceImpl.java
...tech/atms/vat/service/impl/CustomsInvoiceServiceImpl.java
+21
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/CustomsInvoiceServiceImpl.java
View file @
a4498e97
...
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.service.impl;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.constant.enums.EnumTbImportType
;
import
pwc.taxtech.atms.constant.enums.EnumValidationType
;
import
pwc.taxtech.atms.dto.FieldsMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
...
...
@@ -99,7 +100,25 @@ public class CustomsInvoiceServiceImpl extends VatAbstractService {
return
resultOpt
;
}
public
OperationResultDto
ImportCustomsInvoice
(
List
<
CustomsInvoiceDto
>
customsList
,
int
importType
,
String
userId
)
{
return
null
;
public
OperationResultDto
ImportCustomsInvoice
(
List
<
CustomsInvoice
>
custList
,
int
importType
,
String
userId
)
{
try
{
int
periodId
=
0
;
if
(
importType
==
EnumTbImportType
.
CoverImport
.
getCode
())
{
periodId
=
custList
.
get
(
0
).
getPeriodId
().
intValue
();
CustomsInvoiceExample
example
=
new
CustomsInvoiceExample
();
example
.
createCriteria
().
andPeriodIdEqualTo
(
periodId
);
customsInvoiceMapper
.
deleteByExample
(
example
);
}
custList
.
forEach
(
c
->
{
c
.
setCreatorID
(
userId
);
});
custList
.
forEach
(
m
->
customsInvoiceMapper
.
insert
(
m
));
// UpdateCustomsInvoiceValidation(userId, periodId);//todo:[validation] to be continue (neo)
return
new
OperationResultDto
(
true
,
""
);
}
catch
(
Exception
ex
)
{
return
new
OperationResultDto
(
false
,
ex
.
getMessage
());
}
}
}
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