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
24f65265
Commit
24f65265
authored
Jul 26, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] custmons invoice get data for display impl
parent
bc625ef9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
4 deletions
+75
-4
CustomerController.java
.../java/pwc/taxtech/atms/controller/CustomerController.java
+0
-0
CustomsInvoiceDto.java
...n/java/pwc/taxtech/atms/dto/vatdto/CustomsInvoiceDto.java
+15
-0
JsonCustomsInvoice.java
.../java/pwc/taxtech/atms/dto/vatdto/JsonCustomsInvoice.java
+22
-0
CustomerService.java
...c/main/java/pwc/taxtech/atms/service/CustomerService.java
+3
-0
CustomerServiceImpl.java
...va/pwc/taxtech/atms/service/impl/CustomerServiceImpl.java
+35
-2
ProjectServiceImpl.java
...ava/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
+0
-1
StatisticAttributeServiceImpl.java
...tech/atms/service/impl/StatisticAttributeServiceImpl.java
+0
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CustomerController.java
View file @
24f65265
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/CustomsInvoiceDto.java
View file @
24f65265
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
pwc.taxtech.atms.vat.entity.CustomsInvoice
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -113,4 +115,17 @@ public class CustomsInvoiceDto {
public
void
setSeqNo
(
int
seqNo
)
{
this
.
seqNo
=
seqNo
;
}
public
CustomsInvoiceDto
extractFromEntity
(
CustomsInvoice
entity
){
setCustomsId
(
entity
.
getCustomsId
());
setPayNum
(
entity
.
getPayNum
());
setIssueDate
(
entity
.
getIssueDate
());
setInvoiceTaxAmount
(
entity
.
getInvoiceTaxAmount
());
setInvoiceAmount
(
entity
.
getInvoiceAmount
());
setAuditResult
(
entity
.
getAuditResult
());
setCreateTime
(
entity
.
getCreateTime
());
setCreatorID
(
entity
.
getCreatorID
());
setPeriodId
(
entity
.
getPeriodId
());
return
this
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/JsonCustomsInvoice.java
View file @
24f65265
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
public
class
JsonCustomsInvoice
{
@JsonProperty
(
value
=
"recordNumber"
,
required
=
false
)
public
String
RecordNumber
;
@JsonProperty
(
value
=
"customsId"
,
required
=
false
)
public
String
CustomsId
;
@JsonProperty
(
value
=
"payNum"
,
required
=
false
)
public
String
PayNum
;
@JsonProperty
(
value
=
"issueDate"
,
required
=
false
)
public
String
IssueDate
;
@JsonProperty
(
value
=
"invoiceTaxAmount"
,
required
=
false
)
public
String
InvoiceTaxAmount
;
@JsonProperty
(
value
=
"invoiceAmount"
,
required
=
false
)
public
String
InvoiceAmount
;
@JsonProperty
(
value
=
"auditResult"
,
required
=
false
)
public
String
AuditResult
;
@JsonProperty
(
value
=
"createTime"
,
required
=
false
)
public
String
CreateTime
;
@JsonProperty
(
value
=
"creatorID"
,
required
=
false
)
public
String
CreatorID
;
@JsonProperty
(
value
=
"periodId"
,
required
=
false
)
public
Integer
PeriodId
;
}
atms-api/src/main/java/pwc/taxtech/atms/service/CustomerService.java
View file @
24f65265
...
...
@@ -6,6 +6,7 @@ import java.util.List;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.customer.CustomerDto
;
import
pwc.taxtech.atms.dto.customer.CustomerValidateInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto
;
public
interface
CustomerService
{
...
...
@@ -20,4 +21,6 @@ public interface CustomerService {
List
<
OperationResultDto
<
CustomerDto
>>
updateRange
(
List
<
CustomerDto
>
customerDtoList
);
Object
upload
(
InputStream
inputStream
,
String
fileName
,
String
action
,
String
enterpriseAccountID
);
List
<
CustomsInvoiceDto
>
GetCustomsInvoicesByPeriodIds
(
int
fromPeriod
,
int
toPeriod
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CustomerServiceImpl.java
View file @
24f65265
...
...
@@ -4,6 +4,7 @@ import java.io.File;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -19,6 +20,7 @@ import org.springframework.util.Assert;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.common.AuthUserHelper
;
import
pwc.taxtech.atms.common.CommonConstants
;
...
...
@@ -41,8 +43,13 @@ import pwc.taxtech.atms.entitiy.CustomerExample.Criteria;
import
pwc.taxtech.atms.entitiy.EnterpriseAccountSet
;
import
pwc.taxtech.atms.service.CustomerService
;
import
pwc.taxtech.atms.service.OperationLogService
;
import
pwc.taxtech.atms.vat.dao.CustomsInvoiceMapper
;
import
pwc.taxtech.atms.vat.entity.CustomsInvoice
;
import
pwc.taxtech.atms.vat.entity.CustomsInvoiceExample
;
/** @see PwC.Tax.Tech.Atms.Admin.Application.Services.Impl.CustomerService.cs */
/**
* @see PwC.Tax.Tech.Atms.Admin.Application.Services.Impl.CustomerService.cs
*/
@Service
public
class
CustomerServiceImpl
implements
CustomerService
{
...
...
@@ -62,6 +69,8 @@ public class CustomerServiceImpl implements CustomerService {
@Autowired
private
FileService
fileService
;
@Autowired
private
CustomsInvoiceMapper
customsInvoiceMapper
;
@Override
public
List
<
OperationResultDto
<
CustomerDto
>>
addRange
(
List
<
CustomerDto
>
customerDtoList
)
{
...
...
@@ -249,8 +258,32 @@ public class CustomerServiceImpl implements CustomerService {
return
finalResult
;
}
@Override
public
List
<
CustomsInvoiceDto
>
GetCustomsInvoicesByPeriodIds
(
int
fromPeriod
,
int
toPeriod
)
{
CustomsInvoiceExample
example
=
new
CustomsInvoiceExample
();
example
.
createCriteria
().
andPeriodIdGreaterThanOrEqualTo
(
fromPeriod
).
andPeriodIdLessThanOrEqualTo
(
toPeriod
);
List
<
CustomsInvoice
>
reuslt
=
customsInvoiceMapper
.
selectByExample
(
example
);
reuslt
.
stream
().
sorted
(
Comparator
.
comparing
(
CustomsInvoice:
:
getPayNum
));
List
<
CustomsInvoiceDto
>
returnResult
=
new
ArrayList
<>();
int
seqNo
=
1
;
for
(
CustomsInvoice
r
:
reuslt
)
{
CustomsInvoiceDto
dto
=
new
CustomsInvoiceDto
();
dto
.
setSeqNo
(
seqNo
++);
if
(
r
.
getInvoiceAmount
()
!=
null
)
{
r
.
setInvoiceAmount
(
r
.
getInvoiceAmount
().
setScale
(
2
));
}
if
(
r
.
getInvoiceTaxAmount
()
!=
null
)
{
r
.
setInvoiceTaxAmount
(
r
.
getInvoiceTaxAmount
().
setScale
(
2
));
}
returnResult
.
add
(
dto
.
extractFromEntity
(
r
));
}
return
returnResult
;
}
private
List
<
OperationResultDto
<
CustomerDto
>>
saveData
(
String
enterpriseAccountID
,
List
<
CustomerDto
>
customerDtoList
,
String
action
)
{
List
<
CustomerDto
>
customerDtoList
,
String
action
)
{
logger
.
debug
(
"enter customerDtoList, enterpriseAccountID:{}, customerDtoList.size:{}, action:{}"
,
enterpriseAccountID
,
customerDtoList
.
size
(),
action
);
List
<
OperationResultDto
<
CustomerDto
>>
errList
=
new
ArrayList
<
OperationResultDto
<
CustomerDto
>>();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
View file @
24f65265
...
...
@@ -61,7 +61,6 @@ import static pwc.taxtech.atms.constant.Constant.*;
@Service
public
class
ProjectServiceImpl
implements
ProjectService
{
/**
* @see PwC.Tax.Tech.Atms..Admin.Application\Services\impl\ProjectService.cs
*/
private
static
final
int
FIRST_OR_DEFAULT
=
0
;
private
static
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
ProjectServiceImpl
.
class
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/StatisticAttributeServiceImpl.java
View file @
24f65265
...
...
@@ -43,7 +43,6 @@ import pwc.taxtech.atms.service.DimensionService;
import
pwc.taxtech.atms.service.StatisticAttributeService
;
/**
* @see PwC.Tax.Tech.Atms..Admin.Application\Services\impl\StatisticAttributeService.cs
*/
@Service
public
class
StatisticAttributeServiceImpl
extends
AbstractService
implements
StatisticAttributeService
{
...
...
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