From d5c8bc7fb566e6dd06cd04631e01865f86e0a0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 15 May 2025 09:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E5=BC=80=EF=BC=8C=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/WEB-INF/prop/hrmSalary.properties | 2 +- .../salary/service/impl/SalaryAcctResultServiceImpl.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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); //删除本次引用的项目数据