2022-03-03 13:50:03 +08:00
|
|
|
|
package com.engine.salary.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.engine.core.impl.Service;
|
2022-04-11 20:17:47 +08:00
|
|
|
|
import com.engine.salary.biz.AddUpDeductionBiz;
|
2022-05-09 14:11:07 +08:00
|
|
|
|
import com.engine.salary.biz.EmployBiz;
|
2022-03-08 15:40:26 +08:00
|
|
|
|
import com.engine.salary.cmd.datacollection.*;
|
2022-04-11 20:17:47 +08:00
|
|
|
|
import com.engine.salary.entity.datacollection.AddUpDeduction;
|
2022-05-09 14:11:07 +08:00
|
|
|
|
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
2022-04-28 17:44:26 +08:00
|
|
|
|
import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
|
|
|
|
|
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
2022-05-24 15:20:12 +08:00
|
|
|
|
import com.engine.salary.entity.taxagent.bo.TaxAgentBO;
|
|
|
|
|
|
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO;
|
|
|
|
|
|
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
2022-04-11 20:17:47 +08:00
|
|
|
|
import com.engine.salary.exception.SalaryRunTimeException;
|
2022-04-28 17:44:26 +08:00
|
|
|
|
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
|
2022-05-24 15:20:12 +08:00
|
|
|
|
import com.engine.salary.service.*;
|
2022-04-11 20:17:47 +08:00
|
|
|
|
import com.engine.salary.util.SalaryDateUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
2022-04-28 17:44:26 +08:00
|
|
|
|
import com.engine.salary.util.db.MapperProxyFactory;
|
|
|
|
|
|
import com.engine.salary.util.excel.ExcelComment;
|
|
|
|
|
|
import com.engine.salary.util.excel.ExcelUtil;
|
2022-05-24 15:20:12 +08:00
|
|
|
|
import com.engine.salary.util.page.PageInfo;
|
|
|
|
|
|
import com.engine.salary.util.page.PageUtil;
|
2022-04-28 17:44:26 +08:00
|
|
|
|
import com.google.common.collect.Lists;
|
2022-05-09 14:11:07 +08:00
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
2022-05-24 15:20:12 +08:00
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
2022-03-10 11:09:08 +08:00
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
2022-05-20 14:41:42 +08:00
|
|
|
|
import weaver.general.Util;
|
2022-03-03 13:50:03 +08:00
|
|
|
|
|
2022-04-11 20:17:47 +08:00
|
|
|
|
import java.time.YearMonth;
|
2022-05-09 14:11:07 +08:00
|
|
|
|
import java.util.*;
|
2022-04-28 17:44:26 +08:00
|
|
|
|
import java.util.stream.Collectors;
|
2022-03-03 13:50:03 +08:00
|
|
|
|
|
|
|
|
|
|
public class AddUpDeductionServiceImpl extends Service implements AddUpDeductionService {
|
|
|
|
|
|
|
2022-04-28 17:44:26 +08:00
|
|
|
|
private AddUpDeductionMapper getAddUpDeductionMapper() {
|
|
|
|
|
|
return MapperProxyFactory.getProxy(AddUpDeductionMapper.class);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-05-24 15:20:12 +08:00
|
|
|
|
private TaxAgentV2Service taxAgentService;
|
|
|
|
|
|
private SalaryAcctRecordService salaryAcctRecordService;
|
|
|
|
|
|
private SalaryAcctEmployeeService salaryAcctEmployeeService;
|
|
|
|
|
|
private SalaryEmployeeService salaryEmployeeService;
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-03 13:50:03 +08:00
|
|
|
|
@Override
|
|
|
|
|
|
public Map<String, Object> list(Map<String, Object> params) {
|
2022-03-07 15:08:56 +08:00
|
|
|
|
return commandExecutor.execute(new AddUpDeductionListCmd(params, user));
|
2022-03-03 13:50:03 +08:00
|
|
|
|
}
|
2022-03-04 10:10:38 +08:00
|
|
|
|
|
|
|
|
|
|
@Override
|
2022-03-10 11:09:08 +08:00
|
|
|
|
public XSSFWorkbook export(Map<String, Object> params) {
|
2022-05-09 14:11:07 +08:00
|
|
|
|
AddUpDeductionQueryParam addUpDeductionQueryParam = (AddUpDeductionQueryParam) params.get("addUpDeductionQueryParam");
|
|
|
|
|
|
|
|
|
|
|
|
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
|
|
|
|
|
XSSFWorkbook workbook = addUpDeductionBiz.export(addUpDeductionQueryParam);
|
|
|
|
|
|
|
|
|
|
|
|
return workbook;
|
|
|
|
|
|
// return commandExecutor.execute(new AddUpDeductionExportCmd(params, user));
|
2022-03-04 10:10:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
2022-03-07 15:08:56 +08:00
|
|
|
|
return commandExecutor.execute(new AddUpDeductionGetSearchConditionCmd(params, user));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Map<String, Object> importAddUpDeduction(Map<String, Object> params) {
|
|
|
|
|
|
return commandExecutor.execute(new AddUpDeductionImportCmd(params, user));
|
2022-03-04 10:10:38 +08:00
|
|
|
|
}
|
2022-03-08 15:40:26 +08:00
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Map<String, Object> getDetailList(Map<String, Object> params) {
|
|
|
|
|
|
return commandExecutor.execute(new AddUpDeductionGetDetailListCmd(params, user));
|
|
|
|
|
|
}
|
2022-03-09 16:40:14 +08:00
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Map<String, Object> preview(Map<String, Object> params) {
|
|
|
|
|
|
return commandExecutor.execute(new AddUpDeductionPreviewCmd(params, user));
|
|
|
|
|
|
}
|
2022-03-10 11:09:08 +08:00
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public XSSFWorkbook exportDetail(Map<String, Object> params) {
|
2022-05-09 14:11:07 +08:00
|
|
|
|
AddUpDeductionQueryParam queryParam = (AddUpDeductionQueryParam) params.get("addUpDeductionQueryParam");
|
|
|
|
|
|
EmployBiz employBiz = new EmployBiz();
|
|
|
|
|
|
AddUpDeductionBiz biz = new AddUpDeductionBiz();
|
|
|
|
|
|
|
|
|
|
|
|
Long id = queryParam.getAccumulatedSpecialAdditionalDeductionId();
|
|
|
|
|
|
if (id == null) {
|
|
|
|
|
|
throw new SalaryRunTimeException("id不能为空");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AddUpDeduction po = biz.getById(id);
|
|
|
|
|
|
if (po == null) {
|
2022-05-24 15:20:12 +08:00
|
|
|
|
throw new SalaryRunTimeException(String.format("累计专项附加扣除不存在" + "[id:%s]", id));
|
2022-05-09 14:11:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
|
|
|
|
|
if (CollectionUtils.isEmpty(employeeList)) {
|
|
|
|
|
|
throw new SalaryRunTimeException("员工信息不存在");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//查询参数
|
|
|
|
|
|
queryParam.setEmployeeId(po.getEmployeeId());
|
|
|
|
|
|
//申报月份
|
|
|
|
|
|
List<String> declareMonth = queryParam.getDeclareMonth();
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(declareMonth)) {
|
|
|
|
|
|
queryParam.setDeclareMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
XSSFWorkbook workbook = biz.exportDetail(queryParam);
|
|
|
|
|
|
|
|
|
|
|
|
return workbook;
|
|
|
|
|
|
// return commandExecutor.execute(new AddUpDeductionExportDetailCmd(params, user));
|
2022-03-10 11:09:08 +08:00
|
|
|
|
}
|
2022-04-11 20:17:47 +08:00
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<AddUpDeduction> getAddUpDeductionList(YearMonth declareMonth, List<Long> employeeIds) {
|
|
|
|
|
|
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
|
|
|
|
|
if (declareMonth == null) {
|
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:申报月份、租户key必传"));
|
|
|
|
|
|
}
|
|
|
|
|
|
return addUpDeductionBiz.listSome(AddUpDeduction.builder().declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).build());
|
|
|
|
|
|
}
|
2022-04-28 17:44:26 +08:00
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public XSSFWorkbook downloadTemplate(AddUpDeductionQueryParam queryParam) {
|
|
|
|
|
|
|
|
|
|
|
|
String sheetName = SalaryI18nUtil.getI18nLabel(101603, "累计专项附加扣除导入模板");
|
|
|
|
|
|
String[] header = {
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(85429, "姓名"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86185, "部门"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86317, "工号"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86318, "证件号码"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86319, "入职日期"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86321, "累计子女教育"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86323, "累计继续教育"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86324, "累计住房贷款利息"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86325, "累计住房租金"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(86326, "累计赡养老人"),
|
2022-05-20 14:41:42 +08:00
|
|
|
|
SalaryI18nUtil.getI18nLabel(105142, "累计大病医疗"),
|
|
|
|
|
|
SalaryI18nUtil.getI18nLabel(105142, "累计婴幼儿照护")
|
2022-04-28 17:44:26 +08:00
|
|
|
|
};
|
|
|
|
|
|
List<Object> headerList = Arrays.asList(header);
|
|
|
|
|
|
// 2.表头
|
|
|
|
|
|
if (queryParam.getDeclareMonth() != null) {
|
|
|
|
|
|
queryParam.setDeclareMonth(queryParam.getDeclareMonth().stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
|
|
|
|
|
}
|
|
|
|
|
|
// 获取累计专项附加扣除
|
|
|
|
|
|
List<AddUpDeductionDTO> list = getAddUpDeductionMapper().list(queryParam);
|
|
|
|
|
|
// 人员信息赋值
|
|
|
|
|
|
list.forEach(m -> {
|
|
|
|
|
|
// todo 身份证号
|
|
|
|
|
|
m.setIdNo("");
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
List<List<Object>> rows = new ArrayList<>();
|
|
|
|
|
|
rows.add(headerList);
|
|
|
|
|
|
for (AddUpDeductionDTO dto : list) {
|
|
|
|
|
|
List<Object> row = new ArrayList<>();
|
2022-05-20 14:41:42 +08:00
|
|
|
|
row.add(Util.null2String(dto.getUsername()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getTaxAgentName()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getDepartmentName()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getMobile()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getJobNum()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getIdNo()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getHiredate()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getAddUpChildEducation()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getAddUpContinuingEducation()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getAddUpHousingLoanInterest()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getAddUpHousingRent()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getAddUpSupportElderly()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getAddUpIllnessMedical()));
|
|
|
|
|
|
row.add(Util.null2String(dto.getAddUpInfantCare()));
|
2022-04-28 17:44:26 +08:00
|
|
|
|
rows.add(row);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 4.注释
|
|
|
|
|
|
List<ExcelComment> excelComments = Lists.newArrayList();
|
|
|
|
|
|
excelComments.add(new ExcelComment(0, 0, 3, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
|
|
|
|
|
|
excelComments.add(new ExcelComment(1, 0, 4, 2, SalaryI18nUtil.getI18nLabel(100344, "必填")));
|
|
|
|
|
|
excelComments.add(new ExcelComment(7, 0, 10, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
|
|
|
|
|
excelComments.add(new ExcelComment(8, 0, 11, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
|
|
|
|
|
excelComments.add(new ExcelComment(9, 0, 12, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
|
|
|
|
|
excelComments.add(new ExcelComment(10, 0, 13, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
|
|
|
|
|
excelComments.add(new ExcelComment(11, 0, 14, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
|
|
|
|
|
excelComments.add(new ExcelComment(12, 0, 15, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
2022-05-20 14:41:42 +08:00
|
|
|
|
excelComments.add(new ExcelComment(13, 0, 16, 2, SalaryI18nUtil.getI18nLabel(100344, "输入数字")));
|
2022-04-28 17:44:26 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XSSFWorkbook book = ExcelUtil.genWorkbookV2(rows, sheetName, excelComments);
|
|
|
|
|
|
|
|
|
|
|
|
return book;
|
|
|
|
|
|
}
|
2022-05-24 15:20:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public AddUpDeduction getById(Long id) {
|
|
|
|
|
|
return getAddUpDeductionMapper().getById(id);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// /**
|
|
|
|
|
|
// * 获取作为修改者的最新记录
|
|
|
|
|
|
// * 说明:以人员id和个税口角义务人id去重
|
|
|
|
|
|
// *
|
|
|
|
|
|
// * @param currentEmployeeId
|
|
|
|
|
|
// * @return
|
|
|
|
|
|
// */
|
|
|
|
|
|
// private List<AddUpDeduction> getLastListByModifier(Long currentEmployeeId) {
|
|
|
|
|
|
// List<AddUpDeductionPO> list = new LambdaQueryChainWrapper<>(getAddUpDeductionMapper())
|
|
|
|
|
|
// .eq(AddUpDeductionPO::getDeleteType, 0)
|
|
|
|
|
|
// .eq(AddUpDeductionPO::getTenantKey)
|
|
|
|
|
|
// .eq(AddUpDeductionPO::getModifier, currentEmployeeId)
|
|
|
|
|
|
// .orderByDesc(AddUpDeductionPO::getDeclareMonth)
|
|
|
|
|
|
// .list();
|
|
|
|
|
|
// return list.stream()
|
|
|
|
|
|
// .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getEmployeeId() + "-" + f.getTaxAgentId()))), ArrayList::new));
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public PageInfo<AddUpDeductionDTO> listPage(AddUpDeductionQueryParam queryParam, Long employeeId) {
|
|
|
|
|
|
PageInfo<AddUpDeductionDTO> dtoPage = PageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize());
|
|
|
|
|
|
|
|
|
|
|
|
// 未开启分权或是薪酬模块总管理员
|
|
|
|
|
|
if (!taxAgentService.isOpenDevolution() || taxAgentService.isChief(employeeId)) {
|
|
|
|
|
|
PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
|
|
|
|
|
List<AddUpDeductionDTO> list = getAddUpDeductionMapper().list(queryParam);
|
|
|
|
|
|
return new PageInfo<>(list, AddUpDeductionDTO.class);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
List<TaxAgentEmployeeDTO> taxAgentEmployees = taxAgentService.listTaxAgentAndEmployee(employeeId);
|
|
|
|
|
|
List<Long> taxAgentIdsAsAdmin = taxAgentService.listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
|
|
|
|
|
// List<AddUpDeductionPO> lastList = getLastListByModifier(employeeId);
|
|
|
|
|
|
List<AddUpDeductionDTO> list = getAddUpDeductionMapper().list(queryParam);
|
|
|
|
|
|
list = list.stream().filter(f ->
|
|
|
|
|
|
// 作为管理员
|
|
|
|
|
|
taxAgentIdsAsAdmin.contains(f.getTaxAgentId())
|
|
|
|
|
|
// 作为分管理员
|
|
|
|
|
|
|| TaxAgentBO.checkTaxAgentAndEmployee(taxAgentEmployees, f.getTaxAgentId(), f.getEmployeeId())
|
|
|
|
|
|
// 自己最后修改过的,则可以看到最新和其历史
|
|
|
|
|
|
// || lastList.stream().anyMatch(l -> l.getEmployeeId().equals(f.getEmployeeId()) && l.getTaxAgentId().equals(f.getTaxAgentId()) && !l.getDeclareMonth().isBefore(f.getDeclareMonth()))
|
|
|
|
|
|
).collect(Collectors.toList());
|
|
|
|
|
|
// 填充总数和当页数据
|
|
|
|
|
|
// 分页参数
|
|
|
|
|
|
dtoPage.setTotal(list.size());
|
|
|
|
|
|
dtoPage.setRecords(SalaryPageUtil.subList((int) dtoPage.getCurrent(), (int) dtoPage.getSize(), list));
|
|
|
|
|
|
page = dtoPage;
|
|
|
|
|
|
}
|
|
|
|
|
|
return page;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public Page<AddUpDeductionRecordDTO> recordListPage(Page<AddUpDeductionRecordDTO> page, AddUpDeductionQueryParam queryParam, Long employeeId, String tenantKey) {
|
|
|
|
|
|
// 未开启分权或是薪酬模块总管理员
|
|
|
|
|
|
if (!taxAgentService.isOpenDevolution(tenantKey) || taxAgentService.isChief(employeeId, tenantKey)) {
|
|
|
|
|
|
getAddUpDeductionMapper().recordList(page, queryParam, tenantKey);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
List<TaxAgentEmployeeDTO> taxAgentEmployees = taxAgentService.listTaxAgentAndEmployee(employeeId, tenantKey);
|
|
|
|
|
|
List<Long> taxAgentIdsAsAdmin = taxAgentService.listAllTaxAgentsAsAdmin(employeeId, tenantKey).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
|
|
|
|
|
List<AddUpDeductionPO> lastList = getLastListByModifier(employeeId, tenantKey);
|
|
|
|
|
|
List<AddUpDeductionRecordDTO> list = getAddUpDeductionMapper().recordList(queryParam, tenantKey);
|
|
|
|
|
|
// 分页参数
|
|
|
|
|
|
Page<AddUpDeductionRecordDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize());
|
|
|
|
|
|
list = list.stream().filter(f ->
|
|
|
|
|
|
// 作为管理员
|
|
|
|
|
|
taxAgentIdsAsAdmin.contains(f.getTaxAgentId())
|
|
|
|
|
|
// 作为分管理员
|
|
|
|
|
|
|| TaxAgentBO.checkTaxAgentAndEmployee(taxAgentEmployees, f.getTaxAgentId(), f.getEmployeeId())
|
|
|
|
|
|
// 自己最后修改过的,则可以看到最新和其历史
|
|
|
|
|
|
|| lastList.stream().anyMatch(l -> l.getEmployeeId().equals(f.getEmployeeId()) && l.getTaxAgentId().equals(f.getTaxAgentId()) && !l.getDeclareMonth().isBefore(f.getDeclareMonth()))
|
|
|
|
|
|
).collect(Collectors.toList());
|
|
|
|
|
|
// 填充总数和当页数据
|
|
|
|
|
|
dtoPage.setTotal(list.size());
|
|
|
|
|
|
dtoPage.setRecords(SalaryPageUtil.subList((int) dtoPage.getCurrent(), (int) dtoPage.getSize(), list));
|
|
|
|
|
|
page = dtoPage;
|
|
|
|
|
|
}
|
|
|
|
|
|
return page;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public List<AddUpDeductionPO> getAddUpDeductionList(YearMonth declareMonth, List<Long> employeeIds, String tenantKey) {
|
|
|
|
|
|
if (declareMonth == null || StringUtils.isEmpty(tenantKey)) {
|
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(tenantKey, UserContext.getCurrentEmployeeId(), 100342, "参数有误:申报月份、租户key必传"));
|
|
|
|
|
|
}
|
|
|
|
|
|
return new LambdaQueryChainWrapper<>(getAddUpDeductionMapper())
|
|
|
|
|
|
.eq(AddUpDeductionPO::getDeleteType, 0)
|
|
|
|
|
|
.eq(AddUpDeductionPO::getTenantKey, tenantKey)
|
|
|
|
|
|
.eq(AddUpDeductionPO::getDeclareMonth, declareMonth.atDay(1))
|
|
|
|
|
|
.in(CollectionUtils.isNotEmpty(employeeIds), AddUpDeductionPO::getEmployeeId, employeeIds).list();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-03 13:50:03 +08:00
|
|
|
|
}
|