From d3d2074aedeef0a632cbf162a0cfb1e4761ec5df Mon Sep 17 00:00:00 2001 From: sy Date: Wed, 30 Nov 2022 15:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E5=9C=A8=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E6=9C=88=E6=95=B0=E6=8D=AE=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=A4=BE=E4=BF=9D=E8=B0=83=E5=B7=AE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A2=AB=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIAccountBiz.java | 7 +++++++ .../siaccount/InsuranceCompensationMapper.java | 4 +++- .../mapper/siaccount/InsuranceCompensationMapper.xml | 12 ++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java index 52b76d7dc..5e8c8a054 100644 --- a/src/com/engine/salary/biz/SIAccountBiz.java +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -109,6 +109,10 @@ public class SIAccountBiz extends Service { return ServiceUtil.getService(SalarySysConfServiceImpl.class, user); } + private InsuranceCompensationMapper getInsuranceCompensationMapper() { + return MapperProxyFactory.getProxy(InsuranceCompensationMapper.class); + } + public PageInfo listPage(InsuranceAccountBatchParam queryParam) { SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); List list = getInsuranceAccountBatchMapper().list(queryParam); @@ -903,6 +907,9 @@ public class SIAccountBiz extends Service { // } getInsuranceAccountBatchMapper().deleteById(insuranceAccountBatchPO.getId()); getInsuranceAccountDetailMapper().batchDeleteNotFile(param.getBillMonth(), param.getPaymentOrganization()); + + //删除账单月份+个税扣缴义务人下的调差数据 + getInsuranceCompensationMapper().deleteByBillMonthAndPayOrg(param.getBillMonth(), param.getPaymentOrganization()); // LoggerContext insuranceSchemeContext = new LoggerContext(); // insuranceSchemeContext.setTargetId(String.valueOf(insuranceAccountBatchPO.getId())); // insuranceSchemeContext.setTargetName(insuranceAccountBatchPO.getBillMonth()); diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.java b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.java index fe0caa3f3..b407bdf50 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.java +++ b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.java @@ -14,9 +14,11 @@ public interface InsuranceCompensationMapper { InsuranceCompensationPO getById(Long id); - List queryByBillMonthAndPayOrg(String billMonth, Long paymentOrganization); + List queryByBillMonthAndPayOrg(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization); InsuranceCompensationPO getOneByBillMonthPayOrgEmpId(InsuranceCompensationPO insuranceCompensationPO); void deleteById(Long id); + + void deleteByBillMonthAndPayOrg(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization); } diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.xml index 8cdd6992f..1b87e7579 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceCompensationMapper.xml @@ -201,7 +201,7 @@ WHERE t.id = #{id} AND t.delete_type = 0 - SELECT FROM hrsa_compensation_log t @@ -225,6 +225,14 @@ UPDATE hrsa_compensation_log SET delete_type = 1 WHERE id = #{id} - AND delete_type = 0 + AND delete_type = 0 + + + + UPDATE hrsa_compensation_log + SET delete_type = 1 + WHERE bill_month = #{billMonth} + AND payment_organization = #{paymentOrganization} + AND delete_type = 0 \ No newline at end of file