From 5b241cda493856ca01bdcd353f850ef93fc96ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Wed, 25 Dec 2024 16:42:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OtherDeductionServiceImpl.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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);