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
39048226
Commit
39048226
authored
Jun 07, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] add importController and ProjectInfoController and reference dto
parent
a90665b8
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
375 additions
and
3 deletions
+375
-3
ProjectInfoController.java
...va/pwc/taxtech/atms/controller/ProjectInfoController.java
+19
-3
TBDataImportController.java
...a/pwc/taxtech/atms/controller/TBDataImportController.java
+30
-0
PeriodInfoDto.java
...ain/java/pwc/taxtech/atms/dto/taxadmin/PeriodInfoDto.java
+76
-0
ClearTableDto.java
...src/main/java/pwc/taxtech/atms/dto/vat/ClearTableDto.java
+15
-0
CompanyBalanceDto.java
...main/java/pwc/taxtech/atms/dto/vat/CompanyBalanceDto.java
+121
-0
ImportBalanceDto.java
.../main/java/pwc/taxtech/atms/dto/vat/ImportBalanceDto.java
+42
-0
QueryImportType.java
...c/main/java/pwc/taxtech/atms/dto/vat/QueryImportType.java
+42
-0
DataImportService.java
...main/java/pwc/taxtech/atms/service/DataImportService.java
+10
-0
ICitTBDataImportService.java
...ava/pwc/taxtech/atms/service/ICitTBDataImportService.java
+9
-0
ProjectInfoService.java
...ain/java/pwc/taxtech/atms/service/ProjectInfoService.java
+5
-0
ProjectInfoServiceImpl.java
...pwc/taxtech/atms/service/impl/ProjectInfoServiceImpl.java
+6
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ProjectInfoController.java
View file @
39048226
...
...
@@ -3,11 +3,15 @@ package pwc.taxtech.atms.controller;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.taxadmin.PeriodInfoDto
;
import
pwc.taxtech.atms.dto.vat.QueryImportType
;
import
pwc.taxtech.atms.service.IdentityService
;
import
pwc.taxtech.atms.service.ProjectInfoService
;
import
java.util.List
;
...
...
@@ -17,19 +21,30 @@ import java.util.List;
public
class
ProjectInfoController
{
@Autowired
private
ProjectInfoService
projectInfoService
;
@Autowired
private
IdentityService
identityService
;
@ApiOperation
(
value
=
"isProjectImportedData"
,
notes
=
""
)
@RequestMapping
(
value
=
"isProjectImportedData/{projectId}/{serviceType}/{importTypeId}"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
OperationResultDto
<
Boolean
>
isProjectImportedData
(
@PathVariable
String
projectId
,
@PathVariable
Integer
serviceType
,
@PathVariable
Integer
importTypeId
)
{
return
projectInfoService
.
isProjectImportedData
(
projectId
,
serviceType
,
importTypeId
);
@PathVariable
Integer
importTypeId
)
{
return
projectInfoService
.
isProjectImportedData
(
projectId
,
serviceType
,
importTypeId
);
}
@ApiOperation
(
value
=
"isProjectImportedData"
,
notes
=
""
)
@RequestMapping
(
value
=
"isProjectImportedData/{projectId}/{importTypeId}"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
OperationResultDto
<
Boolean
>
isProjectImportedData
(
@PathVariable
String
projectId
,
@PathVariable
Integer
importTypeId
)
{
return
projectInfoService
.
isProjectImportedData
(
projectId
,
importTypeId
);
return
projectInfoService
.
isProjectImportedData
(
projectId
,
importTypeId
);
}
@ApiOperation
(
value
=
"getProjectImportType"
,
notes
=
""
)
@RequestMapping
(
value
=
"getProjectImportType"
,
method
=
RequestMethod
.
GET
)
public
OperationResultDto
<
List
<
PeriodInfoDto
>>
getProjectImportType
(
@RequestBody
QueryImportType
queryImportType
)
{
return
projectInfoService
.
getProjectImportType
(
queryImportType
.
getProjectId
(),
queryImportType
.
getPeriods
(),
queryImportType
.
getServiceTypeId
()
,
identityService
.
getIdentityUser
().
getID
());
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/controller/TBDataImportController.java
View file @
39048226
package
pwc
.
taxtech
.
atms
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
...
...
@@ -10,6 +11,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.dto.vatdto.*
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.vat.ClearTableDto
;
import
pwc.taxtech.atms.dto.vat.ImportBalanceDto
;
import
pwc.taxtech.atms.dto.vatdto.TrialBalanceDto
;
import
pwc.taxtech.atms.dto.vatdto.TrialBalanceFilter
;
import
pwc.taxtech.atms.service.DataImportService
;
import
pwc.taxtech.atms.service.ICitTBDataImportService
;
import
pwc.taxtech.atms.service.IdentityService
;
import
pwc.taxtech.atms.vat.service.TBDataImportService
;
import
java.math.BigDecimal
;
...
...
@@ -23,6 +32,13 @@ public class TBDataImportController {
@Autowired
TBDataImportService
tbDataImportService
;
@Autowired
private
ICitTBDataImportService
citTbDataImport
;
@Autowired
private
DataImportService
dataImportService
;
@Autowired
private
IdentityService
identityService
;
@RequestMapping
(
value
=
"GetBalanceDataForDisplay"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
String
getBalanceDataForDisplay
(
@RequestBody
JSONObject
param
)
{
...
...
@@ -357,5 +373,19 @@ public class TBDataImportController {
return
balanceList
;
}
@ApiOperation
(
value
=
"clearTableByPeriods"
,
notes
=
""
)
@RequestMapping
(
value
=
"clearTableByPeriods"
,
method
=
RequestMethod
.
POST
)
public
OperationResultDto
<
Boolean
>
clearTableByPeriods
(
@RequestBody
ClearTableDto
clearTb
)
{
return
citTbDataImport
.
clearTableByPeriods
(
clearTb
.
getPeriods
());
}
@ApiOperation
(
value
=
"ImportBalance"
,
notes
=
""
)
@RequestMapping
(
value
=
"ImportBalance"
,
method
=
RequestMethod
.
POST
)
public
OperationResultDto
importBalanceList
(
@RequestBody
ImportBalanceDto
importDto
)
{
return
dataImportService
.
importTrialBalance
(
importDto
.
getBalanceList
(),
importDto
.
getImportType
(),
importDto
.
getServiceTypeId
(),
identityService
.
getIdentityUser
().
getID
()
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/taxadmin/PeriodInfoDto.java
0 → 100644
View file @
39048226
package
pwc
.
taxtech
.
atms
.
dto
.
taxadmin
;
public
class
PeriodInfoDto
{
private
String
iD
;
private
String
projectID
;
private
Integer
period
;
private
Integer
status
;
private
String
creatorID
;
private
String
projectInfo
;
private
Integer
importType
;
private
Integer
serviceType
;
public
String
getiD
()
{
return
iD
;
}
public
void
setiD
(
String
iD
)
{
this
.
iD
=
iD
;
}
public
String
getProjectID
()
{
return
projectID
;
}
public
void
setProjectID
(
String
projectID
)
{
this
.
projectID
=
projectID
;
}
public
Integer
getPeriod
()
{
return
period
;
}
public
void
setPeriod
(
Integer
period
)
{
this
.
period
=
period
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getCreatorID
()
{
return
creatorID
;
}
public
void
setCreatorID
(
String
creatorID
)
{
this
.
creatorID
=
creatorID
;
}
public
String
getProjectInfo
()
{
return
projectInfo
;
}
public
void
setProjectInfo
(
String
projectInfo
)
{
this
.
projectInfo
=
projectInfo
;
}
public
Integer
getImportType
()
{
return
importType
;
}
public
void
setImportType
(
Integer
importType
)
{
this
.
importType
=
importType
;
}
public
Integer
getServiceType
()
{
return
serviceType
;
}
public
void
setServiceType
(
Integer
serviceType
)
{
this
.
serviceType
=
serviceType
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vat/ClearTableDto.java
0 → 100644
View file @
39048226
package
pwc
.
taxtech
.
atms
.
dto
.
vat
;
import
java.util.List
;
public
class
ClearTableDto
{
private
List
<
Integer
>
periods
;
public
List
<
Integer
>
getPeriods
()
{
return
periods
;
}
public
void
setPeriods
(
List
<
Integer
>
periods
)
{
this
.
periods
=
periods
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vat/CompanyBalanceDto.java
0 → 100644
View file @
39048226
package
pwc
.
taxtech
.
atms
.
dto
.
vat
;
public
class
CompanyBalanceDto
{
private
String
balanceId
;
private
Integer
periodId
;
private
String
acctCode
;
private
String
customerCode
;
private
Integer
begDebitBal
;
private
Integer
begCreditBal
;
private
Integer
begBal
;
private
Integer
endBal
;
private
Integer
endDebitBal
;
private
Integer
endCreditBal
;
private
Integer
debitBal
;
private
Integer
creditBal
;
private
Integer
monthId
;
public
String
getBalanceId
()
{
return
balanceId
;
}
public
void
setBalanceId
(
String
balanceId
)
{
this
.
balanceId
=
balanceId
;
}
public
Integer
getPeriodId
()
{
return
periodId
;
}
public
void
setPeriodId
(
Integer
periodId
)
{
this
.
periodId
=
periodId
;
}
public
String
getAcctCode
()
{
return
acctCode
;
}
public
void
setAcctCode
(
String
acctCode
)
{
this
.
acctCode
=
acctCode
;
}
public
String
getCustomerCode
()
{
return
customerCode
;
}
public
void
setCustomerCode
(
String
customerCode
)
{
this
.
customerCode
=
customerCode
;
}
public
Integer
getBegDebitBal
()
{
return
begDebitBal
;
}
public
void
setBegDebitBal
(
Integer
begDebitBal
)
{
this
.
begDebitBal
=
begDebitBal
;
}
public
Integer
getBegCreditBal
()
{
return
begCreditBal
;
}
public
void
setBegCreditBal
(
Integer
begCreditBal
)
{
this
.
begCreditBal
=
begCreditBal
;
}
public
Integer
getBegBal
()
{
return
begBal
;
}
public
void
setBegBal
(
Integer
begBal
)
{
this
.
begBal
=
begBal
;
}
public
Integer
getEndBal
()
{
return
endBal
;
}
public
void
setEndBal
(
Integer
endBal
)
{
this
.
endBal
=
endBal
;
}
public
Integer
getEndDebitBal
()
{
return
endDebitBal
;
}
public
void
setEndDebitBal
(
Integer
endDebitBal
)
{
this
.
endDebitBal
=
endDebitBal
;
}
public
Integer
getEndCreditBal
()
{
return
endCreditBal
;
}
public
void
setEndCreditBal
(
Integer
endCreditBal
)
{
this
.
endCreditBal
=
endCreditBal
;
}
public
Integer
getDebitBal
()
{
return
debitBal
;
}
public
void
setDebitBal
(
Integer
debitBal
)
{
this
.
debitBal
=
debitBal
;
}
public
Integer
getCreditBal
()
{
return
creditBal
;
}
public
void
setCreditBal
(
Integer
creditBal
)
{
this
.
creditBal
=
creditBal
;
}
public
Integer
getMonthId
()
{
return
monthId
;
}
public
void
setMonthId
(
Integer
monthId
)
{
this
.
monthId
=
monthId
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vat/ImportBalanceDto.java
0 → 100644
View file @
39048226
package
pwc
.
taxtech
.
atms
.
dto
.
vat
;
import
java.util.List
;
public
class
ImportBalanceDto
{
private
List
<
CompanyBalanceDto
>
balanceList
;
private
Integer
importType
;
private
Integer
serviceTypeId
;
private
List
<
Integer
>
periods
;
public
List
<
CompanyBalanceDto
>
getBalanceList
()
{
return
balanceList
;
}
public
void
setBalanceList
(
List
<
CompanyBalanceDto
>
balanceList
)
{
this
.
balanceList
=
balanceList
;
}
public
Integer
getImportType
()
{
return
importType
;
}
public
void
setImportType
(
Integer
importType
)
{
this
.
importType
=
importType
;
}
public
Integer
getServiceTypeId
()
{
return
serviceTypeId
;
}
public
void
setServiceTypeId
(
Integer
serviceTypeId
)
{
this
.
serviceTypeId
=
serviceTypeId
;
}
public
List
<
Integer
>
getPeriods
()
{
return
periods
;
}
public
void
setPeriods
(
List
<
Integer
>
periods
)
{
this
.
periods
=
periods
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vat/QueryImportType.java
0 → 100644
View file @
39048226
package
pwc
.
taxtech
.
atms
.
dto
.
vat
;
import
java.util.List
;
public
class
QueryImportType
{
private
Integer
serviceTypeId
;
private
List
<
Integer
>
periods
;
private
String
projectId
;
private
Integer
importTypeId
;
public
Integer
getServiceTypeId
()
{
return
serviceTypeId
;
}
public
void
setServiceTypeId
(
Integer
serviceTypeId
)
{
this
.
serviceTypeId
=
serviceTypeId
;
}
public
List
<
Integer
>
getPeriods
()
{
return
periods
;
}
public
void
setPeriods
(
List
<
Integer
>
periods
)
{
this
.
periods
=
periods
;
}
public
String
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
String
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Integer
getImportTypeId
()
{
return
importTypeId
;
}
public
void
setImportTypeId
(
Integer
importTypeId
)
{
this
.
importTypeId
=
importTypeId
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/DataImportService.java
0 → 100644
View file @
39048226
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.vat.CompanyBalanceDto
;
import
java.util.List
;
public
interface
DataImportService
{
OperationResultDto
importTrialBalance
(
List
<
CompanyBalanceDto
>
balanceList
,
Integer
importType
,
Integer
serviceTypeId
,
String
id
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/ICitTBDataImportService.java
0 → 100644
View file @
39048226
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
java.util.List
;
public
interface
ICitTBDataImportService
{
OperationResultDto
<
Boolean
>
clearTableByPeriods
(
List
<
Integer
>
periods
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/ProjectInfoService.java
View file @
39048226
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.taxadmin.PeriodInfoDto
;
import
java.util.List
;
public
interface
ProjectInfoService
{
OperationResultDto
<
Boolean
>
isProjectImportedData
(
String
projectId
,
Integer
serviceType
,
Integer
importTypeId
);
OperationResultDto
<
Boolean
>
isProjectImportedData
(
String
projectId
,
Integer
importTypeId
);
OperationResultDto
<
List
<
PeriodInfoDto
>>
getProjectImportType
(
String
projectId
,
List
<
Integer
>
periods
,
Integer
serviceTypeId
,
String
id
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectInfoServiceImpl.java
View file @
39048226
...
...
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.dao.PeriodInfoMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.taxadmin.PeriodInfoDto
;
import
pwc.taxtech.atms.entitiy.PeriodInfo
;
import
pwc.taxtech.atms.entitiy.PeriodInfoExample
;
import
pwc.taxtech.atms.service.ProjectInfoService
;
...
...
@@ -46,4 +47,9 @@ public class ProjectInfoServiceImpl implements ProjectInfoService {
public
OperationResultDto
<
Boolean
>
isProjectImportedData
(
String
projectId
,
Integer
importTypeId
)
{
return
isProjectImportedData
(
projectId
,
importTypeId
);
}
@Override
public
OperationResultDto
<
List
<
PeriodInfoDto
>>
getProjectImportType
(
String
projectId
,
List
<
Integer
>
periods
,
Integer
serviceTypeId
,
String
id
)
{
return
null
;
}
}
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