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
225e4abf
Commit
225e4abf
authored
Oct 08, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add parameter for some method
parent
bdddb3a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
62 deletions
+96
-62
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+6
-3
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+1
-1
PeriodDataSourceMapper.java
...java/pwc/taxtech/atms/vat/dao/PeriodDataSourceMapper.java
+1
-1
PeriodDataSourceExtendsMapper.xml
...ch/atms/vat/dao/extends/PeriodDataSourceExtendsMapper.xml
+88
-57
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
225e4abf
...
...
@@ -37,7 +37,10 @@ public class ReportController {
}
@RequestMapping
(
value
=
"updateConfig/{projectId}/{ifDeleteManualDataSource}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
updateConfig
(
@PathVariable
String
projectId
,
@PathVariable
Boolean
ifDeleteManualDataSource
,
@PathVariable
Integer
period
,
@RequestParam
String
generator
)
{
public
OperationResultDto
updateConfig
(
@PathVariable
String
projectId
,
@PathVariable
Boolean
ifDeleteManualDataSource
,
@PathVariable
Integer
period
,
@RequestParam
String
generator
)
{
return
reportService
.
updateConfig
(
projectId
,
period
,
ifDeleteManualDataSource
,
generator
);
// OperationResultDto operationResultDto = new OperationResultDto();
// operationResultDto.setResult(true);
...
...
@@ -90,12 +93,12 @@ public class ReportController {
}
@RequestMapping
(
value
=
"getCellAccountRange/{reportTemplateId}/{period}/{rowIndex}/{columnIndex}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
List
<
VatEnterpriseAccountResultDto
>>
getCellAccountRange
(
@PathVariable
Long
reportTemplateId
,
@PathVariable
Integer
period
,
@PathVariable
int
rowIndex
,
@PathVariable
int
columnIndex
,
@RequestHeader
String
from
)
{
public
OperationResultDto
<
List
<
VatEnterpriseAccountResultDto
>>
getCellAccountRange
(
@PathVariable
Long
reportTemplateId
,
@PathVariable
Integer
period
,
@PathVariable
int
rowIndex
,
@PathVariable
int
columnIndex
,
@RequestHeader
String
from
)
{
String
projectId
=
StringUtils
.
EMPTY
;
if
(
StringUtils
.
isNotBlank
(
from
)
&&
from
.
split
(
"@"
).
length
>
0
)
{
projectId
=
from
.
split
(
"@"
)[
0
];
}
return
reportService
.
getCellAccountRange
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
,
projectId
);
return
reportService
.
getCellAccountRange
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
,
projectId
);
}
@RequestMapping
(
value
=
"addCellManualData"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
225e4abf
...
...
@@ -157,7 +157,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
// dataSourceMapper.clearDataSourceWithPeriod(period);
// dataSourceMapper.clearCellDataWithPeriod(strExceptTemplateIds, period);
// dataSourceMapper.clearReportWithPeriod(period);
periodDataSourceMapper
.
clearDataWithPeriod
(
strExceptTemplateIds
,
period
);
periodDataSourceMapper
.
clearDataWithPeriod
(
strExceptTemplateIds
,
period
,
projectId
);
// 根据templategroupid 把 template 插入到 periodTemplate
TemplateExample
example
=
new
TemplateExample
();
example
.
createCriteria
().
andTemplateGroupIdEqualTo
(
templateGroupId
);
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodDataSourceMapper.java
View file @
225e4abf
...
...
@@ -130,7 +130,7 @@ public interface PeriodDataSourceMapper extends MyVatMapper {
void
clearReportWithPeriod
(
Integer
period
);
void
clearDataWithPeriod
(
@Param
(
"exceptReportTemplateIDs"
)
String
exceptReportTemplateIDs
,
@Param
(
"period"
)
Integer
period
);
void
clearDataWithPeriod
(
@Param
(
"exceptReportTemplateIDs"
)
String
exceptReportTemplateIDs
,
@Param
(
"period"
)
Integer
period
,
@Param
(
"projectId"
)
String
projectId
);
List
<
DataSourceExtendDto
>
getFormulaDataSource
(
Long
reportID
);
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodDataSourceExtendsMapper.xml
View file @
225e4abf
...
...
@@ -119,78 +119,109 @@
</delete>
<delete
id=
"clearDataWithPeriod"
>
DELETE FROM
PERIOD_FORMULA_BLOCK
DELETE
FROM
PERIOD_FORMULA_BLOCK
WHERE
PERIOD= #{period,jdbcType=INTEGER} ;
DELETE FROM
PERIOD_TAX_RULE_SETTING
PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
PERIOD_TAX_RULE_SETTING
WHERE
PERIOD= #{period,jdbcType=INTEGER} ;
DELETE FROM
PERIOD_CELL_TEMPLATE
PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
PERIOD_CELL_TEMPLATE
WHERE
PERIOD
= #{period,jdbcType=INTEGER}
AND REPORT_TEMPLATE_ID NOT IN (
${exceptReportTemplateIDs}
)
;
DELETE
FROM
PERIOD_CELL_TEMPLATE_CONFIG
PERIOD
= #{period,jdbcType=INTEGER}
AND REPORT_TEMPLATE_ID NOT IN (
${exceptReportTemplateIDs})
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
PERIOD_CELL_TEMPLATE_CONFIG
WHERE
PERIOD
= #{period,jdbcType=INTEGER}
AND REPORT_TEMPLATE_ID NOT IN (
${exceptReportTemplateIDs}
)
;
DELETE
FROM
PERIOD_TEMPLATE
PERIOD
= #{period,jdbcType=INTEGER}
AND REPORT_TEMPLATE_ID NOT IN (
${exceptReportTemplateIDs})
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
PERIOD_TEMPLATE
WHERE
PERIOD
= #{period,jdbcType=INTEGER}
AND TEMPLATE_ID NOT IN (
${exceptReportTemplateIDs}
)
;
DELETE
FROM
PERIOD_TAX_PAYER_REPORT_RULE
PERIOD
= #{period,jdbcType=INTEGER}
AND TEMPLATE_ID NOT IN (
${exceptReportTemplateIDs})
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
PERIOD_TAX_PAYER_REPORT_RULE
WHERE
PERIOD= #{period,jdbcType=INTEGER} ;
PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
D FROM
DATA_SOURCE_DETAIL D
JOIN
DATA_SOURCE F
ON
D.DATA_SOURCE_ID = F.ID
FROM
PERIOD_DATA_SOURCE_DETAIL D
WHERE
F.PERIOD = #{period,jdbcType=INTEGER} ;
D .DATA_SOURCE_ID IN (
SELECT
DATA_SOURCE_ID
FROM
PERIOD_DATA_SOURCE_DETAIL E
JOIN Period_DATA_SOURCE F ON E .DATA_SOURCE_ID = F. ID
WHERE
F.PERIOD = #{period,jdbcType=INTEGER}
)
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
D FROM
CELL_DATA_SOURCE D
JOIN
DATA_SOURCE F
ON
D.DATA_SOURCE_ID = F.ID
FROM
Period_CELL_DATA_SOURCE D
WHERE
F.PERIOD = #{period,jdbcType=INTEGER} ;
D .DATA_SOURCE_ID IN (
SELECT
DATA_SOURCE_ID
FROM
Period_CELL_DATA_SOURCE E
JOIN period_DATA_SOURCE F ON E .DATA_SOURCE_ID = F. ID
WHERE
F.PERIOD = #{period,jdbcType=INTEGER}
)
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
D
FROM
DATA_SOURCE D
FROM
period_
DATA_SOURCE D
WHERE
D.PERIOD = #{period,jdbcType=INTEGER} ;
D .PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
C FROM
CELL_DATA C
JOIN
REPORT R
ON
C.REPORT_ID=R.ID
FROM
period_CELL_DATA C
WHERE
R.PERIOD = #{period,jdbcType=INTEGER} ;
DELETE FROM
REPORT
REPORT_ID IN (
SELECT
report_id
FROM
PERIOD_CELL_DATA E
JOIN period_REPORT R ON E .REPORT_ID = R. ID
WHERE
R.PERIOD = #{period,jdbcType=INTEGER}
)
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
period_REPORT
WHERE
PERIOD= #{period,jdbcType=INTEGER} ;
PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
</delete>
<resultMap
id=
"DataSourceExtendDtoMap"
type=
"pwc.taxtech.atms.vat.dpo.DataSourceExtendDto"
>
...
...
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