diff --git a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java index 2ee1aa37a..8a4d9e364 100644 --- a/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java +++ b/src/com/engine/salary/service/impl/OtherDeductionServiceImpl.java @@ -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);