Commit 225e4abf authored by frank.xa.zhang's avatar frank.xa.zhang

add parameter for some method

parent bdddb3a5
...@@ -37,7 +37,10 @@ public class ReportController { ...@@ -37,7 +37,10 @@ public class ReportController {
} }
@RequestMapping(value = "updateConfig/{projectId}/{ifDeleteManualDataSource}/{period}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @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); return reportService.updateConfig(projectId, period, ifDeleteManualDataSource, generator);
// OperationResultDto operationResultDto = new OperationResultDto(); // OperationResultDto operationResultDto = new OperationResultDto();
// operationResultDto.setResult(true); // operationResultDto.setResult(true);
...@@ -90,12 +93,12 @@ public class ReportController { ...@@ -90,12 +93,12 @@ public class ReportController {
} }
@RequestMapping(value = "getCellAccountRange/{reportTemplateId}/{period}/{rowIndex}/{columnIndex}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @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; String projectId = StringUtils.EMPTY;
if (StringUtils.isNotBlank(from) && from.split("@").length > 0) { if (StringUtils.isNotBlank(from) && from.split("@").length > 0) {
projectId = from.split("@")[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) @RequestMapping(value = "addCellManualData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......
...@@ -157,7 +157,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi ...@@ -157,7 +157,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
// dataSourceMapper.clearDataSourceWithPeriod(period); // dataSourceMapper.clearDataSourceWithPeriod(period);
// dataSourceMapper.clearCellDataWithPeriod(strExceptTemplateIds, period); // dataSourceMapper.clearCellDataWithPeriod(strExceptTemplateIds, period);
// dataSourceMapper.clearReportWithPeriod(period); // dataSourceMapper.clearReportWithPeriod(period);
periodDataSourceMapper.clearDataWithPeriod(strExceptTemplateIds, period); periodDataSourceMapper.clearDataWithPeriod(strExceptTemplateIds, period,projectId);
// 根据templategroupid 把 template 插入到 periodTemplate // 根据templategroupid 把 template 插入到 periodTemplate
TemplateExample example = new TemplateExample(); TemplateExample example = new TemplateExample();
example.createCriteria().andTemplateGroupIdEqualTo(templateGroupId); example.createCriteria().andTemplateGroupIdEqualTo(templateGroupId);
......
...@@ -130,7 +130,7 @@ public interface PeriodDataSourceMapper extends MyVatMapper { ...@@ -130,7 +130,7 @@ public interface PeriodDataSourceMapper extends MyVatMapper {
void clearReportWithPeriod(Integer period); 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); List<DataSourceExtendDto> getFormulaDataSource(Long reportID);
......
...@@ -119,78 +119,109 @@ ...@@ -119,78 +119,109 @@
</delete> </delete>
<delete id="clearDataWithPeriod"> <delete id="clearDataWithPeriod">
DELETE FROM DELETE
FROM
PERIOD_FORMULA_BLOCK PERIOD_FORMULA_BLOCK
WHERE WHERE
PERIOD= #{period,jdbcType=INTEGER} ; PERIOD = #{period,jdbcType=INTEGER}
DELETE FROM AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
PERIOD_TAX_RULE_SETTING PERIOD_TAX_RULE_SETTING
WHERE WHERE
PERIOD= #{period,jdbcType=INTEGER} ; PERIOD = #{period,jdbcType=INTEGER}
DELETE FROM AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
PERIOD_CELL_TEMPLATE PERIOD_CELL_TEMPLATE
WHERE WHERE
PERIOD= #{period,jdbcType=INTEGER} PERIOD = #{period,jdbcType=INTEGER}
AND REPORT_TEMPLATE_ID NOT IN ( AND REPORT_TEMPLATE_ID NOT IN (${exceptReportTemplateIDs})
${exceptReportTemplateIDs} AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
)
; DELETE
DELETE FROM FROM
PERIOD_CELL_TEMPLATE_CONFIG PERIOD_CELL_TEMPLATE_CONFIG
WHERE WHERE
PERIOD= #{period,jdbcType=INTEGER} PERIOD = #{period,jdbcType=INTEGER}
AND REPORT_TEMPLATE_ID NOT IN ( AND REPORT_TEMPLATE_ID NOT IN (${exceptReportTemplateIDs})
${exceptReportTemplateIDs} AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
)
; DELETE
DELETE FROM FROM
PERIOD_TEMPLATE PERIOD_TEMPLATE
WHERE WHERE
PERIOD= #{period,jdbcType=INTEGER} PERIOD = #{period,jdbcType=INTEGER}
AND TEMPLATE_ID NOT IN ( AND TEMPLATE_ID NOT IN (${exceptReportTemplateIDs})
${exceptReportTemplateIDs} AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
)
; DELETE
DELETE FROM FROM
PERIOD_TAX_PAYER_REPORT_RULE PERIOD_TAX_PAYER_REPORT_RULE
WHERE WHERE
PERIOD= #{period,jdbcType=INTEGER} ; PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE DELETE
D FROM FROM
DATA_SOURCE_DETAIL D PERIOD_DATA_SOURCE_DETAIL D
JOIN
DATA_SOURCE F
ON
D.DATA_SOURCE_ID = F.ID
WHERE 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 DELETE
D FROM FROM
CELL_DATA_SOURCE D Period_CELL_DATA_SOURCE D
JOIN
DATA_SOURCE F
ON
D.DATA_SOURCE_ID = F.ID
WHERE 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 DELETE
D FROM FROM
DATA_SOURCE D period_DATA_SOURCE D
WHERE WHERE
D.PERIOD = #{period,jdbcType=INTEGER} ; D .PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE DELETE
C FROM FROM
CELL_DATA C period_CELL_DATA C
JOIN
REPORT R
ON
C.REPORT_ID=R.ID
WHERE WHERE
R.PERIOD = #{period,jdbcType=INTEGER} ; REPORT_ID IN (
DELETE FROM SELECT
REPORT report_id
FROM
PERIOD_CELL_DATA E
JOIN period_REPORT R ON E .REPORT_ID = R. ID
WHERE WHERE
PERIOD= #{period,jdbcType=INTEGER} ; R.PERIOD = #{period,jdbcType=INTEGER}
)
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
DELETE
FROM
period_REPORT
WHERE
PERIOD = #{period,jdbcType=INTEGER}
AND PROJECT_ID = #{projectId,jdbcType=NVARCHAR};
</delete> </delete>
<resultMap id="DataSourceExtendDtoMap" type="pwc.taxtech.atms.vat.dpo.DataSourceExtendDto"> <resultMap id="DataSourceExtendDtoMap" type="pwc.taxtech.atms.vat.dpo.DataSourceExtendDto">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment