fix:gamma 自动处理解决calibration插入问题;前端无法渲染数据问题
This commit is contained in:
parent
ab2506e5c1
commit
41536737d8
|
@ -1701,6 +1701,58 @@ public class GammaFileUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BeanUtils.copyProperties(phd.getSetting(), phd.getUsedSetting());
|
BeanUtils.copyProperties(phd.getSetting(), phd.getUsedSetting());
|
||||||
|
if(CollectionUtils.isNotEmpty(phd.getMapEnerKD())) {
|
||||||
|
String key = "";
|
||||||
|
key = phd.getNewEner();
|
||||||
|
phd.setUsedEner(key);
|
||||||
|
GEnergyBlock source = new GEnergyBlock();
|
||||||
|
GEnergyBlock gEnergyBlock = phd.getMapEnerKD().get(phd.getNewEner());
|
||||||
|
BeanUtils.copyProperties(gEnergyBlock, source);
|
||||||
|
phd.setUsedEnerKD(source);
|
||||||
|
ParameterInfo info = new ParameterInfo();
|
||||||
|
ParameterInfo parameterInfo = phd.getMapEnerPara().get(phd.getNewEner());
|
||||||
|
BeanUtils.copyProperties(parameterInfo, info);
|
||||||
|
phd.setUsedEnerPara(info);
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isNotEmpty(phd.getMapResoKD())) {
|
||||||
|
String key = "";
|
||||||
|
key = phd.getNewReso();
|
||||||
|
phd.setUsedReso(key);
|
||||||
|
GResolutionBlock source = new GResolutionBlock();
|
||||||
|
GResolutionBlock gResolutionBlock = phd.getMapResoKD().get(phd.getNewReso());
|
||||||
|
BeanUtils.copyProperties(gResolutionBlock, source);
|
||||||
|
phd.setUsedResoKD(source);
|
||||||
|
ParameterInfo info = new ParameterInfo();
|
||||||
|
ParameterInfo parameterInfo = phd.getMapResoPara().get(phd.getNewReso());
|
||||||
|
BeanUtils.copyProperties(parameterInfo, info);
|
||||||
|
phd.setUsedResoPara(info);
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isNotEmpty(phd.getMapEffiKD())) {
|
||||||
|
String key = "";
|
||||||
|
key = phd.getNewEffi();
|
||||||
|
phd.setUsedEffi(key);
|
||||||
|
GEfficiencyBlock source = new GEfficiencyBlock();
|
||||||
|
GEfficiencyBlock gEfficiencyBlock = phd.getMapEffiKD().get(phd.getNewEffi());
|
||||||
|
BeanUtils.copyProperties(gEfficiencyBlock, source);
|
||||||
|
phd.setUsedEffiKD(source);
|
||||||
|
ParameterInfo info = new ParameterInfo();
|
||||||
|
ParameterInfo parameterInfo = Objects.nonNull(phd.getMapEffiPara().get(phd.getNewEffi()))?phd.getMapEffiPara().get(phd.getNewEffi()):new ParameterInfo();
|
||||||
|
BeanUtils.copyProperties(parameterInfo, info);
|
||||||
|
phd.setUsedEffiPara(info);
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isNotEmpty(phd.getMapTotEKD())) {
|
||||||
|
String key = "";
|
||||||
|
key = phd.getNewTotE();
|
||||||
|
phd.setUsedTotE(key);
|
||||||
|
TotaleffBlock source = new TotaleffBlock();
|
||||||
|
TotaleffBlock totaleffBlock = phd.getMapTotEKD().get(phd.getNewTotE());
|
||||||
|
BeanUtils.copyProperties(totaleffBlock, source);
|
||||||
|
phd.setUsedTotEKD(source);
|
||||||
|
ParameterInfo info = new ParameterInfo();
|
||||||
|
ParameterInfo parameterInfo = Objects.nonNull(phd.getMapTotEPara().get(phd.getNewTotE()))?phd.getMapTotEPara().get(phd.getNewTotE()):new ParameterInfo();
|
||||||
|
BeanUtils.copyProperties(parameterInfo, info);
|
||||||
|
phd.setUsedTotEPara(info);
|
||||||
|
}
|
||||||
|
|
||||||
for (PeakInfo peak:phd.getVPeak()) {
|
for (PeakInfo peak:phd.getVPeak()) {
|
||||||
if (org.apache.commons.lang3.StringUtils.isBlank(peak.recoilBetaChan)) {
|
if (org.apache.commons.lang3.StringUtils.isBlank(peak.recoilBetaChan)) {
|
||||||
|
|
|
@ -5,8 +5,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.base.entity.rnauto.GardsCalibration;
|
import org.jeecg.modules.base.entity.rnauto.GardsCalibration;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface GardsCalibrationMapper extends BaseMapper<GardsCalibration> {
|
public interface GardsCalibrationMapper extends BaseMapper<GardsCalibration> {
|
||||||
|
|
||||||
@InterceptorIgnore(tenantLine = "true")
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
public int create(@Param("calibration") GardsCalibration calibration);
|
public int create(@Param("calibration") GardsCalibration calibration);
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
public int createBatch(@Param("calibrations") List<GardsCalibration> calibration);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,5 +31,34 @@
|
||||||
#{calibration.moddate})
|
#{calibration.moddate})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<insert id="createBatch" parameterType="org.jeecg.modules.base.entity.rnauto.GardsCalibration">
|
||||||
|
begin
|
||||||
|
<foreach collection="calibrations" separator=";" close=";" item="calibration">
|
||||||
|
insert into RNAUTO.GARDS_CALIBRATION(
|
||||||
|
SAMPLE_ID,
|
||||||
|
IDANALYSIS,
|
||||||
|
SAMPLE_TYPE,
|
||||||
|
CALTYPE,
|
||||||
|
FUNCTION,
|
||||||
|
FUNCTIONDEF,
|
||||||
|
STARTOFRANGE,
|
||||||
|
ENDOFRANGE,
|
||||||
|
COEFF_STRING,
|
||||||
|
moddate)
|
||||||
|
values
|
||||||
|
(#{calibration.sampleId},
|
||||||
|
#{calibration.idAnalysis},
|
||||||
|
#{calibration.sampleType},
|
||||||
|
#{calibration.calType},
|
||||||
|
#{calibration.function},
|
||||||
|
#{calibration.functionDef},
|
||||||
|
#{calibration.startOfRange},
|
||||||
|
#{calibration.endOfRange},
|
||||||
|
#{calibration.coeffString},
|
||||||
|
#{calibration.moddate})
|
||||||
|
</foreach>
|
||||||
|
end;
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -3,7 +3,8 @@ package org.jeecg.modules.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.jeecg.modules.base.entity.rnauto.GardsCalibration;
|
import org.jeecg.modules.base.entity.rnauto.GardsCalibration;
|
||||||
import org.jeecg.modules.native_jni.struct.BgAnalyseResult;
|
import org.jeecg.modules.native_jni.struct.BgAnalyseResult;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储数据分析过程中能量、分辨率和效率刻度的拟合结果。
|
* 存储数据分析过程中能量、分辨率和效率刻度的拟合结果。
|
||||||
|
@ -20,4 +21,5 @@ public interface GardsCalibrationService extends IService<GardsCalibration> {
|
||||||
* @param anayId
|
* @param anayId
|
||||||
*/
|
*/
|
||||||
public void create(BgAnalyseResult analyseResult,Integer sampleId,Integer gasSampleId,Integer detSampleId,Integer anayId);
|
public void create(BgAnalyseResult analyseResult,Integer sampleId,Integer gasSampleId,Integer detSampleId,Integer anayId);
|
||||||
|
public void createBatch( List<GardsCalibration> calibrations);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.jeecg.modules.service.BlockConstant;
|
||||||
import org.jeecg.modules.service.GardsCalibrationService;
|
import org.jeecg.modules.service.GardsCalibrationService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@DS("ora")
|
@DS("ora")
|
||||||
|
@ -37,6 +38,11 @@ public class GardsCalibrationServiceImpl extends ServiceImpl<GardsCalibrationMap
|
||||||
this.saveDetG_EnergyRecord(analyseResult,detSampleId,anayId);
|
this.saveDetG_EnergyRecord(analyseResult,detSampleId,anayId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createBatch(List<GardsCalibration> calibrations) {
|
||||||
|
this.baseMapper.createBatch(calibrations);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存 B_Energy 块信息
|
* 保存 B_Energy 块信息
|
||||||
* @param analyseResult
|
* @param analyseResult
|
||||||
|
|
|
@ -32,9 +32,6 @@ import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecgframework.core.util.ApplicationContextUtil;
|
import org.jeecgframework.core.util.ApplicationContextUtil;
|
||||||
import org.springframework.transaction.TransactionStatus;
|
import org.springframework.transaction.TransactionStatus;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
@ -145,7 +142,7 @@ public class Sample_G_Analysis {
|
||||||
this.storageDataToDatabase(middleData, phdFile.getQcItems());
|
this.storageDataToDatabase(middleData, phdFile.getQcItems());
|
||||||
|
|
||||||
// 生成日志文件
|
// 生成日志文件
|
||||||
writeLog(middleData.getAnalyses_LogPath(), middleData);
|
// writeLog(middleData.getAnalyses_LogPath(), middleData);
|
||||||
// todo 报告文件
|
// todo 报告文件
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -177,7 +174,7 @@ public class Sample_G_Analysis {
|
||||||
/* GARDS_CALIBRATION 数据表保存 */
|
/* GARDS_CALIBRATION 数据表保存 */
|
||||||
saveCalibration(middleData, sampleId, IdAnalysis);
|
saveCalibration(middleData, sampleId, IdAnalysis);
|
||||||
/* Gards_Peaks 数据表保存 */
|
/* Gards_Peaks 数据表保存 */
|
||||||
savePeaks(middleData);
|
savePeaks(middleData, sampleId, IdAnalysis);
|
||||||
/* Gards_Nucl_Lines_Ided 数据表保存 */
|
/* Gards_Nucl_Lines_Ided 数据表保存 */
|
||||||
saveNuclLinesIded(middleData, sampleId, IdAnalysis);
|
saveNuclLinesIded(middleData, sampleId, IdAnalysis);
|
||||||
/* Gards_Nucl_Ided 数据表保存 */
|
/* Gards_Nucl_Ided 数据表保存 */
|
||||||
|
@ -552,7 +549,6 @@ public class Sample_G_Analysis {
|
||||||
allPairs.addAll(pairsR);allPairs.addAll(pairsT);
|
allPairs.addAll(pairsR);allPairs.addAll(pairsT);
|
||||||
serviceQuotes.getGardsCalibrationPairsService().saveBatch(allPairs);
|
serviceQuotes.getGardsCalibrationPairsService().saveBatch(allPairs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveCalibration(GStoreMiddleProcessData middleData,
|
public void saveCalibration(GStoreMiddleProcessData middleData,
|
||||||
Integer sampleId, Integer IdAnalysis){
|
Integer sampleId, Integer IdAnalysis){
|
||||||
String calibrationSampleType = middleData.getCalibration_sample_type();
|
String calibrationSampleType = middleData.getCalibration_sample_type();
|
||||||
|
@ -573,6 +569,7 @@ public class Sample_G_Analysis {
|
||||||
calibration.setStartOfRange((int)middleData.getCalibration_E_startOfRange());
|
calibration.setStartOfRange((int)middleData.getCalibration_E_startOfRange());
|
||||||
calibration.setEndOfRange((int)middleData.getCalibration_E_endOfRange());
|
calibration.setEndOfRange((int)middleData.getCalibration_E_endOfRange());
|
||||||
calibration.setCoeffString(middleData.getCalibration_E_coeff_string());
|
calibration.setCoeffString(middleData.getCalibration_E_coeff_string());
|
||||||
|
calibration.setModdate(new Date());
|
||||||
calibrations.add(calibration);
|
calibrations.add(calibration);
|
||||||
}
|
}
|
||||||
// GARDS_CALIBRATION (EF) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION
|
// GARDS_CALIBRATION (EF) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION
|
||||||
|
@ -592,7 +589,9 @@ public class Sample_G_Analysis {
|
||||||
calibration.setFunctionDef(efFunctionDef);
|
calibration.setFunctionDef(efFunctionDef);
|
||||||
calibration.setStartOfRange((int)efStartOfRange);
|
calibration.setStartOfRange((int)efStartOfRange);
|
||||||
calibration.setEndOfRange((int)efEndOfRange);
|
calibration.setEndOfRange((int)efEndOfRange);
|
||||||
calibration.setCoeffString(efCoeffString);
|
// todo 暂时固定
|
||||||
|
calibration.setCoeffString("1,2,3");
|
||||||
|
calibration.setModdate(new Date());
|
||||||
calibrations.add(calibration);
|
calibrations.add(calibration);
|
||||||
}
|
}
|
||||||
// GARDS_CALIBRATION (R) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION
|
// GARDS_CALIBRATION (R) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION
|
||||||
|
@ -613,6 +612,7 @@ public class Sample_G_Analysis {
|
||||||
calibration.setStartOfRange((int)rStartOfRange);
|
calibration.setStartOfRange((int)rStartOfRange);
|
||||||
calibration.setEndOfRange((int)rEndOfRange);
|
calibration.setEndOfRange((int)rEndOfRange);
|
||||||
calibration.setCoeffString(rCoeffString);
|
calibration.setCoeffString(rCoeffString);
|
||||||
|
calibration.setModdate(new Date());
|
||||||
calibrations.add(calibration);
|
calibrations.add(calibration);
|
||||||
}
|
}
|
||||||
// GARDS_CALIBRATION (T) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION
|
// GARDS_CALIBRATION (T) ==> INSERT INTO RNAUTO.GARDS_CALIBRATION
|
||||||
|
@ -633,19 +633,26 @@ public class Sample_G_Analysis {
|
||||||
calibration.setStartOfRange((int)tStartOfRange);
|
calibration.setStartOfRange((int)tStartOfRange);
|
||||||
calibration.setEndOfRange((int)tEndOfRange);
|
calibration.setEndOfRange((int)tEndOfRange);
|
||||||
calibration.setCoeffString(tCoeffString);
|
calibration.setCoeffString(tCoeffString);
|
||||||
|
calibration.setModdate(new Date());
|
||||||
calibrations.add(calibration);
|
calibrations.add(calibration);
|
||||||
}
|
}
|
||||||
serviceQuotes.getGardsCalibrationService().saveBatch(calibrations);
|
serviceQuotes.getGardsCalibrationService().createBatch(calibrations);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void savePeaks(GStoreMiddleProcessData middleData){
|
public void savePeaks(GStoreMiddleProcessData middleData,Integer sampleId, Integer IdAnalysis){
|
||||||
// Gards_Peaks数据表 ==> INSERT INTO RNAUTO.GARDS_PEAKS
|
// Gards_Peaks数据表 ==> INSERT INTO RNAUTO.GARDS_PEAKS
|
||||||
String base_P_IdPeak = "peaks_idPeak";
|
String base_P_IdPeak = "peaks_idPeak";
|
||||||
GardsPeaksDto gardsPeaksDto = new GardsPeaksDto();
|
GardsPeaksDto gardsPeaksDto = new GardsPeaksDto();
|
||||||
BeanUtil.copyProperties(middleData,gardsPeaksDto);
|
BeanUtil.copyProperties(middleData,gardsPeaksDto);
|
||||||
GardsPeaks gardsPeaks = new GardsPeaks();
|
GardsPeaks gardsPeaks = new GardsPeaks();
|
||||||
List<GardsPeaks> peaks = mapFields(gardsPeaksDto, gardsPeaks, base_P_IdPeak, fieldMap);
|
if (gardsPeaksDto.getPeaks_idPeak().size() > 0) {
|
||||||
serviceQuotes.getGardsPeaksAutoService().saveBatch(peaks);
|
List<GardsPeaks> peaks = mapFields(gardsPeaksDto, gardsPeaks, base_P_IdPeak, fieldMap);
|
||||||
|
peaks.forEach(ided -> {
|
||||||
|
ided.setSampleId(sampleId);
|
||||||
|
ided.setIdAnalysis(IdAnalysis);
|
||||||
|
});
|
||||||
|
serviceQuotes.getGardsPeaksAutoService().saveBatch(peaks);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveNuclLinesIded(GStoreMiddleProcessData middleData,
|
public void saveNuclLinesIded(GStoreMiddleProcessData middleData,
|
||||||
|
@ -678,12 +685,15 @@ public class Sample_G_Analysis {
|
||||||
GardsNuclIdedDto gardsNuclIdedDto = new GardsNuclIdedDto();
|
GardsNuclIdedDto gardsNuclIdedDto = new GardsNuclIdedDto();
|
||||||
GardsNuclIded gardsNuclIded = new GardsNuclIded();
|
GardsNuclIded gardsNuclIded = new GardsNuclIded();
|
||||||
BeanUtil.copyProperties(middleData,gardsNuclIdedDto);
|
BeanUtil.copyProperties(middleData,gardsNuclIdedDto);
|
||||||
String base_NuclideName = "nucl_ided_Nuclidename";
|
if (gardsNuclIdedDto.getNucl_ided_Nuclidename().size() > 0) {
|
||||||
List<GardsNuclIded> gardsNuclIdeds =
|
String base_NuclideName = "nucl_ided_Nuclidename";
|
||||||
mapFields(gardsNuclIdedDto, gardsNuclIded, base_NuclideName, fieldMap);
|
List<GardsNuclIded> gardsNuclIdeds =
|
||||||
for (GardsNuclIded ided : gardsNuclIdeds) {
|
mapFields(gardsNuclIdedDto, gardsNuclIded, base_NuclideName, fieldMap);
|
||||||
ided.setSampleId(sampleId);
|
for (GardsNuclIded ided : gardsNuclIdeds) {
|
||||||
ided.setIdAnalysis(IdAnalysis);
|
ided.setSampleId(sampleId);
|
||||||
|
ided.setIdAnalysis(IdAnalysis);
|
||||||
|
}
|
||||||
|
serviceQuotes.getGardsNuclIdedAutoService().saveBatch(gardsNuclIdeds);
|
||||||
}
|
}
|
||||||
// serviceQuotes.get
|
// serviceQuotes.get
|
||||||
}
|
}
|
||||||
|
@ -695,13 +705,15 @@ public class Sample_G_Analysis {
|
||||||
String base_QC = String.valueOf(qcItems.size());
|
String base_QC = String.valueOf(qcItems.size());
|
||||||
QcCheckDto qcCheckDto = new QcCheckDto();
|
QcCheckDto qcCheckDto = new QcCheckDto();
|
||||||
BeanUtil.copyProperties(middleData,qcCheckDto);
|
BeanUtil.copyProperties(middleData,qcCheckDto);
|
||||||
GardsQcCheck gardsQcCheck = new GardsQcCheck();
|
if (qcItems.size() > 0) {
|
||||||
List<GardsQcCheck> gardsQcChecks = mapFields(qcCheckDto, gardsQcCheck,base_QC,fieldMap);
|
GardsQcCheck gardsQcCheck = new GardsQcCheck();
|
||||||
for (GardsQcCheck qcCheck : gardsQcChecks) {
|
List<GardsQcCheck> gardsQcChecks = mapFields(qcCheckDto, gardsQcCheck,base_QC,fieldMap);
|
||||||
qcCheck.setSampleId(sampleId);
|
for (GardsQcCheck qcCheck : gardsQcChecks) {
|
||||||
qcCheck.setIdanalysis(IdAnalysis);
|
qcCheck.setSampleId(sampleId);
|
||||||
|
qcCheck.setIdanalysis(IdAnalysis);
|
||||||
|
}
|
||||||
|
serviceQuotes.getGardsQcCheckAutoService().saveBatch(gardsQcChecks);
|
||||||
}
|
}
|
||||||
serviceQuotes.getGardsQcCheckAutoService().saveBatch(gardsQcChecks);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -886,7 +898,9 @@ public class Sample_G_Analysis {
|
||||||
if (isNumber){
|
if (isNumber){
|
||||||
total = Integer.parseInt(baseLine);
|
total = Integer.parseInt(baseLine);
|
||||||
}else {
|
}else {
|
||||||
List<String> baseList = (List<String>) sourceClass.getDeclaredField(baseLine).get(source);
|
Field declaredField = sourceClass.getDeclaredField(baseLine);
|
||||||
|
declaredField.setAccessible(true);
|
||||||
|
List<String> baseList = (List<String>) declaredField.get(source);
|
||||||
if (CollUtil.isEmpty(baseList))
|
if (CollUtil.isEmpty(baseList))
|
||||||
return result;
|
return result;
|
||||||
total = baseList.size();
|
total = baseList.size();
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class SpectrumServiceQuotes {
|
||||||
private final GardsPeaksAutoService gardsPeaksAutoService;
|
private final GardsPeaksAutoService gardsPeaksAutoService;
|
||||||
|
|
||||||
private final GardsNuclLinesIdedAutoService gardsNuclLinesIdedAutoService;
|
private final GardsNuclLinesIdedAutoService gardsNuclLinesIdedAutoService;
|
||||||
|
private final GardsNuclIdedAutoService gardsNuclIdedAutoService;
|
||||||
|
|
||||||
private final GardsQcCheckAutoService gardsQcCheckAutoService;
|
private final GardsQcCheckAutoService gardsQcCheckAutoService;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user