Merge remote-tracking branch 'origin/mdc' into mdc

This commit is contained in:
nieziyan 2023-12-27 17:18:53 +08:00
commit c5ecbbccff
4 changed files with 11 additions and 6 deletions

View File

@ -3,6 +3,7 @@ package org.jeecg.modules.spectrum;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.StringConstant; import org.jeecg.common.constant.StringConstant;
import org.jeecg.common.properties.SpectrumPathProperties; import org.jeecg.common.properties.SpectrumPathProperties;
import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.DateUtils;
@ -337,6 +338,7 @@ public class Sample_B_Analysis implements BlockConstant {
nuclides.put(XE_133m,String.valueOf(analyseResult.Xe133m_con)); nuclides.put(XE_133m,String.valueOf(analyseResult.Xe133m_con));
nuclides.put(XE_135,String.valueOf(analyseResult.Xe135_con)); nuclides.put(XE_135,String.valueOf(analyseResult.Xe135_con));
info.setNuclides(nuclides); info.setNuclides(nuclides);
info.setAnalyst(CommonConstant.REPORT_PREFIX_AUTO);
spectrumServiceQuotes.getRedisStreamUtil().pushAnalysis(info); spectrumServiceQuotes.getRedisStreamUtil().pushAnalysis(info);
} }
@ -541,7 +543,7 @@ public class Sample_B_Analysis implements BlockConstant {
for(int i=0;i<roi.size();i++){ for(int i=0;i<roi.size();i++){
String beta = b_chan_start.get(i)+to_flag+b_chan_stop.get(i); String beta = b_chan_start.get(i)+to_flag+b_chan_stop.get(i);
String gamma = g_chan_start.get(i)+to_flag+g_chan_stop.get(i); String gamma = g_chan_start.get(i)+to_flag+g_chan_stop.get(i);
reportContent.append(super.rowFormat(rowValue,String.valueOf(i),beta,gamma)); reportContent.append(super.rowFormat(rowValue,String.valueOf(i+1),beta,gamma));
if(i==roi.size()-1){ if(i==roi.size()-1){
reportContent.append(System.lineSeparator()).append(System.lineSeparator()); reportContent.append(System.lineSeparator()).append(System.lineSeparator());
}else{ }else{
@ -593,7 +595,7 @@ public class Sample_B_Analysis implements BlockConstant {
for(int i=0;i<roi.size();i++){ for(int i=0;i<roi.size();i++){
String beta = b_chan_start.get(i)+to_flag+b_chan_stop.get(i); String beta = b_chan_start.get(i)+to_flag+b_chan_stop.get(i);
String gamma = g_chan_start.get(i)+to_flag+g_chan_stop.get(i); String gamma = g_chan_start.get(i)+to_flag+g_chan_stop.get(i);
reportContent.append(super.rowFormat(rowValue,String.valueOf(i),beta,gamma)); reportContent.append(super.rowFormat(rowValue,String.valueOf(i+1),beta,gamma));
if(i==roi.size()-1){ if(i==roi.size()-1){
reportContent.append(System.lineSeparator()).append(System.lineSeparator()); reportContent.append(System.lineSeparator()).append(System.lineSeparator());
}else{ }else{
@ -629,7 +631,7 @@ public class Sample_B_Analysis implements BlockConstant {
* 处理#GAS LIMITS PER ROI 模块 * 处理#GAS LIMITS PER ROI 模块
*/ */
private void handleGasLimits() throws IOException { private void handleGasLimits() throws IOException {
String gasLimitsBlock = "#DET LIMITS PER ROI (SAMPLEID:%s)"; String gasLimitsBlock = "#GAS LIMITS PER ROI (SAMPLEID:%s)";
String rowTitle = " Roi %-46s Beta %-46s Gamma"; String rowTitle = " Roi %-46s Beta %-46s Gamma";
String rowValue = " %-50s %-51s %s"; String rowValue = " %-50s %-51s %s";
List<Integer> roi = analyseResult.G_ROI; List<Integer> roi = analyseResult.G_ROI;
@ -645,7 +647,7 @@ public class Sample_B_Analysis implements BlockConstant {
for(int i=0;i<roi.size();i++){ for(int i=0;i<roi.size();i++){
String beta = b_chan_start.get(i)+to_flag+b_chan_stop.get(i); String beta = b_chan_start.get(i)+to_flag+b_chan_stop.get(i);
String gamma = g_chan_start.get(i)+to_flag+g_chan_stop.get(i); String gamma = g_chan_start.get(i)+to_flag+g_chan_stop.get(i);
reportContent.append(super.rowFormat(rowValue,String.valueOf(i),beta,gamma)); reportContent.append(super.rowFormat(rowValue,String.valueOf(i+1),beta,gamma));
if(i==roi.size()-1){ if(i==roi.size()-1){
reportContent.append(System.lineSeparator()).append(System.lineSeparator()); reportContent.append(System.lineSeparator()).append(System.lineSeparator());
}else{ }else{

View File

@ -297,6 +297,7 @@ public class Sample_G_Analysis {
nuclides.put(middleData.nucl_ided_Nuclidename.get(i), middleData.nucl_ided_Concentration.get(i)); nuclides.put(middleData.nucl_ided_Nuclidename.get(i), middleData.nucl_ided_Concentration.get(i));
} }
info.setNuclides(nuclides); info.setNuclides(nuclides);
info.setAnalyst(middleData.analyses_analyst);
serviceQuotes.getRedisStreamUtil().pushAnalysis(info); serviceQuotes.getRedisStreamUtil().pushAnalysis(info);
} catch (ParseException e) { } catch (ParseException e) {
throw new RuntimeException(e); throw new RuntimeException(e);

View File

@ -5116,6 +5116,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
nuclides.put(middleData.nucl_ided_Nuclidename.get(i), middleData.nucl_ided_Concentration.get(i)); nuclides.put(middleData.nucl_ided_Nuclidename.get(i), middleData.nucl_ided_Concentration.get(i));
} }
info.setNuclides(nuclides); info.setNuclides(nuclides);
info.setAnalyst(middleData.analyses_analyst);
redisStreamUtil.pushAnalysis(info); redisStreamUtil.pushAnalysis(info);
} catch (ParseException e) { } catch (ParseException e) {
throw new RuntimeException(e); throw new RuntimeException(e);

View File

@ -4002,7 +4002,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
map.put("qc", qcData); map.put("qc", qcData);
} }
//发送数据到redis //发送数据到redis
pushToRedis(betaDataFile); pushToRedis(betaDataFile, userName);
result.setSuccess(true); result.setSuccess(true);
result.setResult(map); result.setResult(map);
return result; return result;
@ -4011,7 +4011,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
/** /**
* 分析成功数据发送到Redis * 分析成功数据发送到Redis
*/ */
private void pushToRedis(BetaDataFile betaDataFile){ private void pushToRedis(BetaDataFile betaDataFile, String userName){
try { try {
Info info = new Info(); Info info = new Info();
info.setStationId(betaDataFile.getStationId()); info.setStationId(betaDataFile.getStationId());
@ -4037,6 +4037,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
} }
} }
info.setNuclides(nuclides); info.setNuclides(nuclides);
info.setAnalyst(userName);
redisStreamUtil.pushAnalysis(info); redisStreamUtil.pushAnalysis(info);
} catch (ParseException e) { } catch (ParseException e) {
throw new RuntimeException(e); throw new RuntimeException(e);