fix:bug
This commit is contained in:
parent
6d2ec53b4c
commit
2693294331
|
@ -1407,7 +1407,7 @@ public class Sample_C_Analysis {
|
||||||
|
|
||||||
public void saveAnalysis(Integer sampleId, GardsSampleData detSampleData, Date analysisBegin,
|
public void saveAnalysis(Integer sampleId, GardsSampleData detSampleData, Date analysisBegin,
|
||||||
Date analysisEnd, String logPath, String reportPath){
|
Date analysisEnd, String logPath, String reportPath){
|
||||||
GardsAnalyses analysis = new GardsAnalyses();
|
GardsAnalyses analysis = new GardsAnalyses(); // TODO 自动处理 分析表数据补全 (包括update)
|
||||||
analysis.setSampleId(sampleId);
|
analysis.setSampleId(sampleId);
|
||||||
analysis.setCategory(1);//按C++代码写死的1,该字段是分级结果张博士还没有想好数据要不要分级1,2,3,4
|
analysis.setCategory(1);//按C++代码写死的1,该字段是分级结果张博士还没有想好数据要不要分级1,2,3,4
|
||||||
analysis.setAnalysisBegin(analysisBegin);
|
analysis.setAnalysisBegin(analysisBegin);
|
||||||
|
@ -1421,6 +1421,10 @@ public class Sample_C_Analysis {
|
||||||
analysis.setUseddetphd(detSampleData.getInputFileName());
|
analysis.setUseddetphd(detSampleData.getInputFileName());
|
||||||
analysis.setUseddetphdId(detSampleData.getSampleId());
|
analysis.setUseddetphdId(detSampleData.getSampleId());
|
||||||
}
|
}
|
||||||
|
// 基础数据
|
||||||
|
|
||||||
|
// Beta分析产生的 baseline log report等文件地址补全 ...
|
||||||
|
|
||||||
analysis.setLogPath(FileOperation.separatorConvert(logPath));
|
analysis.setLogPath(FileOperation.separatorConvert(logPath));
|
||||||
analysis.setReportPath(FileOperation.separatorConvert(reportPath));
|
analysis.setReportPath(FileOperation.separatorConvert(reportPath));
|
||||||
serviceQuotes.getAnalysesService().save(analysis);
|
serviceQuotes.getAnalysesService().save(analysis);
|
||||||
|
|
|
@ -211,6 +211,7 @@
|
||||||
AND qc_samples.SPECTRAL_QUALIFIE='FULL'
|
AND qc_samples.SPECTRAL_QUALIFIE='FULL'
|
||||||
AND qc_samples.ACQUISITION_START <= TO_DATE('${collectStartStr}', 'YYYY-MM-DD hh24:mi:ss'))
|
AND qc_samples.ACQUISITION_START <= TO_DATE('${collectStartStr}', 'YYYY-MM-DD hh24:mi:ss'))
|
||||||
AND org_sample_data.SITE_DET_CODE= '${siteDetCode}'
|
AND org_sample_data.SITE_DET_CODE= '${siteDetCode}'
|
||||||
|
AND org_sample_data.DATA_TYPE = 'Q'
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -535,7 +536,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCalibrationPairs" resultType="org.jeecg.modules.entity.GardsCalibrationPairsSpectrum">
|
<select id="getCalibrationPairs" resultType="org.jeecg.modules.entity.GardsCalibrationPairsSpectrum">
|
||||||
SELECT CALTYPE, INPUT, XVALUE, YVALUE, UNCYVALUE, ROI_ID FROM ${dbName} WHERE IDANALYSIS = #{idAnalysis} ORDER BY XVALUE
|
SELECT CALTYPE, INPUT, XVALUE, YVALUE, UNCYVALUE FROM ${dbName} WHERE IDANALYSIS = #{idAnalysis} ORDER BY XVALUE
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCalibrationPairsROI" resultType="org.jeecg.modules.entity.GardsCalibrationPairsSpectrum">
|
<select id="getCalibrationPairsROI" resultType="org.jeecg.modules.entity.GardsCalibrationPairsSpectrum">
|
||||||
|
|
|
@ -59,15 +59,21 @@ public class GardsAnalysesSpectrumServiceImpl extends ServiceImpl<GardsAnalysesM
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer saveAnalyses(Integer sampleId, String startTime, String userName) {
|
public Integer saveAnalyses(Integer sampleId, String startTime, String userName) {
|
||||||
GardsAnalyses analyses = new GardsAnalyses();
|
GardsAnalyses analyses = new GardsAnalyses(); // TODO 人工交互 分析表数据补全 (包括update)
|
||||||
try {
|
try {
|
||||||
analyses.setSampleId(sampleId);
|
analyses.setSampleId(sampleId);
|
||||||
|
analyses.setCategory(1);//按C++代码写死的1,该字段是分级结果张博士还没有想好数据要不要分级1,2,3,4
|
||||||
analyses.setAnalysisBegin(DateUtils.parseDate(startTime));
|
analyses.setAnalysisBegin(DateUtils.parseDate(startTime));
|
||||||
analyses.setAnalysisEnd(new Date());
|
analyses.setAnalysisEnd(new Date());
|
||||||
analyses.setType("Interactive");
|
analyses.setType("Interactive");
|
||||||
analyses.setSoftware("");
|
analyses.setSoftware("");
|
||||||
analyses.setSwVersion("1.0.1");
|
analyses.setSwVersion("1.0.1");
|
||||||
analyses.setAnalyst(userName);
|
analyses.setAnalyst(userName);
|
||||||
|
|
||||||
|
// 基础数据
|
||||||
|
|
||||||
|
// Beta分析产生的 baseline log report等文件地址
|
||||||
|
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
@ -106,6 +112,7 @@ public class GardsAnalysesSpectrumServiceImpl extends ServiceImpl<GardsAnalysesM
|
||||||
analyses.setAnalysisBeginStr(startTime);
|
analyses.setAnalysisBeginStr(startTime);
|
||||||
analyses.setAnalyst(userName);
|
analyses.setAnalyst(userName);
|
||||||
analyses.setAnalysisEndStr(DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss"));
|
analyses.setAnalysisEndStr(DateUtils.formatDate(new Date(), "yyyy/MM/dd HH:mm:ss"));
|
||||||
|
|
||||||
this.baseMapper.updateAnalyses(analyses);
|
this.baseMapper.updateAnalyses(analyses);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,11 +307,6 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
|
|
||||||
// 返回Beta和Gamma的数据
|
// 返回Beta和Gamma的数据
|
||||||
bGSpectrum(struct, map);
|
bGSpectrum(struct, map);
|
||||||
|
|
||||||
//将自建台站的数据封装到缓存对象中
|
|
||||||
selfCache.put(sampleFileName + StringPool.DASH + userName, selfStationData);
|
|
||||||
//将缓存对象存入到缓存中
|
|
||||||
selfStationCache.setSelfCache(selfCache);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断det文件名是否为空
|
//判断det文件名是否为空
|
||||||
|
@ -326,13 +321,17 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
selfStationData.setDetStruct(struct);
|
selfStationData.setDetStruct(struct);
|
||||||
selfStationData.setDetTmpPath(detFilePath);
|
selfStationData.setDetTmpPath(detFilePath);
|
||||||
selfStationUtil.loadFile(selfStationData, detBg.getSampleId(), detBg.getStatus(), "det", map);
|
selfStationUtil.loadFile(selfStationData, detBg.getSampleId(), detBg.getStatus(), "det", map);
|
||||||
|
|
||||||
resultMap.put("det", map);
|
resultMap.put("det", map);
|
||||||
|
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(struct, map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断qc文件名是否为空
|
//判断qc文件名是否为空
|
||||||
if (Objects.nonNull(qc)) {
|
if (Objects.nonNull(qc)) {
|
||||||
//拼接det文件路径
|
//拼接det文件路径
|
||||||
String qcFilePath = prefix + dbSpectrumFilePath.getQcFilePath();
|
String qcFilePath = prefix + qc.getInputFileName();
|
||||||
//返回结果map
|
//返回结果map
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
//获取sample分析后的对象
|
//获取sample分析后的对象
|
||||||
|
@ -341,11 +340,16 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
selfStationData.setQcStruct(struct);
|
selfStationData.setQcStruct(struct);
|
||||||
selfStationData.setQcTmpPath(qcFilePath);
|
selfStationData.setQcTmpPath(qcFilePath);
|
||||||
selfStationUtil.loadFile(selfStationData, qc.getSampleId(), qc.getStatus(), "qc", map);
|
selfStationUtil.loadFile(selfStationData, qc.getSampleId(), qc.getStatus(), "qc", map);
|
||||||
|
|
||||||
resultMap.put("qc", map);
|
resultMap.put("qc", map);
|
||||||
|
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(struct, map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 初始化自建台站Configure信息
|
// 初始化自建台站Configure信息
|
||||||
if (!StrUtil.equals(dbName, "RNAUTO")) initConfigure(analysisID, selfStationData);
|
if (!StrUtil.equals(dbName, "RNAUTO")) initConfigure(analysisID, selfStationData);
|
||||||
|
|
||||||
// 初始化自建台站用户核素库信息
|
// 初始化自建台站用户核素库信息
|
||||||
if (ObjectUtil.isNotNull(selfStationData.getSampleStruct())){
|
if (ObjectUtil.isNotNull(selfStationData.getSampleStruct())){
|
||||||
String systemType = selfStationData.getSampleStruct().getSystem_type();
|
String systemType = selfStationData.getSampleStruct().getSystem_type();
|
||||||
|
@ -371,6 +375,11 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
redisUtil.set(userName+StringPool.DASH+systemType+"-self", nuclideMap);
|
redisUtil.set(userName+StringPool.DASH+systemType+"-self", nuclideMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//将自建台站的数据封装到缓存对象中
|
||||||
|
selfCache.put(sampleFileName + StringPool.DASH + userName, selfStationData);
|
||||||
|
//将缓存对象存入到缓存中
|
||||||
|
selfStationCache.setSelfCache(selfCache);
|
||||||
} else {
|
} else {
|
||||||
if (Objects.nonNull(sample)) {
|
if (Objects.nonNull(sample)) {
|
||||||
//返回结果map
|
//返回结果map
|
||||||
|
@ -407,7 +416,19 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
//返回结果map
|
//返回结果map
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
selfStationUtil.loadFile(selfStationData, detBg.getSampleId(), detBg.getStatus(), "det", map);
|
selfStationUtil.loadFile(selfStationData, detBg.getSampleId(), detBg.getStatus(), "det", map);
|
||||||
|
|
||||||
resultMap.put("det", map);
|
resultMap.put("det", map);
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(selfStationData.getDetStruct(), map);
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(qc)) {
|
||||||
|
//返回结果map
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
selfStationUtil.loadFile(selfStationData, qc.getSampleId(), qc.getStatus(), "qc", map);
|
||||||
|
|
||||||
|
resultMap.put("qc", map);
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(selfStationData.getQcStruct(), map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -459,8 +480,10 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
selfStationUtil.createGamma(path, sampleFileName, struct, sampleVueData);
|
selfStationUtil.createGamma(path, sampleFileName, struct, sampleVueData);
|
||||||
|
|
||||||
resultMap.put("sample", map);
|
resultMap.put("sample", map);
|
||||||
|
|
||||||
// 初始化Configure
|
// 初始化Configure
|
||||||
initConfigure(struct, selfStationData);
|
initConfigure(struct, selfStationData);
|
||||||
|
|
||||||
// 返回Beta和Gamma的数据
|
// 返回Beta和Gamma的数据
|
||||||
bGSpectrum(struct, map);
|
bGSpectrum(struct, map);
|
||||||
}
|
}
|
||||||
|
@ -479,6 +502,9 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
selfStationData.setDetFileName(detFileName);
|
selfStationData.setDetFileName(detFileName);
|
||||||
selfStationUtil.loadFile(selfStationData, null, null, "det", map);
|
selfStationUtil.loadFile(selfStationData, null, null, "det", map);
|
||||||
resultMap.put("det", map);
|
resultMap.put("det", map);
|
||||||
|
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(struct, map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断qc文件名是否为空
|
//判断qc文件名是否为空
|
||||||
|
@ -495,6 +521,9 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
selfStationData.setQcFileName(qcFileName);
|
selfStationData.setQcFileName(qcFileName);
|
||||||
selfStationUtil.loadFile(selfStationData, null, null, "qc", map);
|
selfStationUtil.loadFile(selfStationData, null, null, "qc", map);
|
||||||
resultMap.put("qc", map);
|
resultMap.put("qc", map);
|
||||||
|
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(struct, map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotNull(selfStationData.getSampleStruct())){
|
if (ObjectUtil.isNotNull(selfStationData.getSampleStruct())){
|
||||||
|
@ -527,6 +556,7 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
selfStationUtil.loadFile(selfStationData, null, null, "sample", map);
|
selfStationUtil.loadFile(selfStationData, null, null, "sample", map);
|
||||||
resultMap.put("sample", map);
|
resultMap.put("sample", map);
|
||||||
|
|
||||||
// 返回Beta和Gamma的数据
|
// 返回Beta和Gamma的数据
|
||||||
bGSpectrum(selfStationData.getSampleStruct(), map);
|
bGSpectrum(selfStationData.getSampleStruct(), map);
|
||||||
}
|
}
|
||||||
|
@ -535,6 +565,18 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
selfStationUtil.loadFile(selfStationData, null, null, "det", map);
|
selfStationUtil.loadFile(selfStationData, null, null, "det", map);
|
||||||
resultMap.put("det", map);
|
resultMap.put("det", map);
|
||||||
|
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(selfStationData.getDetStruct(), map);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(qcFileName)) {
|
||||||
|
//返回结果map
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
selfStationUtil.loadFile(selfStationData, null, null, "qc", map);
|
||||||
|
resultMap.put("qc", map);
|
||||||
|
|
||||||
|
// 返回Beta和Gamma的数据
|
||||||
|
bGSpectrum(selfStationData.getQcStruct(), map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//将自建台站的数据封装到缓存对象中
|
//将自建台站的数据封装到缓存对象中
|
||||||
|
@ -5381,7 +5423,7 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
EnergySpectrumStruct detStruct = selfStationData.getDetStruct();
|
EnergySpectrumStruct detStruct = selfStationData.getDetStruct();
|
||||||
String siteCode = sampleStruct.site_code;
|
String siteCode = sampleStruct.site_code;
|
||||||
Integer stationId = spectrumAnalysisMapper.getStationId(siteCode);
|
Integer stationId = spectrumAnalysisMapper.getStationId(siteCode);
|
||||||
Integer sampleId = null, gasId = null, detId = null, qcId = null;
|
Integer sampleId; Integer detId;
|
||||||
//判断当前分析员当天是否有对应台站的排班任务
|
//判断当前分析员当天是否有对应台站的排班任务
|
||||||
List<String> userStation = userTaskUtil.findUserStation(userName);
|
List<String> userStation = userTaskUtil.findUserStation(userName);
|
||||||
boolean bAnalysisResultWriteAuthority = userStation.contains(String.valueOf(stationId));
|
boolean bAnalysisResultWriteAuthority = userStation.contains(String.valueOf(stationId));
|
||||||
|
@ -5478,13 +5520,13 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
|
||||||
result.error500("detFile save failed");
|
result.error500("detFile save failed");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
detId = spectrumAnalysisMapper.getSampleId(detFilePathName);
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(qcFilePathName)) {
|
if (StringUtils.isNotBlank(qcFilePathName)) {
|
||||||
if (!this.OriginalDataStore(qcStruct, qcTmpPath, qcFilePathName) ){
|
if (!this.OriginalDataStore(qcStruct, qcTmpPath, qcFilePathName) ){
|
||||||
result.error500("qcFile save failed");
|
result.error500("qcFile save failed");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
qcId = spectrumAnalysisMapper.getSampleId(qcFilePathName);
|
|
||||||
}
|
}
|
||||||
sampleData = spectrumAnalysisMapper.findSampleByFilePath(sampleFilePathName);
|
sampleData = spectrumAnalysisMapper.findSampleByFilePath(sampleFilePathName);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user