添加STATISTICS界面显示mdc信息

This commit is contained in:
duwenyuan 2025-06-30 10:45:27 +08:00
parent c02fddaf6f
commit 4de9186c64

View File

@ -934,6 +934,8 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
if (StringUtils.isNotBlank(nuclideName)) { if (StringUtils.isNotBlank(nuclideName)) {
List<Double> concList = new LinkedList<>(); List<Double> concList = new LinkedList<>();
resultMap.put(nuclideName+"Conc", concList); resultMap.put(nuclideName+"Conc", concList);
List<Double> mdcList = new LinkedList<>();
resultMap.put(nuclideName+"MDC", mdcList);
} }
} }
} }
@ -1042,6 +1044,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
String nuclideName = nuclideNameList.get(i); String nuclideName = nuclideNameList.get(i);
if (StringUtils.isNotBlank(nuclideName)) { if (StringUtils.isNotBlank(nuclideName)) {
columnNameList.add(StringUtils.upperCase(nuclideName)); columnNameList.add(StringUtils.upperCase(nuclideName));
columnNameList.add(StringUtils.upperCase(nuclideName+"MDC"));
} }
} }
} }
@ -1158,12 +1161,19 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
if (StringUtils.isNotBlank(nuclideName)) { if (StringUtils.isNotBlank(nuclideName)) {
String nuclideSql = "(SELECT DISTINCT\n" + String nuclideSql = "(SELECT DISTINCT\n" +
"D.CONCENTRATION\n" + "D.CONCENTRATION\n" +
"FROM\n" + "FROM\n" +dbName+".GARDS_NUCL_IDED D\n" +
""+dbName+".GARDS_NUCL_IDED D\n" +
"WHERE\n" + "WHERE\n" +
"D.NUCLIDENAME = '"+nuclideName+"'\n" + "D.NUCLIDENAME = '"+nuclideName+"'\n" +
"AND D.SAMPLE_ID = AA.SAMPLE_ID\n" + "AND D.SAMPLE_ID = AA.SAMPLE_ID\n" +
") AS "+nuclideName; ") AS "+nuclideName+",\n" +
"(\n" +
"SELECT DISTINCT\n" +
"D.MDC\n" +
"FROM\n" +dbName+".GARDS_NUCL_IDED D\n" +
"WHERE\n" +
"D.NUCLIDENAME = '"+nuclideName+"'\n" +
"AND D.SAMPLE_ID = AA.SAMPLE_ID\n" +
") AS "+nuclideName+"MDC";
nuclideSqls.add(nuclideSql); nuclideSqls.add(nuclideSql);
} }
} }
@ -1250,6 +1260,7 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
} else if (systemType.equals("Particulate")) { } else if (systemType.equals("Particulate")) {
for (String nuclideName: nuclideNameList) { for (String nuclideName: nuclideNameList) {
List<Double> concList = (List<Double>) resultMap.get(nuclideName + "Conc"); List<Double> concList = (List<Double>) resultMap.get(nuclideName + "Conc");
List<Double> mdcList = (List<Double>) resultMap.get(nuclideName + "MDC");
//将核素名称转为全部大写 //将核素名称转为全部大写
String columnName = StringUtils.upperCase(nuclideName); String columnName = StringUtils.upperCase(nuclideName);
//读取查询出的浓度 //读取查询出的浓度
@ -1264,6 +1275,18 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
} else { } else {
concList.add(null); concList.add(null);
} }
//读取查询出的mdc结果
Object mdc = nuclideStatistics.get(columnName + "MDC");
//判断如果mdc结果不为空 正常存储
if (Objects.nonNull(mdc)) {
if (mdc.toString().toLowerCase().contains("inf") || mdc.toString().toLowerCase().contains("nan")) {
mdcList.add(null);
} else {
mdcList.add(Double.valueOf(mdc.toString()));
}
} else {
mdcList.add(null);
}
} }
} }
isHave = true; isHave = true;
@ -1284,7 +1307,9 @@ public class GardsSampleDataWebServiceImpl extends ServiceImpl<GardsSampleDataWe
} else if (systemType.equals("Particulate")) { } else if (systemType.equals("Particulate")) {
for (String nuclideName: nuclideNameList) { for (String nuclideName: nuclideNameList) {
List<Double> concList = (List<Double>) resultMap.get(nuclideName + "Conc"); List<Double> concList = (List<Double>) resultMap.get(nuclideName + "Conc");
List<Double> mdcList = (List<Double>) resultMap.get(nuclideName + "MDC");
concList.add(null); concList.add(null);
mdcList.add(null);
} }
} }
} }