人工交互分析模块存储mdc数值非正常数字格式存储后,数据库读取错误问题修改

人工交互分析模块新增加载查询mdc数据内容方法
This commit is contained in:
qiaoqinzheng 2023-12-19 11:48:34 +08:00
parent 807c72d78e
commit b2c85bcd45
5 changed files with 23 additions and 6 deletions

View File

@ -4844,7 +4844,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
//获取主峰对应的下标
int maxIndex = efficiencies.indexOf(maxEff);
mdcInfo.setEnergy(nuclideLines.venergy.get(maxIndex));
mdcInfo.setEfficiency(efficiencies.get(maxIndex) * 100 / nuclideLines.vyield.get(maxIndex));
mdcInfo.setEfficiency(efficiencies.get(maxIndex) / nuclideLines.vyield.get(maxIndex));
mdcInfo.setYield(nuclideLines.vyield.get(maxIndex));
}

View File

@ -72,6 +72,8 @@ public interface SpectrumAnalysisMapper {
List<GardsQcCheckSpectrum> getQcCheck(@Param(value = "dbName") String dbName, @Param(value = "idAnalysis") Integer idAnalysis);
List<CalMDCInfo> getMDC(@Param(value = "dbName") String dbName, @Param(value = "idAnalysis") Integer idAnalysis);
GardsAnalySetting getAnalySetting(@Param(value = "idAnalysis") Integer idAnalysis);
List<NuclideLine> getNuclideLines(@Param(value = "name") String name);

View File

@ -526,6 +526,10 @@
SELECT QC_NAME, QC_VALUE, QC_STANDARD, QC_RESULT FROM ${dbName} WHERE IDANALYSIS = #{idAnalysis}
</select>
<select id="getMDC" resultType="org.jeecg.modules.entity.vo.CalMDCInfo">
SELECT NUCLIDENAME,ENERGY,YIELD,EFFICIENCY,MDC FROM ${dbName} WHERE IDANALYSIS = #{idAnalysis}
</select>
<select id="getAnalySetting" resultType="org.jeecg.modules.base.entity.rnman.GardsAnalySetting">
SELECT
ECUTANALYSIS_LOW,

View File

@ -79,6 +79,7 @@ import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import static io.netty.util.ResourceLeakDetector.setEnabled;
@ -560,6 +561,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
String T_nuc_line = "";
String T_nuc_act = "";
String T_qc = "";
String T_mdc = "";
String T_setting = "";
if (dbName.equals("auto")) {
T_analy = "RNAUTO.GARDS_ANALYSES";
@ -569,6 +571,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
T_nuc_line = "RNAUTO.GARDS_NUCL_LINES_IDED";
T_nuc_act = "RNAUTO.GARDS_NUCL_IDED";
T_qc = "RNAUTO.GARDS_QC_CHECK";
T_mdc = "RNAUTO.GARDS_MDC";
userName = "RNAUTO";
} else if (dbName.equals("man")) {
T_analy = "RNMAN.GARDS_ANALYSES";
@ -578,6 +581,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
T_nuc_line = "RNMAN.GARDS_NUCL_LINES_IDED";
T_nuc_act = "RNMAN.GARDS_NUCL_IDED";
T_qc = "RNMAN.GARDS_QC_CHECK";
T_mdc = "RNMAN.GARDS_MDC";
T_setting = "RNMAN.GARDS_ANALY_SETTING";
}
@ -809,6 +813,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
phd.getQcItems().put(str_key, qcCheckItem);
}
}
// 获取 MDC 结果
List<CalMDCInfo> calMDCInfoList = spectrumAnalysisMapper.getMDC(T_mdc, analysis.getIdAnalysis());
if (CollectionUtils.isNotEmpty(calMDCInfoList)) {
Map<String, CalMDCInfo> mdcInfoMap = calMDCInfoList.stream().collect(Collectors.toMap(CalMDCInfo::getNuclideName, Function.identity()));
phd.setMdcInfoMap(mdcInfoMap);
}
// RNMAN.GARDS_ANALY_SETTING 表读分析设置
if (!dbName.equals("auto")) {
GardsAnalySetting analySetting = spectrumAnalysisMapper.getAnalySetting(analysis.getIdAnalysis());

View File

@ -10,10 +10,7 @@ import org.jeecg.modules.mapper.GardsMDCSpectrumMapper;
import org.jeecg.modules.service.IGardsMDCSpectrumService;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.*;
@Service("mdcSpectrumService")
@DS("ora")
@ -34,7 +31,11 @@ public class GardsMDCSpectrumServiceImpl extends ServiceImpl<GardsMDCSpectrumMap
mdc.setEnergy(mdcInfo.getEnergy());
mdc.setYield(mdcInfo.getYield());
mdc.setEfficiency(mdcInfo.getEfficiency());
mdc.setMdc(mdcInfo.getMdc());
if (Objects.nonNull(mdcInfo.getMdc()) && Double.isFinite(mdcInfo.getMdc())) {
mdc.setMdc(mdcInfo.getMdc());
} else {
mdc.setMdc(null);
}
mdc.setMdcErr(null);
mdc.setModdate(nowDate);
mdcList.add(mdc);