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 {
@Resource
private CashFlowMapper cashFlowMapper;
@Resource
private CashFlowFinalMapper cashFlowFinalMapper;
@Resource
private BalanceSheetMapper balanceSheetMapper;
@Resource
private BalanceSheetPrcMapper balanceSheetPrcMapper;
......@@ -301,7 +303,14 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setCreateTime(new Date());
result.setCreateBy(getCurrentOperatorName(id));
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) {
......@@ -325,7 +334,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("start to insert balanceSheetFinal ");
// 1、写入最终表
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) {
balanceSheetFinalMapper.deleteByExample(balanceSheetExample);
}
......@@ -354,7 +363,7 @@ public class EbsApiServiceImpl implements EbsApiService {
// 1、写入最终表
logger.debug("start to insert BalanceSheetPrcFinal ");
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) {
balanceSheetPrcFinalMapper.deleteByExample(balanceSheetPrcExample);
}
......@@ -382,7 +391,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("start to insert profitLossStatementFinal ");
// 1、写入最终表
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) {
profitLossStatementFinalMapper.deleteByExample(profitLossStatementExample);
}
......@@ -410,7 +419,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger.debug("start to insert profitLossStatementPrcFinal ");
// 1、写入最终表
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) {
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