beta功能增加initValue接口提前缓存数据信息
This commit is contained in:
parent
21b40f9ba8
commit
6e7b3f8e01
|
@ -24,12 +24,6 @@ public class GammaController {
|
|||
@Autowired
|
||||
private IGammaService gammaService;
|
||||
|
||||
@Autowired
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
@Autowired
|
||||
private SystemClient systemClient;
|
||||
|
||||
@GetMapping("initValue")
|
||||
@ApiOperation(value = "初始化gamma数据", notes = "初始化gamma数据")
|
||||
public Result initValue(Integer sampleId, String dbName, String analyst, String fileName, HttpServletRequest request) {
|
||||
|
|
|
@ -24,6 +24,12 @@ public class SpectrumAnalysesController {
|
|||
@Autowired
|
||||
private ISpectrumAnalysisService spectrumAnalysisService;
|
||||
|
||||
@GetMapping("initValue")
|
||||
@ApiOperation(value = "初始化数据", notes = "初始化数据")
|
||||
public Result initValue(String dbName, Integer sampleId, String analyst, String sampleFileName, String gasFileName, String detFileName, String qcFileName, HttpServletRequest request) {
|
||||
return spectrumAnalysisService.initValue(dbName, sampleId, analyst, sampleFileName, gasFileName, detFileName, qcFileName, request);
|
||||
}
|
||||
|
||||
@GetMapping("getDBSearchList")
|
||||
@ApiOperation(value = "查询查询条件数据接口", notes = "查询查询条件数据接口")
|
||||
public Result getDBSearchList(HttpServletRequest request, boolean AllUsers) {
|
||||
|
|
|
@ -14,6 +14,8 @@ import java.util.List;
|
|||
|
||||
public interface ISpectrumAnalysisService {
|
||||
|
||||
Result initValue(String dbName, Integer sampleId, String analyst, String sampleFileName, String gasFileName, String detFileName, String qcFileName, HttpServletRequest request);
|
||||
|
||||
Result getDBSearchList(HttpServletRequest request, boolean AllUsers);
|
||||
|
||||
Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleDataSpectrum gardsSampleData, String dbName, String[] menuTypes, boolean AllUsers, boolean CollectStopB, boolean AcqStartB, Date startDate, Date endDate, HttpServletRequest request);
|
||||
|
|
|
@ -110,6 +110,14 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
private IGardsHistogramSpectrumService histogramService;
|
||||
|
||||
|
||||
@Override
|
||||
public Result initValue(String dbName, Integer sampleId, String analyst, String sampleFileName, String gasFileName, String detFileName, String qcFileName, HttpServletRequest request) {
|
||||
if (StringUtils.isNotBlank(dbName) && Objects.nonNull(sampleId)) {
|
||||
return getDBSpectrumChart(dbName, sampleId, analyst, request);
|
||||
} else {
|
||||
return getFileSpectrumChart(sampleFileName, gasFileName, detFileName, qcFileName, request);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getDBSearchList(HttpServletRequest request, boolean AllUsers) {
|
||||
|
@ -342,24 +350,9 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
if (dbName.equalsIgnoreCase("auto")){
|
||||
dbName = "RNAUTO";
|
||||
analysisID = spectrumAnalysisMapper.getAnalysisID(dbName, sampleId, "RNAUTO");
|
||||
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
|
||||
gammaCalibrationSpectrumList = spectrumAnalysisMapper.ReadGammaCalibrationParam("RNAUTO", analysisID);
|
||||
betaCalibrationSpectrumList = spectrumAnalysisMapper.ReadBetaCalibrationParam("RNAUTO", analysisID);
|
||||
roiChannelsSpectrumList = spectrumAnalysisMapper.ReadROIChannels("RNAUTO", analysisID, sampleId);
|
||||
roiResultsSpectrumList = spectrumAnalysisMapper.ReadROIResults("RNAUTO", analysisID, sampleId);
|
||||
} else if (dbName.equalsIgnoreCase("man")){
|
||||
dbName = "RNMAN";
|
||||
analysisID = spectrumAnalysisMapper.getAnalysisID(dbName, sampleId, analyst);
|
||||
gammaCalibrationPairsList = spectrumAnalysisMapper.ReadGammaFitChannelEnergy(analysisID, sampleId);
|
||||
betaCalibrationPairsList = spectrumAnalysisMapper.ReadBetaFitChannelEnergy(analysisID, sampleId);
|
||||
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
|
||||
gammaCalibrationSpectrumList = spectrumAnalysisMapper.ReadGammaCalibrationParam("RNMAN", analysisID);
|
||||
betaCalibrationSpectrumList = spectrumAnalysisMapper.ReadBetaCalibrationParam("RNMAN", analysisID);
|
||||
roiChannelsSpectrumList = spectrumAnalysisMapper.ReadROIChannels("RNMAN", analysisID, sampleId);
|
||||
roiResultsSpectrumList = spectrumAnalysisMapper.ReadROIResults("RNMAN", analysisID, sampleId);
|
||||
}else {
|
||||
result.error500("The database type does not exist");
|
||||
return result;
|
||||
}
|
||||
File sampleTmp = null;
|
||||
File gasTmp = null;
|
||||
|
@ -411,6 +404,21 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
//如果缓存中没有公用变量的数据
|
||||
if (Objects.isNull(betaDataFile)) {
|
||||
betaDataFile = new BetaDataFile();
|
||||
if (dbName.equalsIgnoreCase("RNAUTO")) {
|
||||
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
|
||||
gammaCalibrationSpectrumList = spectrumAnalysisMapper.ReadGammaCalibrationParam("RNAUTO", analysisID);
|
||||
betaCalibrationSpectrumList = spectrumAnalysisMapper.ReadBetaCalibrationParam("RNAUTO", analysisID);
|
||||
roiChannelsSpectrumList = spectrumAnalysisMapper.ReadROIChannels("RNAUTO", analysisID, sampleId);
|
||||
roiResultsSpectrumList = spectrumAnalysisMapper.ReadROIResults("RNAUTO", analysisID, sampleId);
|
||||
} else {
|
||||
gammaCalibrationPairsList = spectrumAnalysisMapper.ReadGammaFitChannelEnergy(analysisID, sampleId);
|
||||
betaCalibrationPairsList = spectrumAnalysisMapper.ReadBetaFitChannelEnergy(analysisID, sampleId);
|
||||
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
|
||||
gammaCalibrationSpectrumList = spectrumAnalysisMapper.ReadGammaCalibrationParam("RNMAN", analysisID);
|
||||
betaCalibrationSpectrumList = spectrumAnalysisMapper.ReadBetaCalibrationParam("RNMAN", analysisID);
|
||||
roiChannelsSpectrumList = spectrumAnalysisMapper.ReadROIChannels("RNMAN", analysisID, sampleId);
|
||||
roiResultsSpectrumList = spectrumAnalysisMapper.ReadROIResults("RNMAN", analysisID, sampleId);
|
||||
}
|
||||
//给公用变量赋值sampleId
|
||||
betaDataFile.setSampleId(String.valueOf(sampleId));
|
||||
//用于记录文件路径信息
|
||||
|
@ -2984,9 +2992,6 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
}
|
||||
//根据sample文件名称获取当前文件的缓存信息
|
||||
BetaDataFile sampleBetaData = cache.getIfPresent(sampleFileName + "-" + userName);
|
||||
if (Objects.isNull(sampleBetaData)) {
|
||||
sampleBetaData = new BetaDataFile();
|
||||
}
|
||||
//将当前文件用到的计算数据同步到需要计算的文件缓存
|
||||
sampleBetaData.setBetaList(betaList);
|
||||
sampleBetaData.setBetaFittingPara(betaFittingPara);
|
||||
|
|
Loading…
Reference in New Issue
Block a user