package com.engine.salary.service.impl; import com.engine.core.impl.Service; import com.engine.salary.biz.OtherDeductionBiz; import com.engine.salary.cmd.datacollection.*; import com.engine.salary.entity.datacollection.po.OtherDeductionPO; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.service.OtherDeductionService; 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 OtherDeductionServiceImpl extends Service implements OtherDeductionService { @Override public Map getSearchCondition(Map params) { return commandExecutor.execute(new OtherDeductionGetSearchConditionCmd(params, user)); } @Override public Map list(Map params) { return commandExecutor.execute(new OtherDeductionListCmd(params, user)); } @Override public Map preview(Map params) { return commandExecutor.execute(new OtherDeductionPreviewCmd(params, user)); } @Override public Map importData(Map params) { return commandExecutor.execute(new OtherDeductionImportCmd(params, user)); } @Override public XSSFWorkbook export(Map params) { return commandExecutor.execute(new OtherDeductionExportCmd(params, user)); } @Override public XSSFWorkbook exportDetail(Map params) { return commandExecutor.execute(new OtherDeductionExportDetailCmd(params, user)); } @Override public Map getDetailList(Map params) { return commandExecutor.execute(new OtherDeductionGetDetailListCmd(params, user)); } @Override public List getOtherDeductionList(YearMonth declareMonth, List 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()); } }