性能优化

This commit is contained in:
梁琦涛
2024-09-20 17:28:25 +08:00
parent aedfb9339a
commit d5f0bd9f82
@@ -1942,6 +1942,28 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
case StandardInterpretCommon.INTERPRETING_PEOPLE_FILLOUT:
boolean pass = (boolean) map.get(StandardInterpretCommon.PASS);
if (pass){
// List<ProcessStandardInterpretClauseSublist> idsNotNull = new ArrayList<>();
// List<ProcessStandardInterpretClauseSublist> idsNull = new ArrayList<>();
// List<String> ids = processStandardInterpretClauseSublistList.stream().map(ProcessStandardInterpretClauseSublist::getId).collect(Collectors.toList());
// List<ProcessStandardInterpretClauseSublist> listData = processStandardInterpretClauseSublistService.listByIds(ids);
// if(!CollectionUtils.isEmpty(listData)){
// List<String> idsNew = listData.stream().map(ProcessStandardInterpretClauseSublist::getId).collect(Collectors.toList());
// processStandardInterpretClauseSublistList.forEach(p->{
// if(idsNew.contains(p.getId())){
// idsNotNull.add(p);
// }else{
// idsNull.add(p);
// }
// });
// }
// if(!CollectionUtils.isEmpty(idsNotNull)){
// processStandardInterpretClauseSublistService.updateBatchById(idsNotNull);
// }
//
// if(!CollectionUtils.isEmpty(idsNull)){
// processStandardInterpretClauseSublistService.saveBatch(idsNull);
// }
processStandardInterpretClauseSublistList.stream().map(ProcessStandardInterpretClauseSublist::getId).collect(Collectors.toList());
processStandardInterpretClauseSublistService
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
}