2022-03-10 17:57:46 +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.OtherDeductionBiz;
|
2022-03-10 17:57:46 +08:00
|
|
|
import com.engine.salary.cmd.datacollection.*;
|
2022-04-11 20:17:47 +08:00
|
|
|
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
|
|
|
|
|
import com.engine.salary.exception.SalaryRunTimeException;
|
2022-03-10 17:57:46 +08:00
|
|
|
import com.engine.salary.service.OtherDeductionService;
|
2022-04-11 20:17:47 +08:00
|
|
|
import com.engine.salary.util.SalaryDateUtil;
|
|
|
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
2022-03-10 17:57:46 +08:00
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
|
2022-04-11 20:17:47 +08:00
|
|
|
import java.time.YearMonth;
|
|
|
|
|
import java.util.List;
|
2022-03-10 17:57:46 +08:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
public class OtherDeductionServiceImpl extends Service implements OtherDeductionService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
|
|
|
|
return commandExecutor.execute(new OtherDeductionGetSearchConditionCmd(params, user));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> list(Map<String, Object> params) {
|
|
|
|
|
return commandExecutor.execute(new OtherDeductionListCmd(params, user));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> preview(Map<String, Object> params) {
|
|
|
|
|
return commandExecutor.execute(new OtherDeductionPreviewCmd(params, user));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> importData(Map<String, Object> params) {
|
|
|
|
|
return commandExecutor.execute(new OtherDeductionImportCmd(params, user));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public XSSFWorkbook export(Map<String, Object> params) {
|
|
|
|
|
return commandExecutor.execute(new OtherDeductionExportCmd(params, user));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public XSSFWorkbook exportDetail(Map<String, Object> params) {
|
|
|
|
|
return commandExecutor.execute(new OtherDeductionExportDetailCmd(params, user));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, Object> getDetailList(Map<String, Object> params) {
|
|
|
|
|
return commandExecutor.execute(new OtherDeductionGetDetailListCmd(params, user));
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-11 20:17:47 +08:00
|
|
|
@Override
|
|
|
|
|
public List<OtherDeductionPO> getOtherDeductionList(YearMonth declareMonth, List<Long> employeeIds) {
|
|
|
|
|
if (declareMonth == null) {
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100342, "参数有误:申报月份必传"));
|
|
|
|
|
}
|
|
|
|
|
OtherDeductionBiz OtherDeductionBiz = new OtherDeductionBiz();
|
|
|
|
|
return OtherDeductionBiz.listSome(OtherDeductionPO.builder().declareMonth(SalaryDateUtil.toDateStartOfMonth(declareMonth)).employeeIds(employeeIds).build());
|
|
|
|
|
}
|
2022-03-10 17:57:46 +08:00
|
|
|
}
|