50 lines
1.8 KiB
Java
50 lines
1.8 KiB
Java
|
|
package com.engine.salary.service.impl;
|
||
|
|
|
||
|
|
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||
|
|
import com.engine.common.util.ServiceUtil;
|
||
|
|
import com.engine.core.impl.Service;
|
||
|
|
import com.engine.salary.entity.siaccount.param.InspectAccountParam;
|
||
|
|
import com.engine.salary.exception.SalaryRunTimeException;
|
||
|
|
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
|
||
|
|
import com.engine.salary.service.SIAccountService;
|
||
|
|
import com.engine.salary.service.SIBalanceService;
|
||
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
||
|
|
import com.google.common.collect.Lists;
|
||
|
|
import org.apache.commons.collections4.CollectionUtils;
|
||
|
|
import weaver.hrm.User;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @Author: sy
|
||
|
|
* @Description: 福利台账-补差实现类
|
||
|
|
* @Date: 2022/12/8
|
||
|
|
**/
|
||
|
|
public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
||
|
|
|
||
|
|
private InsuranceAccountDetailMapper getInsuranceAccountDetailMapper() {
|
||
|
|
return SqlProxyHandle.getProxy(InsuranceAccountDetailMapper.class);
|
||
|
|
}
|
||
|
|
|
||
|
|
private SIAccountService getSIAccountService(User user) {
|
||
|
|
return ServiceUtil.getService(SIAccountServiceImpl.class, user);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public void del(InspectAccountParam param, Long employeeId) {
|
||
|
|
|
||
|
|
//入参判断
|
||
|
|
if (CollectionUtils.isEmpty(param.getIds()) || param.getPaymentOrganization() == null || param.getBillMonth() == null) {
|
||
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
|
||
|
|
}
|
||
|
|
|
||
|
|
//根据id删除
|
||
|
|
List<List<Long>> partition = Lists.partition((List<Long>) param.getIds(), 100);
|
||
|
|
partition.forEach(getInsuranceAccountDetailMapper()::batchDelAccountDetailsByIds);
|
||
|
|
|
||
|
|
//刷新bill_batch表中统计信息
|
||
|
|
getSIAccountService(user).refreshBillBatch(param.getPaymentOrganization(), param.getBillMonth());
|
||
|
|
}
|
||
|
|
}
|