From 7d3b55efd31dc7c10c3185cf068f8181a4a65962 Mon Sep 17 00:00:00 2001 From: litao Date: Sat, 8 Oct 2022 09:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=8A=A5=E5=91=8A=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E9=98=B4=E9=98=B3=E6=95=B0=E9=87=8F=EF=BC=8C=E5=8F=A3?= =?UTF-8?q?=E8=B9=84=E7=96=ABO=E5=9E=8B=E5=AF=B9=E7=85=A7=E5=8A=A0?= =?UTF-8?q?=E4=B8=B4=E7=95=8C=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ExamineResultController.java | 54 +- .../lims/service/impl/EntrustServiceImpl.java | 511 ++++++++---------- 2 files changed, 251 insertions(+), 314 deletions(-) diff --git a/lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ExamineResultController.java b/lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ExamineResultController.java index 1a13e32..b2c60f3 100644 --- a/lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ExamineResultController.java +++ b/lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ExamineResultController.java @@ -1274,38 +1274,27 @@ public class ExamineResultController extends BladeController { // 待抽 ↓ if (col == 1) { value = excels.get(row).getCode1(); - } - if (col == 2) { + } else if (col == 2) { value = excels.get(row).getCode2(); - } - if (col == 3) { + } else if (col == 3) { value = excels.get(row).getCode3(); - } - if (col == 4) { + } else if (col == 4) { value = excels.get(row).getCode4(); - } - if (col == 5) { + } else if (col == 5) { value = excels.get(row).getCode5(); - } - if (col == 6) { + } else if (col == 6) { value = excels.get(row).getCode6(); - } - if (col == 7) { + } else if (col == 7) { value = excels.get(row).getCode7(); - } - if (col == 8) { + } else if (col == 8) { value = excels.get(row).getCode8(); - } - if (col == 9) { + } else if (col == 9) { value = excels.get(row).getCode9(); - } - if (col == 10) { + } else if (col == 10) { value = excels.get(row).getCode10(); - } - if (col == 11) { + } else if (col == 11) { value = excels.get(row).getCode11(); - } - if (col == 12) { + } else if (col == 12) { value = excels.get(row).getCode12(); } Map cPosData = new HashMap<>(4); @@ -1528,38 +1517,31 @@ public class ExamineResultController extends BladeController { if (avg < currValue) { return "<1:8"; } - } - if (row == 1) { + } else if (row == 1) { if (avg < currValue && avg > lastValue) { return "1:11"; } - } - if (row == 2) { + } else if (row == 2) { if (avg < currValue && avg > lastValue) { return "1:22"; } - } - if (row == 3) { + } else if (row == 3) { if (avg < currValue && avg > lastValue) { return "1:45"; } - } - if (row == 4) { + } else if (row == 4) { if (avg < currValue && avg > lastValue) { return "1:90"; } - } - if (row == 5) { + } else if (row == 5) { if (avg < currValue && avg > lastValue) { return "1:180"; } - } - if (row == 6) { + } else if (row == 6) { if (avg < currValue && avg > lastValue) { return "1:360"; } - } - if (row == 7) { + } else if (row == 7) { if (avg < currValue && avg > lastValue) { return "1:720"; } else if (avg > currValue) { 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 56346ad..3e03f85 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 @@ -95,77 +95,77 @@ public class EntrustServiceImpl extends BaseServiceImpl @Autowired private IRepairApplicationService repairApplicationService; - @Value("${handleUrl}") - private String handleUrl; - - @Value("${print1}") - private String print1; - - @Value("${print2}") - private String print2; - - @Value("${print3}") - private String print3; - - @Value("${print4}") - private String print4; - - @Value("${print5}") - private String print5; - - @Value("${print6}") - private String print6; - - @Value("${print7}") - private String print7; - - @Value("${print8}") - private String print8; - - @Value("${print9}") - private String print9; - - @Value("${print10}") - private String print10; - - @Value("${reportPrint}") - private String reportPrint; - - @Value("${examineReportPrint}") - private String examineReportPrint; - - @Value("${BLSreportPrint}") - private String BLSreportPrint; - - @Value("${PCRreportPrint}") - private String PCRreportPrint; - - @Value("${XNreportPrint}") - private String XNreportPrint; - - @Value("${LDanreportPrint}") - private String LDanreportPrint; - - @Value("${LDuoreportPrint}") - private String LDuoreportPrint; - - @Value("${simpleRegisterPrint}") - private String simpleRegisterPrint; - - @Value("${simpleNumberPrint}") - private String simpleNumberPrint; - - @Value("${eTaskPrint}") - private String eTaskPrint; - - @Value("${simpleHandlePrint}") - private String simpleHandlePrint; - - @Value("${simpleReceivePrint}") - private String simpleReceivePrint; - - @Value("${repairPrint}") - private String repairPrint; +// @Value("${handleUrl}") +// private String handleUrl; +// +// @Value("${print1}") +// private String print1; +// +// @Value("${print2}") +// private String print2; +// +// @Value("${print3}") +// private String print3; +// +// @Value("${print4}") +// private String print4; +// +// @Value("${print5}") +// private String print5; +// +// @Value("${print6}") +// private String print6; +// +// @Value("${print7}") +// private String print7; +// +// @Value("${print8}") +// private String print8; +// +// @Value("${print9}") +// private String print9; +// +// @Value("${print10}") +// private String print10; +// +// @Value("${reportPrint}") +// private String reportPrint; +// +// @Value("${examineReportPrint}") +// private String examineReportPrint; +// +// @Value("${BLSreportPrint}") +// private String BLSreportPrint; +// +// @Value("${PCRreportPrint}") +// private String PCRreportPrint; +// +// @Value("${XNreportPrint}") +// private String XNreportPrint; +// +// @Value("${LDanreportPrint}") +// private String LDanreportPrint; +// +// @Value("${LDuoreportPrint}") +// private String LDuoreportPrint; +// +// @Value("${simpleRegisterPrint}") +// private String simpleRegisterPrint; +// +// @Value("${simpleNumberPrint}") +// private String simpleNumberPrint; +// +// @Value("${eTaskPrint}") +// private String eTaskPrint; +// +// @Value("${simpleHandlePrint}") +// private String simpleHandlePrint; +// +// @Value("${simpleReceivePrint}") +// private String simpleReceivePrint; +// +// @Value("${repairPrint}") +// private String repairPrint; // @Value("${imagePrint}") // private String imagePrint; @@ -697,7 +697,7 @@ public class EntrustServiceImpl extends BaseServiceImpl List everyResultUnit = collect.get(originalNum); Map row = new HashMap<>(); row.put("originalNum", everyResultUnit.get(0).getOriginalNum()); - rowCount ++; + rowCount++; // 对检测按照index分组 Map> voGroupByIndex = everyResultUnit.stream().collect(Collectors.groupingBy(ExamineResultVo::getIndex)); @@ -736,7 +736,7 @@ public class EntrustServiceImpl extends BaseServiceImpl } row.put("num" + index, num); row.put("value" + index, value); - row.put("result" + index,result); + row.put("result" + index, result); } // 将每一行加入到模板循环列表 tempResultList.add(row); @@ -1256,27 +1256,27 @@ public class EntrustServiceImpl extends BaseServiceImpl if ("2".equals(byId.getInputMode()) || "6".equals(byId.getInputMode())) { List list = JSON.parseArray(examineResult.getExamineDataArr(), ExamineTemplate2Excel.class); // 阴阳性数量 - long yin = list.stream().filter((ExamineTemplate2Excel e) -> "阴性".equals(e.getResult())).count(); - long yang = list.stream().filter((ExamineTemplate2Excel e) -> "阳性".equals(e.getResult())).count(); - - ExamineTemplate2Excel examineTemplate2Excel1 = new ExamineTemplate2Excel(); - examineTemplate2Excel1.setExperieNum("阴性数量"); - examineTemplate2Excel1.setValue(String.valueOf(yin)); - list.add(examineTemplate2Excel1); - - ExamineTemplate2Excel examineTemplate2Excel2 = new ExamineTemplate2Excel(); - examineTemplate2Excel2.setExperieNum("阳性数量"); - examineTemplate2Excel2.setValue(String.valueOf(yang)); - list.add(examineTemplate2Excel2); +// long yin = list.stream().filter((ExamineTemplate2Excel e) -> "阴性".equals(e.getResult())).count(); +// long yang = list.stream().filter((ExamineTemplate2Excel e) -> "阳性".equals(e.getResult())).count(); +// +// ExamineTemplate2Excel examineTemplate2Excel1 = new ExamineTemplate2Excel(); +// examineTemplate2Excel1.setExperieNum("阴性数量"); +// examineTemplate2Excel1.setValue(String.valueOf(yin)); +// list.add(examineTemplate2Excel1); +// +// ExamineTemplate2Excel examineTemplate2Excel2 = new ExamineTemplate2Excel(); +// examineTemplate2Excel2.setExperieNum("阳性数量"); +// examineTemplate2Excel2.setValue(String.valueOf(yang)); +// list.add(examineTemplate2Excel2); // 如果是平板的,只有阴性和阳性,如果是试管的才有可疑 - if ("6".equals(byId.getInputMode())) { - long keyi = list.stream().filter((ExamineTemplate2Excel e) -> "可疑".equals(e.getResult())).count(); - ExamineTemplate2Excel examineTemplate2Excel3 = new ExamineTemplate2Excel(); - examineTemplate2Excel3.setExperieNum("可疑数量"); - examineTemplate2Excel3.setValue(String.valueOf(keyi)); - list.add(examineTemplate2Excel3); - } +// if ("6".equals(byId.getInputMode())) { +// long keyi = list.stream().filter((ExamineTemplate2Excel e) -> "可疑".equals(e.getResult())).count(); +// ExamineTemplate2Excel examineTemplate2Excel3 = new ExamineTemplate2Excel(); +// examineTemplate2Excel3.setExperieNum("可疑数量"); +// examineTemplate2Excel3.setValue(String.valueOf(keyi)); +// list.add(examineTemplate2Excel3); +// } if (list.size() > 0) { Map> resultMap = new HashMap<>(); @@ -1334,18 +1334,18 @@ public class EntrustServiceImpl extends BaseServiceImpl else if ("4".equals(byId.getInputMode())) { List list = JSON.parseArray(examineResult.getExamineDataArr(), PCR2Excel.class); // 阴阳性数量 - long yin = list.stream().filter((PCR2Excel e) -> "阴性".equals(e.getValue())).count(); - long yang = list.stream().filter((PCR2Excel e) -> " 阳性".equals(e.getValue())).count(); - PCR2Excel pcr2Excel1 = new PCR2Excel(); - PCR2Excel pcr2Excel2 = new PCR2Excel(); - pcr2Excel1.setExperieNum("阴性数量"); - // 减1是因为,不能把阴性对照的阴性结果当做样品计算 - pcr2Excel1.setCtValue(String.valueOf(yin - 1)); - pcr2Excel2.setExperieNum("阳性数量"); - // 减1是因为,不能把阳性对照的阳性结果当做样品计算 - pcr2Excel2.setCtValue(String.valueOf(yang - 1)); - list.add(pcr2Excel1); - list.add(pcr2Excel2); +// long yin = list.stream().filter((PCR2Excel e) -> "阴性".equals(e.getValue())).count(); +// long yang = list.stream().filter((PCR2Excel e) -> " 阳性".equals(e.getValue())).count(); +// PCR2Excel pcr2Excel1 = new PCR2Excel(); +// PCR2Excel pcr2Excel2 = new PCR2Excel(); +// pcr2Excel1.setExperieNum("阴性数量"); +// // 减1是因为,不能把阴性对照的阴性结果当做样品计算 +// pcr2Excel1.setCtValue(String.valueOf(yin - 1)); +// pcr2Excel2.setExperieNum("阳性数量"); +// // 减1是因为,不能把阳性对照的阳性结果当做样品计算 +// pcr2Excel2.setCtValue(String.valueOf(yang - 1)); +// list.add(pcr2Excel1); +// list.add(pcr2Excel2); if (list.size() > 0) { Map> resultMap = new HashMap<>(); @@ -1466,16 +1466,16 @@ public class EntrustServiceImpl extends BaseServiceImpl else if ("5".equals(byId.getInputMode())) { List list = JSON.parseArray(examineResult.getExamineDataArr(), XN2Excel.class); // 阴阳性数量 - long yin = list.stream().filter((XN2Excel e) -> "阴性".equals(e.getValue())).count(); - long yang = list.stream().filter((XN2Excel e) -> "阳性".equals(e.getValue())).count(); - XN2Excel xn2Excel1 = new XN2Excel(); - XN2Excel xn2Excel2 = new XN2Excel(); - xn2Excel1.setExperieNum("阴性数量"); - xn2Excel1.setCtValue(String.valueOf(yin)); - xn2Excel2.setExperieNum("阳性数量"); - xn2Excel2.setCtValue(String.valueOf(yang)); - list.add(xn2Excel1); - list.add(xn2Excel2); +// long yin = list.stream().filter((XN2Excel e) -> "阴性".equals(e.getValue())).count(); +// long yang = list.stream().filter((XN2Excel e) -> "阳性".equals(e.getValue())).count(); +// XN2Excel xn2Excel1 = new XN2Excel(); +// XN2Excel xn2Excel2 = new XN2Excel(); +// xn2Excel1.setExperieNum("阴性数量"); +// xn2Excel1.setCtValue(String.valueOf(yin)); +// xn2Excel2.setExperieNum("阳性数量"); +// xn2Excel2.setCtValue(String.valueOf(yang)); +// list.add(xn2Excel1); +// list.add(xn2Excel2); if (list.size() > 0) { Map> resultMap = new HashMap<>(); int count = 0; @@ -1638,16 +1638,16 @@ public class EntrustServiceImpl extends BaseServiceImpl list1.add(examineDataArrVO); list1.addAll(voList); // 阴阳性数量 - long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); - long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); - ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); - ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); - dataArrVO1.setNum("阴性数量"); - dataArrVO1.setValue(String.valueOf(yin)); - dataArrVO2.setNum("阳性数量"); - dataArrVO2.setValue(String.valueOf(yang)); - list1.add(dataArrVO1); - list1.add(dataArrVO2); +// long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); +// long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); +// ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); +// ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); +// dataArrVO1.setNum("阴性数量"); +// dataArrVO1.setValue(String.valueOf(yin)); +// dataArrVO2.setNum("阳性数量"); +// dataArrVO2.setValue(String.valueOf(yang)); +// list1.add(dataArrVO1); +// list1.add(dataArrVO2); if (list1.size() > 0) { Map> resultMap = new HashMap<>(); @@ -1803,8 +1803,7 @@ public class EntrustServiceImpl extends BaseServiceImpl Map map = new HashMap<>(); if (j == 0) { map.put("1", s + "(" + startNum + "-" + endNum + ")"); - } - else if (j == 1) { + } else if (j == 1) { map.put("0", " "); map.put("1", "1"); map.put("2", "2"); @@ -1830,30 +1829,22 @@ public class EntrustServiceImpl extends BaseServiceImpl map.put("22", "10"); map.put("23", "11"); map.put("24", "12"); - } - else { + } else { if (j == 2) { map.put("0", "A"); - } - if (j == 3) { + } else if (j == 3) { map.put("0", "B"); - } - if (j == 4) { + } else if (j == 4) { map.put("0", "C"); - } - if (j == 5) { + } else if (j == 5) { map.put("0", "D"); - } - if (j == 6) { + } else if (j == 6) { map.put("0", "E"); - } - if (j == 7) { + } else if (j == 7) { map.put("0", "F"); - } - if (j == 8) { + } else if (j == 8) { map.put("0", "G"); - } - if (j == 9) { + } else if (j == 9) { map.put("0", "H"); } for (int k = 1; k <= 12; k++) { @@ -1907,22 +1898,22 @@ public class EntrustServiceImpl extends BaseServiceImpl }); if (list.size() > 0) { for (int i = 0; i < list.size() / 96; i++) { -// List doubles = new ArrayList<>(); -// double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); -// double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); -// double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); -// double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); -// doubles.add(a1); -// doubles.add(a2); -// doubles.add(a3); -// doubles.add(a4); -// List collect = doubles.stream().sorted().collect(Collectors.toList()); -// String format2 = df.format((collect.get(1) + collect.get(2)) / 4); -// ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); -// examineDataArrVO.setNum("临界值"); -// examineDataArrVO.setValue(""); -// examineDataArrVO.setResult(format2); -// list1.add(examineDataArrVO); + List doubles = new ArrayList<>(); + double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); + double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); + double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); + double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); + doubles.add(a1); + doubles.add(a2); + doubles.add(a3); + doubles.add(a4); + List collect = doubles.stream().sorted().collect(Collectors.toList()); + String format2 = df.format((collect.get(1) + collect.get(2)) / 4); + ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); + examineDataArrVO.setNum("临界值"); + examineDataArrVO.setValue(""); + examineDataArrVO.setResult(format2); + list1.add(examineDataArrVO); for (int j = 0; j < 96; j++) { ExamineDataArrVO vo = list.get((i * 96) + j); if (vo.getNum() != null) { @@ -1933,16 +1924,16 @@ public class EntrustServiceImpl extends BaseServiceImpl } // 阴阳性数量 - long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); - long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); - ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); - ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); - dataArrVO1.setNum("阴性数量"); - dataArrVO1.setLog2(String.valueOf(yin)); - dataArrVO2.setNum("阳性数量"); - dataArrVO2.setLog2(String.valueOf(yang)); - list1.add(dataArrVO1); - list1.add(dataArrVO2); +// long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); +// long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); +// ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); +// ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); +// dataArrVO1.setNum("阴性数量"); +// dataArrVO1.setLog2(String.valueOf(yin)); +// dataArrVO2.setNum("阳性数量"); +// dataArrVO2.setLog2(String.valueOf(yang)); +// list1.add(dataArrVO1); +// list1.add(dataArrVO2); if (list1.size() > 0) { Map> resultMap = new HashMap<>(); @@ -2096,8 +2087,7 @@ public class EntrustServiceImpl extends BaseServiceImpl Map map = new HashMap<>(); if (j == 0) { map.put("1", s + "(" + startNum + "-" + endNum + ")"); - } - else if (j == 1) { + } else if (j == 1) { map.put("0", " "); map.put("1", "1"); map.put("2", "2"); @@ -2123,30 +2113,22 @@ public class EntrustServiceImpl extends BaseServiceImpl map.put("22", "10"); map.put("23", "11"); map.put("24", "12"); - } - else { + } else { if (j == 2) { map.put("0", "A"); - } - if (j == 3) { + } else if (j == 3) { map.put("0", "B"); - } - if (j == 4) { + } else if (j == 4) { map.put("0", "C"); - } - if (j == 5) { + } else if (j == 5) { map.put("0", "D"); - } - if (j == 6) { + } else if (j == 6) { map.put("0", "E"); - } - if (j == 7) { + } else if (j == 7) { map.put("0", "F"); - } - if (j == 8) { + } else if (j == 8) { map.put("0", "G"); - } - if (j == 9) { + } else if (j == 9) { map.put("0", "H"); } for (int k = 1; k <= 12; k++) { @@ -2200,22 +2182,22 @@ public class EntrustServiceImpl extends BaseServiceImpl }); if (list.size() > 0) { for (int i = 0; i < list.size() / 96; i++) { -// List doubles = new ArrayList<>(); -// double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); -// double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); -// double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); -// double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); -// doubles.add(a1); -// doubles.add(a2); -// doubles.add(a3); -// doubles.add(a4); -// List collect = doubles.stream().sorted().collect(Collectors.toList()); -// String format2 = df.format((collect.get(1) + collect.get(2)) / 4); -// ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); -// examineDataArrVO.setNum("临界值"); -// examineDataArrVO.setValue(""); -// examineDataArrVO.setResult(format2); -// list1.add(examineDataArrVO); + List doubles = new ArrayList<>(); + double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); + double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); + double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); + double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); + doubles.add(a1); + doubles.add(a2); + doubles.add(a3); + doubles.add(a4); + List collect = doubles.stream().sorted().collect(Collectors.toList()); + String format2 = df.format((collect.get(1) + collect.get(2)) / 4); + ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); + examineDataArrVO.setNum("临界值"); + examineDataArrVO.setValue(""); + examineDataArrVO.setResult(format2); + list1.add(examineDataArrVO); for (int j = 0; j < 96; j++) { ExamineDataArrVO vo = list.get((i * 96) + j); if (vo.getNum() != null) { @@ -2226,16 +2208,16 @@ public class EntrustServiceImpl extends BaseServiceImpl } // 阴阳性数量 - long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); - long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); - ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); - ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); - dataArrVO1.setNum("阴性数量"); - dataArrVO1.setLog2(String.valueOf(yin)); - dataArrVO2.setNum("阳性数量"); - dataArrVO2.setLog2(String.valueOf(yang)); - list1.add(dataArrVO1); - list1.add(dataArrVO2); +// long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); +// long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); +// ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); +// ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); +// dataArrVO1.setNum("阴性数量"); +// dataArrVO1.setLog2(String.valueOf(yin)); +// dataArrVO2.setNum("阳性数量"); +// dataArrVO2.setLog2(String.valueOf(yang)); +// list1.add(dataArrVO1); +// list1.add(dataArrVO2); if (list1.size() > 0) { Map> resultMap = new HashMap<>(); @@ -2389,8 +2371,7 @@ public class EntrustServiceImpl extends BaseServiceImpl Map map = new HashMap<>(); if (j == 0) { map.put("1", s + "(" + startNum + "-" + endNum + ")"); - } - else if (j == 1) { + } else if (j == 1) { map.put("0", " "); map.put("1", "1"); map.put("2", "2"); @@ -2416,30 +2397,22 @@ public class EntrustServiceImpl extends BaseServiceImpl map.put("22", "10"); map.put("23", "11"); map.put("24", "12"); - } - else { + } else { if (j == 2) { map.put("0", "A"); - } - if (j == 3) { + } else if (j == 3) { map.put("0", "B"); - } - if (j == 4) { + } else if (j == 4) { map.put("0", "C"); - } - if (j == 5) { + } else if (j == 5) { map.put("0", "D"); - } - if (j == 6) { + } else if (j == 6) { map.put("0", "E"); - } - if (j == 7) { + } else if (j == 7) { map.put("0", "F"); - } - if (j == 8) { + } else if (j == 8) { map.put("0", "G"); - } - if (j == 9) { + } else if (j == 9) { map.put("0", "H"); } for (int k = 1; k <= 12; k++) { @@ -2511,8 +2484,7 @@ public class EntrustServiceImpl extends BaseServiceImpl } } } - } - else { + } else { for (int i = 0; i < list.size() / 96 + 1; i++) { double a1 = Double.parseDouble(list.get(i * 96).getOriginResult()); double b1 = Double.parseDouble(list.get((i * 96) + 1).getOriginResult()); @@ -2544,16 +2516,16 @@ public class EntrustServiceImpl extends BaseServiceImpl } // 阴阳性数量 - long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); - long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); - ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); - ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); - dataArrVO1.setNum("阴性数量"); - dataArrVO1.setValue(String.valueOf(yin)); - dataArrVO2.setNum("阳性数量"); - dataArrVO2.setValue(String.valueOf(yang)); - list1.add(dataArrVO1); - list1.add(dataArrVO2); +// long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); +// long yang = list1.stream().filter((ExamineDataArrVO e) -> "阳性".equals(e.getResult())).count(); +// ExamineDataArrVO dataArrVO1 = new ExamineDataArrVO(); +// ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); +// dataArrVO1.setNum("阴性数量"); +// dataArrVO1.setValue(String.valueOf(yin)); +// dataArrVO2.setNum("阳性数量"); +// dataArrVO2.setValue(String.valueOf(yang)); +// list1.add(dataArrVO1); +// list1.add(dataArrVO2); if (list1.size() > 0) { Map> resultMap = new HashMap<>(); @@ -2662,8 +2634,7 @@ public class EntrustServiceImpl extends BaseServiceImpl Map map = new HashMap<>(); if (j == 0) { map.put("1", s + "(" + startNum + "-" + endNum + ")"); - } - else if (j == 1) { + } else if (j == 1) { map.put("0", " "); map.put("1", "1"); map.put("2", "2"); @@ -2689,30 +2660,22 @@ public class EntrustServiceImpl extends BaseServiceImpl map.put("22", "10"); map.put("23", "11"); map.put("24", "12"); - } - else { + } else { if (j == 2) { map.put("0", "A"); - } - if (j == 3) { + } else if (j == 3) { map.put("0", "B"); - } - if (j == 4) { + } else if (j == 4) { map.put("0", "C"); - } - if (j == 5) { + } else if (j == 5) { map.put("0", "D"); - } - if (j == 6) { + } else if (j == 6) { map.put("0", "E"); - } - if (j == 7) { + } else if (j == 7) { map.put("0", "F"); - } - if (j == 8) { + } else if (j == 8) { map.put("0", "G"); - } - if (j == 9) { + } else if (j == 9) { map.put("0", "H"); } for (int k = 1; k <= 12; k++) { @@ -2813,8 +2776,7 @@ public class EntrustServiceImpl extends BaseServiceImpl Map map = new HashMap<>(); if (j == 0) { map.put("1", s + "(" + startNum + "-" + endNum + ")"); - } - else if (j == 1) { + } else if (j == 1) { map.put("0", " "); map.put("1", "1"); map.put("2", "2"); @@ -2840,30 +2802,22 @@ public class EntrustServiceImpl extends BaseServiceImpl map.put("22", "10"); map.put("23", "11"); map.put("24", "12"); - } - else { + } else { if (j == 2) { map.put("0", "A"); - } - if (j == 3) { + } else if (j == 3) { map.put("0", "B"); - } - if (j == 4) { + } else if (j == 4) { map.put("0", "C"); - } - if (j == 5) { + } else if (j == 5) { map.put("0", "D"); - } - if (j == 6) { + } else if (j == 6) { map.put("0", "E"); - } - if (j == 7) { + } else if (j == 7) { map.put("0", "F"); - } - if (j == 8) { + } else if (j == 8) { map.put("0", "G"); - } - if (j == 9) { + } else if (j == 9) { map.put("0", "H"); } for (int k = 1; k <= 12; k++) { @@ -2950,6 +2904,7 @@ public class EntrustServiceImpl extends BaseServiceImpl /** * 通过空格替换null + * * @param ctValue * @return */