Commit fd6d1a79 authored by Ken you's avatar Ken you

add cashFlowfInal ebs synchronization date ---Ken

parent 72e50540
...@@ -35,6 +35,8 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -35,6 +35,8 @@ public class EbsApiServiceImpl implements EbsApiService {
@Resource @Resource
private CashFlowMapper cashFlowMapper; private CashFlowMapper cashFlowMapper;
@Resource @Resource
private CashFlowFinalMapper cashFlowFinalMapper;
@Resource
private BalanceSheetMapper balanceSheetMapper; private BalanceSheetMapper balanceSheetMapper;
@Resource @Resource
private BalanceSheetPrcMapper balanceSheetPrcMapper; private BalanceSheetPrcMapper balanceSheetPrcMapper;
...@@ -301,7 +303,14 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -301,7 +303,14 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(getCurrentOperatorName(id)); result.setCreateBy(getCurrentOperatorName(id));
cashFlowMapper.insertSelective(result); cashFlowMapper.insertSelective(result);
logger.debug("start to insert cashFlowFinal ");
// 1、写入最终表
CashFlowExample cashFlowExample = new CashFlowExample();
cashFlowExample.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId());
if (cashFlowFinalMapper.countByExample(cashFlowExample) > 0) {
cashFlowFinalMapper.deleteByExample(cashFlowExample);
}
cashFlowFinalMapper.insertSelective(result);
} }
private void processBS(Long id,BalanceSheetQueryDto item) { private void processBS(Long id,BalanceSheetQueryDto item) {
...@@ -325,7 +334,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -325,7 +334,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("start to insert balanceSheetFinal "); logger.debug("start to insert balanceSheetFinal ");
// 1、写入最终表 // 1、写入最终表
BalanceSheetExample balanceSheetExample = new BalanceSheetExample(); BalanceSheetExample balanceSheetExample = new BalanceSheetExample();
balanceSheetExample.createCriteria().andOrganizationIdEqualTo(result.getOrganizationId()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId()); balanceSheetExample.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId());
if (balanceSheetFinalMapper.countByExample(balanceSheetExample) > 0) { if (balanceSheetFinalMapper.countByExample(balanceSheetExample) > 0) {
balanceSheetFinalMapper.deleteByExample(balanceSheetExample); balanceSheetFinalMapper.deleteByExample(balanceSheetExample);
} }
...@@ -354,7 +363,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -354,7 +363,7 @@ public class EbsApiServiceImpl implements EbsApiService {
// 1、写入最终表 // 1、写入最终表
logger.debug("start to insert BalanceSheetPrcFinal "); logger.debug("start to insert BalanceSheetPrcFinal ");
BalanceSheetPrcExample balanceSheetPrcExample = new BalanceSheetPrcExample(); BalanceSheetPrcExample balanceSheetPrcExample = new BalanceSheetPrcExample();
balanceSheetPrcExample.createCriteria().andOrganizationIdEqualTo(result.getOrganizationId()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId()); balanceSheetPrcExample.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId());
if (balanceSheetPrcFinalMapper.countByExample(balanceSheetPrcExample) > 0) { if (balanceSheetPrcFinalMapper.countByExample(balanceSheetPrcExample) > 0) {
balanceSheetPrcFinalMapper.deleteByExample(balanceSheetPrcExample); balanceSheetPrcFinalMapper.deleteByExample(balanceSheetPrcExample);
} }
...@@ -382,7 +391,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -382,7 +391,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("start to insert profitLossStatementFinal "); logger.debug("start to insert profitLossStatementFinal ");
// 1、写入最终表 // 1、写入最终表
ProfitLossStatementExample profitLossStatementExample = new ProfitLossStatementExample(); ProfitLossStatementExample profitLossStatementExample = new ProfitLossStatementExample();
profitLossStatementExample.createCriteria().andOrganizationIdEqualTo(result.getOrganizationId()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId()); profitLossStatementExample.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId());
if (profitLossStatementFinalMapper.countByExample(profitLossStatementExample) > 0) { if (profitLossStatementFinalMapper.countByExample(profitLossStatementExample) > 0) {
profitLossStatementFinalMapper.deleteByExample(profitLossStatementExample); profitLossStatementFinalMapper.deleteByExample(profitLossStatementExample);
} }
...@@ -410,7 +419,7 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -410,7 +419,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("start to insert profitLossStatementPrcFinal "); logger.debug("start to insert profitLossStatementPrcFinal ");
// 1、写入最终表 // 1、写入最终表
ProfitLossStatementPrcExample profitLossStatementPrcExample = new ProfitLossStatementPrcExample(); ProfitLossStatementPrcExample profitLossStatementPrcExample = new ProfitLossStatementPrcExample();
profitLossStatementPrcExample.createCriteria().andOrganizationIdEqualTo(result.getOrganizationId()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId()); profitLossStatementPrcExample.createCriteria().andEntityCodeEqualTo(item.getEntityCode()).andPeriodEqualTo(result.getPeriod()).andTaskIdNotEqualTo(item.getTaskId());
if (profitLossStatementPrcFinalMapper.countByExample(profitLossStatementPrcExample) > 0) { if (profitLossStatementPrcFinalMapper.countByExample(profitLossStatementPrcExample) > 0) {
profitLossStatementPrcFinalMapper.deleteByExample(profitLossStatementPrcExample); profitLossStatementPrcFinalMapper.deleteByExample(profitLossStatementPrcExample);
} }
......
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