|
|
|
@ -1102,27 +1102,30 @@ public class ExamineResultController extends BladeController { |
|
|
|
throw new Exception("分配样品数量与检测样品数量不一致!"); |
|
|
|
throw new Exception("分配样品数量与检测样品数量不一致!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> realResultMap = new HashMap<>(); |
|
|
|
|
|
|
|
realResultMap.put("data", resultMap); |
|
|
|
|
|
|
|
realResultMap.put("yinCount", yinCount); |
|
|
|
|
|
|
|
realResultMap.put("yangCount", yangCount); |
|
|
|
|
|
|
|
|
|
|
|
// 新增或修改Result数据
|
|
|
|
// 新增或修改Result数据
|
|
|
|
LambdaQueryWrapper<ExamineResult> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<ExamineResult> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.eq(ExamineResult::getExamineId, examine.getId()); |
|
|
|
wrapper.eq(ExamineResult::getExamineId, examine.getId()); |
|
|
|
ExamineResult result = service.getOne(wrapper); |
|
|
|
ExamineResult result = service.getOne(wrapper); |
|
|
|
if (result != null) { |
|
|
|
if (result != null) { |
|
|
|
result.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
result.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
result.setOriginRecordResult(JSON.toJSONString(resultMap)); |
|
|
|
// result.setOriginRecordResult(JSON.toJSONString(resultMap));
|
|
|
|
|
|
|
|
result.setOriginRecordResult(JSON.toJSONString(realResultMap)); |
|
|
|
result.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
result.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
service.updateById(result); |
|
|
|
service.updateById(result); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ExamineResult examineResult = new ExamineResult(); |
|
|
|
ExamineResult examineResult = new ExamineResult(); |
|
|
|
examineResult.setExamineId(Long.valueOf(examine.getId())); |
|
|
|
examineResult.setExamineId(Long.valueOf(examine.getId())); |
|
|
|
examineResult.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
examineResult.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
examineResult.setOriginRecordResult(JSON.toJSONString(resultMap)); |
|
|
|
// result.setOriginRecordResult(JSON.toJSONString(resultMap));
|
|
|
|
|
|
|
|
result.setOriginRecordResult(JSON.toJSONString(realResultMap)); |
|
|
|
examineResult.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
examineResult.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
service.save(examineResult); |
|
|
|
service.save(examineResult); |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String, Object> realResultMap = new HashMap<>(); |
|
|
|
|
|
|
|
realResultMap.put("data", resultMap); |
|
|
|
|
|
|
|
realResultMap.put("yinCount", yinCount); |
|
|
|
|
|
|
|
realResultMap.put("yangCount", yangCount); |
|
|
|
|
|
|
|
return R.data(realResultMap); |
|
|
|
return R.data(realResultMap); |
|
|
|
} |
|
|
|
} |
|
|
|
// 非兰所,11列也是样品 ---------------------------------------------------------------------------------------
|
|
|
|
// 非兰所,11列也是样品 ---------------------------------------------------------------------------------------
|
|
|
|
@ -1228,6 +1231,11 @@ public class ExamineResultController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> realResultMap = new HashMap<>(); |
|
|
|
|
|
|
|
realResultMap.put("data", resultMap); |
|
|
|
|
|
|
|
realResultMap.put("yinCount", yinCount); |
|
|
|
|
|
|
|
realResultMap.put("yangCount", yangCount); |
|
|
|
|
|
|
|
|
|
|
|
// 判断应实验样品数量和实际样品数量是否相等
|
|
|
|
// 判断应实验样品数量和实际样品数量是否相等
|
|
|
|
if (experieNum.length != allDatas.size()) { |
|
|
|
if (experieNum.length != allDatas.size()) { |
|
|
|
throw new Exception("分配样品数量与检测样品数量不一致!"); |
|
|
|
throw new Exception("分配样品数量与检测样品数量不一致!"); |
|
|
|
@ -1238,21 +1246,19 @@ public class ExamineResultController extends BladeController { |
|
|
|
ExamineResult result = service.getOne(wrapper); |
|
|
|
ExamineResult result = service.getOne(wrapper); |
|
|
|
if (result != null) { |
|
|
|
if (result != null) { |
|
|
|
result.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
result.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
result.setOriginRecordResult(JSON.toJSONString(resultMap)); |
|
|
|
// result.setOriginRecordResult(JSON.toJSONString(resultMap));
|
|
|
|
|
|
|
|
result.setOriginRecordResult(JSON.toJSONString(realResultMap)); |
|
|
|
result.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
result.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
service.updateById(result); |
|
|
|
service.updateById(result); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ExamineResult examineResult = new ExamineResult(); |
|
|
|
ExamineResult examineResult = new ExamineResult(); |
|
|
|
examineResult.setExamineId(Long.valueOf(examine.getId())); |
|
|
|
examineResult.setExamineId(Long.valueOf(examine.getId())); |
|
|
|
examineResult.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
examineResult.setOriginRecordData(JSON.toJSONString(allData)); |
|
|
|
examineResult.setOriginRecordResult(JSON.toJSONString(resultMap)); |
|
|
|
// result.setOriginRecordResult(JSON.toJSONString(resultMap));
|
|
|
|
|
|
|
|
result.setOriginRecordResult(JSON.toJSONString(realResultMap)); |
|
|
|
examineResult.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
examineResult.setExamineDataArr(JSON.toJSONString(allDatas)); |
|
|
|
service.save(examineResult); |
|
|
|
service.save(examineResult); |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String, Object> realResultMap = new HashMap<>(); |
|
|
|
|
|
|
|
realResultMap.put("data", resultMap); |
|
|
|
|
|
|
|
realResultMap.put("yinCount", yinCount); |
|
|
|
|
|
|
|
realResultMap.put("yangCount", yangCount); |
|
|
|
|
|
|
|
return R.data(realResultMap); |
|
|
|
return R.data(realResultMap); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|