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-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;
|
|
|
|
|
|
import com.engine.salary.exception.SalaryRunTimeException;
|
2022-03-03 13:50:03 +08:00
|
|
|
|
import com.engine.salary.service.AddUpDeductionService;
|
2022-04-11 20:17:47 +08:00
|
|
|
|
import com.engine.salary.util.SalaryDateUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
2022-03-10 11:09:08 +08:00
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
2022-03-03 13:50:03 +08:00
|
|
|
|
|
2022-04-11 20:17:47 +08:00
|
|
|
|
import java.time.YearMonth;
|
|
|
|
|
|
import java.util.List;
|
2022-03-03 13:50:03 +08:00
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
public class AddUpDeductionServiceImpl extends Service implements AddUpDeductionService {
|
|
|
|
|
|
|
|
|
|
|
|
@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-03-07 15:08:56 +08:00
|
|
|
|
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) {
|
|
|
|
|
|
return commandExecutor.execute(new AddUpDeductionExportDetailCmd(params, user));
|
|
|
|
|
|
}
|
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-03-03 13:50:03 +08:00
|
|
|
|
}
|