薪酬系统-福利台账,在社保核算月数据删除时,社保调差数据被删除

This commit is contained in:
sy 2022-11-30 15:55:23 +08:00
parent 4d01c324e0
commit d3d2074aed
3 changed files with 20 additions and 3 deletions

View File

@ -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<InsuranceAccountBatchPO> listPage(InsuranceAccountBatchParam queryParam) {
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<InsuranceAccountBatchPO> 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());

View File

@ -14,9 +14,11 @@ public interface InsuranceCompensationMapper {
InsuranceCompensationPO getById(Long id);
List<InsuranceCompensationPO> queryByBillMonthAndPayOrg(String billMonth, Long paymentOrganization);
List<InsuranceCompensationPO> 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);
}

View File

@ -201,7 +201,7 @@
WHERE t.id = #{id} AND t.delete_type = 0
</select>
<select id="queryByBillMonthAndPayOrg" resultMap="BaseResultMap" parameterType="Long">
<select id="queryByBillMonthAndPayOrg" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
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
</delete>
<delete id="deleteByBillMonthAndPayOrg">
UPDATE hrsa_compensation_log
SET delete_type = 1
WHERE bill_month = #{billMonth}
AND payment_organization = #{paymentOrganization}
AND delete_type = 0
</delete>
</mapper>