63 lines
2.4 KiB
Java
63 lines
2.4 KiB
Java
package com.engine.salary.service.impl;
|
||
|
||
import com.engine.core.impl.Service;
|
||
import com.engine.salary.biz.AddUpDeductionBiz;
|
||
import com.engine.salary.cmd.datacollection.*;
|
||
import com.engine.salary.entity.datacollection.AddUpDeduction;
|
||
import com.engine.salary.exception.SalaryRunTimeException;
|
||
import com.engine.salary.service.AddUpDeductionService;
|
||
import com.engine.salary.util.SalaryDateUtil;
|
||
import com.engine.salary.util.SalaryI18nUtil;
|
||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||
|
||
import java.time.YearMonth;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
public class AddUpDeductionServiceImpl extends Service implements AddUpDeductionService {
|
||
|
||
@Override
|
||
public Map<String, Object> list(Map<String, Object> params) {
|
||
return commandExecutor.execute(new AddUpDeductionListCmd(params, user));
|
||
}
|
||
|
||
@Override
|
||
public XSSFWorkbook export(Map<String, Object> params) {
|
||
return commandExecutor.execute(new AddUpDeductionExportCmd(params, user));
|
||
}
|
||
|
||
@Override
|
||
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
||
return commandExecutor.execute(new AddUpDeductionGetSearchConditionCmd(params, user));
|
||
}
|
||
|
||
@Override
|
||
public Map<String, Object> importAddUpDeduction(Map<String, Object> params) {
|
||
return commandExecutor.execute(new AddUpDeductionImportCmd(params, user));
|
||
}
|
||
|
||
@Override
|
||
public Map<String, Object> getDetailList(Map<String, Object> params) {
|
||
return commandExecutor.execute(new AddUpDeductionGetDetailListCmd(params, user));
|
||
}
|
||
|
||
@Override
|
||
public Map<String, Object> preview(Map<String, Object> params) {
|
||
return commandExecutor.execute(new AddUpDeductionPreviewCmd(params, user));
|
||
}
|
||
|
||
@Override
|
||
public XSSFWorkbook exportDetail(Map<String, Object> params) {
|
||
return commandExecutor.execute(new AddUpDeductionExportDetailCmd(params, user));
|
||
}
|
||
|
||
@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());
|
||
}
|
||
}
|