Commit 66cddc96 by zhangxingmin

push

parent bdfc676e
......@@ -381,7 +381,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
}
}
// 1. 校验列表内部是否有重复
// 校验列表内部是否有重复
Set<String> keySet = new HashSet<>();
List<String> duplicateKeys = new ArrayList<>();
for (ApiSalaryBatchAddDTO dto : apiSalaryBatchAddDTOList) {
......@@ -402,7 +402,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
throw new BusinessException("批量数据中存在重复的转介人与薪资月份组合: " + String.join(", ", duplicateDescriptions));
}
// 2. 查询数据库中已存在的相同组合
// 查询数据库中已存在的相同组合
List<String> brokerBizIdList = apiSalaryBatchAddDTOList.stream()
.map(ApiSalaryBatchAddDTO::getBrokerBizId)
.distinct()
......@@ -422,7 +422,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
.map(s -> s.getBrokerBizId() + "|" + s.getMonth())
.collect(Collectors.toSet());
// 3. 找出冲突的组合
// 找出冲突的组合
List<String> conflictKeys = apiSalaryBatchAddDTOList.stream()
.map(dto -> dto.getBrokerBizId() + "|" + dto.getMonth())
.filter(existingKeys::contains)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment