From 57fed63674de162a6be1e10ffc3a4a4409fadc5b Mon Sep 17 00:00:00 2001 From: litao Date: Tue, 27 Sep 2022 18:30:33 +0800 Subject: [PATCH] =?UTF-8?q?lims=E6=B5=81=E7=A8=8B=E6=80=A7=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lims/service/impl/EntrustServiceImpl.java | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/EntrustServiceImpl.java b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/EntrustServiceImpl.java index 250bc2d..1a6e474 100644 --- a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/EntrustServiceImpl.java +++ b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/EntrustServiceImpl.java @@ -724,9 +724,15 @@ public class EntrustServiceImpl extends BaseServiceImpl String result = ""; for (int i = 0; i < currExamResVoList.size(); i++) { ExamineResultVo resultVo = currExamResVoList.get(i); - num += resultVo.getNum() + ","; - value += resultVo.getValue() + ","; - result += resultVo.getResult() + ","; + if (i == currExamResVoList.size() - 1) { + num += resultVo.getNum(); + value += resultVo.getValue(); + result += resultVo.getResult(); + } else { + num += resultVo.getNum() + ","; + value += resultVo.getValue() + ","; + result += resultVo.getResult() + ","; + } } row.put("num" + index, num); row.put("value" + index, value); @@ -1195,7 +1201,7 @@ public class EntrustServiceImpl extends BaseServiceImpl // result.put("13", examineBasis.getContent().replace("$", "(char)11")); // } // 结果判定方法和依据 - result.put("13", examineResult.getExamineBasisContent().replace("$", "(char)11")); + result.put("13", examineResult.getExamineBasisContent().replace("$", "\n")); String path = sysClient.getParamValue("electronic_signature_real_path").getData(); // 检测人 if (!"".equals(examine.getExamineBy()) && examine.getExamineBy() != null) { @@ -1932,9 +1938,9 @@ public class EntrustServiceImpl extends BaseServiceImpl ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); dataArrVO1.setNum("阴性数量"); - dataArrVO1.setValue(String.valueOf(yin)); + dataArrVO1.setLog2(String.valueOf(yin)); dataArrVO2.setNum("阳性数量"); - dataArrVO2.setValue(String.valueOf(yang)); + dataArrVO2.setLog2(String.valueOf(yang)); list1.add(dataArrVO1); list1.add(dataArrVO2); @@ -1965,15 +1971,15 @@ public class EntrustServiceImpl extends BaseServiceImpl for (int i = 0; i < voList.size() / 3; i++) { Map map = new HashMap<>(); map.put("num1", voList.get(i).getNum()); - map.put("value1", voList.get(i).getValue()); + map.put("log1", voList.get(i).getLog2()); map.put("result1", voList.get(i).getResult()); map.put("num2", voList.get(voList.size() / 3 + i).getNum()); - map.put("value2", voList.get(voList.size() / 3 + i).getValue()); + map.put("log2", voList.get(voList.size() / 3 + i).getLog2()); map.put("result2", voList.get(voList.size() / 3 + i).getResult()); map.put("num3", voList.get(voList.size() / 3 * 2 + i).getNum()); - map.put("value3", voList.get(voList.size() / 3 * 2 + i).getValue()); + map.put("log3", voList.get(voList.size() / 3 * 2 + i).getLog2()); map.put("result3", voList.get(voList.size() / 3 * 2 + i).getResult()); resultList1.add(map); } @@ -1982,28 +1988,28 @@ public class EntrustServiceImpl extends BaseServiceImpl if (voList.size() % 3 == 1) { Map map = new HashMap<>(); map.put("num1", voList.get(i).getNum()); - map.put("value1", voList.get(i).getValue()); + map.put("log1", voList.get(i).getLog2()); map.put("result1", voList.get(i).getResult()); if (i < voList.size() / 3) { map.put("num2", voList.get(voList.size() / 3 + i + 1).getNum()); - map.put("value2", voList.get(voList.size() / 3 + i + 1).getValue()); + map.put("log2", voList.get(voList.size() / 3 + i + 1).getLog2()); map.put("result2", voList.get(voList.size() / 3 + i + 1).getResult()); map.put("num3", voList.get(voList.size() / 3 * 2 + i + 1).getNum()); - map.put("value3", voList.get(voList.size() / 3 * 2 + i + 1).getValue()); + map.put("log3", voList.get(voList.size() / 3 * 2 + i + 1).getLog2()); map.put("result3", voList.get(voList.size() / 3 * 2 + i + 1).getResult()); } resultList1.add(map); } else if (voList.size() % 3 == 2) { Map map = new HashMap<>(); map.put("num1", voList.get(i).getNum()); - map.put("value1", voList.get(i).getValue()); + map.put("log1", voList.get(i).getLog2()); map.put("result1", voList.get(i).getResult()); map.put("num2", voList.get(voList.size() / 3 + i + 1).getNum()); - map.put("value2", voList.get(voList.size() / 3 + i + 1).getValue()); + map.put("log2", voList.get(voList.size() / 3 + i + 1).getLog2()); map.put("result2", voList.get(voList.size() / 3 + i + 1).getResult()); if (i < voList.size() / 3) { map.put("num3", voList.get(voList.size() / 3 * 2 + i + 2).getNum()); - map.put("value3", voList.get(voList.size() / 3 * 2 + i + 2).getValue()); + map.put("log3", voList.get(voList.size() / 3 * 2 + i + 2).getLog2()); map.put("result3", voList.get(voList.size() / 3 * 2 + i + 2).getResult()); } resultList1.add(map); @@ -2225,9 +2231,9 @@ public class EntrustServiceImpl extends BaseServiceImpl ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); dataArrVO1.setNum("阴性数量"); - dataArrVO1.setValue(String.valueOf(yin)); + dataArrVO1.setLog2(String.valueOf(yin)); dataArrVO2.setNum("阳性数量"); - dataArrVO2.setValue(String.valueOf(yang)); + dataArrVO2.setLog2(String.valueOf(yang)); list1.add(dataArrVO1); list1.add(dataArrVO2); @@ -2258,15 +2264,15 @@ public class EntrustServiceImpl extends BaseServiceImpl for (int i = 0; i < voList.size() / 3; i++) { Map map = new HashMap<>(); map.put("num1", voList.get(i).getNum()); - map.put("value1", voList.get(i).getValue()); + map.put("log1", voList.get(i).getLog2()); map.put("result1", voList.get(i).getResult()); map.put("num2", voList.get(voList.size() / 3 + i).getNum()); - map.put("value2", voList.get(voList.size() / 3 + i).getValue()); + map.put("log2", voList.get(voList.size() / 3 + i).getLog2()); map.put("result2", voList.get(voList.size() / 3 + i).getResult()); map.put("num3", voList.get(voList.size() / 3 * 2 + i).getNum()); - map.put("value3", voList.get(voList.size() / 3 * 2 + i).getValue()); + map.put("log3", voList.get(voList.size() / 3 * 2 + i).getLog2()); map.put("result3", voList.get(voList.size() / 3 * 2 + i).getResult()); resultList1.add(map); } @@ -2275,28 +2281,28 @@ public class EntrustServiceImpl extends BaseServiceImpl if (voList.size() % 3 == 1) { Map map = new HashMap<>(); map.put("num1", voList.get(i).getNum()); - map.put("value1", voList.get(i).getValue()); + map.put("log1", voList.get(i).getLog2()); map.put("result1", voList.get(i).getResult()); if (i < voList.size() / 3) { map.put("num2", voList.get(voList.size() / 3 + i + 1).getNum()); - map.put("value2", voList.get(voList.size() / 3 + i + 1).getValue()); + map.put("log2", voList.get(voList.size() / 3 + i + 1).getLog2()); map.put("result2", voList.get(voList.size() / 3 + i + 1).getResult()); map.put("num3", voList.get(voList.size() / 3 * 2 + i + 1).getNum()); - map.put("value3", voList.get(voList.size() / 3 * 2 + i + 1).getValue()); + map.put("log3", voList.get(voList.size() / 3 * 2 + i + 1).getLog2()); map.put("result3", voList.get(voList.size() / 3 * 2 + i + 1).getResult()); } resultList1.add(map); } else if (voList.size() % 3 == 2) { Map map = new HashMap<>(); map.put("num1", voList.get(i).getNum()); - map.put("value1", voList.get(i).getValue()); + map.put("log1", voList.get(i).getLog2()); map.put("result1", voList.get(i).getResult()); map.put("num2", voList.get(voList.size() / 3 + i + 1).getNum()); - map.put("value2", voList.get(voList.size() / 3 + i + 1).getValue()); + map.put("log2", voList.get(voList.size() / 3 + i + 1).getLog2()); map.put("result2", voList.get(voList.size() / 3 + i + 1).getResult()); if (i < voList.size() / 3) { map.put("num3", voList.get(voList.size() / 3 * 2 + i + 2).getNum()); - map.put("value3", voList.get(voList.size() / 3 * 2 + i + 2).getValue()); + map.put("log3", voList.get(voList.size() / 3 * 2 + i + 2).getLog2()); map.put("result3", voList.get(voList.size() / 3 * 2 + i + 2).getResult()); } resultList1.add(map); @@ -3193,7 +3199,6 @@ public class EntrustServiceImpl extends BaseServiceImpl } List> resultList = new ArrayList<>(); - Map map = new HashMap<>(); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(Examine::getEntrustId, id); @@ -3201,6 +3206,7 @@ public class EntrustServiceImpl extends BaseServiceImpl List examineList = examineService.list(queryWrapper); if (CollectionUtils.isNotEmpty(examineList)) { for (Examine examine : examineList) { + Map map = new HashMap<>(); map.put("simpleName", examine.getSimpleName()); map.put("simpleCount", examine.getSimpleCount()); String[] split = examine.getExperieNum().split(",");