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