Просмотр исходного кода

质检-评定表
1、去掉去重功能

LHB 6 дней назад
Родитель
Сommit
6d35341cd9

+ 4 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -518,18 +518,18 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
                                         FormulaUtils.write(t.getJudge(), "合格", false);
                                     }
 //                                    itemBlockList.sort(Comparator.comparingInt(a -> ids.indexOf(a.getPkeyId())));
-                                    Set<String> values;
+                                    List<String> values;
                                     Predicate<String> predicate = s -> Pattern.matches("^[,]*$", s);
                                     if (itemBlockList.stream().map(ItemBlock::getData).flatMap(v -> v.stream().flatMap(Collection::stream)).map(Func::toStr).anyMatch(CustomFunction::containsZH)) {
-                                        values = itemBlockList.stream().map(ItemBlock::getData).flatMap(v -> v.stream().map(l -> l.stream().map(Func::toStr).collect(Collectors.joining(","))).filter(predicate.negate()).distinct().flatMap(s -> Arrays.stream(s.split(",")))).collect(Collectors.toSet());
+                                        values = itemBlockList.stream().map(ItemBlock::getData).flatMap(v -> v.stream().map(l -> l.stream().map(Func::toStr).collect(Collectors.joining(","))).filter(predicate.negate()).distinct().flatMap(s -> Arrays.stream(s.split(",")))).collect(Collectors.toList());
                                     } else {
-                                        values = itemBlockList.stream().map(ItemBlock::getData).flatMap(v -> v.stream().flatMap(Collection::stream)).map(Func::toStr).collect(Collectors.toSet());
+                                        values = itemBlockList.stream().map(ItemBlock::getData).flatMap(v -> v.stream().flatMap(Collection::stream)).map(Func::toStr).collect(Collectors.toList());
                                     }
                                     if (t.getPoint().contains("榀数")) {
                                         if (values.size() > 0) {
                                             double x = values.stream().mapToDouble(Double::parseDouble).sum() / 3.0;
                                             if (x != 0) {
-                                                values = Collections.singleton(StringUtils.number2String(x, 0));
+                                                values = Collections.singletonList(StringUtils.number2String(x, 0));
                                             }
                                         }
                                     }