|
|
|
|
@ -27,6 +27,8 @@ import java.text.DecimalFormat; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
import static java.util.stream.Collectors.toList; |
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
|
@AllArgsConstructor |
|
|
|
|
@RequestMapping("/examineResult") |
|
|
|
|
@ -960,11 +962,22 @@ public class ExamineResultController extends BladeController { |
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>(); |
|
|
|
|
for (Map<String, Object> map : resultList) { |
|
|
|
|
if (!"".equals(map.get("log")) && !"".equals(map.get("result"))) { |
|
|
|
|
if (!"".equals(map.get("log2")) && !"".equals(map.get("result"))) { |
|
|
|
|
mapList.add(map); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// mapList根据order排序
|
|
|
|
|
Collections.sort(mapList, new Comparator<Map<String, Object>>() { |
|
|
|
|
@Override |
|
|
|
|
public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
|
|
|
|
Integer id1 = (Integer) o1.get("order"); |
|
|
|
|
Integer id2 = (Integer) o2.get("order"); |
|
|
|
|
// 升序
|
|
|
|
|
return id1.compareTo(id2); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 判断应实验样品数量和实际样品数量是否相等
|
|
|
|
|
if (experieNum.length != mapList.size()) { |
|
|
|
|
throw new Exception("分配样品数量与检测样品数量不一致!"); |
|
|
|
|
@ -1485,7 +1498,7 @@ public class ExamineResultController extends BladeController { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("order", order); |
|
|
|
|
map.put("value", value); |
|
|
|
|
map.put("log", log); |
|
|
|
|
map.put("log2", log); |
|
|
|
|
map.put("result", result); |
|
|
|
|
map.put("num", experieNums[col - 1]); |
|
|
|
|
return map; |
|
|
|
|
@ -1493,7 +1506,7 @@ public class ExamineResultController extends BladeController { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("order", order); |
|
|
|
|
map.put("value", ""); |
|
|
|
|
map.put("log", ""); |
|
|
|
|
map.put("log2", ""); |
|
|
|
|
map.put("result", ""); |
|
|
|
|
map.put("num", ""); |
|
|
|
|
return map; |
|
|
|
|
@ -1502,7 +1515,7 @@ public class ExamineResultController extends BladeController { |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("order", order); |
|
|
|
|
map.put("value", value); |
|
|
|
|
map.put("log", ""); |
|
|
|
|
map.put("log2", ""); |
|
|
|
|
map.put("result", ""); |
|
|
|
|
map.put("num", ""); |
|
|
|
|
return map; |
|
|
|
|
|