打印报告去掉阴阳数量,口蹄疫O型对照加临界值

dev
litao 3 years ago
parent ca2e7171d6
commit 7d3b55efd3
  1. 54
      lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ExamineResultController.java
  2. 511
      lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/EntrustServiceImpl.java

@ -1274,38 +1274,27 @@ public class ExamineResultController extends BladeController {
// 待抽 ↓ // 待抽 ↓
if (col == 1) { if (col == 1) {
value = excels.get(row).getCode1(); value = excels.get(row).getCode1();
} } else if (col == 2) {
if (col == 2) {
value = excels.get(row).getCode2(); value = excels.get(row).getCode2();
} } else if (col == 3) {
if (col == 3) {
value = excels.get(row).getCode3(); value = excels.get(row).getCode3();
} } else if (col == 4) {
if (col == 4) {
value = excels.get(row).getCode4(); value = excels.get(row).getCode4();
} } else if (col == 5) {
if (col == 5) {
value = excels.get(row).getCode5(); value = excels.get(row).getCode5();
} } else if (col == 6) {
if (col == 6) {
value = excels.get(row).getCode6(); value = excels.get(row).getCode6();
} } else if (col == 7) {
if (col == 7) {
value = excels.get(row).getCode7(); value = excels.get(row).getCode7();
} } else if (col == 8) {
if (col == 8) {
value = excels.get(row).getCode8(); value = excels.get(row).getCode8();
} } else if (col == 9) {
if (col == 9) {
value = excels.get(row).getCode9(); value = excels.get(row).getCode9();
} } else if (col == 10) {
if (col == 10) {
value = excels.get(row).getCode10(); value = excels.get(row).getCode10();
} } else if (col == 11) {
if (col == 11) {
value = excels.get(row).getCode11(); value = excels.get(row).getCode11();
} } else if (col == 12) {
if (col == 12) {
value = excels.get(row).getCode12(); value = excels.get(row).getCode12();
} }
Map<String, Object> cPosData = new HashMap<>(4); Map<String, Object> cPosData = new HashMap<>(4);
@ -1528,38 +1517,31 @@ public class ExamineResultController extends BladeController {
if (avg < currValue) { if (avg < currValue) {
return "<1:8"; return "<1:8";
} }
} } else if (row == 1) {
if (row == 1) {
if (avg < currValue && avg > lastValue) { if (avg < currValue && avg > lastValue) {
return "1:11"; return "1:11";
} }
} } else if (row == 2) {
if (row == 2) {
if (avg < currValue && avg > lastValue) { if (avg < currValue && avg > lastValue) {
return "1:22"; return "1:22";
} }
} } else if (row == 3) {
if (row == 3) {
if (avg < currValue && avg > lastValue) { if (avg < currValue && avg > lastValue) {
return "1:45"; return "1:45";
} }
} } else if (row == 4) {
if (row == 4) {
if (avg < currValue && avg > lastValue) { if (avg < currValue && avg > lastValue) {
return "1:90"; return "1:90";
} }
} } else if (row == 5) {
if (row == 5) {
if (avg < currValue && avg > lastValue) { if (avg < currValue && avg > lastValue) {
return "1:180"; return "1:180";
} }
} } else if (row == 6) {
if (row == 6) {
if (avg < currValue && avg > lastValue) { if (avg < currValue && avg > lastValue) {
return "1:360"; return "1:360";
} }
} } else if (row == 7) {
if (row == 7) {
if (avg < currValue && avg > lastValue) { if (avg < currValue && avg > lastValue) {
return "1:720"; return "1:720";
} else if (avg > currValue) { } else if (avg > currValue) {

@ -95,77 +95,77 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Autowired @Autowired
private IRepairApplicationService repairApplicationService; private IRepairApplicationService repairApplicationService;
@Value("${handleUrl}") // @Value("${handleUrl}")
private String handleUrl; // private String handleUrl;
//
@Value("${print1}") // @Value("${print1}")
private String print1; // private String print1;
//
@Value("${print2}") // @Value("${print2}")
private String print2; // private String print2;
//
@Value("${print3}") // @Value("${print3}")
private String print3; // private String print3;
//
@Value("${print4}") // @Value("${print4}")
private String print4; // private String print4;
//
@Value("${print5}") // @Value("${print5}")
private String print5; // private String print5;
//
@Value("${print6}") // @Value("${print6}")
private String print6; // private String print6;
//
@Value("${print7}") // @Value("${print7}")
private String print7; // private String print7;
//
@Value("${print8}") // @Value("${print8}")
private String print8; // private String print8;
//
@Value("${print9}") // @Value("${print9}")
private String print9; // private String print9;
//
@Value("${print10}") // @Value("${print10}")
private String print10; // private String print10;
//
@Value("${reportPrint}") // @Value("${reportPrint}")
private String reportPrint; // private String reportPrint;
//
@Value("${examineReportPrint}") // @Value("${examineReportPrint}")
private String examineReportPrint; // private String examineReportPrint;
//
@Value("${BLSreportPrint}") // @Value("${BLSreportPrint}")
private String BLSreportPrint; // private String BLSreportPrint;
//
@Value("${PCRreportPrint}") // @Value("${PCRreportPrint}")
private String PCRreportPrint; // private String PCRreportPrint;
//
@Value("${XNreportPrint}") // @Value("${XNreportPrint}")
private String XNreportPrint; // private String XNreportPrint;
//
@Value("${LDanreportPrint}") // @Value("${LDanreportPrint}")
private String LDanreportPrint; // private String LDanreportPrint;
//
@Value("${LDuoreportPrint}") // @Value("${LDuoreportPrint}")
private String LDuoreportPrint; // private String LDuoreportPrint;
//
@Value("${simpleRegisterPrint}") // @Value("${simpleRegisterPrint}")
private String simpleRegisterPrint; // private String simpleRegisterPrint;
//
@Value("${simpleNumberPrint}") // @Value("${simpleNumberPrint}")
private String simpleNumberPrint; // private String simpleNumberPrint;
//
@Value("${eTaskPrint}") // @Value("${eTaskPrint}")
private String eTaskPrint; // private String eTaskPrint;
//
@Value("${simpleHandlePrint}") // @Value("${simpleHandlePrint}")
private String simpleHandlePrint; // private String simpleHandlePrint;
//
@Value("${simpleReceivePrint}") // @Value("${simpleReceivePrint}")
private String simpleReceivePrint; // private String simpleReceivePrint;
//
@Value("${repairPrint}") // @Value("${repairPrint}")
private String repairPrint; // private String repairPrint;
// @Value("${imagePrint}") // @Value("${imagePrint}")
// private String imagePrint; // private String imagePrint;
@ -697,7 +697,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
List<ExamineResultVo> everyResultUnit = collect.get(originalNum); List<ExamineResultVo> everyResultUnit = collect.get(originalNum);
Map<String, String> row = new HashMap<>(); Map<String, String> row = new HashMap<>();
row.put("originalNum", everyResultUnit.get(0).getOriginalNum()); row.put("originalNum", everyResultUnit.get(0).getOriginalNum());
rowCount ++; rowCount++;
// 对检测按照index分组 // 对检测按照index分组
Map<Integer, List<ExamineResultVo>> voGroupByIndex = everyResultUnit.stream().collect(Collectors.groupingBy(ExamineResultVo::getIndex)); Map<Integer, List<ExamineResultVo>> voGroupByIndex = everyResultUnit.stream().collect(Collectors.groupingBy(ExamineResultVo::getIndex));
@ -736,7 +736,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
row.put("num" + index, num); row.put("num" + index, num);
row.put("value" + index, value); row.put("value" + index, value);
row.put("result" + index,result); row.put("result" + index, result);
} }
// 将每一行加入到模板循环列表 // 将每一行加入到模板循环列表
tempResultList.add(row); tempResultList.add(row);
@ -1256,27 +1256,27 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
if ("2".equals(byId.getInputMode()) || "6".equals(byId.getInputMode())) { if ("2".equals(byId.getInputMode()) || "6".equals(byId.getInputMode())) {
List<ExamineTemplate2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), ExamineTemplate2Excel.class); List<ExamineTemplate2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), ExamineTemplate2Excel.class);
// 阴阳性数量 // 阴阳性数量
long yin = list.stream().filter((ExamineTemplate2Excel e) -> "阴性".equals(e.getResult())).count(); // long yin = list.stream().filter((ExamineTemplate2Excel e) -> "阴性".equals(e.getResult())).count();
long yang = list.stream().filter((ExamineTemplate2Excel e) -> "阳性".equals(e.getResult())).count(); // long yang = list.stream().filter((ExamineTemplate2Excel e) -> "阳性".equals(e.getResult())).count();
//
ExamineTemplate2Excel examineTemplate2Excel1 = new ExamineTemplate2Excel(); // ExamineTemplate2Excel examineTemplate2Excel1 = new ExamineTemplate2Excel();
examineTemplate2Excel1.setExperieNum("阴性数量"); // examineTemplate2Excel1.setExperieNum("阴性数量");
examineTemplate2Excel1.setValue(String.valueOf(yin)); // examineTemplate2Excel1.setValue(String.valueOf(yin));
list.add(examineTemplate2Excel1); // list.add(examineTemplate2Excel1);
//
ExamineTemplate2Excel examineTemplate2Excel2 = new ExamineTemplate2Excel(); // ExamineTemplate2Excel examineTemplate2Excel2 = new ExamineTemplate2Excel();
examineTemplate2Excel2.setExperieNum("阳性数量"); // examineTemplate2Excel2.setExperieNum("阳性数量");
examineTemplate2Excel2.setValue(String.valueOf(yang)); // examineTemplate2Excel2.setValue(String.valueOf(yang));
list.add(examineTemplate2Excel2); // list.add(examineTemplate2Excel2);
// 如果是平板的,只有阴性和阳性,如果是试管的才有可疑 // 如果是平板的,只有阴性和阳性,如果是试管的才有可疑
if ("6".equals(byId.getInputMode())) { // if ("6".equals(byId.getInputMode())) {
long keyi = list.stream().filter((ExamineTemplate2Excel e) -> "可疑".equals(e.getResult())).count(); // long keyi = list.stream().filter((ExamineTemplate2Excel e) -> "可疑".equals(e.getResult())).count();
ExamineTemplate2Excel examineTemplate2Excel3 = new ExamineTemplate2Excel(); // ExamineTemplate2Excel examineTemplate2Excel3 = new ExamineTemplate2Excel();
examineTemplate2Excel3.setExperieNum("可疑数量"); // examineTemplate2Excel3.setExperieNum("可疑数量");
examineTemplate2Excel3.setValue(String.valueOf(keyi)); // examineTemplate2Excel3.setValue(String.valueOf(keyi));
list.add(examineTemplate2Excel3); // list.add(examineTemplate2Excel3);
} // }
if (list.size() > 0) { if (list.size() > 0) {
Map<String, List<ExamineTemplate2Excel>> resultMap = new HashMap<>(); Map<String, List<ExamineTemplate2Excel>> resultMap = new HashMap<>();
@ -1334,18 +1334,18 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
else if ("4".equals(byId.getInputMode())) { else if ("4".equals(byId.getInputMode())) {
List<PCR2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), PCR2Excel.class); List<PCR2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), PCR2Excel.class);
// 阴阳性数量 // 阴阳性数量
long yin = list.stream().filter((PCR2Excel e) -> "阴性".equals(e.getValue())).count(); // long yin = list.stream().filter((PCR2Excel e) -> "阴性".equals(e.getValue())).count();
long yang = 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 pcr2Excel1 = new PCR2Excel();
PCR2Excel pcr2Excel2 = new PCR2Excel(); // PCR2Excel pcr2Excel2 = new PCR2Excel();
pcr2Excel1.setExperieNum("阴性数量"); // pcr2Excel1.setExperieNum("阴性数量");
// 减1是因为,不能把阴性对照的阴性结果当做样品计算 // // 减1是因为,不能把阴性对照的阴性结果当做样品计算
pcr2Excel1.setCtValue(String.valueOf(yin - 1)); // pcr2Excel1.setCtValue(String.valueOf(yin - 1));
pcr2Excel2.setExperieNum("阳性数量"); // pcr2Excel2.setExperieNum("阳性数量");
// 减1是因为,不能把阳性对照的阳性结果当做样品计算 // // 减1是因为,不能把阳性对照的阳性结果当做样品计算
pcr2Excel2.setCtValue(String.valueOf(yang - 1)); // pcr2Excel2.setCtValue(String.valueOf(yang - 1));
list.add(pcr2Excel1); // list.add(pcr2Excel1);
list.add(pcr2Excel2); // list.add(pcr2Excel2);
if (list.size() > 0) { if (list.size() > 0) {
Map<String, List<PCR2Excel>> resultMap = new HashMap<>(); Map<String, List<PCR2Excel>> resultMap = new HashMap<>();
@ -1466,16 +1466,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
else if ("5".equals(byId.getInputMode())) { else if ("5".equals(byId.getInputMode())) {
List<XN2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), XN2Excel.class); List<XN2Excel> list = JSON.parseArray(examineResult.getExamineDataArr(), XN2Excel.class);
// 阴阳性数量 // 阴阳性数量
long yin = list.stream().filter((XN2Excel e) -> "阴性".equals(e.getValue())).count(); // long yin = list.stream().filter((XN2Excel e) -> "阴性".equals(e.getValue())).count();
long yang = 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 xn2Excel1 = new XN2Excel();
XN2Excel xn2Excel2 = new XN2Excel(); // XN2Excel xn2Excel2 = new XN2Excel();
xn2Excel1.setExperieNum("阴性数量"); // xn2Excel1.setExperieNum("阴性数量");
xn2Excel1.setCtValue(String.valueOf(yin)); // xn2Excel1.setCtValue(String.valueOf(yin));
xn2Excel2.setExperieNum("阳性数量"); // xn2Excel2.setExperieNum("阳性数量");
xn2Excel2.setCtValue(String.valueOf(yang)); // xn2Excel2.setCtValue(String.valueOf(yang));
list.add(xn2Excel1); // list.add(xn2Excel1);
list.add(xn2Excel2); // list.add(xn2Excel2);
if (list.size() > 0) { if (list.size() > 0) {
Map<String, List<XN2Excel>> resultMap = new HashMap<>(); Map<String, List<XN2Excel>> resultMap = new HashMap<>();
int count = 0; int count = 0;
@ -1638,16 +1638,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
list1.add(examineDataArrVO); list1.add(examineDataArrVO);
list1.addAll(voList); list1.addAll(voList);
// 阴阳性数量 // 阴阳性数量
long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); // long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count();
long yang = 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 dataArrVO1 = new ExamineDataArrVO();
ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); // ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO();
dataArrVO1.setNum("阴性数量"); // dataArrVO1.setNum("阴性数量");
dataArrVO1.setValue(String.valueOf(yin)); // dataArrVO1.setValue(String.valueOf(yin));
dataArrVO2.setNum("阳性数量"); // dataArrVO2.setNum("阳性数量");
dataArrVO2.setValue(String.valueOf(yang)); // dataArrVO2.setValue(String.valueOf(yang));
list1.add(dataArrVO1); // list1.add(dataArrVO1);
list1.add(dataArrVO2); // list1.add(dataArrVO2);
if (list1.size() > 0) { if (list1.size() > 0) {
Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>(); Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>();
@ -1803,8 +1803,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
} } else if (j == 1) {
else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
map.put("2", "2"); map.put("2", "2");
@ -1830,30 +1829,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
map.put("22", "10"); map.put("22", "10");
map.put("23", "11"); map.put("23", "11");
map.put("24", "12"); map.put("24", "12");
} } else {
else {
if (j == 2) { if (j == 2) {
map.put("0", "A"); map.put("0", "A");
} } else if (j == 3) {
if (j == 3) {
map.put("0", "B"); map.put("0", "B");
} } else if (j == 4) {
if (j == 4) {
map.put("0", "C"); map.put("0", "C");
} } else if (j == 5) {
if (j == 5) {
map.put("0", "D"); map.put("0", "D");
} } else if (j == 6) {
if (j == 6) {
map.put("0", "E"); map.put("0", "E");
} } else if (j == 7) {
if (j == 7) {
map.put("0", "F"); map.put("0", "F");
} } else if (j == 8) {
if (j == 8) {
map.put("0", "G"); map.put("0", "G");
} } else if (j == 9) {
if (j == 9) {
map.put("0", "H"); map.put("0", "H");
} }
for (int k = 1; k <= 12; k++) { for (int k = 1; k <= 12; k++) {
@ -1907,22 +1898,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}); });
if (list.size() > 0) { if (list.size() > 0) {
for (int i = 0; i < list.size() / 96; i++) { for (int i = 0; i < list.size() / 96; i++) {
// List<Double> doubles = new ArrayList<>(); List<Double> doubles = new ArrayList<>();
// double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue());
// double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue());
// double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue());
// double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue());
// doubles.add(a1); doubles.add(a1);
// doubles.add(a2); doubles.add(a2);
// doubles.add(a3); doubles.add(a3);
// doubles.add(a4); doubles.add(a4);
// List<Double> collect = doubles.stream().sorted().collect(Collectors.toList()); List<Double> collect = doubles.stream().sorted().collect(Collectors.toList());
// String format2 = df.format((collect.get(1) + collect.get(2)) / 4); String format2 = df.format((collect.get(1) + collect.get(2)) / 4);
// ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO();
// examineDataArrVO.setNum("临界值"); examineDataArrVO.setNum("临界值");
// examineDataArrVO.setValue(""); examineDataArrVO.setValue("");
// examineDataArrVO.setResult(format2); examineDataArrVO.setResult(format2);
// list1.add(examineDataArrVO); list1.add(examineDataArrVO);
for (int j = 0; j < 96; j++) { for (int j = 0; j < 96; j++) {
ExamineDataArrVO vo = list.get((i * 96) + j); ExamineDataArrVO vo = list.get((i * 96) + j);
if (vo.getNum() != null) { if (vo.getNum() != null) {
@ -1933,16 +1924,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
// 阴阳性数量 // 阴阳性数量
long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); // long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count();
long yang = 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 dataArrVO1 = new ExamineDataArrVO();
ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); // ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO();
dataArrVO1.setNum("阴性数量"); // dataArrVO1.setNum("阴性数量");
dataArrVO1.setLog2(String.valueOf(yin)); // dataArrVO1.setLog2(String.valueOf(yin));
dataArrVO2.setNum("阳性数量"); // dataArrVO2.setNum("阳性数量");
dataArrVO2.setLog2(String.valueOf(yang)); // dataArrVO2.setLog2(String.valueOf(yang));
list1.add(dataArrVO1); // list1.add(dataArrVO1);
list1.add(dataArrVO2); // list1.add(dataArrVO2);
if (list1.size() > 0) { if (list1.size() > 0) {
Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>(); Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>();
@ -2096,8 +2087,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
} } else if (j == 1) {
else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
map.put("2", "2"); map.put("2", "2");
@ -2123,30 +2113,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
map.put("22", "10"); map.put("22", "10");
map.put("23", "11"); map.put("23", "11");
map.put("24", "12"); map.put("24", "12");
} } else {
else {
if (j == 2) { if (j == 2) {
map.put("0", "A"); map.put("0", "A");
} } else if (j == 3) {
if (j == 3) {
map.put("0", "B"); map.put("0", "B");
} } else if (j == 4) {
if (j == 4) {
map.put("0", "C"); map.put("0", "C");
} } else if (j == 5) {
if (j == 5) {
map.put("0", "D"); map.put("0", "D");
} } else if (j == 6) {
if (j == 6) {
map.put("0", "E"); map.put("0", "E");
} } else if (j == 7) {
if (j == 7) {
map.put("0", "F"); map.put("0", "F");
} } else if (j == 8) {
if (j == 8) {
map.put("0", "G"); map.put("0", "G");
} } else if (j == 9) {
if (j == 9) {
map.put("0", "H"); map.put("0", "H");
} }
for (int k = 1; k <= 12; k++) { for (int k = 1; k <= 12; k++) {
@ -2200,22 +2182,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}); });
if (list.size() > 0) { if (list.size() > 0) {
for (int i = 0; i < list.size() / 96; i++) { for (int i = 0; i < list.size() / 96; i++) {
// List<Double> doubles = new ArrayList<>(); List<Double> doubles = new ArrayList<>();
// double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue()); double a1 = Double.parseDouble(list.get((i + 1) * 96 - 1).getValue());
// double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue()); double a2 = Double.parseDouble(list.get((i + 1) * 96 - 2).getValue());
// double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue()); double a3 = Double.parseDouble(list.get((i + 1) * 96 - 3).getValue());
// double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue()); double a4 = Double.parseDouble(list.get((i + 1) * 96 - 4).getValue());
// doubles.add(a1); doubles.add(a1);
// doubles.add(a2); doubles.add(a2);
// doubles.add(a3); doubles.add(a3);
// doubles.add(a4); doubles.add(a4);
// List<Double> collect = doubles.stream().sorted().collect(Collectors.toList()); List<Double> collect = doubles.stream().sorted().collect(Collectors.toList());
// String format2 = df.format((collect.get(1) + collect.get(2)) / 4); String format2 = df.format((collect.get(1) + collect.get(2)) / 4);
// ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO(); ExamineDataArrVO examineDataArrVO = new ExamineDataArrVO();
// examineDataArrVO.setNum("临界值"); examineDataArrVO.setNum("临界值");
// examineDataArrVO.setValue(""); examineDataArrVO.setValue("");
// examineDataArrVO.setResult(format2); examineDataArrVO.setResult(format2);
// list1.add(examineDataArrVO); list1.add(examineDataArrVO);
for (int j = 0; j < 96; j++) { for (int j = 0; j < 96; j++) {
ExamineDataArrVO vo = list.get((i * 96) + j); ExamineDataArrVO vo = list.get((i * 96) + j);
if (vo.getNum() != null) { if (vo.getNum() != null) {
@ -2226,16 +2208,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
// 阴阳性数量 // 阴阳性数量
long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); // long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count();
long yang = 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 dataArrVO1 = new ExamineDataArrVO();
ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); // ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO();
dataArrVO1.setNum("阴性数量"); // dataArrVO1.setNum("阴性数量");
dataArrVO1.setLog2(String.valueOf(yin)); // dataArrVO1.setLog2(String.valueOf(yin));
dataArrVO2.setNum("阳性数量"); // dataArrVO2.setNum("阳性数量");
dataArrVO2.setLog2(String.valueOf(yang)); // dataArrVO2.setLog2(String.valueOf(yang));
list1.add(dataArrVO1); // list1.add(dataArrVO1);
list1.add(dataArrVO2); // list1.add(dataArrVO2);
if (list1.size() > 0) { if (list1.size() > 0) {
Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>(); Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>();
@ -2389,8 +2371,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
} } else if (j == 1) {
else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
map.put("2", "2"); map.put("2", "2");
@ -2416,30 +2397,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
map.put("22", "10"); map.put("22", "10");
map.put("23", "11"); map.put("23", "11");
map.put("24", "12"); map.put("24", "12");
} } else {
else {
if (j == 2) { if (j == 2) {
map.put("0", "A"); map.put("0", "A");
} } else if (j == 3) {
if (j == 3) {
map.put("0", "B"); map.put("0", "B");
} } else if (j == 4) {
if (j == 4) {
map.put("0", "C"); map.put("0", "C");
} } else if (j == 5) {
if (j == 5) {
map.put("0", "D"); map.put("0", "D");
} } else if (j == 6) {
if (j == 6) {
map.put("0", "E"); map.put("0", "E");
} } else if (j == 7) {
if (j == 7) {
map.put("0", "F"); map.put("0", "F");
} } else if (j == 8) {
if (j == 8) {
map.put("0", "G"); map.put("0", "G");
} } else if (j == 9) {
if (j == 9) {
map.put("0", "H"); map.put("0", "H");
} }
for (int k = 1; k <= 12; k++) { for (int k = 1; k <= 12; k++) {
@ -2511,8 +2484,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
} }
} }
} } else {
else {
for (int i = 0; i < list.size() / 96 + 1; i++) { for (int i = 0; i < list.size() / 96 + 1; i++) {
double a1 = Double.parseDouble(list.get(i * 96).getOriginResult()); double a1 = Double.parseDouble(list.get(i * 96).getOriginResult());
double b1 = Double.parseDouble(list.get((i * 96) + 1).getOriginResult()); double b1 = Double.parseDouble(list.get((i * 96) + 1).getOriginResult());
@ -2544,16 +2516,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
// 阴阳性数量 // 阴阳性数量
long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count(); // long yin = list1.stream().filter((ExamineDataArrVO e) -> "阴性".equals(e.getResult())).count();
long yang = 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 dataArrVO1 = new ExamineDataArrVO();
ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO(); // ExamineDataArrVO dataArrVO2 = new ExamineDataArrVO();
dataArrVO1.setNum("阴性数量"); // dataArrVO1.setNum("阴性数量");
dataArrVO1.setValue(String.valueOf(yin)); // dataArrVO1.setValue(String.valueOf(yin));
dataArrVO2.setNum("阳性数量"); // dataArrVO2.setNum("阳性数量");
dataArrVO2.setValue(String.valueOf(yang)); // dataArrVO2.setValue(String.valueOf(yang));
list1.add(dataArrVO1); // list1.add(dataArrVO1);
list1.add(dataArrVO2); // list1.add(dataArrVO2);
if (list1.size() > 0) { if (list1.size() > 0) {
Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>(); Map<String, List<ExamineDataArrVO>> resultMap = new HashMap<>();
@ -2662,8 +2634,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
} } else if (j == 1) {
else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
map.put("2", "2"); map.put("2", "2");
@ -2689,30 +2660,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
map.put("22", "10"); map.put("22", "10");
map.put("23", "11"); map.put("23", "11");
map.put("24", "12"); map.put("24", "12");
} } else {
else {
if (j == 2) { if (j == 2) {
map.put("0", "A"); map.put("0", "A");
} } else if (j == 3) {
if (j == 3) {
map.put("0", "B"); map.put("0", "B");
} } else if (j == 4) {
if (j == 4) {
map.put("0", "C"); map.put("0", "C");
} } else if (j == 5) {
if (j == 5) {
map.put("0", "D"); map.put("0", "D");
} } else if (j == 6) {
if (j == 6) {
map.put("0", "E"); map.put("0", "E");
} } else if (j == 7) {
if (j == 7) {
map.put("0", "F"); map.put("0", "F");
} } else if (j == 8) {
if (j == 8) {
map.put("0", "G"); map.put("0", "G");
} } else if (j == 9) {
if (j == 9) {
map.put("0", "H"); map.put("0", "H");
} }
for (int k = 1; k <= 12; k++) { for (int k = 1; k <= 12; k++) {
@ -2813,8 +2776,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (j == 0) { if (j == 0) {
map.put("1", s + "(" + startNum + "-" + endNum + ")"); map.put("1", s + "(" + startNum + "-" + endNum + ")");
} } else if (j == 1) {
else if (j == 1) {
map.put("0", " "); map.put("0", " ");
map.put("1", "1"); map.put("1", "1");
map.put("2", "2"); map.put("2", "2");
@ -2840,30 +2802,22 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
map.put("22", "10"); map.put("22", "10");
map.put("23", "11"); map.put("23", "11");
map.put("24", "12"); map.put("24", "12");
} } else {
else {
if (j == 2) { if (j == 2) {
map.put("0", "A"); map.put("0", "A");
} } else if (j == 3) {
if (j == 3) {
map.put("0", "B"); map.put("0", "B");
} } else if (j == 4) {
if (j == 4) {
map.put("0", "C"); map.put("0", "C");
} } else if (j == 5) {
if (j == 5) {
map.put("0", "D"); map.put("0", "D");
} } else if (j == 6) {
if (j == 6) {
map.put("0", "E"); map.put("0", "E");
} } else if (j == 7) {
if (j == 7) {
map.put("0", "F"); map.put("0", "F");
} } else if (j == 8) {
if (j == 8) {
map.put("0", "G"); map.put("0", "G");
} } else if (j == 9) {
if (j == 9) {
map.put("0", "H"); map.put("0", "H");
} }
for (int k = 1; k <= 12; k++) { for (int k = 1; k <= 12; k++) {
@ -2950,6 +2904,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
/** /**
* 通过空格替换null * 通过空格替换null
*
* @param ctValue * @param ctValue
* @return * @return
*/ */

Loading…
Cancel
Save