fix:修改新beta savetodb接口

This commit is contained in:
xiaoguangbin 2024-10-09 10:31:39 +08:00
parent 9eeb36b105
commit 9a403638f6
2 changed files with 5 additions and 6 deletions

View File

@ -82,7 +82,6 @@ public class GardsCalibrationPairsOrigSpectrumServiceImpl extends ServiceImpl<Ga
calibrationPairsOrig.setCaltype(CalType.EFFICIENCY_CAL.getType());
calibrationPairsOrig.setInput("PHD");
calibrationPairsOrig.setIdCalPoint(i);
calibrationPairsOrig.setXValue(sourceData.b_e_energy.get(i));
calibrationPairsOrig.setYValue(sourceData.b_e_efficiency.get(i));
calibrationPairsOrig.setUncYValue(sourceData.b_e_uncertainty.get(i));
calibrationPairsOrigList.add(calibrationPairsOrig);

View File

@ -5538,19 +5538,19 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
phd.setId_sample(sampleData.getSampleId().toString());
// 判断文件是否存储过 如果没有则解析文件并进行存储
if (!this.OriginalDataStore(sampleStruct, sampleTmpPath, sampleFilePathName) ){
if (!this.OriginalDataStore(sampleStruct, sampleFilePathName) ){
result.error500("sampleFile save failed");
return result;
}
if (StrUtil.isNotBlank(detFilePathName)){
if (!this.OriginalDataStore(detStruct, detTmpPath, detFilePathName) ){
if (!this.OriginalDataStore(detStruct, detFilePathName) ){
result.error500("detFile save failed");
return result;
}
detId = spectrumAnalysisMapper.getSampleId(detFilePathName);
}
if (StringUtils.isNotBlank(qcFilePathName)) {
if (!this.OriginalDataStore(qcStruct, qcTmpPath, qcFilePathName) ){
if (!this.OriginalDataStore(qcStruct, qcFilePathName) ){
result.error500("qcFile save failed");
return result;
}
@ -5692,7 +5692,7 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
}
@Transactional
public boolean OriginalDataStore(EnergySpectrumStruct sourceData, String tmpPath, String filePathName) {
public boolean OriginalDataStore(EnergySpectrumStruct sourceData, String filePathName) {
//根据新的文件路径名称查询数据是否存在
GardsSampleData isExist = spectrumAnalysisMapper.findSampleByFile(filePathName);
//如果数据已经存入过数据库 修改状态后返回
@ -5702,7 +5702,7 @@ public class SelfStationServiceImpl extends AbstractLogOrReport implements ISelf
return true;
}
//读取文件内容
File file = new File(tmpPath);
File file = new File(filePathName);
try {
//获取文件中块名信息
List<String> readLines = getFileBlockList(file);