|
|
@@ -462,11 +462,21 @@ List<WorkOrderType> typelist=workrodertypeService.getList();
|
|
462
|
462
|
}
|
|
463
|
463
|
if(!StringHelper.isEmpty(orderBase.getHandlingMeasures())){
|
|
464
|
464
|
// if(orderBase.getHandlingMeasures()!=null && orderBase.getHandlingMeasures()>0){
|
|
|
465
|
+// orderBase.setHandlingMeasuresName(dictDatas.stream()
|
|
|
466
|
+// .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
|
|
|
467
|
+// .findFirst()
|
|
|
468
|
+// .map(DictData::getDictLabel)
|
|
|
469
|
+// .orElse(null) );
|
|
|
470
|
+
|
|
|
471
|
+
|
|
|
472
|
+ // 通过Stream过滤并生成新List
|
|
|
473
|
+ String[] targetNames = orderBase.getHandlingMeasures().split(",");
|
|
|
474
|
+ // 转换为Set以提高查询效率
|
|
|
475
|
+ Set<String> targetSet = new HashSet<>(Arrays.asList(targetNames));
|
|
465
|
476
|
orderBase.setHandlingMeasuresName(dictDatas.stream()
|
|
466
|
|
- .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
|
|
467
|
|
- .findFirst()
|
|
|
477
|
+ .filter(obj -> targetSet.contains(obj.getDictValue()))
|
|
468
|
478
|
.map(DictData::getDictLabel)
|
|
469
|
|
- .orElse(null) );
|
|
|
479
|
+ .collect(Collectors.joining(",")));
|
|
470
|
480
|
}
|
|
471
|
481
|
}
|
|
472
|
482
|
|
|
|
@@ -914,11 +924,18 @@ if(!StringHelper.isEmpty(orderBase.getGrade())){
|
|
914
|
924
|
}
|
|
915
|
925
|
if(!StringHelper.isEmpty(orderBase.getHandlingMeasures())){
|
|
916
|
926
|
// if(orderBase.getHandlingMeasures()!=null && orderBase.getHandlingMeasures()>0){
|
|
|
927
|
+// ov.setHandlingMeasuresName(dictDatas.stream()
|
|
|
928
|
+// .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
|
|
|
929
|
+// .findFirst()
|
|
|
930
|
+// .map(DictData::getDictLabel)
|
|
|
931
|
+// .orElse(null) );
|
|
|
932
|
+ String[] targetNames = orderBase.getHandlingMeasures().split(",");
|
|
|
933
|
+ // 转换为Set以提高查询效率
|
|
|
934
|
+ Set<String> targetSet = new HashSet<>(Arrays.asList(targetNames));
|
|
917
|
935
|
ov.setHandlingMeasuresName(dictDatas.stream()
|
|
918
|
|
- .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
|
|
919
|
|
- .findFirst()
|
|
|
936
|
+ .filter(obj -> targetSet.contains(obj.getDictValue()))
|
|
920
|
937
|
.map(DictData::getDictLabel)
|
|
921
|
|
- .orElse(null) );
|
|
|
938
|
+ .collect(Collectors.joining(",")));
|
|
922
|
939
|
}
|
|
923
|
940
|
if(orderBase.getComplaintdept()!=null && orderBase.getComplaintdept()>0){
|
|
924
|
941
|
DeptView ordertype = deptService.selectDeptNameById(orderBase.getComplaintdept() );
|