累计实体错误
This commit is contained in:
parent
92fc902fba
commit
3f32fa98d6
|
|
@ -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<Map<St
|
|||
@Override
|
||||
public Map<String, Object> 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<Map<St
|
|||
throw new SalaryRunTimeException(String.format("累计专项附加扣除不存在[id:%s]", id));
|
||||
}
|
||||
|
||||
// List<SimpleEmployee> employeeList = employeeService.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()), tenantKey);
|
||||
// if (CollectionUtils.isEmpty(employeeList)) {
|
||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 100340, "员工信息不存在"));
|
||||
// }
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
||||
queryParam.setEmployeeId(po.getEmployeeId());
|
||||
|
||||
|
|
|
|||
|
|
@ -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<Map<St
|
|||
@Override
|
||||
public Map<String, Object> 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<DataCollectionEmployee> 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," +
|
||||
|
|
|
|||
Loading…
Reference in New Issue