diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index c4b7713cc..e60629922 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=3.0.2.2504.03 +version=3.0.2.250515.03 openFormulaForcedEditing=false \ No newline at end of file diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index cd17d1c81..ec6c36d92 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -1322,14 +1322,23 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe SalaryAcctConfig salaryAcctConfig = getSalaryAcctSobConfigService(user).getSalaryAcctConfig(salaryAcctRecordId); List salarySobItemPOS = salaryAcctConfig.getSalarySobItems().stream().filter(item -> SalaryOnOffEnum.ON.getValue().equals(item.getQuote())).collect(Collectors.toList()); List itemIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getSalaryItemId, Collectors.toList()); + if(CollUtil.isEmpty(itemIds)){ + throw new SalaryRunTimeException("未在账套中配置同步项目"); + } //查询本次核算人员 List employeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordId); + if(CollUtil.isEmpty(employeePOS)){ + throw new SalaryRunTimeException("本次无核算人员"); + } List employeeIds = SalaryEntityUtil.properties(employeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList()); List acctEmpIds = SalaryEntityUtil.properties(employeePOS, SalaryAcctEmployeePO::getId, Collectors.toList()); //查询上个月数据 List lastMonthResultPOS = listBySobSalaryMonth(SalaryDateUtil.localDateToDate(SalaryDateUtil.dateToLocalDate(recordPO.getSalaryMonth()).minusMonths(1)), recordPO.getSalarySobId(), employeeIds, itemIds); + if(CollUtil.isEmpty(itemIds)){ + throw new SalaryRunTimeException("未查询到上月核算数据"); + } Map> itemValueMap = SalaryEntityUtil.group2Map(lastMonthResultPOS, SalaryAcctResultPO::getEmployeeId); //删除本次引用的项目数据