From 3f32fa98d6d3e4e7800a931b222fe269e68d0dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Fri, 11 Mar 2022 10:18:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=AF=E8=AE=A1=E5=AE=9E=E4=BD=93=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AddUpDeductionGetDetailListCmd.java | 11 ++++--- .../AddUpSituationGetDetailListCmd.java | 29 +++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java b/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java index 92715a12c..4796b1722 100644 --- a/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java +++ b/src/com/engine/salary/cmd/datacollection/AddUpDeductionGetDetailListCmd.java @@ -5,8 +5,10 @@ import com.engine.common.biz.AbstractCommonCommand; import com.engine.common.entity.BizLogContext; import com.engine.core.interceptor.CommandContext; import com.engine.salary.biz.AddUpDeductionBiz; +import com.engine.salary.biz.EmployBiz; import com.engine.salary.component.SalaryWeaTable; import com.engine.salary.entity.datacollection.AddUpDeduction; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO; import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam; import com.engine.salary.exception.SalaryRunTimeException; @@ -32,6 +34,7 @@ public class AddUpDeductionGetDetailListCmd extends AbstractCommonCommand execute(CommandContext commandContext) { + EmployBiz employBiz = new EmployBiz(); AddUpDeductionBiz biz = new AddUpDeductionBiz(); AddUpDeductionQueryParam queryParam = (AddUpDeductionQueryParam) params.get("queryParam"); @@ -49,10 +52,10 @@ public class AddUpDeductionGetDetailListCmd extends AbstractCommonCommand employeeList = employeeService.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()), tenantKey); -// if (CollectionUtils.isEmpty(employeeList)) { -// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100340, "员工信息不存在")); -// } + List employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId())); + if (CollectionUtils.isEmpty(employeeList)) { + throw new SalaryRunTimeException("员工信息不存在"); + } queryParam.setEmployeeId(po.getEmployeeId()); diff --git a/src/com/engine/salary/cmd/datacollection/AddUpSituationGetDetailListCmd.java b/src/com/engine/salary/cmd/datacollection/AddUpSituationGetDetailListCmd.java index 22ac82f71..f9c42c179 100644 --- a/src/com/engine/salary/cmd/datacollection/AddUpSituationGetDetailListCmd.java +++ b/src/com/engine/salary/cmd/datacollection/AddUpSituationGetDetailListCmd.java @@ -4,9 +4,14 @@ import com.cloudstore.eccom.result.WeaResultMsg; import com.engine.common.biz.AbstractCommonCommand; import com.engine.common.entity.BizLogContext; import com.engine.core.interceptor.CommandContext; +import com.engine.salary.biz.AddUpSituationBiz; +import com.engine.salary.biz.EmployBiz; import com.engine.salary.component.SalaryWeaTable; +import com.engine.salary.entity.datacollection.AddUpSituation; +import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO; import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam; +import com.engine.salary.exception.SalaryRunTimeException; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import weaver.hrm.User; @@ -29,6 +34,30 @@ public class AddUpSituationGetDetailListCmd extends AbstractCommonCommand execute(CommandContext commandContext) { + EmployBiz employBiz = new EmployBiz(); + AddUpSituationBiz biz = new AddUpSituationBiz(); + + AddUpSituationQueryParam queryParam = (AddUpSituationQueryParam) params.get("queryParam"); + if (queryParam == null) { + throw new SalaryRunTimeException("参数异常"); + } + + Long id = queryParam.getAccumulatedSituationId(); + if (id == null) { + throw new SalaryRunTimeException("累计情况id不能为空"); + } + + AddUpSituation po = biz.getById(id); + if (po == null) { + throw new SalaryRunTimeException(String.format("累计情况不存在[id:%s]", id)); + } + + List employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId())); + if (CollectionUtils.isEmpty(employeeList)) { + throw new SalaryRunTimeException("员工信息不存在"); + } + + String fields = " t1.id," + " t1.tax_year_month," + " t1.employee_id as employeeId," +