Commit 2b17e796 authored by Ken you's avatar Ken you

add delete origin data ---Ken

parent fc03f870
...@@ -250,12 +250,9 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -250,12 +250,9 @@ public class EbsApiServiceImpl implements EbsApiService {
TrialBalance result = new TrialBalance(); TrialBalance result = new TrialBalance();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete TrialBalance EntityCode:{},Period:{}", item.getSegment1(), item.getPeriod()); logger.debug("exit and delete TrialBalance EntityCode:{},Period:{}", item.getSegment1(), item.getPeriod());
// result = itemList.get(0);
// populateFieldsTB(item, result);
// result.setId(itemList.get(0).getId());
trialBalanceMapper.deleteByExample(example); trialBalanceMapper.deleteByExample(example);
} else { }
logger.debug("exit and update TrialBalance EntityCode:{},Period:{}", item.getSegment1(), item.getPeriod()); logger.debug("insert TrialBalance EntityCode:{},Period:{}", item.getSegment1(), item.getPeriod());
populateFieldsTB(item, result); populateFieldsTB(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateBy(""); result.setCreateBy("");
...@@ -263,7 +260,6 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -263,7 +260,6 @@ public class EbsApiServiceImpl implements EbsApiService {
result.setCreateTime(new Date()); result.setCreateTime(new Date());
trialBalanceMapper.insertSelective(result); trialBalanceMapper.insertSelective(result);
} }
}
private void processCF(CashFlowQueryDto item) { private void processCF(CashFlowQueryDto item) {
CashFlowExample example = new CashFlowExample(); CashFlowExample example = new CashFlowExample();
...@@ -276,19 +272,15 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -276,19 +272,15 @@ public class EbsApiServiceImpl implements EbsApiService {
CashFlow result = new CashFlow(); CashFlow result = new CashFlow();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete CashFlow EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("exit and delete CashFlow EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
// result = itemList.get(0);
// populateFieldsCF(item, result);
// result.setId(itemList.get(0).getId());
cashFlowMapper.deleteByExample(example); cashFlowMapper.deleteByExample(example);
} else { }
logger.debug("exit and update CashFlow EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("insert CashFlow EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
populateFieldsCF(item, result); populateFieldsCF(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy("");
cashFlowMapper.insertSelective(result); cashFlowMapper.insertSelective(result);
} }
}
private void processBS(BalanceSheetQueryDto item) { private void processBS(BalanceSheetQueryDto item) {
BalanceSheetExample example = new BalanceSheetExample(); BalanceSheetExample example = new BalanceSheetExample();
...@@ -301,19 +293,15 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -301,19 +293,15 @@ public class EbsApiServiceImpl implements EbsApiService {
BalanceSheet result = new BalanceSheet(); BalanceSheet result = new BalanceSheet();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete BalanceSheet EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("exit and delete BalanceSheet EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
// result = itemList.get(0);
// populateFieldsBS(item, result);
// result.setId(itemList.get(0).getId());
balanceSheetMapper.deleteByExample(example); balanceSheetMapper.deleteByExample(example);
} else { }
logger.debug("exit and update BalanceSheet EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("insert BalanceSheet EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
populateFieldsBS(item, result); populateFieldsBS(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateBy(""); result.setCreateBy("");
result.setCreateTime(new Date()); result.setCreateTime(new Date());
balanceSheetMapper.insertSelective(result); balanceSheetMapper.insertSelective(result);
} }
}
private void processBSprc(BalanceSheetPrcQueryDto item) { private void processBSprc(BalanceSheetPrcQueryDto item) {
...@@ -327,19 +315,15 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -327,19 +315,15 @@ public class EbsApiServiceImpl implements EbsApiService {
BalanceSheet result = new BalanceSheet(); BalanceSheet result = new BalanceSheet();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("exit and delete BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
// result = itemList.get(0);
// populateFieldsBSprc(item, result);
// result.setId(itemList.get(0).getId());
balanceSheetMapper.updateByPrimaryKey(result); balanceSheetMapper.updateByPrimaryKey(result);
} else { }
logger.debug("exit and update BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("insert BalanceSheetPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
populateFieldsBSprc(item, result); populateFieldsBSprc(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateBy(""); result.setCreateBy("");
result.setCreateTime(new Date()); result.setCreateTime(new Date());
balanceSheetMapper.insertSelective(result); balanceSheetMapper.insertSelective(result);
} }
}
private void processPL(ProfitLossStatementQueryDto item) { private void processPL(ProfitLossStatementQueryDto item) {
ProfitLossStatementExample example = new ProfitLossStatementExample(); ProfitLossStatementExample example = new ProfitLossStatementExample();
...@@ -352,19 +336,15 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -352,19 +336,15 @@ public class EbsApiServiceImpl implements EbsApiService {
ProfitLossStatement result = new ProfitLossStatement(); ProfitLossStatement result = new ProfitLossStatement();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete ProfitLossStatement EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("exit and delete ProfitLossStatement EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
// result = itemList.get(0);
// populateFieldsPLS(item, result);
// result.setId(itemList.get(0).getId());
profitLossStatementMapper.deleteByExample(example); profitLossStatementMapper.deleteByExample(example);
} else { }
logger.debug("exit and update ProfitLossStatement EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("insert ProfitLossStatement EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
populateFieldsPLS(item, result); populateFieldsPLS(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy("");
profitLossStatementMapper.insertSelective(result); profitLossStatementMapper.insertSelective(result);
} }
}
private void processPLprc(ProfitLossStatementPrcQueryDto item) { private void processPLprc(ProfitLossStatementPrcQueryDto item) {
ProfitLossStatementExample example = new ProfitLossStatementExample(); ProfitLossStatementExample example = new ProfitLossStatementExample();
...@@ -377,19 +357,15 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -377,19 +357,15 @@ public class EbsApiServiceImpl implements EbsApiService {
ProfitLossStatement result = new ProfitLossStatement(); ProfitLossStatement result = new ProfitLossStatement();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete ProfitLossStatementPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("exit and delete ProfitLossStatementPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
// result = itemList.get(0);
// populateFieldsPLSprc(item, result);
// result.setId(itemList.get(0).getId());
profitLossStatementMapper.deleteByExample(example); profitLossStatementMapper.deleteByExample(example);
} else { }
logger.debug("exit and update ProfitLossStatementPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod()); logger.debug("insert ProfitLossStatementPrc EntityCode:{},Period:{}", item.getEntityCode(), item.getPeriod());
populateFieldsPLSprc(item, result); populateFieldsPLSprc(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy("");
profitLossStatementMapper.insertSelective(result); profitLossStatementMapper.insertSelective(result);
} }
}
private void processOAR(OrganizationAccountingRateQueryDto item) { private void processOAR(OrganizationAccountingRateQueryDto item) {
OrganizationAccountingRateExample example = new OrganizationAccountingRateExample(); OrganizationAccountingRateExample example = new OrganizationAccountingRateExample();
...@@ -403,19 +379,15 @@ public class EbsApiServiceImpl implements EbsApiService { ...@@ -403,19 +379,15 @@ public class EbsApiServiceImpl implements EbsApiService {
OrganizationAccountingRate result = new OrganizationAccountingRate(); OrganizationAccountingRate result = new OrganizationAccountingRate();
if (itemList.size() >0) { if (itemList.size() >0) {
logger.debug("exit and delete OrganizationAccountingRate Period:{}", item.getPeriod()); logger.debug("exit and delete OrganizationAccountingRate Period:{}", item.getPeriod());
// result = itemList.get(0);
// populateFieldsOAR(item, result);
// result.setId(itemList.get(0).getId());
organizationAccountingRateMapper.deleteByExample(example); organizationAccountingRateMapper.deleteByExample(example);
} else { }
logger.debug("exit and update OrganizationAccountingRate Period:{}", item.getPeriod()); logger.debug("insert OrganizationAccountingRate Period:{}", item.getPeriod());
populateFieldsOAR(item, result); populateFieldsOAR(item, result);
result.setId(distributedIdService.nextId()); result.setId(distributedIdService.nextId());
result.setCreateTime(new Date()); result.setCreateTime(new Date());
result.setCreateBy(""); result.setCreateBy("");
organizationAccountingRateMapper.insertSelective(result); organizationAccountingRateMapper.insertSelective(result);
} }
}
private void populateFieldsJE(JournalEntryQueryDto item, JournalEntry result) { private void populateFieldsJE(JournalEntryQueryDto item, JournalEntry result) {
......
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