diff --git a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/IExamineReagentService.java b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/IExamineReagentService.java index 0829c22..e256f32 100644 --- a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/IExamineReagentService.java +++ b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/IExamineReagentService.java @@ -133,5 +133,160 @@ public interface IExamineReagentService { Map>>> map1, List> list); + /** + * 数据库ID:2010597883441655809 + * 试剂名称:非洲猪瘟病毒阻断ELISA抗体检测试剂盒-- + * 生产厂家:青岛立见生物科技有限公司 + * + * @param group 填报实验结果的组数,每组9行,12列 + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655809(int group, Map> groupExcelData, + Map>>> map1, + List> list); + /** + * 数据库ID:2010597883441655810 + * 试剂名称:非洲猪瘟病毒(ASFV)阻断ELISA抗体检测试剂盒 + * 生产厂家:北京鑫康生物技术开发有限公司 + * + * @param group 填报实验结果的组数,每组9行,12列 + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655810(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883441655811 + * 试剂名称:非洲猪瘟病毒抗体阻断ELISA检测试剂盒 + * 生产厂家:--测易生物 + * + * @param group 填报实验结果的组数,每组9行,12列 + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655811(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958977 + * 试剂名称:猪伪狂犬病病毒gE蛋白阻断ELISA抗体检测试剂盒 + * 生产厂家:--科前生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655977(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958978 + * 试剂名称:猪伪狂犬病病毒gB蛋自阻断ELIA抗体检测试剂盒 + * 生产厂家:--科前生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655978(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958979 + * 试剂名称:猪伪狂犬病毒gPI竞争ELISA抗体检测试剂盒 + * 生产厂家:--禾旭生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655979(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958980 + * 试剂名称:猪伪狂犬病毒gB竞争ELISA抗体检测试剂盒 + * 生产厂家:---禾旭生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655980(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958981 + * 试剂名称:猪瘟病毒ELISA抗体检测试剂盒 + * 生产厂家:--深圳市绿诗源生物技术有限公司 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655981(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958982 + * 试剂名称:猪瘟病毒阻断ELISA抗体检测试剂盒 + * 生产厂家:--科前生物 --有相同的 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655982(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958983 + * 试剂名称:猪瘟病毒间接ELISA抗体检测试剂盒 + * 生产厂家:--禾旭生物 --有相同的 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655983(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958984 + * 试剂名称:猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(维伯鑫) + * 生产厂家:--维伯鑫 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655984(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958985 + * 试剂名称:猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(绿诗源) + * 生产厂家:--深圳市绿诗源生物技术有限公司 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655985(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958986 + * 试剂名称:猪繁殖与呼吸综合征病毒间接ELISA抗体检测试剂盒 + * 生产厂家:--禾旭生物 --有相同的 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655986(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958987 + * 试剂名称:猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(测易) + * 生产厂家:--测易生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655987(int group, Map> groupExcelData, Map>>> map1, List> list); + /** + * 数据库ID:2010597883512958988 + * 试剂名称:猪口蹄疫病毒O型VP1间接ELISA抗体检测试剂盒 + * 生产厂家:--洛阳莱普生信息科技有限公司 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + void reagent2010597883441655988(int group, Map> groupExcelData, Map>>> map1, List> list); } 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 e85e834..c1b2bb2 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 @@ -3273,46 +3273,6 @@ public class EntrustServiceImpl extends BaseServiceImpl map2.put("2", "阳性对照OD平均值"); map2.put("3", format1); } - // 2010597883441655809 非洲猪瘟病毒阻断ELISA抗体检测试剂盒--青岛立见生物科技有限公司 - // 2010597883441655810 非洲猪瘟病毒(ASFV)阻断ELISA抗体检测试剂盒--北京鑫康生物技术开发有限公司 - // 2010597883441655811 非洲猪瘟病毒抗体阻断ELISA检测试剂盒--测易生物 - // 2010597883512958977 猪伪狂犬病病毒gE蛋白阻断ELISA抗体检测试剂盒--科前生物 - // 2010597883512958978 猪伪狂犬病病毒gB蛋自阻断ELIA抗体检测试剂盒--科前生物 - // 2010597883512958979 猪伪狂犬病毒gPI竞争ELISA抗体检测试剂盒--禾旭生物 - // 2010597883512958980 猪伪狂犬病毒gB竞争ELISA抗体检测试剂盒--禾旭生物 - // 2010597883512958981 猪瘟病毒ELISA抗体检测试剂盒--深圳市绿诗源生物技术有限公司 - // 2010597883512958982 猪瘟病毒阻断ELISA抗体检测试剂盒--科前生物 --有相同的 - // 2010597883512958983 猪瘟病毒间接ELISA抗体检测试剂盒--禾旭生物 --有相同的 - // 2010597883512958984 猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(维伯鑫)--维伯鑫 - // 2010597883512958985 猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(绿诗源)--深圳市绿诗源生物技术有限公司 - // 2010597883512958986 猪繁殖与呼吸综合征病毒间接ELISA抗体检测试剂盒--禾旭生物 --有相同的 - // 2010597883512958987 猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(测易)--测易生物 - // 2010597883512958988 猪口蹄疫病毒O型VP1间接ELISA抗体检测试剂盒--洛阳莱普生信息科技有限公司 - // 2010597883512958989 禽白血病病毒J亚群ELISA抗体检测试剂盒--哈尔滨国生生物科技股份有限公司 - // 2010597883512958990 禽白血病病毒AB亚群ELISA抗体检测试剂盒--哈尔滨国生生物科技股份有限公司 - else if ("2010597883441655809".equals(reagentId) - ||"2010597883441655810".equals(reagentId) - ||"2010597883441655811".equals(reagentId) - ||"2010597883512958977".equals(reagentId) - ||"2010597883512958978".equals(reagentId) - ||"2010597883512958979".equals(reagentId) - ||"2010597883512958980".equals(reagentId) - ||"2010597883512958981".equals(reagentId) - ||"2010597883512958982".equals(reagentId) - ||"2010597883512958983".equals(reagentId) - ||"2010597883512958984".equals(reagentId) - ||"2010597883512958985".equals(reagentId) - ||"2010597883512958986".equals(reagentId) - ||"2010597883512958987".equals(reagentId) - ||"2010597883512958988".equals(reagentId) - ||"2010597883512958989".equals(reagentId) - ||"2010597883512958990".equals(reagentId) - ) { - map1.put("2", "阴性对照OD平均值"); - map1.put("3", format); - map2.put("2", "阳性对照OD平均值"); - map2.put("3", format1); - } map1.put("5", "成立"); map2.put("5", "成立"); resultList3.add(map1); diff --git a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineReagentServiceImpl.java b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineReagentServiceImpl.java index 3839bc1..12a78ff 100644 --- a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineReagentServiceImpl.java +++ b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineReagentServiceImpl.java @@ -21,6 +21,7 @@ import java.util.Map; @RequiredArgsConstructor public class ExamineReagentServiceImpl implements IExamineReagentService { private final static DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#0.000"); + private final static DecimalFormat BLOCKING_RATE_PERCENT_FORMAT = new DecimalFormat("#.00%"); @Override public Map> getGroupExcelData(int group, List excelData) { @@ -201,6 +202,1162 @@ public class ExamineReagentServiceImpl implements IExamineReagentService { map1.put("g" + (i + 1), mapList); } } + /** + * 数据库ID:2010597883441655809 + * 试剂名称:非洲猪瘟病毒阻断ELISA抗体检测试剂盒-- + * 生产厂家:青岛立见生物科技有限公司 + * + * @param group 填报实验结果的组数,每组9行,12列 + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655809(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = (negativeVal1 + negativeVal2) / 2; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(negativeAvg>0.5 && (100 - (positiveAvg/negativeAvg ) * 100)>50 )) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg != 0) { + SP = DECIMAL_FORMAT.format(100-((Double.parseDouble(cellVal)) / negativeAvg) *100); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) < 0.2) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883441655810 + * 试剂名称:非洲猪瘟病毒(ASFV)阻断ELISA抗体检测试剂盒 + * 生产厂家:北京鑫康生物技术开发有限公司 + * + * @param group 填报实验结果的组数,每组9行,12列 + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655810(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = (negativeVal1 + negativeVal2) / 2; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (negativeAvg/positiveAvg<4) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg != 0) { + SP = DECIMAL_FORMAT.format(((negativeAvg-(Double.parseDouble(cellVal)))/(negativeAvg-positiveAvg))*100); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <= 40) { + mapResult.put("result", "阴性"); + } else if (Double.parseDouble(SP) < 50) { + mapResult.put("result", "可疑样本"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883441655811 + * 试剂名称:非洲猪瘟病毒抗体阻断ELISA检测试剂盒 + * 生产厂家:--测易生物 + * + * @param group 填报实验结果的组数,每组9行,12列 + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655811(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = (negativeVal1 + negativeVal2) / 2; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(negativeAvg>0.7 && positiveAvg/negativeAvg <0.3)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg != 0) { + SP = DECIMAL_FORMAT.format((Double.parseDouble(cellVal))/negativeAvg); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) >0.5) { + mapResult.put("result", "阴性"); + } else if (Double.parseDouble(SP) >0.4) { + mapResult.put("result", "可疑样本"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958977 + * 试剂名称:猪伪狂犬病病毒gE蛋白阻断ELISA抗体检测试剂盒 + * 生产厂家:--科前生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655977(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = (negativeVal1 + negativeVal2) / 2; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (negativeAvg-positiveAvg>=0.3) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg != 0) { + SP = DECIMAL_FORMAT.format((Double.parseDouble(cellVal))/negativeAvg); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) >0.7) { + mapResult.put("result", "阴性"); + } else if (Double.parseDouble(SP) >0.6) { + mapResult.put("result", "可疑样本"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958978 + * 试剂名称:猪伪狂犬病病毒gB蛋自阻断ELIA抗体检测试剂盒 + * 生产厂家:--科前生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655978(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = (negativeVal1 + negativeVal2) / 2; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(positiveAvg!=0 && positiveAvg<=0.4 && negativeAvg/positiveAvg>=0.5)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg != 0) { + SP = DECIMAL_FORMAT.format((Double.parseDouble(cellVal))/negativeAvg); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) >0.7) { + mapResult.put("result", "阴性"); + } else if (Double.parseDouble(SP) >0.6) { + mapResult.put("result", "可疑样本"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958979 + * 试剂名称:猪伪狂犬病毒gPI竞争ELISA抗体检测试剂盒 + * 生产厂家:--禾旭生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655979(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = (negativeVal1 + negativeVal2) / 2; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(negativeAvg-positiveAvg>=0.4 && positiveAvg<=0.3)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg != 0) { + SP = DECIMAL_FORMAT.format((Double.parseDouble(cellVal))/negativeAvg); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) >0.35) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958980 + * 试剂名称:猪伪狂犬病毒gB竞争ELISA抗体检测试剂盒 + * 生产厂家:---禾旭生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655980(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = (negativeVal1 + negativeVal2) / 2; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(negativeAvg-positiveAvg>=0.4 && positiveAvg<=0.3)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg != 0) { + SP = DECIMAL_FORMAT.format((Double.parseDouble(cellVal))/negativeAvg); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) >0.4) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958981 + * 试剂名称:猪瘟病毒ELISA抗体检测试剂盒 + * 生产厂家:--深圳市绿诗源生物技术有限公司 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655981(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg1 = ((negativeVal1 + negativeVal2) / 2); + double negativeAvg = negativeAvg1<=0.05?0.05:negativeAvg1; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(positiveAvg>=0.6 && negativeAvg<0.4)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if ((positiveAvg-negativeAvg)!=0) { + SP = DECIMAL_FORMAT.format(((Double.parseDouble(cellVal))-negativeAvg)/(positiveAvg-negativeAvg)); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.25) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958982 + * 试剂名称:猪瘟病毒阻断ELISA抗体检测试剂盒 + * 生产厂家:--科前生物 --有相同的 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655982(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = ((negativeVal1 + negativeVal2) / 2); + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(negativeAvg>0.5 && (positiveAvg/negativeAvg)<0.5)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (negativeAvg!=0) { + SP = DECIMAL_FORMAT.format(1-((Double.parseDouble(cellVal))/negativeAvg)); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", BLOCKING_RATE_PERCENT_FORMAT.format(SP)); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.35) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958983 + * 试剂名称:猪瘟病毒间接ELISA抗体检测试剂盒 + * 生产厂家:--禾旭生物 --有相同的 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655983(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = ((negativeVal1 + negativeVal2) / 2); + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(negativeAvg<0.3 && positiveAvg>0.6)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (positiveAvg!=0) { + SP = DECIMAL_FORMAT.format((Double.parseDouble(cellVal))/positiveAvg); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.5) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958984 + * 试剂名称:猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(维伯鑫) + * 生产厂家:--维伯鑫 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655984(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg = ((negativeVal1 + negativeVal2) / 2); + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(negativeAvg<=0.2 && positiveAvg>=0.6)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if ((positiveAvg-negativeAvg)!=0) { + SP = DECIMAL_FORMAT.format(((Double.parseDouble(cellVal))-negativeAvg)/(positiveAvg-negativeAvg)); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.5) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958985 + * 试剂名称:猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(绿诗源) + * 生产厂家:--深圳市绿诗源生物技术有限公司 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655985(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg1 = ((negativeVal1 + negativeVal2) / 2); + double negativeAvg = negativeAvg1 <=0.05 ? 0.05:negativeAvg1; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!(positiveAvg>=0.6 && negativeAvg<0.4)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if ((positiveAvg-negativeAvg)!=0) { + SP = DECIMAL_FORMAT.format(((Double.parseDouble(cellVal))-negativeAvg)/(positiveAvg-negativeAvg)); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.2) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958986 + * 试剂名称:猪繁殖与呼吸综合征病毒间接ELISA抗体检测试剂盒 + * 生产厂家:--禾旭生物 --有相同的 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655986(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg1 = ((negativeVal1 + negativeVal2) / 2); + double negativeAvg = negativeAvg1 <=0.05 ? 0.05:negativeAvg1; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!((positiveAvg-negativeAvg)>=0.7 && negativeAvg<0.3)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if (positiveAvg!=0) { + SP = DECIMAL_FORMAT.format((Double.parseDouble(cellVal))/positiveAvg); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.3) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958987 + * 试剂名称:猪繁殖与呼吸综合征病毒ELISA抗体检测试剂盒(测易) + * 生产厂家:--测易生物 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655987(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg1 = ((negativeVal1 + negativeVal2) / 2); + double negativeAvg = negativeAvg1 <=0.05 ? 0.05:negativeAvg1; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!((positiveAvg-negativeAvg)>=0.3 && negativeAvg<=0.5)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if ((positiveAvg-negativeAvg)!=0) { + SP = DECIMAL_FORMAT.format(((Double.parseDouble(cellVal))-negativeAvg)/(positiveAvg-negativeAvg)); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.3) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } + /** + * 数据库ID:2010597883512958988 + * 试剂名称:猪口蹄疫病毒O型VP1间接ELISA抗体检测试剂盒 + * 生产厂家:--洛阳莱普生信息科技有限公司 + * @param group + * @param groupExcelData + * @param map1 + * @param list + */ + @Override + public void reagent2010597883441655988(int group, Map> groupExcelData, Map>>> map1, List> list) { + for (int i = 0; i < group; i++) { + List>> mapList = new ArrayList<>(); + List excels = groupExcelData.get(i + 1 + ""); + double negativeVal1 = Double.parseDouble(excels.get(0).getCode1()); + double negativeVal2 = Double.parseDouble(excels.get(1).getCode1()); + double positiveVal1 = Double.parseDouble(excels.get(2).getCode1()); + double positiveVal2 = Double.parseDouble(excels.get(3).getCode1()); + // 阴性对照平均值 + double negativeAvg1 = ((negativeVal1 + negativeVal2) / 2); + double negativeAvg = negativeAvg1 <=0.05 ? 0.05:negativeAvg1; + // 阳性对照平均值 + double positiveAvg = (positiveVal1 + positiveVal2) / 2; + + // 成立条件校验 + if (!((positiveAvg-negativeAvg)>=0.5 && negativeAvg<=0.3)) { + throw new ServiceException("第" + (i + 1) + "板阴阳性对照OD值条件不成立,请修改后重新上传!"); + } + + for (int rowNum = 0; rowNum < excels.size(); rowNum++) { + // 行标头:前端渲染需要A、B、C.... + String a = String.valueOf((char) (rowNum + 65)); + + //取到一行记录 + ExamineExcel examineExcel = excels.get(rowNum); + int fieldsLength = examineExcel.getClass().getDeclaredFields().length - 1; + + Map> map2 = new HashMap<>(); + + String SP = "0.00"; + for (int colNum = 1; colNum <= fieldsLength; colNum++) { + String cellVal = getExamineCellData(examineExcel, colNum); + + Map mapResult = new HashMap<>(); + // colNum 是列,rowNum是行 ,我们定义index是一列列的定义 + int index = (colNum - 1) * 8 + rowNum + 1; + if (StringUtils.isNotBlank(cellVal)) { + if (rowNum > 5 || colNum > 1) { + if ((positiveAvg-negativeAvg)!=0) { + SP = DECIMAL_FORMAT.format(((Double.parseDouble(cellVal))-negativeAvg)/(positiveAvg-negativeAvg)); + } + mapResult.put("originResult", cellVal); + mapResult.put("value", SP); + mapResult.put("num", "1"); + if (Double.parseDouble(SP) <0.3) { + mapResult.put("result", "阴性"); + } else { + mapResult.put("result", "阳性"); + } + } else { + mapResult.put("originResult", cellVal); + mapResult.put("num", ""); + } + } else { + mapResult.put("originResult", ""); + mapResult.put("num", ""); + } + mapResult.put("order", index + i * 96); + map2.put(a + colNum, mapResult); + list.add(mapResult); + } + mapList.add(map2); + } + + map1.put("g" + (i + 1), mapList); + } + } /** * 数据库ID:2010597883512958986 diff --git a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineResultServiceImpl.java b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineResultServiceImpl.java index cb8029b..bc42201 100644 --- a/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineResultServiceImpl.java +++ b/lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/ExamineResultServiceImpl.java @@ -5618,7 +5618,39 @@ public class ExamineResultServiceImpl extends BaseServiceImpl