二开,引用功能

This commit is contained in:
钱涛 2025-05-15 09:57:05 +08:00
parent 5b4f11e9cf
commit d5c8bc7fb5
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,5 @@
log=false
defaultCloseNonStandard149=true
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
version=3.0.2.2504.03
version=3.0.2.250515.03
openFormulaForcedEditing=false

View File

@ -1322,14 +1322,23 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
SalaryAcctConfig salaryAcctConfig = getSalaryAcctSobConfigService(user).getSalaryAcctConfig(salaryAcctRecordId);
List<SalarySobItemPO> salarySobItemPOS = salaryAcctConfig.getSalarySobItems().stream().filter(item -> SalaryOnOffEnum.ON.getValue().equals(item.getQuote())).collect(Collectors.toList());
List<Long> itemIds = SalaryEntityUtil.properties(salarySobItemPOS, SalarySobItemPO::getSalaryItemId, Collectors.toList());
if(CollUtil.isEmpty(itemIds)){
throw new SalaryRunTimeException("未在账套中配置同步项目");
}
//查询本次核算人员
List<SalaryAcctEmployeePO> employeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordId);
if(CollUtil.isEmpty(employeePOS)){
throw new SalaryRunTimeException("本次无核算人员");
}
List<Long> employeeIds = SalaryEntityUtil.properties(employeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
List<Long> acctEmpIds = SalaryEntityUtil.properties(employeePOS, SalaryAcctEmployeePO::getId, Collectors.toList());
//查询上个月数据
List<SalaryAcctResultPO> lastMonthResultPOS = listBySobSalaryMonth(SalaryDateUtil.localDateToDate(SalaryDateUtil.dateToLocalDate(recordPO.getSalaryMonth()).minusMonths(1)), recordPO.getSalarySobId(), employeeIds, itemIds);
if(CollUtil.isEmpty(itemIds)){
throw new SalaryRunTimeException("未查询到上月核算数据");
}
Map<Long, List<SalaryAcctResultPO>> itemValueMap = SalaryEntityUtil.group2Map(lastMonthResultPOS, SalaryAcctResultPO::getEmployeeId);
//删除本次引用的项目数据