加上大括号

This commit is contained in:
Harryxzy 2023-07-19 16:27:55 +08:00
parent 5340b114d1
commit 07b36db9e1
1 changed files with 4 additions and 2 deletions

View File

@ -82,12 +82,14 @@ public class SalaryBillItemNameServiceImpl extends Service implements SalaryBill
if(CollectionUtils.isEmpty(saveList))
return;
List<Long> templateIdList = saveList.stream().map(SalaryBillItemNameSaveParam::getSalaryTemplateId).distinct().collect(Collectors.toList());
if(CollectionUtils.isEmpty(templateIdList) || templateIdList.size()>1)
if(CollectionUtils.isEmpty(templateIdList) || templateIdList.size()>1){
throw new SalaryRunTimeException("工资单模板id为空或存在多个工资单模板id");
}
Long salaryTemplateId = templateIdList.get(0);
SalaryTemplatePO salaryTemplatePO = getSalaryTemplateService(user).getById(salaryTemplateId);
if(Objects.isNull(salaryTemplatePO))
if(Objects.isNull(salaryTemplatePO)){
throw new SalaryRunTimeException("工资单模板不存在或已被删除");
}
List<SalaryBillItemNamePO> needInsertList = new ArrayList<>();
List<SalaryBillItemNamePO> needUpdateList = new ArrayList<>();
Date now = new Date();