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
d4ce6f59
Commit
d4ce6f59
authored
Sep 29, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] fixed period template project id
parent
d244664d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
11 deletions
+18
-11
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+9
-3
ReportService.java
...main/java/pwc/taxtech/atms/vat/service/ReportService.java
+1
-1
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-1
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+7
-3
FormulaHelper.java
...atms/vat/service/impl/report/functions/FormulaHelper.java
+0
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
d4ce6f59
...
...
@@ -2,7 +2,13 @@ package pwc.taxtech.atms.controller;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.constant.enums.EnumServiceType
;
import
pwc.taxtech.atms.dpo.ReportDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
...
...
@@ -48,13 +54,13 @@ public class ReportController {
}
@RequestMapping
(
value
=
"reportData/{reportId}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
ReportDataDto
>
getReportData
(
@PathVariable
Long
reportId
)
{
public
OperationResultDto
<
ReportDataDto
>
getReportData
(
@PathVariable
Long
reportId
,
@RequestHeader
String
from
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
if
(
reportId
==
null
||
reportId
==
0L
)
{
resultDto
.
setResult
(
false
);
return
resultDto
;
}
return
reportService
.
getCellData
(
reportId
);
return
reportService
.
getCellData
(
reportId
,
from
);
}
@RequestMapping
(
value
=
"report/{templateId}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/ReportService.java
View file @
d4ce6f59
...
...
@@ -24,7 +24,7 @@ public interface ReportService {
List
<
CellTemplateReferenceDto
>
getTemplateReferences
(
int
period
);
OperationResultDto
<
ReportDataDto
>
getCellData
(
Long
reportId
);
OperationResultDto
<
ReportDataDto
>
getCellData
(
Long
reportId
,
String
porjectId
);
OperationResultDto
<
ReportDto
>
getReportByTemplate
(
Long
templateId
,
Integer
period
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
d4ce6f59
...
...
@@ -70,7 +70,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
().
andIdIn
(
templateIds
);
periodTemplateExample
.
createCriteria
().
and
ProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
).
and
IdIn
(
templateIds
);
List
<
PeriodTemplate
>
periodTemplateList
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample
);
List
<
Long
>
periodTemplateIdList
=
periodTemplateList
.
stream
()
.
map
(
PeriodTemplate:
:
getTemplateId
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
d4ce6f59
...
...
@@ -367,13 +367,16 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
()
.
andTemplateGroupIdEqualTo
(
templateGroupId
.
get
())
.
andProjectIdEqualTo
(
projectId
)
.
andPeriodEqualTo
(
period
)
.
andIsActiveAssociationEqualTo
(
true
)
.
andReportTypeEqualTo
(
reportType
);
templateIds
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample
).
stream
().
map
(
PeriodTemplate:
:
getId
).
collect
(
Collectors
.
toList
());
}
else
{
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
().
andTemplateGroupIdEqualTo
(
templateGroupId
.
get
()).
andPeriodEqualTo
(
period
).
andIsActiveAssociationEqualTo
(
true
);
periodTemplateExample
.
createCriteria
().
andTemplateGroupIdEqualTo
(
templateGroupId
.
get
())
.
andProjectIdEqualTo
(
projectId
)
.
andPeriodEqualTo
(
period
).
andIsActiveAssociationEqualTo
(
true
);
templateIds
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample
).
stream
().
map
(
PeriodTemplate:
:
getId
).
collect
(
Collectors
.
toList
());
}
...
...
@@ -396,7 +399,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
@Override
public
OperationResultDto
<
ReportDataDto
>
getCellData
(
Long
reportId
)
{
public
OperationResultDto
<
ReportDataDto
>
getCellData
(
Long
reportId
,
String
projectId
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
ReportDataDto
dataDto
=
new
ReportDataDto
();
try
{
...
...
@@ -408,7 +411,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
PeriodTemplateExample
example
=
new
PeriodTemplateExample
();
example
.
createCriteria
().
andTemplateIdEqualTo
(
report
.
getTemplateId
()).
andPeriodEqualTo
(
report
.
getPeriod
());
example
.
createCriteria
().
and
ProjectIdEqualTo
(
projectId
).
and
TemplateIdEqualTo
(
report
.
getTemplateId
()).
andPeriodEqualTo
(
report
.
getPeriod
());
Optional
<
PeriodTemplate
>
reportTemplate
=
periodTemplateMapper
.
selectByExample
(
example
).
stream
().
findFirst
();
if
(!
reportTemplate
.
isPresent
())
{
resultDto
.
setResult
(
false
);
...
...
@@ -425,6 +428,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
()
.
andProjectIdEqualTo
(
projectId
)
.
andTemplateGroupIdEqualTo
(
reportTemplate
.
get
().
getTemplateGroupId
())
.
andPeriodEqualTo
(
report
.
getPeriod
())
.
andIsActiveAssociationEqualTo
(
true
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FormulaHelper.java
View file @
d4ce6f59
...
...
@@ -2,12 +2,9 @@ package pwc.taxtech.atms.vat.service.impl.report.functions;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigResultType
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplate
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplateExample
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
FormulaHelper
{
...
...
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