薪酬系统-福利台账,补缴页新增补缴数据时,校验数据库中是否已有该组信息的补缴数据
This commit is contained in:
parent
86ba593d1f
commit
eb033d64fd
|
|
@ -904,6 +904,11 @@ public class SIAccountBiz extends Service {
|
|||
//核算结果集
|
||||
List<InsuranceAccountDetailPO> pos = new ArrayList<>();
|
||||
baseList.forEach(baseParam -> {
|
||||
//判断人员id+账单月份+补缴月份在表中的唯一性
|
||||
List<InsuranceAccountDetailPO> supplementList = getInsuranceAccountDetailMapper().querySupplementList(baseParam.getBillMonth(), baseParam.getPaymentOrganization(), baseParam.getEmployeeId(), baseParam.getSupplementaryMonth());
|
||||
if (supplementList.size() > 0) {
|
||||
throw new SalaryRunTimeException("当前人员和账单月份已存在该补缴月份的数据!无法再次创建!");
|
||||
}
|
||||
InsuranceAccountDetailPO insuranceAccountDetailPO = accountSingleEmployeeBill(baseParam, longInsuranceArchivesAccountPOMap.get(baseParam.getEmployeeId()), employeeId);
|
||||
pos.add(insuranceAccountDetailPO);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -72,6 +72,16 @@ public interface InsuranceAccountDetailMapper {
|
|||
|
||||
List<InsuranceAccountDetailPO> queryList(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization, @Param("employeeIds") Collection<Long> employeeIds);
|
||||
|
||||
/**
|
||||
* 查询补缴数据
|
||||
* @param billMonth
|
||||
* @param paymentOrganization
|
||||
* @param employeeId
|
||||
* @param supplementaryMonth
|
||||
* @return
|
||||
*/
|
||||
List<InsuranceAccountDetailPO> querySupplementList(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization, @Param("employeeId") Long employeeId, @Param("supplementaryMonth") String supplementaryMonth);
|
||||
|
||||
|
||||
/**
|
||||
* 根据账单月份删除
|
||||
|
|
|
|||
|
|
@ -188,6 +188,21 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="querySupplementList" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
t.employee_id,t.social_per_json,t.social_com_json,
|
||||
t.fund_per_json,t.fund_com_json,t.other_per_json,
|
||||
t.other_com_json,t.social_per_sum,t.social_com_sum,
|
||||
t.fund_per_sum,t.fund_com_sum,t.other_per_sum,
|
||||
t.other_com_sum,t.per_sum,t.com_sum
|
||||
FROM
|
||||
hrsa_bill_detail t
|
||||
WHERE t.delete_type = 0
|
||||
AND t.bill_month = #{billMonth}
|
||||
AND t.payment_organization = #{paymentOrganization}
|
||||
AND t.employee_id = #{employeeId}
|
||||
AND t.supplementary_month = #{supplementaryMonth}
|
||||
</select>
|
||||
|
||||
<select id="selectAccountIds" resultType="java.lang.Long">
|
||||
SELECT DISTINCT a.ID
|
||||
|
|
|
|||
Loading…
Reference in New Issue