导入功能

This commit is contained in:
钱涛 2024-12-25 16:42:27 +08:00
parent 18bd6509db
commit 5b241cda49
1 changed files with 11 additions and 8 deletions

View File

@ -1503,18 +1503,21 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
}
eligibleData.forEach(po -> {
//列表转为属性数据
po.handleList();
//清除旧数据
OtherDeductionPO otherDeductionPO = getOtherDeductionMapper().getByTaxAgentIdAndEmployeeId(po.getTaxAgentId(), po.getEmployeeId());
getOtherDeductionMapper().delete(otherDeductionPO);
getFreeIncomeMapper().deleteByMainId(otherDeductionPO.getId());
getHealthInsuranceMapper().deleteByMainId(otherDeductionPO.getId());
getEndowmentInsuranceMapper().deleteByMainId(otherDeductionPO.getId());
getGrantDonationMapper().deleteByMainId(otherDeductionPO.getId());
getDerateDeductionMapper().deleteByMainId(otherDeductionPO.getId());
getOtherDerateDeductionMapper().deleteByMainId(otherDeductionPO.getId());
getPersonalPensionMapper().deleteByMainId(otherDeductionPO.getId());
if(otherDeductionPO != null){
getOtherDeductionMapper().delete(otherDeductionPO);
getFreeIncomeMapper().deleteByMainId(otherDeductionPO.getId());
getHealthInsuranceMapper().deleteByMainId(otherDeductionPO.getId());
getEndowmentInsuranceMapper().deleteByMainId(otherDeductionPO.getId());
getGrantDonationMapper().deleteByMainId(otherDeductionPO.getId());
getDerateDeductionMapper().deleteByMainId(otherDeductionPO.getId());
getOtherDerateDeductionMapper().deleteByMainId(otherDeductionPO.getId());
getPersonalPensionMapper().deleteByMainId(otherDeductionPO.getId());
}
//更新主表
getOtherDeductionMapper().insertIgnoreNull(po);