查询用户是否对某个台站有过排班任务
修改BgDataAnalyseResultIn实体类 saveToDB修改
This commit is contained in:
parent
34ae278463
commit
244c1645fd
|
@ -232,10 +232,13 @@ public class PHDFileUtil {
|
||||||
Double mdc = xeData.getMdc();
|
Double mdc = xeData.getMdc();
|
||||||
if (conc < 0){
|
if (conc < 0){
|
||||||
xeData.setColor("red");
|
xeData.setColor("red");
|
||||||
|
xeData.setNidFlag(0);
|
||||||
} else if (0<conc && conc < mdc) {
|
} else if (0<conc && conc < mdc) {
|
||||||
xeData.setColor("#ffcc30");
|
xeData.setColor("#ffcc30");
|
||||||
|
xeData.setNidFlag(0);
|
||||||
} else if (conc > mdc) {
|
} else if (conc > mdc) {
|
||||||
xeData.setColor("green");
|
xeData.setColor("green");
|
||||||
|
xeData.setNidFlag(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("XeData", xeDataList);
|
map.put("XeData", xeDataList);
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class UserTaskUtil {
|
||||||
String userId = user.getId();
|
String userId = user.getId();
|
||||||
List<String> userStations = userTaskService.findUserStations(userId);
|
List<String> userStations = userTaskService.findUserStations(userId);
|
||||||
if (Objects.nonNull(stationId) && CollectionUtils.isNotEmpty(userStations)){
|
if (Objects.nonNull(stationId) && CollectionUtils.isNotEmpty(userStations)){
|
||||||
if (userStations.contains(stationId)){
|
if (userStations.contains(String.valueOf(stationId))){
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
package org.jeecg.modules.entity.vo;
|
package org.jeecg.modules.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.jeecg.modules.entity.GardsCalibrationSpectrum;
|
||||||
|
import org.jeecg.modules.entity.GardsROIChannelsSpectrum;
|
||||||
|
import org.jeecg.modules.entity.GardsROIResultsSpectrum;
|
||||||
|
import org.jeecg.modules.entity.GardsXeResultsSpectrum;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -205,24 +209,14 @@ public class BgDataAnlyseResultIn implements Serializable {
|
||||||
|
|
||||||
private int Xe135Flag;
|
private int Xe135Flag;
|
||||||
|
|
||||||
private List<Double> s_roi_cts;
|
List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList;
|
||||||
|
|
||||||
private List<Double> LC;
|
List<GardsCalibrationSpectrum> betaCalibrationSpectrumList;
|
||||||
|
|
||||||
private List<Double> g_roi_cts;
|
List<GardsROIChannelsSpectrum> roiChannelsSpectrumList;
|
||||||
|
|
||||||
private List<Double> d_roi_cts;
|
List<GardsROIResultsSpectrum> roiResultsSpectrumList;
|
||||||
|
|
||||||
private List<Double> s_deduct_d_cts;
|
List<GardsXeResultsSpectrum> XeData;
|
||||||
|
|
||||||
private List<Double> g_deduct_d_cts;
|
|
||||||
|
|
||||||
private List<Double> ROI_net_coutns;
|
|
||||||
|
|
||||||
private List<Double> ROI_net_err;
|
|
||||||
|
|
||||||
private List<Double> ROI_con_uncer;
|
|
||||||
|
|
||||||
private List<Double> MDC;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsRoiChannels;
|
||||||
|
|
||||||
|
public interface GardsROIChannelsSpectrumMapper extends BaseMapper<GardsRoiChannels> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsRoiResults;
|
||||||
|
|
||||||
|
public interface GardsROIResultsSpectrumMapper extends BaseMapper<GardsRoiResults> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsXeResults;
|
||||||
|
|
||||||
|
public interface GardsXeResultsSpectrumMapper extends BaseMapper<GardsXeResults> {
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package org.jeecg.modules.mapper;
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
@ -7,7 +8,9 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsDetectors;
|
import org.jeecg.modules.base.entity.configuration.GardsDetectors;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsNuclLib;
|
import org.jeecg.modules.base.entity.configuration.GardsNuclLib;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib;
|
import org.jeecg.modules.base.entity.configuration.GardsNuclLinesLib;
|
||||||
|
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
||||||
import org.jeecg.modules.base.entity.rnman.GardsAnalySetting;
|
import org.jeecg.modules.base.entity.rnman.GardsAnalySetting;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsCalibrationPairs;
|
||||||
import org.jeecg.modules.entity.*;
|
import org.jeecg.modules.entity.*;
|
||||||
import org.jeecg.modules.entity.vo.*;
|
import org.jeecg.modules.entity.vo.*;
|
||||||
|
|
||||||
|
@ -116,6 +119,8 @@ public interface SpectrumAnalysisMapper {
|
||||||
|
|
||||||
Integer SampleIsExist(@Param(value = "filePathName") String filePathName, @Param(value = "userName") String userName);
|
Integer SampleIsExist(@Param(value = "filePathName") String filePathName, @Param(value = "userName") String userName);
|
||||||
|
|
||||||
|
GardsSampleData findSampleByFile(@Param(value = "filePathName") String filePathName);
|
||||||
|
|
||||||
void updateAnalysesStatus(String filePathName);
|
void updateAnalysesStatus(String filePathName);
|
||||||
|
|
||||||
Integer getStationId(String stationName);
|
Integer getStationId(String stationName);
|
||||||
|
@ -124,13 +129,14 @@ public interface SpectrumAnalysisMapper {
|
||||||
|
|
||||||
Integer getSampleId(@Param(value = "filePathName") String filePathName);
|
Integer getSampleId(@Param(value = "filePathName") String filePathName);
|
||||||
|
|
||||||
void updateGardsAnalyses(GardsAnalysesSpectrum gardsAnalyses);
|
void updateGardsAnalyses(@Param(value = "gardsAnalyses") GardsAnalysesSpectrum gardsAnalyses);
|
||||||
|
|
||||||
void insertGardsAnalyses(GardsAnalysesSpectrum gardsAnalyses);
|
void insertGardsAnalyses(@Param(value = "gardsAnalyses") GardsAnalysesSpectrum gardsAnalyses);
|
||||||
|
|
||||||
void deleteCalibrationPairs(Integer idAnalysis);
|
void deleteCalibrationPairs(Integer idAnalysis);
|
||||||
|
|
||||||
void insertCalibrationPairs(List<GardsCalibrationPairsSpectrum> calibrationPairsList);
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
|
void insertCalibrationPairs(List<GardsCalibrationPairs> calibrationPairsList);
|
||||||
|
|
||||||
void deleteCalibration(Integer idAnalysis);
|
void deleteCalibration(Integer idAnalysis);
|
||||||
|
|
||||||
|
|
|
@ -748,6 +748,10 @@
|
||||||
SELECT IDANALYSIS FROM RNMAN.GARDS_ANALYSES WHERE SAMPLE_ID=(SELECT SAMPLE_ID FROM ORIGINAL.GARDS_SAMPLE_DATA WHERE INPUT_FILE_NAME = #{filePathName}) AND ANALYST= #{userName}
|
SELECT IDANALYSIS FROM RNMAN.GARDS_ANALYSES WHERE SAMPLE_ID=(SELECT SAMPLE_ID FROM ORIGINAL.GARDS_SAMPLE_DATA WHERE INPUT_FILE_NAME = #{filePathName}) AND ANALYST= #{userName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findSampleByFile" resultType="org.jeecg.modules.base.entity.original.GardsSampleData">
|
||||||
|
SELECT SAMPLE_ID,STATUS FROM ORIGINAL.GARDS_SAMPLE_DATA WHERE INPUT_FILE_NAME=#{filePathName}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateAnalysesStatus">
|
<update id="updateAnalysesStatus">
|
||||||
UPDATE ORIGINAL.GARDS_SAMPLE_DATA A SET A.STATUS='R' WHERE INPUT_FILE_NAME=#{filePathName}
|
UPDATE ORIGINAL.GARDS_SAMPLE_DATA A SET A.STATUS='R' WHERE INPUT_FILE_NAME=#{filePathName}
|
||||||
</update>
|
</update>
|
||||||
|
@ -819,26 +823,11 @@
|
||||||
DELETE FROM RNMAN.GARDS_CALIBRATION_PAIRS WHERE IDANALYSIS=#{idAnalysis}
|
DELETE FROM RNMAN.GARDS_CALIBRATION_PAIRS WHERE IDANALYSIS=#{idAnalysis}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertCalibrationPairs">
|
<insert id="insertCalibrationPairs" parameterType="java.util.List">
|
||||||
<foreach collection="calibrationPairsList" item="calibrationPairs" open="(" close=")" separator=",">
|
INSERT INTO RNMAN.GARDS_CALIBRATION_PAIRS(SAMPLE_ID,IDANALYSIS,SAMPLE_TYPE,CALTYPE,INPUT,IDCALPOINT,XVALUE,YVALUE)
|
||||||
INSERT INTO
|
VALUES
|
||||||
RNMAN.GARDS_CALIBRATION_PAIRS(
|
<foreach collection="calibrationPairsList" item="calibrationPairs" separator=",">
|
||||||
SAMPLE_ID,
|
(#{calibrationPairs.sampleId},#{calibrationPairs.idAnalysis},#{calibrationPairs.sampleType},#{calibrationPairs.caltype},#{calibrationPairs.input},#{calibrationPairs.idCalPoint},#{calibrationPairs.xValue},#{calibrationPairs.yValue})
|
||||||
IDANALYSIS,
|
|
||||||
SAMPLE_TYPE,
|
|
||||||
CALTYPE,
|
|
||||||
INPUT,
|
|
||||||
IDCALPOINT,
|
|
||||||
XVALUE,
|
|
||||||
YVALUE)
|
|
||||||
VALUES(#{calibrationPairs.sampleId},
|
|
||||||
#{calibrationPairs.idAnalysis},
|
|
||||||
#{calibrationPairs.sampleType},
|
|
||||||
#{calibrationPairs.caltype},
|
|
||||||
#{calibrationPairs.input},
|
|
||||||
#{calibrationPairs.idCalPoint},
|
|
||||||
#{calibrationPairs.xValue},
|
|
||||||
#{calibrationPairs.yValue},)
|
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -847,20 +836,20 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertCalibration">
|
<insert id="insertCalibration">
|
||||||
<foreach collection="calibrationList" item="calibration" open="(" close=")" separator=",">
|
INSERT INTO
|
||||||
INSERT INTO
|
RNMAN.GARDS_CALIBRATION(
|
||||||
RNMAN.GARDS_CALIBRATION(
|
SAMPLE_ID,
|
||||||
SAMPLE_ID,
|
IDANALYSIS,
|
||||||
IDANALYSIS,
|
SAMPLE_TYPE,
|
||||||
SAMPLE_TYPE,
|
CALTYPE,
|
||||||
CALTYPE,
|
FUNCTION,
|
||||||
FUNCTION,
|
FUNCTIONDEF,
|
||||||
FUNCTIONDEF,
|
STARTOFRANGE,
|
||||||
STARTOFRANGE,
|
ENDOFRANGE,
|
||||||
ENDOFRANGE,
|
COEFF1,
|
||||||
COEFF1,
|
COEFF2,
|
||||||
COEFF2,
|
COEFF3)
|
||||||
COEFF3)
|
<foreach collection="calibrationList" item="calibration" open=" " close=" " separator=",">
|
||||||
VALUES(#{calibration.sampleId},
|
VALUES(#{calibration.sampleId},
|
||||||
#{calibration.idAnalysis},
|
#{calibration.idAnalysis},
|
||||||
#{calibration.sampleType},
|
#{calibration.sampleType},
|
||||||
|
@ -881,16 +870,16 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertROIChannels">
|
<insert id="insertROIChannels">
|
||||||
<foreach collection="roiChannelsList" item="roiChannels" open="(" close=")" separator=",">
|
INSERT INTO
|
||||||
INSERT INTO
|
RNMAN.GARDS_ROI_CHANNELS(
|
||||||
RNMAN.GARDS_ROI_CHANNELS(
|
SAMPLE_ID,
|
||||||
SAMPLE_ID,
|
IDANALYSIS,
|
||||||
IDANALYSIS,
|
ROI,
|
||||||
ROI,
|
B_CHAN_START,
|
||||||
B_CHAN_START,
|
B_CHAN_STOP,
|
||||||
B_CHAN_STOP,
|
G_CHAN_START,
|
||||||
G_CHAN_START,
|
G_CHAN_STOP)
|
||||||
G_CHAN_STOP)
|
<foreach collection="roiChannelsList" item="roiChannels" open=" " close=" " separator=",">
|
||||||
VALUES(#{roiChannels.sampleId},
|
VALUES(#{roiChannels.sampleId},
|
||||||
#{roiChannels.idAnalysis},
|
#{roiChannels.idAnalysis},
|
||||||
#{roiChannels.roi},
|
#{roiChannels.roi},
|
||||||
|
@ -906,16 +895,16 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertXeResult">
|
<insert id="insertXeResult">
|
||||||
<foreach collection="xeResults" item="xeResult" open="(" close=")" separator=",">
|
INSERT INTO
|
||||||
INSERT INTO
|
RNMAN.GARDS_XE_RESULTS(SAMPLE_ID,
|
||||||
RNMAN.GARDS_XE_RESULTS(SAMPLE_ID,
|
IDANALYSIS,
|
||||||
IDANALYSIS,
|
NUCLIDE_NAME,
|
||||||
NUCLIDE_NAME,
|
CONC,
|
||||||
CONC,
|
CONC_ERR,
|
||||||
CONC_ERR,
|
MDC,
|
||||||
MDC,
|
LC,
|
||||||
LC,
|
NID_FLAG)
|
||||||
NID_FLAG)
|
<foreach collection="xeResults" item="xeResult" open=" " close=" " separator=",">
|
||||||
VALUES(#{xeResult.sampleId},
|
VALUES(#{xeResult.sampleId},
|
||||||
#{xeResult.idAnalysis},
|
#{xeResult.idAnalysis},
|
||||||
#{xeResult.nuclideName},
|
#{xeResult.nuclideName},
|
||||||
|
@ -932,23 +921,23 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="insertROIResults">
|
<insert id="insertROIResults">
|
||||||
<foreach collection="roiResultsSpectrumList" item="roiResultsSpectrum" open="(" separator="," close=")">
|
INSERT INTO
|
||||||
INSERT INTO
|
RNMAN.GARDS_ROI_RESULTS(SAMPLE_ID,
|
||||||
RNMAN.GARDS_ROI_RESULTS(SAMPLE_ID,
|
IDANALYSIS,
|
||||||
IDANALYSIS,
|
ROI,
|
||||||
ROI,
|
LC,
|
||||||
LC,
|
S_GROSS,
|
||||||
S_GROSS,
|
G_GROSS,
|
||||||
G_GROSS,
|
B_GROSS,
|
||||||
B_GROSS,
|
S_NET,
|
||||||
S_NET,
|
G_NET,
|
||||||
G_NET,
|
NET,
|
||||||
NET,
|
NET_ERR,
|
||||||
NET_ERR,
|
CONC,
|
||||||
CONC,
|
CONC_ERR,
|
||||||
CONC_ERR,
|
MDC,
|
||||||
MDC,
|
NID_FLAG)
|
||||||
NID_FLAG)
|
<foreach collection="roiResultsSpectrumList" item="roiResultsSpectrum" open=" " separator="," close=" ">
|
||||||
VALUES(#{roiResultsSpectrum.sampleId},
|
VALUES(#{roiResultsSpectrum.sampleId},
|
||||||
#{roiResultsSpectrum.idAnalysis},
|
#{roiResultsSpectrum.idAnalysis},
|
||||||
#{roiResultsSpectrum.roi},
|
#{roiResultsSpectrum.roi},
|
||||||
|
|
|
@ -6,8 +6,7 @@ import java.util.List;
|
||||||
* 能谱结构体字段信息
|
* 能谱结构体字段信息
|
||||||
*/
|
*/
|
||||||
public class EnergySpectrumStruct {
|
public class EnergySpectrumStruct {
|
||||||
|
/************************* Infomations ******************/
|
||||||
/************************* Infomations ******************/
|
|
||||||
/**
|
/**
|
||||||
* 消息类型
|
* 消息类型
|
||||||
*/
|
*/
|
||||||
|
@ -70,9 +69,9 @@ public class EnergySpectrumStruct {
|
||||||
* transmit time (hh : mm : ss . s)
|
* transmit time (hh : mm : ss . s)
|
||||||
*/
|
*/
|
||||||
public String transmit_time;
|
public String transmit_time;
|
||||||
|
|
||||||
/************************* Sample ******************/
|
/************************* Sample ******************/
|
||||||
public double dimension_1;
|
public double dimension_1;
|
||||||
|
|
||||||
public double dimension_2;
|
public double dimension_2;
|
||||||
|
|
||||||
/************************* Comment ******************/
|
/************************* Comment ******************/
|
||||||
|
@ -267,7 +266,7 @@ public class EnergySpectrumStruct {
|
||||||
/**
|
/**
|
||||||
* ROI number
|
* ROI number
|
||||||
*/
|
*/
|
||||||
public List<String> bg_ROI_number;
|
public List<Double> bg_ROI_number;
|
||||||
/**
|
/**
|
||||||
* β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
|
* β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
|
||||||
*/
|
*/
|
||||||
|
@ -420,6 +419,7 @@ public class EnergySpectrumStruct {
|
||||||
public List<Double> intensity_b_particle;
|
public List<Double> intensity_b_particle;
|
||||||
|
|
||||||
public int record_count;
|
public int record_count;
|
||||||
|
|
||||||
/************************* Totaleff Block ******************/
|
/************************* Totaleff Block ******************/
|
||||||
/**
|
/**
|
||||||
* γ-energy (keV)
|
* γ-energy (keV)
|
||||||
|
|
|
@ -5,8 +5,12 @@ import org.jeecg.modules.base.entity.rnman.GardsCalibrationPairs;
|
||||||
import org.jeecg.modules.entity.vo.GStoreMiddleProcessData;
|
import org.jeecg.modules.entity.vo.GStoreMiddleProcessData;
|
||||||
import org.jeecg.modules.entity.vo.PHDFile;
|
import org.jeecg.modules.entity.vo.PHDFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface IGardsCalibrationPairsSpectrumService extends IService<GardsCalibrationPairs> {
|
public interface IGardsCalibrationPairsSpectrumService extends IService<GardsCalibrationPairs> {
|
||||||
|
|
||||||
|
int saveGardsCalibrationPairs(List<GardsCalibrationPairs> calibrationPairsList);
|
||||||
|
|
||||||
boolean saveGardsCalibrationPairsGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis);
|
boolean saveGardsCalibrationPairsGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.jeecg.modules.base.entity.rnman.GardsCalibration;
|
import org.jeecg.modules.base.entity.rnman.GardsCalibration;
|
||||||
import org.jeecg.modules.entity.vo.GStoreMiddleProcessData;
|
import org.jeecg.modules.entity.vo.GStoreMiddleProcessData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface IGardsCalibrationSpectrumService extends IService<GardsCalibration> {
|
public interface IGardsCalibrationSpectrumService extends IService<GardsCalibration> {
|
||||||
|
|
||||||
|
int saveGardsCalibration(List<GardsCalibration> calibrationPairsList);
|
||||||
|
|
||||||
boolean saveCalibrationGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis);
|
boolean saveCalibrationGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsRoiChannels;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGardsROIChannelsSpectrumService extends IService<GardsRoiChannels> {
|
||||||
|
|
||||||
|
int saveGardsROIChannels(List<GardsRoiChannels> roiChannelsList);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsRoiResults;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGardsROIResultsSpectrumService extends IService<GardsRoiResults> {
|
||||||
|
|
||||||
|
int saveGardsROIResults(List<GardsRoiResults> roiResultsList);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package org.jeecg.modules.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsXeResults;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGardsXeResultsSpectrumService extends IService<GardsXeResults> {
|
||||||
|
|
||||||
|
int saveGardsXeResults(List<GardsXeResults> xeResultsList);
|
||||||
|
|
||||||
|
}
|
|
@ -7,12 +7,14 @@ import org.jeecg.modules.entity.vo.PHDFile;
|
||||||
import org.jeecg.modules.mapper.GardsAnalySettingSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsAnalySettingSpectrumMapper;
|
||||||
import org.jeecg.modules.service.IGardsAnalySettingSpectrumService;
|
import org.jeecg.modules.service.IGardsAnalySettingSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service("gardsAnalySettingSpectrumService")
|
@Service("gardsAnalySettingSpectrumService")
|
||||||
@DS("ora")
|
@DS("ora")
|
||||||
public class GardsAnalySettingSpectrumServiceImpl extends ServiceImpl<GardsAnalySettingSpectrumMapper, GardsAnalySetting> implements IGardsAnalySettingSpectrumService {
|
public class GardsAnalySettingSpectrumServiceImpl extends ServiceImpl<GardsAnalySettingSpectrumMapper, GardsAnalySetting> implements IGardsAnalySettingSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveAnalySettingGamma(PHDFile phd, String idAnalysis) {
|
public boolean saveAnalySettingGamma(PHDFile phd, String idAnalysis) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
GardsAnalySetting analySetting = new GardsAnalySetting();
|
GardsAnalySetting analySetting = new GardsAnalySetting();
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.jeecg.modules.entity.GardsAnalysesSpectrum;
|
||||||
import org.jeecg.modules.mapper.GardsAnalysesManMapper;
|
import org.jeecg.modules.mapper.GardsAnalysesManMapper;
|
||||||
import org.jeecg.modules.service.IGardsAnalysesSpectrumService;
|
import org.jeecg.modules.service.IGardsAnalysesSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -19,6 +20,7 @@ import java.util.Date;
|
||||||
public class GardsAnalysesSpectrumServiceImpl extends ServiceImpl<GardsAnalysesManMapper, GardsAnalyses> implements IGardsAnalysesSpectrumService {
|
public class GardsAnalysesSpectrumServiceImpl extends ServiceImpl<GardsAnalysesManMapper, GardsAnalyses> implements IGardsAnalysesSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer insertEntity(GStoreMiddleProcessData middleData, PHDFile phd, String userName, String comments) {
|
public Integer insertEntity(GStoreMiddleProcessData middleData, PHDFile phd, String userName, String comments) {
|
||||||
try {
|
try {
|
||||||
GardsAnalyses analyses = new GardsAnalyses();
|
GardsAnalyses analyses = new GardsAnalyses();
|
||||||
|
@ -46,6 +48,7 @@ public class GardsAnalysesSpectrumServiceImpl extends ServiceImpl<GardsAnalysesM
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public void updateEntity(GStoreMiddleProcessData middleData, PHDFile phd, String userName, String comments, String idAnalysis) {
|
public void updateEntity(GStoreMiddleProcessData middleData, PHDFile phd, String userName, String comments, String idAnalysis) {
|
||||||
GardsAnalysesSpectrum analyses = new GardsAnalysesSpectrum();
|
GardsAnalysesSpectrum analyses = new GardsAnalysesSpectrum();
|
||||||
analyses.setIdAnalysis(Integer.valueOf(idAnalysis));
|
analyses.setIdAnalysis(Integer.valueOf(idAnalysis));
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.jeecg.modules.mapper.GardsBgEfficiencyPairsSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsBgEfficiencyPairsSpectrumService;
|
import org.jeecg.modules.service.IGardsBgEfficiencyPairsSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -17,12 +18,13 @@ import java.util.List;
|
||||||
public class GardsBgEfficiencyPairsSpectrumServiceImpl extends ServiceImpl<GardsBgEfficiencyPairsSpectrumMapper, GardsBgEfficiencyPairs> implements IGardsBgEfficiencyPairsSpectrumService {
|
public class GardsBgEfficiencyPairsSpectrumServiceImpl extends ServiceImpl<GardsBgEfficiencyPairsSpectrumMapper, GardsBgEfficiencyPairs> implements IGardsBgEfficiencyPairsSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveBgEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId) {
|
public Integer saveBgEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
List<GardsBgEfficiencyPairs> bgEfficiencyPairsList = new LinkedList<>();
|
List<GardsBgEfficiencyPairs> bgEfficiencyPairsList = new LinkedList<>();
|
||||||
for (int i=0; i< sourceData.bg_record_count; i++){
|
for (int i=0; i< sourceData.bg_record_count; i++){
|
||||||
GardsBgEfficiencyPairs bgEfficiencyPairs = new GardsBgEfficiencyPairs();
|
GardsBgEfficiencyPairs bgEfficiencyPairs = new GardsBgEfficiencyPairs();
|
||||||
bgEfficiencyPairs.setSampleId(sampleId);
|
bgEfficiencyPairs.setSampleId(sampleId);
|
||||||
bgEfficiencyPairs.setRoi(Integer.valueOf(sourceData.bg_ROI_number.get(i)));
|
bgEfficiencyPairs.setRoi(sourceData.bg_ROI_number.get(i).intValue());
|
||||||
bgEfficiencyPairs.setNuclideName(sourceData.bg_nuclide_name.get(i));
|
bgEfficiencyPairs.setNuclideName(sourceData.bg_nuclide_name.get(i));
|
||||||
bgEfficiencyPairs.setBgEfficiency(sourceData.bg_efficiency.get(i));
|
bgEfficiencyPairs.setBgEfficiency(sourceData.bg_efficiency.get(i));
|
||||||
bgEfficiencyPairs.setBgEfficError(sourceData.bg_uncertainty.get(i));
|
bgEfficiencyPairs.setBgEfficError(sourceData.bg_uncertainty.get(i));
|
||||||
|
|
|
@ -16,6 +16,7 @@ import org.jeecg.modules.mapper.GardsCalibrationPairsOrigSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsCalibrationPairsOrigSpectrumService;
|
import org.jeecg.modules.service.IGardsCalibrationPairsOrigSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -25,6 +26,7 @@ import java.util.List;
|
||||||
public class GardsCalibrationPairsOrigSpectrumServiceImpl extends ServiceImpl<GardsCalibrationPairsOrigSpectrumMapper, GardsCalibrationPairsOrig> implements IGardsCalibrationPairsOrigSpectrumService {
|
public class GardsCalibrationPairsOrigSpectrumServiceImpl extends ServiceImpl<GardsCalibrationPairsOrigSpectrumMapper, GardsCalibrationPairsOrig> implements IGardsCalibrationPairsOrigSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveGardsCalibrationPairsOrig(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines) {
|
public Integer saveGardsCalibrationPairsOrig(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines) {
|
||||||
List<GardsCalibrationPairsOrig> calibrationPairsOrigList = new LinkedList<>();
|
List<GardsCalibrationPairsOrig> calibrationPairsOrigList = new LinkedList<>();
|
||||||
//判断文件是否包含g_Energy块 新增Gards_Calibration_Pairs_Orig数据
|
//判断文件是否包含g_Energy块 新增Gards_Calibration_Pairs_Orig数据
|
||||||
|
@ -106,6 +108,7 @@ public class GardsCalibrationPairsOrigSpectrumServiceImpl extends ServiceImpl<Ga
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveCalibrationPairsOrigGamma(PHDFile phd, Integer sampleId) {
|
public boolean saveCalibrationPairsOrigGamma(PHDFile phd, Integer sampleId) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
List<GardsCalibrationPairsOrig> calibrationPairsOrigList = new LinkedList<>();
|
List<GardsCalibrationPairsOrig> calibrationPairsOrigList = new LinkedList<>();
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.jeecg.modules.entity.GardsCalibrationSpectrum;
|
||||||
import org.jeecg.modules.mapper.GardsCalibrationPairsSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsCalibrationPairsSpectrumMapper;
|
||||||
import org.jeecg.modules.service.IGardsCalibrationPairsSpectrumService;
|
import org.jeecg.modules.service.IGardsCalibrationPairsSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,8 +20,17 @@ import java.util.List;
|
||||||
@DS("ora")
|
@DS("ora")
|
||||||
public class GardsCalibrationPairsSpectrumServiceImpl extends ServiceImpl<GardsCalibrationPairsSpectrumMapper, GardsCalibrationPairs> implements IGardsCalibrationPairsSpectrumService {
|
public class GardsCalibrationPairsSpectrumServiceImpl extends ServiceImpl<GardsCalibrationPairsSpectrumMapper, GardsCalibrationPairs> implements IGardsCalibrationPairsSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int saveGardsCalibrationPairs(List<GardsCalibrationPairs> calibrationPairsList) {
|
||||||
|
if (CollectionUtils.isNotEmpty(calibrationPairsList)) {
|
||||||
|
this.saveBatch(calibrationPairsList);
|
||||||
|
}
|
||||||
|
return calibrationPairsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveGardsCalibrationPairsGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
public boolean saveGardsCalibrationPairsGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
List<GardsCalibrationPairs> calibrationPairsList = new LinkedList<>();
|
List<GardsCalibrationPairs> calibrationPairsList = new LinkedList<>();
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.jeecg.modules.entity.vo.GStoreMiddleProcessData;
|
||||||
import org.jeecg.modules.mapper.GardsCalibrationSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsCalibrationSpectrumMapper;
|
||||||
import org.jeecg.modules.service.IGardsCalibrationSpectrumService;
|
import org.jeecg.modules.service.IGardsCalibrationSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -18,6 +19,16 @@ public class GardsCalibrationSpectrumServiceImpl extends ServiceImpl<GardsCalibr
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int saveGardsCalibration(List<GardsCalibration> calibrationPairsList) {
|
||||||
|
if (CollectionUtils.isNotEmpty(calibrationPairsList)) {
|
||||||
|
this.saveBatch(calibrationPairsList);
|
||||||
|
}
|
||||||
|
return calibrationPairsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveCalibrationGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
public boolean saveCalibrationGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
List<GardsCalibration> calibrationList = new LinkedList<>();
|
List<GardsCalibration> calibrationList = new LinkedList<>();
|
||||||
|
|
|
@ -7,6 +7,7 @@ import org.jeecg.modules.mapper.GardsHistogramSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsHistogramSpectrumService;
|
import org.jeecg.modules.service.IGardsHistogramSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -15,6 +16,7 @@ import java.util.List;
|
||||||
public class GardsHistogramSpectrumServiceImpl extends ServiceImpl<GardsHistogramSpectrumMapper, GardsHistogram> implements IGardsHistogramSpectrumService {
|
public class GardsHistogramSpectrumServiceImpl extends ServiceImpl<GardsHistogramSpectrumMapper, GardsHistogram> implements IGardsHistogramSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveHistogram(EnergySpectrumStruct sourceData, Integer sampleId, String filePathName) {
|
public Integer saveHistogram(EnergySpectrumStruct sourceData, Integer sampleId, String filePathName) {
|
||||||
GardsHistogram histogram = new GardsHistogram();
|
GardsHistogram histogram = new GardsHistogram();
|
||||||
histogram.setSampleId(sampleId);
|
histogram.setSampleId(sampleId);
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.jeecg.modules.entity.GardsNuclIdedSpectrum;
|
||||||
import org.jeecg.modules.mapper.GardsNuclIdedSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsNuclIdedSpectrumMapper;
|
||||||
import org.jeecg.modules.service.IGardsNuclIdedSpectrumService;
|
import org.jeecg.modules.service.IGardsNuclIdedSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,6 +20,7 @@ public class GardsNuclIdedSpectrumServiceImpl extends ServiceImpl<GardsNuclIdedS
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveNuclIdedGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
public boolean saveNuclIdedGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
List<GardsNuclIded> nuclIdedList = new LinkedList<>();
|
List<GardsNuclIded> nuclIdedList = new LinkedList<>();
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.jeecg.modules.entity.vo.GStoreMiddleProcessDataNuclLinesIded;
|
||||||
import org.jeecg.modules.mapper.GardsNuclLinesIdedSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsNuclLinesIdedSpectrumMapper;
|
||||||
import org.jeecg.modules.service.IGardsNuclLinesIdedSpectrumService;
|
import org.jeecg.modules.service.IGardsNuclLinesIdedSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,6 +20,7 @@ import java.util.Map;
|
||||||
public class GardsNuclLinesIdedSpectrumServiceImpl extends ServiceImpl<GardsNuclLinesIdedSpectrumMapper, GardsNuclLinesIded> implements IGardsNuclLinesIdedSpectrumService {
|
public class GardsNuclLinesIdedSpectrumServiceImpl extends ServiceImpl<GardsNuclLinesIdedSpectrumMapper, GardsNuclLinesIded> implements IGardsNuclLinesIdedSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveNuclLinesIdedGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
public boolean saveNuclLinesIdedGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
Map<String, GStoreMiddleProcessDataNuclLinesIded> map = middleData.nucl_lines_ided_data;
|
Map<String, GStoreMiddleProcessDataNuclLinesIded> map = middleData.nucl_lines_ided_data;
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.jeecg.modules.entity.vo.GStoreMiddleProcessData;
|
||||||
import org.jeecg.modules.mapper.GardsPeaksSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsPeaksSpectrumMapper;
|
||||||
import org.jeecg.modules.service.IGardsPeaksSpectrumService;
|
import org.jeecg.modules.service.IGardsPeaksSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -18,6 +19,7 @@ public class GardsPeaksSpectrumServiceImpl extends ServiceImpl<GardsPeaksSpectru
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean savePeaksGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
public boolean savePeaksGamma(GStoreMiddleProcessData middleData, Integer sampleId, String idAnalysis) {
|
||||||
List<GardsPeaks> peaksList = new LinkedList<>();
|
List<GardsPeaks> peaksList = new LinkedList<>();
|
||||||
int t_size = middleData.peaks_idPeak.size();
|
int t_size = middleData.peaks_idPeak.size();
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.jeecg.modules.entity.GardsQcCheckSpectrum;
|
||||||
import org.jeecg.modules.mapper.GardsQcCheckSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsQcCheckSpectrumMapper;
|
||||||
import org.jeecg.modules.service.IGardsQcCheckSpectrumService;
|
import org.jeecg.modules.service.IGardsQcCheckSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -19,6 +20,7 @@ public class GardsQcCheckSpectrumServiceImpl extends ServiceImpl<GardsQcCheckSpe
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveQcCheckGamma(GStoreMiddleProcessData middleData, PHDFile phd, String idAnalysis) {
|
public boolean saveQcCheckGamma(GStoreMiddleProcessData middleData, PHDFile phd, String idAnalysis) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsRoiChannels;
|
||||||
|
import org.jeecg.modules.mapper.GardsROIChannelsSpectrumMapper;
|
||||||
|
import org.jeecg.modules.service.IGardsROIChannelsSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("roiChannelsService")
|
||||||
|
@DS("ora")
|
||||||
|
public class GardsROIChannelsSpectrumServiceImpl extends ServiceImpl<GardsROIChannelsSpectrumMapper, GardsRoiChannels> implements IGardsROIChannelsSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int saveGardsROIChannels(List<GardsRoiChannels> roiChannelsList) {
|
||||||
|
if (CollectionUtils.isNotEmpty(roiChannelsList)) {
|
||||||
|
this.saveBatch(roiChannelsList);
|
||||||
|
}
|
||||||
|
return roiChannelsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsRoiResults;
|
||||||
|
import org.jeecg.modules.mapper.GardsROIResultsSpectrumMapper;
|
||||||
|
import org.jeecg.modules.service.IGardsROIResultsSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("roiResultsSpectrumService")
|
||||||
|
@DS("ora")
|
||||||
|
public class GardsROIResultsSpectrumServiceImpl extends ServiceImpl<GardsROIResultsSpectrumMapper, GardsRoiResults> implements IGardsROIResultsSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int saveGardsROIResults(List<GardsRoiResults> roiResultsList) {
|
||||||
|
if (CollectionUtils.isNotEmpty(roiResultsList)) {
|
||||||
|
this.saveBatch(roiResultsList);
|
||||||
|
}
|
||||||
|
return roiResultsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ import org.jeecg.modules.mapper.GardsRoiLimitsSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsRoiLimitsSpectrumService;
|
import org.jeecg.modules.service.IGardsRoiLimitsSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -17,6 +18,7 @@ import java.util.List;
|
||||||
public class GardsRoiLimitsSpectrumServiceImpl extends ServiceImpl<GardsRoiLimitsSpectrumMapper, GardsRoiLimits> implements IGardsRoiLimitsSpectrumService {
|
public class GardsRoiLimitsSpectrumServiceImpl extends ServiceImpl<GardsRoiLimitsSpectrumMapper, GardsRoiLimits> implements IGardsRoiLimitsSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveRoiLimits(EnergySpectrumStruct sourceData, Integer sampleId) {
|
public Integer saveRoiLimits(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
List<GardsRoiLimits> roiLimitsList = new LinkedList<>();
|
List<GardsRoiLimits> roiLimitsList = new LinkedList<>();
|
||||||
for (int i=0; i<sourceData.roi_record_count; i++){
|
for (int i=0; i<sourceData.roi_record_count; i++){
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.jeecg.modules.mapper.GardsSampleAuxSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsSampleAuxSpectrumService;
|
import org.jeecg.modules.service.IGardsSampleAuxSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -20,6 +21,7 @@ import java.util.List;
|
||||||
public class GardsSampleAuxSpectrumServiceImpl extends ServiceImpl<GardsSampleAuxSpectrumMapper, GardsSampleAux> implements IGardsSampleAuxSpectrumService {
|
public class GardsSampleAuxSpectrumServiceImpl extends ServiceImpl<GardsSampleAuxSpectrumMapper, GardsSampleAux> implements IGardsSampleAuxSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveSampleAux(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines) {
|
public Integer saveSampleAux(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines) {
|
||||||
String sampleRefId = "";
|
String sampleRefId = "";
|
||||||
String measurementID = "";
|
String measurementID = "";
|
||||||
|
@ -37,16 +39,11 @@ public class GardsSampleAuxSpectrumServiceImpl extends ServiceImpl<GardsSampleAu
|
||||||
//读取message下内容
|
//读取message下内容
|
||||||
msgID = sourceData.msg_id;
|
msgID = sourceData.msg_id;
|
||||||
GardsSampleAux sampleAux = new GardsSampleAux();
|
GardsSampleAux sampleAux = new GardsSampleAux();
|
||||||
sampleAux.setMsgId(msgID);
|
//封装sampleAux对应的数据
|
||||||
sampleAux.setSampleHeight(Double.valueOf(sampleHeight));
|
measurementID = sourceData.measurement_id.replace("\\", "/").replace(" ", "-");
|
||||||
sampleAux.setSampleDiameter(Double.valueOf(sampleDiameter));
|
bkgdMeasurementID = sourceData.detector_bk_measurement_id.replace("\\", "/").replace(" ", "-");
|
||||||
if (readLines.contains(SampleFileHeader.HEADER.getMessage())){
|
gasBkgdMeasurementID = sourceData.gas_bk_measurement_id.replace("\\", "/").replace(" ", "-");
|
||||||
//封装sampleAux对应的数据
|
sampleRefId = sourceData.sample_ref_id;
|
||||||
measurementID = sourceData.measurement_id.replace("\\", "/").replace(" ", "-");
|
|
||||||
bkgdMeasurementID = sourceData.detector_bk_measurement_id.replace("\\", "/").replace(" ", "-");
|
|
||||||
gasBkgdMeasurementID = sourceData.gas_bk_measurement_id.replace("\\", "/").replace(" ", "-");
|
|
||||||
sampleRefId = sourceData.sample_ref_id;
|
|
||||||
}
|
|
||||||
if (readLines.contains(SampleFileHeader.SAMPLE.getMessage())){
|
if (readLines.contains(SampleFileHeader.SAMPLE.getMessage())){
|
||||||
//读取Sample下内容
|
//读取Sample下内容
|
||||||
sampleHeight = String.valueOf(sourceData.dimension_2);
|
sampleHeight = String.valueOf(sourceData.dimension_2);
|
||||||
|
@ -64,13 +61,18 @@ public class GardsSampleAuxSpectrumServiceImpl extends ServiceImpl<GardsSampleAu
|
||||||
xeCollectionYiedUncer= sourceData.uncertainty_2;
|
xeCollectionYiedUncer= sourceData.uncertainty_2;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
sampleAux.setMsgId(msgID);
|
||||||
|
if (StringUtils.isNotBlank(sampleHeight)) {
|
||||||
|
sampleAux.setSampleHeight(Double.valueOf(sampleHeight));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(sampleDiameter)) {
|
||||||
|
sampleAux.setSampleDiameter(Double.valueOf(sampleDiameter));
|
||||||
|
}
|
||||||
sampleAux.setSampleId(sampleId);
|
sampleAux.setSampleId(sampleId);
|
||||||
sampleAux.setSampleRefId(sampleRefId);
|
sampleAux.setSampleRefId(sampleRefId);
|
||||||
sampleAux.setMeasurementId(measurementID);
|
sampleAux.setMeasurementId(measurementID);
|
||||||
sampleAux.setBkgdMeasurementId(bkgdMeasurementID);
|
sampleAux.setBkgdMeasurementId(bkgdMeasurementID);
|
||||||
sampleAux.setGasBkgdMeasurementId(gasBkgdMeasurementID);
|
sampleAux.setGasBkgdMeasurementId(gasBkgdMeasurementID);
|
||||||
sampleAux.setSampleHeight(Double.valueOf(sampleHeight));
|
|
||||||
sampleAux.setSampleDiameter(Double.valueOf(sampleDiameter));
|
|
||||||
sampleAux.setCalibrationDtg(DateUtils.parseDate(calibrationDtg));
|
sampleAux.setCalibrationDtg(DateUtils.parseDate(calibrationDtg));
|
||||||
sampleAux.setArchiveBottleId(archiveBottleID);
|
sampleAux.setArchiveBottleId(archiveBottleID);
|
||||||
sampleAux.setXeVolume(xeVolume);
|
sampleAux.setXeVolume(xeVolume);
|
||||||
|
@ -85,6 +87,7 @@ public class GardsSampleAuxSpectrumServiceImpl extends ServiceImpl<GardsSampleAu
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveSampleAuxGamma(PHDFile phd, Integer sampleId) {
|
public boolean saveSampleAuxGamma(PHDFile phd, Integer sampleId) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
GardsSampleAux sampleAux = new GardsSampleAux();
|
GardsSampleAux sampleAux = new GardsSampleAux();
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.jeecg.modules.mapper.GardsSampleCertLineSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsSampleCertLineSpectrumService;
|
import org.jeecg.modules.service.IGardsSampleCertLineSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -18,6 +19,7 @@ import java.util.List;
|
||||||
public class GardsSampleCertLineSpectrumServiceImpl extends ServiceImpl<GardsSampleCertLineSpectrumMapper, GardsSampleCertLine> implements IGardsSampleCertLineSpectrumService {
|
public class GardsSampleCertLineSpectrumServiceImpl extends ServiceImpl<GardsSampleCertLineSpectrumMapper, GardsSampleCertLine> implements IGardsSampleCertLineSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveSampleCertLine(EnergySpectrumStruct sourceData, Integer sampleId) {
|
public Integer saveSampleCertLine(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
List<GardsSampleCertLine> sampleCertLineList = new LinkedList<>();
|
List<GardsSampleCertLine> sampleCertLineList = new LinkedList<>();
|
||||||
for (int i=0; i<sourceData.record_count; i++){
|
for (int i=0; i<sourceData.record_count; i++){
|
||||||
|
@ -42,6 +44,7 @@ public class GardsSampleCertLineSpectrumServiceImpl extends ServiceImpl<GardsSam
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveSampleCertLineGamma(PHDFile phd, Integer sampleId) {
|
public boolean saveSampleCertLineGamma(PHDFile phd, Integer sampleId) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
List<GardsSampleCertLine> sampleCertLineList = new LinkedList<>();
|
List<GardsSampleCertLine> sampleCertLineList = new LinkedList<>();
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.jeecg.modules.mapper.GardsSampleCertSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsSampleCertSpectrumService;
|
import org.jeecg.modules.service.IGardsSampleCertSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
|
|
||||||
|
@ -17,6 +18,7 @@ import java.text.ParseException;
|
||||||
public class GardsSampleCertSpectrumServiceImpl extends ServiceImpl<GardsSampleCertSpectrumMapper, GardsSampleCert> implements IGardsSampleCertSpectrumService {
|
public class GardsSampleCertSpectrumServiceImpl extends ServiceImpl<GardsSampleCertSpectrumMapper, GardsSampleCert> implements IGardsSampleCertSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveSampleCert(EnergySpectrumStruct sourceData, Integer sampleId) {
|
public Integer saveSampleCert(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
GardsSampleCert sampleCert = new GardsSampleCert();
|
GardsSampleCert sampleCert = new GardsSampleCert();
|
||||||
try {
|
try {
|
||||||
|
@ -32,6 +34,7 @@ public class GardsSampleCertSpectrumServiceImpl extends ServiceImpl<GardsSampleC
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveSampleCertGamma(PHDFile phd, Integer sampleId) {
|
public boolean saveSampleCertGamma(PHDFile phd, Integer sampleId) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
String assay_date = phd.getCertificate().getAssay_date() + " " + phd.getCertificate().getAssay_time();
|
String assay_date = phd.getCertificate().getAssay_date() + " " + phd.getCertificate().getAssay_time();
|
||||||
|
|
|
@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.jeecg.common.util.DateUtils;
|
import org.jeecg.common.util.DateUtils;
|
||||||
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
||||||
|
import org.jeecg.modules.base.enums.DataType;
|
||||||
import org.jeecg.modules.base.enums.SampleFileHeader;
|
import org.jeecg.modules.base.enums.SampleFileHeader;
|
||||||
import org.jeecg.modules.entity.vo.PHDFile;
|
import org.jeecg.modules.entity.vo.PHDFile;
|
||||||
import org.jeecg.modules.mapper.GardsSampleDataSpectrumMapper;
|
import org.jeecg.modules.mapper.GardsSampleDataSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsSampleDataSpectrumService;
|
import org.jeecg.modules.service.IGardsSampleDataSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -21,6 +23,7 @@ import java.util.List;
|
||||||
public class GardsSampleDataSpectrumServiceImpl extends ServiceImpl<GardsSampleDataSpectrumMapper, GardsSampleData> implements IGardsSampleDataSpectrumService {
|
public class GardsSampleDataSpectrumServiceImpl extends ServiceImpl<GardsSampleDataSpectrumMapper, GardsSampleData> implements IGardsSampleDataSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveSampleData(EnergySpectrumStruct sourceData, Integer stationId, Integer detectorId, String filePathName, List<String> readLines) {
|
public Integer saveSampleData(EnergySpectrumStruct sourceData, Integer stationId, Integer detectorId, String filePathName, List<String> readLines) {
|
||||||
String sample_type = "";
|
String sample_type = "";
|
||||||
String detect_code = "";
|
String detect_code = "";
|
||||||
|
@ -35,16 +38,14 @@ public class GardsSampleDataSpectrumServiceImpl extends ServiceImpl<GardsSampleD
|
||||||
double acquisition_real_sec=0;
|
double acquisition_real_sec=0;
|
||||||
double acquisition_live_sec=0;
|
double acquisition_live_sec=0;
|
||||||
//读取message下内容
|
//读取message下内容
|
||||||
data_type = sourceData.data_type;
|
data_type = sourceData.data_type.substring(0, 1);
|
||||||
//读取header下内容
|
//读取header下内容
|
||||||
GardsSampleData sampleData = new GardsSampleData();
|
GardsSampleData sampleData = new GardsSampleData();
|
||||||
if (readLines.contains(SampleFileHeader.HEADER.getMessage())){
|
sample_type=sourceData.system_type;
|
||||||
sample_type=sourceData.system_type;
|
geometry=sourceData.sample_geometry;
|
||||||
geometry=sourceData.sample_geometry;
|
spectral_qualifie=sourceData.spectrum_quantity;
|
||||||
spectral_qualifie=sourceData.spectrum_quantity;
|
transmit_dtg=sourceData.transmit_date+" "+sourceData.transmit_time;
|
||||||
transmit_dtg=sourceData.transmit_date+" "+sourceData.transmit_time;
|
detect_code=sourceData.detector_code;
|
||||||
detect_code=sourceData.detector_code;
|
|
||||||
}
|
|
||||||
if (readLines.contains(SampleFileHeader.COLLECTION.getMessage())){
|
if (readLines.contains(SampleFileHeader.COLLECTION.getMessage())){
|
||||||
//读取Collection下内容
|
//读取Collection下内容
|
||||||
collect_start = sourceData.collection_start_date+" "+sourceData.collection_start_time;
|
collect_start = sourceData.collection_start_date+" "+sourceData.collection_start_time;
|
||||||
|
@ -64,15 +65,23 @@ public class GardsSampleDataSpectrumServiceImpl extends ServiceImpl<GardsSampleD
|
||||||
sampleData.setDataType(data_type);
|
sampleData.setDataType(data_type);
|
||||||
sampleData.setGeometry(geometry);
|
sampleData.setGeometry(geometry);
|
||||||
sampleData.setSpectralQualifie(spectral_qualifie);
|
sampleData.setSpectralQualifie(spectral_qualifie);
|
||||||
sampleData.setTransmitDtg(DateUtils.parseDate(transmit_dtg));
|
if (StringUtils.isNotBlank(transmit_dtg)) {
|
||||||
sampleData.setCollectStart(DateUtils.parseDate(collect_start));
|
sampleData.setTransmitDtg(DateUtils.parseDate(transmit_dtg));
|
||||||
sampleData.setCollectStop(DateUtils.parseDate(collect_stop));
|
}
|
||||||
|
if (StringUtils.isNotBlank(collect_start)) {
|
||||||
|
sampleData.setCollectStart(DateUtils.parseDate(collect_start));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(collect_stop)) {
|
||||||
|
sampleData.setCollectStop(DateUtils.parseDate(collect_stop));
|
||||||
|
}
|
||||||
sampleData.setQuantity(quantity);
|
sampleData.setQuantity(quantity);
|
||||||
Date acquisitionStart = DateUtils.parseDate(acquisition_start);
|
if (StringUtils.isNotBlank(acquisition_start)) {
|
||||||
long timeSecs = (long) (acquisitionStart.getTime() + acquisition_live_sec);
|
Date acquisitionStart = DateUtils.parseDate(acquisition_start);
|
||||||
Date acquisitionStop = new Date(timeSecs);
|
long timeSecs = (long) (acquisitionStart.getTime() + acquisition_live_sec);
|
||||||
sampleData.setAcquisitionStart(acquisitionStart);
|
Date acquisitionStop = new Date(timeSecs);
|
||||||
sampleData.setAcquisitionStop(acquisitionStop);
|
sampleData.setAcquisitionStart(acquisitionStart);
|
||||||
|
sampleData.setAcquisitionStop(acquisitionStop);
|
||||||
|
}
|
||||||
sampleData.setAcquisitionLiveSec(acquisition_live_sec);
|
sampleData.setAcquisitionLiveSec(acquisition_live_sec);
|
||||||
sampleData.setAcquisitionRealSec(acquisition_real_sec);
|
sampleData.setAcquisitionRealSec(acquisition_real_sec);
|
||||||
sampleData.setStatus("R");
|
sampleData.setStatus("R");
|
||||||
|
@ -86,6 +95,7 @@ public class GardsSampleDataSpectrumServiceImpl extends ServiceImpl<GardsSampleD
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveSampleDataGamma(PHDFile phd, String input_file_name, Integer station_id, Integer detect_id) {
|
public boolean saveSampleDataGamma(PHDFile phd, String input_file_name, Integer station_id, Integer detect_id) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
// ORIGINAL.GARDS_SAMPLE_DATA 表数据
|
// ORIGINAL.GARDS_SAMPLE_DATA 表数据
|
||||||
|
|
|
@ -9,12 +9,14 @@ import org.jeecg.modules.mapper.GardsSampleDescriptionSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsSampleDescriptionSpectrumService;
|
import org.jeecg.modules.service.IGardsSampleDescriptionSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service("gardsSampleDescriptionSpectrumService")
|
@Service("gardsSampleDescriptionSpectrumService")
|
||||||
@DS("ora")
|
@DS("ora")
|
||||||
public class GardsSampleDescriptionSpectrumServiceImpl extends ServiceImpl<GardsSampleDescriptionSpectrumMapper, GardsSampleDescription> implements IGardsSampleDescriptionSpectrumService {
|
public class GardsSampleDescriptionSpectrumServiceImpl extends ServiceImpl<GardsSampleDescriptionSpectrumMapper, GardsSampleDescription> implements IGardsSampleDescriptionSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveSampleDescription(EnergySpectrumStruct sourceData, Integer sampleId) {
|
public Integer saveSampleDescription(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
GardsSampleDescription sampleDescription = new GardsSampleDescription();
|
GardsSampleDescription sampleDescription = new GardsSampleDescription();
|
||||||
String comment = sourceData.comment;
|
String comment = sourceData.comment;
|
||||||
|
@ -28,6 +30,7 @@ public class GardsSampleDescriptionSpectrumServiceImpl extends ServiceImpl<Gards
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveSampleDescriptionGamma(PHDFile phd, Integer sampleId) {
|
public boolean saveSampleDescriptionGamma(PHDFile phd, Integer sampleId) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
if(StringUtils.isNotBlank(phd.getOriTotalCmt())) {
|
if(StringUtils.isNotBlank(phd.getOriTotalCmt())) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.jeecg.modules.mapper.GardsSampleRatiosSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsSampleRatiosSpectrumService;
|
import org.jeecg.modules.service.IGardsSampleRatiosSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -17,6 +18,7 @@ import java.util.List;
|
||||||
public class GardsSampleRatiosSpectrumServiceImpl extends ServiceImpl<GardsSampleRatiosSpectrumMapper, GardsSampleRatios> implements IGardsSampleRatiosSpectrumService {
|
public class GardsSampleRatiosSpectrumServiceImpl extends ServiceImpl<GardsSampleRatiosSpectrumMapper, GardsSampleRatios> implements IGardsSampleRatiosSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveSampleRatios(EnergySpectrumStruct sourceData, Integer sampleId) {
|
public Integer saveSampleRatios(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
List<GardsSampleRatios> sampleRatiosList = new LinkedList<>();
|
List<GardsSampleRatios> sampleRatiosList = new LinkedList<>();
|
||||||
for (int i=0; i<sourceData.ratio_record_count; i++){
|
for (int i=0; i<sourceData.ratio_record_count; i++){
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.jeecg.modules.mapper.GardsSpectrumSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsSpectrumSpectrumService;
|
import org.jeecg.modules.service.IGardsSpectrumSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -21,6 +22,7 @@ import java.util.List;
|
||||||
public class GardsSpectrumSpectrumServiceImpl extends ServiceImpl<GardsSpectrumSpectrumMapper, GardsSpectrum> implements IGardsSpectrumSpectrumService {
|
public class GardsSpectrumSpectrumServiceImpl extends ServiceImpl<GardsSpectrumSpectrumMapper, GardsSpectrum> implements IGardsSpectrumSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveSpectrum(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines, String filePathName) {
|
public Integer saveSpectrum(EnergySpectrumStruct sourceData, Integer sampleId, List<String> readLines, String filePathName) {
|
||||||
List<GardsSpectrum> spectrumList = new LinkedList<>();
|
List<GardsSpectrum> spectrumList = new LinkedList<>();
|
||||||
//判断是否包含b_Spectrum块 新增Gards_Spectrum数据
|
//判断是否包含b_Spectrum块 新增Gards_Spectrum数据
|
||||||
|
@ -52,6 +54,7 @@ public class GardsSpectrumSpectrumServiceImpl extends ServiceImpl<GardsSpectrumS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveSpectrumGamma(PHDFile phd, Integer sampleId, String input_file_name) {
|
public boolean saveSpectrumGamma(PHDFile phd, Integer sampleId, String input_file_name) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
int t_size = (int) phd.getSpec().getNum_g_channel();
|
int t_size = (int) phd.getSpec().getNum_g_channel();
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.jeecg.modules.mapper.GardsTotalEfficiencyPairsSpectrumMapper;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.IGardsTotalEfficiencyPairsSpectrumService;
|
import org.jeecg.modules.service.IGardsTotalEfficiencyPairsSpectrumService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -20,6 +21,7 @@ import java.util.List;
|
||||||
public class GardsTotalEfficiencyPairsSpectrumServiceImpl extends ServiceImpl<GardsTotalEfficiencyPairsSpectrumMapper, GardsTotalEfficiencyPairs> implements IGardsTotalEfficiencyPairsSpectrumService {
|
public class GardsTotalEfficiencyPairsSpectrumServiceImpl extends ServiceImpl<GardsTotalEfficiencyPairsSpectrumMapper, GardsTotalEfficiencyPairs> implements IGardsTotalEfficiencyPairsSpectrumService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Integer saveTotalEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId) {
|
public Integer saveTotalEfficiencyPairs(EnergySpectrumStruct sourceData, Integer sampleId) {
|
||||||
List<GardsTotalEfficiencyPairs> totalEfficiencyPairsList = new LinkedList<>();
|
List<GardsTotalEfficiencyPairs> totalEfficiencyPairsList = new LinkedList<>();
|
||||||
for (int i=0; i<sourceData.t_record_count; i++){
|
for (int i=0; i<sourceData.t_record_count; i++){
|
||||||
|
@ -37,6 +39,7 @@ public class GardsTotalEfficiencyPairsSpectrumServiceImpl extends ServiceImpl<Ga
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean saveTotalEfficiencyPairsGamma(PHDFile phd, Integer sampleId) {
|
public boolean saveTotalEfficiencyPairsGamma(PHDFile phd, Integer sampleId) {
|
||||||
boolean bRet = false;
|
boolean bRet = false;
|
||||||
List<GardsTotalEfficiencyPairs> totalEfficiencyPairsList = new LinkedList<>();
|
List<GardsTotalEfficiencyPairs> totalEfficiencyPairsList = new LinkedList<>();
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
package org.jeecg.modules.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.GardsXeResults;
|
||||||
|
import org.jeecg.modules.mapper.GardsXeResultsSpectrumMapper;
|
||||||
|
import org.jeecg.modules.service.IGardsXeResultsSpectrumService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service("xeResultsSpectrumService")
|
||||||
|
@DS("ora")
|
||||||
|
public class GardsXeResultsSpectrumServiceImpl extends ServiceImpl<GardsXeResultsSpectrumMapper, GardsXeResults> implements IGardsXeResultsSpectrumService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int saveGardsXeResults(List<GardsXeResults> xeResultsList) {
|
||||||
|
if (CollectionUtils.isNotEmpty(xeResultsList)) {
|
||||||
|
this.saveBatch(xeResultsList);
|
||||||
|
}
|
||||||
|
return xeResultsList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -22,16 +22,17 @@ import org.jeecg.common.util.*;
|
||||||
import org.jeecg.modules.base.bizVo.BetaRLR;
|
import org.jeecg.modules.base.bizVo.BetaRLR;
|
||||||
import org.jeecg.modules.base.entity.configuration.GardsDetectors;
|
import org.jeecg.modules.base.entity.configuration.GardsDetectors;
|
||||||
import org.jeecg.modules.base.entity.original.*;
|
import org.jeecg.modules.base.entity.original.*;
|
||||||
|
import org.jeecg.modules.base.entity.rnman.*;
|
||||||
import org.jeecg.modules.base.enums.*;
|
import org.jeecg.modules.base.enums.*;
|
||||||
import org.jeecg.modules.entity.*;
|
import org.jeecg.modules.entity.*;
|
||||||
import org.jeecg.modules.entity.vo.*;
|
import org.jeecg.modules.entity.vo.*;
|
||||||
import org.jeecg.modules.mapper.SpectrumAnalysisMapper;
|
import org.jeecg.modules.mapper.SpectrumAnalysisMapper;
|
||||||
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
||||||
import org.jeecg.modules.native_jni.struct.BgBoundary;
|
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.jeecg.modules.service.*;
|
import org.jeecg.modules.service.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
import javax.servlet.ServletOutputStream;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
@ -73,6 +74,16 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IGardsSampleCertLineSpectrumService sampleCertLineSpectrumService;
|
private IGardsSampleCertLineSpectrumService sampleCertLineSpectrumService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private IGardsCalibrationSpectrumService calibrationSpectrumService;
|
||||||
|
@Autowired
|
||||||
|
private IGardsROIChannelsSpectrumService roiChannelsSpectrumService;
|
||||||
|
@Autowired
|
||||||
|
private IGardsXeResultsSpectrumService xeResultsSpectrumService;
|
||||||
|
@Autowired
|
||||||
|
private IGardsROIResultsSpectrumService roiResultsSpectrumService;
|
||||||
|
@Autowired
|
||||||
|
private IGardsCalibrationPairsSpectrumService calibrationPairsSpectrumService;
|
||||||
|
@Autowired
|
||||||
private IGardsCalibrationPairsOrigSpectrumService calibrationPairsOrigSpectrumService;
|
private IGardsCalibrationPairsOrigSpectrumService calibrationPairsOrigSpectrumService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IGardsBgEfficiencyPairsSpectrumService bgEfficiencyPairsSpectrumService;
|
private IGardsBgEfficiencyPairsSpectrumService bgEfficiencyPairsSpectrumService;
|
||||||
|
@ -2532,7 +2543,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
map.put("sampleFileName", sampleFileName);
|
map.put("sampleFileName", sampleFileName);
|
||||||
BgDataAnlyseResultIn resultIn = phdFileUtil.analyzeSpectrum(sampleTmp, gasTmp, detTmp, map);
|
BgDataAnlyseResultIn resultIn = phdFileUtil.analyzeSpectrum(sampleTmp, gasTmp, detTmp, map);
|
||||||
if (Objects.nonNull(resultIn)) {
|
if (Objects.nonNull(resultIn)) {
|
||||||
List<GardsXeResultsSpectrum> xeDataList = getXeResults(resultIn, sampleId, analysisID);
|
List<GardsXeResultsSpectrum> xeDataList = getXeDataList(resultIn, sampleId, analysisID);
|
||||||
if (CollectionUtils.isNotEmpty(xeDataList)){
|
if (CollectionUtils.isNotEmpty(xeDataList)){
|
||||||
for (GardsXeResultsSpectrum xeData:xeDataList) {
|
for (GardsXeResultsSpectrum xeData:xeDataList) {
|
||||||
Double conc = xeData.getConc();
|
Double conc = xeData.getConc();
|
||||||
|
@ -2606,7 +2617,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
File detTmp = phdFileUtil.analyzeFile(detPath, detFileName);
|
File detTmp = phdFileUtil.analyzeFile(detPath, detFileName);
|
||||||
map.put("sampleFileName", sampleFileName);
|
map.put("sampleFileName", sampleFileName);
|
||||||
BgDataAnlyseResultIn resultIn = phdFileUtil.analyzeSpectrum(sampleTmp, gasTmp, detTmp, map);
|
BgDataAnlyseResultIn resultIn = phdFileUtil.analyzeSpectrum(sampleTmp, gasTmp, detTmp, map);
|
||||||
List<GardsXeResultsSpectrum> xeDataList = getXeResults(resultIn, sampleId, analysisID);
|
List<GardsXeResultsSpectrum> xeDataList = getXeDataList(resultIn, sampleId, analysisID);
|
||||||
if (CollectionUtils.isNotEmpty(xeDataList)){
|
if (CollectionUtils.isNotEmpty(xeDataList)){
|
||||||
for (GardsXeResultsSpectrum xeData:xeDataList) {
|
for (GardsXeResultsSpectrum xeData:xeDataList) {
|
||||||
Double conc = xeData.getConc();
|
Double conc = xeData.getConc();
|
||||||
|
@ -2634,6 +2645,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public Result saveToDB(BgDataAnlyseResultIn anlyseResultIn) {
|
public Result saveToDB(BgDataAnlyseResultIn anlyseResultIn) {
|
||||||
Result result = new Result();
|
Result result = new Result();
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
@ -2669,16 +2681,6 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
//判断当前分析员是否有过历史分析当前文件
|
//判断当前分析员是否有过历史分析当前文件
|
||||||
Integer isExist = spectrumAnalysisMapper.SampleIsExist(sampleFilePathName, anlyseResultIn.getUserName());
|
Integer isExist = spectrumAnalysisMapper.SampleIsExist(sampleFilePathName, anlyseResultIn.getUserName());
|
||||||
//获取sample,gas,det对应的临时文件
|
|
||||||
File sampleTmp = phdFileUtil.analyzeFile(anlyseResultIn.getSampleFilePath(), anlyseResultIn.getSampleFileName());
|
|
||||||
File gasTmp = phdFileUtil.analyzeFile(anlyseResultIn.getGasFilePath(), anlyseResultIn.getGasFileName());
|
|
||||||
File detTmp = phdFileUtil.analyzeFile(anlyseResultIn.getDetFilePath(), anlyseResultIn.getDetFileName());
|
|
||||||
if (Objects.isNull(sampleTmp) || Objects.isNull(gasTmp) || Objects.isNull(detTmp)) {
|
|
||||||
result.error500("ftp文件获取失败!");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
//解析文件内容获取对应数据
|
|
||||||
BgDataAnlyseResultIn resultIn = phdFileUtil.analyzeSpectrum(sampleTmp, gasTmp, detTmp, map);
|
|
||||||
//根据文件名称查询对应的sampleId--- sampleFile gasFile detFile
|
//根据文件名称查询对应的sampleId--- sampleFile gasFile detFile
|
||||||
Integer sampleId = spectrumAnalysisMapper.getSampleId(sampleFilePathName);
|
Integer sampleId = spectrumAnalysisMapper.getSampleId(sampleFilePathName);
|
||||||
Integer gasId = spectrumAnalysisMapper.getSampleId(gasFilePathName);
|
Integer gasId = spectrumAnalysisMapper.getSampleId(gasFilePathName);
|
||||||
|
@ -2698,84 +2700,76 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
gardsAnalyses.setUsedgasphdId(gasId);
|
gardsAnalyses.setUsedgasphdId(gasId);
|
||||||
gardsAnalyses.setUseddetphdId(detId);
|
gardsAnalyses.setUseddetphdId(detId);
|
||||||
gardsAnalyses.setAnalyst(anlyseResultIn.getUserName());
|
gardsAnalyses.setAnalyst(anlyseResultIn.getUserName());
|
||||||
map.put("gardsAnalyses", gardsAnalyses);
|
|
||||||
if (Objects.nonNull(isExist)){
|
if (Objects.nonNull(isExist)){
|
||||||
//spectrumAnalysisMapper.updateGardsAnalyses(gardsAnalyses);
|
spectrumAnalysisMapper.updateGardsAnalyses(gardsAnalyses);
|
||||||
}else {//如果没有分析过就新增--GARDS_ANALYSES
|
}else {//如果没有分析过就新增--GARDS_ANALYSES
|
||||||
//spectrumAnalysisMapper.insertGardsAnalyses(gardsAnalyses);
|
spectrumAnalysisMapper.insertGardsAnalyses(gardsAnalyses);
|
||||||
}
|
}
|
||||||
//查询analysisId根据sampleId 分析员名称--GARDS_ANALYSES
|
//查询analysisId根据sampleId 分析员名称--GARDS_ANALYSES
|
||||||
GardsAnalysesSpectrum analysis = spectrumAnalysisMapper.getAnalysis("RNMAN.GARDS_ANALYSES", sampleId);
|
GardsAnalysesSpectrum analysis = spectrumAnalysisMapper.getAnalysis("RNMAN.GARDS_ANALYSES", sampleId);
|
||||||
Integer idAnalysis = analysis.getIdAnalysis();
|
Integer idAnalysis = analysis.getIdAnalysis();
|
||||||
//获取sample,gas,det三个文件分别对应的beta,gamma数据集合
|
//获取sample,gas,det三个文件分别对应的beta,gamma数据集合
|
||||||
List<GardsCalibrationPairsSpectrum> calibrationPairsList = getCalibrationPairs(anlyseResultIn, sampleId, gasId, detId, idAnalysis);
|
List<GardsCalibrationPairs> calibrationPairsList = getCalibrationPairs(anlyseResultIn, sampleId, gasId, detId, idAnalysis);
|
||||||
map.put("calibrationPairsList", calibrationPairsList);
|
|
||||||
//如果分析过--删除GARDS_CALIBRATION_PAIRS表数据 新增GARDS_CALIBRATION_PAIRS表数据
|
//如果分析过--删除GARDS_CALIBRATION_PAIRS表数据 新增GARDS_CALIBRATION_PAIRS表数据
|
||||||
if (Objects.nonNull(isExist)){
|
if (Objects.nonNull(isExist)){
|
||||||
//根据idAnalysis删除GARDS_CALIBRATION_PAIRS表数据
|
//根据idAnalysis删除GARDS_CALIBRATION_PAIRS表数据
|
||||||
//spectrumAnalysisMapper.deleteCalibrationPairs(idAnalysis);
|
spectrumAnalysisMapper.deleteCalibrationPairs(idAnalysis);
|
||||||
//新增GARDS_CALIBRATION_PAIRS表数据
|
//新增GARDS_CALIBRATION_PAIRS表数据
|
||||||
//spectrumAnalysisMapper.insertCalibrationPairs(calibrationPairsList);
|
spectrumAnalysisMapper.insertCalibrationPairs(calibrationPairsList);
|
||||||
}else {//如果没有分析过--新增GARDS_CALIBRATION_PAIRS表数据
|
}else {//如果没有分析过--新增GARDS_CALIBRATION_PAIRS表数据
|
||||||
//新增GARDS_CALIBRATION_PAIRS表数据
|
//新增GARDS_CALIBRATION_PAIRS表数据
|
||||||
//spectrumAnalysisMapper.insertCalibrationPairs(calibrationPairsList);
|
spectrumAnalysisMapper.insertCalibrationPairs(calibrationPairsList);
|
||||||
}
|
}
|
||||||
//gards_calibration 数据表
|
//gards_calibration 数据表
|
||||||
List<GardsCalibrationSpectrum> calibrationList = getCalibration(anlyseResultIn, sampleId, gasId, detId, idAnalysis);
|
List<GardsCalibration> calibrationList = getCalibration(anlyseResultIn, sampleId, gasId, detId, idAnalysis);
|
||||||
map.put("calibrationList", calibrationList);
|
|
||||||
//判断是否分析过
|
//判断是否分析过
|
||||||
if (Objects.nonNull(isExist)) {
|
if (Objects.nonNull(isExist)) {
|
||||||
//删除Gards_Calibration表数据
|
//删除Gards_Calibration表数据
|
||||||
//spectrumAnalysisMapper.deleteCalibration(idAnalysis);
|
spectrumAnalysisMapper.deleteCalibration(idAnalysis);
|
||||||
//新增数据
|
//新增数据
|
||||||
//spectrumAnalysisMapper.insertCalibration(calibrationList);
|
calibrationSpectrumService.saveGardsCalibration(calibrationList);
|
||||||
} else {
|
} else {
|
||||||
//新增数据
|
//新增数据
|
||||||
//spectrumAnalysisMapper.insertCalibration(calibrationList);
|
calibrationSpectrumService.saveGardsCalibration(calibrationList);
|
||||||
}
|
}
|
||||||
//gards_roi_channels数据表
|
//gards_roi_channels数据表
|
||||||
List<GardsROIChannelsSpectrum> roiChannelsList = new LinkedList<>();
|
List<GardsRoiChannels> roiChannelsList = new LinkedList<>();
|
||||||
List<GardsROIChannelsSpectrum> roiChannelsSpectrumList = (List<GardsROIChannelsSpectrum>) map.get("roiChannelsSpectrumList");
|
getROIChannel(sampleId, idAnalysis, anlyseResultIn.getRoiChannelsSpectrumList(), roiChannelsList);
|
||||||
getROIChannel(sampleId, idAnalysis, roiChannelsSpectrumList, roiChannelsList);
|
getROIChannel(gasId, idAnalysis, anlyseResultIn.getRoiChannelsSpectrumList(), roiChannelsList);
|
||||||
getROIChannel(gasId, idAnalysis, roiChannelsSpectrumList, roiChannelsList);
|
getROIChannel(detId, idAnalysis, anlyseResultIn.getRoiChannelsSpectrumList(), roiChannelsList);
|
||||||
getROIChannel(detId, idAnalysis, roiChannelsSpectrumList, roiChannelsList);
|
|
||||||
map.put("roiChannelsList", roiChannelsList);
|
|
||||||
//如果分析过数据
|
//如果分析过数据
|
||||||
if (Objects.nonNull(isExist)){
|
if (Objects.nonNull(isExist)){
|
||||||
//删除gards_roi_channels数据表数据
|
//删除gards_roi_channels数据表数据
|
||||||
//spectrumAnalysisMapper.deleteROIChannels(idAnalysis);
|
spectrumAnalysisMapper.deleteROIChannels(idAnalysis);
|
||||||
//新增gards_roi_channels数据表数据
|
//新增gards_roi_channels数据表数据
|
||||||
//spectrumAnalysisMapper.insertROIChannels(roiChannelsList);
|
roiChannelsSpectrumService.saveGardsROIChannels(roiChannelsList);
|
||||||
}else {//没有分析过
|
}else {//没有分析过
|
||||||
//新增gards_roi_channels数据表数据
|
//新增gards_roi_channels数据表数据
|
||||||
//spectrumAnalysisMapper.insertROIChannels(roiChannelsList);
|
roiChannelsSpectrumService.saveGardsROIChannels(roiChannelsList);
|
||||||
}
|
}
|
||||||
//gards_Xe_results数据表
|
//gards_Xe_results数据表
|
||||||
List<GardsXeResultsSpectrum> xeResults = getXeResults(anlyseResultIn, sampleId, idAnalysis);
|
List<GardsXeResults> xeResults = getXeResults(anlyseResultIn, sampleId, idAnalysis);
|
||||||
map.put("xeResults", xeResults);
|
|
||||||
if(Objects.nonNull(isExist)) {
|
if(Objects.nonNull(isExist)) {
|
||||||
//删除gards_Xe_results数据表数据
|
//删除gards_Xe_results数据表数据
|
||||||
//spectrumAnalysisMapper.deleteXeResult(idAnalysis);
|
spectrumAnalysisMapper.deleteXeResult(idAnalysis);
|
||||||
//新增gards_Xe_results数据表数据
|
//新增gards_Xe_results数据表数据
|
||||||
//spectrumAnalysisMapper.insertXeResult(xeResults);
|
xeResultsSpectrumService.saveGardsXeResults(xeResults);
|
||||||
} else {
|
} else {
|
||||||
//新增gards_Xe_results数据表数据
|
//新增gards_Xe_results数据表数据
|
||||||
//spectrumAnalysisMapper.insertXeResult(xeResults);
|
xeResultsSpectrumService.saveGardsXeResults(xeResults);
|
||||||
}
|
}
|
||||||
//gards_roi_results数据表
|
//gards_roi_results数据表
|
||||||
List<GardsROIResultsSpectrum> roiResultsSpectrumList = getROIResult(anlyseResultIn, sampleId, idAnalysis, isExist);
|
List<GardsRoiResults> roiResultsSpectrumList = getROIResult(anlyseResultIn.getRoiResultsSpectrumList(), sampleId, idAnalysis, isExist);
|
||||||
map.put("roiResultsSpectrumList", roiResultsSpectrumList);
|
|
||||||
if(Objects.nonNull(isExist)) {
|
if(Objects.nonNull(isExist)) {
|
||||||
//删除gards_roi_results数据表数据
|
//删除gards_roi_results数据表数据
|
||||||
//spectrumAnalysisMapper.deleteROIResults(idAnalysis);
|
spectrumAnalysisMapper.deleteROIResults(idAnalysis);
|
||||||
//新增gards_roi_results数据表数据
|
//新增gards_roi_results数据表数据
|
||||||
//spectrumAnalysisMapper.insertROIResults(roiResultsSpectrumList);
|
roiResultsSpectrumService.saveGardsROIResults(roiResultsSpectrumList);
|
||||||
} else {
|
} else {
|
||||||
//新增gards_roi_results数据表数据
|
//新增gards_roi_results数据表数据
|
||||||
//spectrumAnalysisMapper.insertROIResults(roiResultsSpectrumList);
|
roiResultsSpectrumService.saveGardsROIResults(roiResultsSpectrumList);
|
||||||
}
|
}
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
result.setResult(map);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2786,8 +2780,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
File detTmp = phdFileUtil.analyzeFile(anlyseResultIn.getDetFilePath(), anlyseResultIn.getDetFileName());
|
File detTmp = phdFileUtil.analyzeFile(anlyseResultIn.getDetFilePath(), anlyseResultIn.getDetFileName());
|
||||||
System.loadLibrary("ReadPHDFile");
|
System.loadLibrary("ReadPHDFile");
|
||||||
//如果勾选了Energy Calibration页面下sample Data
|
//如果勾选了Energy Calibration页面下sample Data
|
||||||
if (Objects.nonNull(sampleTmp)){
|
if (Objects.nonNull(sampleTmp)) {
|
||||||
if(anlyseResultIn.isCheckSample()){
|
if(anlyseResultIn.isCheckSample()) {
|
||||||
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(sampleTmp.getAbsolutePath());
|
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(sampleTmp.getAbsolutePath());
|
||||||
//没有点击过Energy Calibration页面下Gamma Detector Calibration的fitting按钮 channel/energy数据读取文件 如果点击过数据来源页面
|
//没有点击过Energy Calibration页面下Gamma Detector Calibration的fitting按钮 channel/energy数据读取文件 如果点击过数据来源页面
|
||||||
if (!anlyseResultIn.isBGammaEnergyValid()){
|
if (!anlyseResultIn.isBGammaEnergyValid()){
|
||||||
|
@ -2807,8 +2801,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
anlyseResultIn.setB_energy_sample(sourceData.b_electron_energy);
|
anlyseResultIn.setB_energy_sample(sourceData.b_electron_energy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(gasTmp)){
|
if (Objects.nonNull(gasTmp)) {
|
||||||
if (anlyseResultIn.isCheckGas()){
|
if (anlyseResultIn.isCheckGas()) {
|
||||||
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(gasTmp.getAbsolutePath());
|
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(gasTmp.getAbsolutePath());
|
||||||
if (!anlyseResultIn.isBGammaEnergyValid()){
|
if (!anlyseResultIn.isBGammaEnergyValid()){
|
||||||
anlyseResultIn.setG_channel_gas(sourceData.g_centroid_channel);
|
anlyseResultIn.setG_channel_gas(sourceData.g_centroid_channel);
|
||||||
|
@ -2826,8 +2820,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
anlyseResultIn.setB_energy_gas(sourceData.b_electron_energy);
|
anlyseResultIn.setB_energy_gas(sourceData.b_electron_energy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(detTmp)){
|
if (Objects.nonNull(detTmp)) {
|
||||||
if (anlyseResultIn.isCheckDet()){
|
if (anlyseResultIn.isCheckDet()) {
|
||||||
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(detTmp.getAbsolutePath());
|
EnergySpectrumStruct sourceData = EnergySpectrumHandler.getSourceData(detTmp.getAbsolutePath());
|
||||||
if (!anlyseResultIn.isBGammaEnergyValid()){
|
if (!anlyseResultIn.isBGammaEnergyValid()){
|
||||||
anlyseResultIn.setG_channel_det(sourceData.g_centroid_channel);
|
anlyseResultIn.setG_channel_det(sourceData.g_centroid_channel);
|
||||||
|
@ -2847,10 +2841,10 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GardsCalibrationPairsSpectrum> getCalibrationPairs(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer gasId, Integer detId, Integer idAnalysis) {
|
public List<GardsCalibrationPairs> getCalibrationPairs(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer gasId, Integer detId, Integer idAnalysis) {
|
||||||
List<GardsCalibrationPairsSpectrum> calibrationPairsList = new LinkedList<>();
|
List<GardsCalibrationPairs> calibrationPairsList = new LinkedList<>();
|
||||||
for (int i=0; i< anlyseResultIn.getB_channel_sample().size(); i++){
|
for (int i=0; i< anlyseResultIn.getB_channel_sample().size(); i++){
|
||||||
GardsCalibrationPairsSpectrum calibrationPairs = new GardsCalibrationPairsSpectrum();
|
GardsCalibrationPairs calibrationPairs = new GardsCalibrationPairs();
|
||||||
calibrationPairs.setSampleId(sampleId);
|
calibrationPairs.setSampleId(sampleId);
|
||||||
calibrationPairs.setIdAnalysis(idAnalysis);
|
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||||
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
||||||
|
@ -2862,7 +2856,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
calibrationPairsList.add(calibrationPairs);
|
calibrationPairsList.add(calibrationPairs);
|
||||||
}
|
}
|
||||||
for (int i=0; i< anlyseResultIn.getG_channel_sample().size(); i++){
|
for (int i=0; i< anlyseResultIn.getG_channel_sample().size(); i++){
|
||||||
GardsCalibrationPairsSpectrum calibrationPairs = new GardsCalibrationPairsSpectrum();
|
GardsCalibrationPairs calibrationPairs = new GardsCalibrationPairs();
|
||||||
calibrationPairs.setSampleId(sampleId);
|
calibrationPairs.setSampleId(sampleId);
|
||||||
calibrationPairs.setIdAnalysis(idAnalysis);
|
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||||
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
@ -2875,7 +2869,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i< anlyseResultIn.getB_channel_gas().size(); i++){
|
for (int i=0; i< anlyseResultIn.getB_channel_gas().size(); i++){
|
||||||
GardsCalibrationPairsSpectrum calibrationPairs = new GardsCalibrationPairsSpectrum();
|
GardsCalibrationPairs calibrationPairs = new GardsCalibrationPairs();
|
||||||
calibrationPairs.setSampleId(gasId);
|
calibrationPairs.setSampleId(gasId);
|
||||||
calibrationPairs.setIdAnalysis(idAnalysis);
|
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||||
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
||||||
|
@ -2888,7 +2882,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i< anlyseResultIn.getG_channel_gas().size(); i++){
|
for (int i=0; i< anlyseResultIn.getG_channel_gas().size(); i++){
|
||||||
GardsCalibrationPairsSpectrum calibrationPairs = new GardsCalibrationPairsSpectrum();
|
GardsCalibrationPairs calibrationPairs = new GardsCalibrationPairs();
|
||||||
calibrationPairs.setSampleId(gasId);
|
calibrationPairs.setSampleId(gasId);
|
||||||
calibrationPairs.setIdAnalysis(idAnalysis);
|
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||||
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
@ -2901,7 +2895,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i< anlyseResultIn.getB_channel_det().size(); i++){
|
for (int i=0; i< anlyseResultIn.getB_channel_det().size(); i++){
|
||||||
GardsCalibrationPairsSpectrum calibrationPairs = new GardsCalibrationPairsSpectrum();
|
GardsCalibrationPairs calibrationPairs = new GardsCalibrationPairs();
|
||||||
calibrationPairs.setSampleId(detId);
|
calibrationPairs.setSampleId(detId);
|
||||||
calibrationPairs.setIdAnalysis(idAnalysis);
|
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||||
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
calibrationPairs.setSampleType(SystemType.BETA.getType());
|
||||||
|
@ -2914,7 +2908,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i< anlyseResultIn.getG_channel_det().size(); i++){
|
for (int i=0; i< anlyseResultIn.getG_channel_det().size(); i++){
|
||||||
GardsCalibrationPairsSpectrum calibrationPairs = new GardsCalibrationPairsSpectrum();
|
GardsCalibrationPairs calibrationPairs = new GardsCalibrationPairs();
|
||||||
calibrationPairs.setSampleId(detId);
|
calibrationPairs.setSampleId(detId);
|
||||||
calibrationPairs.setIdAnalysis(idAnalysis);
|
calibrationPairs.setIdAnalysis(idAnalysis);
|
||||||
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
calibrationPairs.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
@ -2989,10 +2983,10 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GardsCalibrationSpectrum> getCalibration(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer gasId, Integer detId, Integer idAnalysis) {
|
public List<GardsCalibration> getCalibration(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer gasId, Integer detId, Integer idAnalysis) {
|
||||||
List<GardsCalibrationSpectrum> calibrationSpectrumList = new LinkedList<>();
|
List<GardsCalibration> calibrationSpectrumList = new LinkedList<>();
|
||||||
if (Objects.nonNull(sampleId)){
|
if (Objects.nonNull(sampleId)) {
|
||||||
GardsCalibrationSpectrum calibrationB = new GardsCalibrationSpectrum();
|
GardsCalibration calibrationB = new GardsCalibration();
|
||||||
calibrationB.setSampleId(sampleId);
|
calibrationB.setSampleId(sampleId);
|
||||||
calibrationB.setIdAnalysis(idAnalysis);
|
calibrationB.setIdAnalysis(idAnalysis);
|
||||||
calibrationB.setSampleType(SystemType.BETA.getType());
|
calibrationB.setSampleType(SystemType.BETA.getType());
|
||||||
|
@ -3005,7 +2999,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
calibrationB.setCoeff2(Double.valueOf(anlyseResultIn.getParam_b_c2e_b_sample()));
|
calibrationB.setCoeff2(Double.valueOf(anlyseResultIn.getParam_b_c2e_b_sample()));
|
||||||
calibrationB.setCoeff3(Double.valueOf(anlyseResultIn.getParam_c_c2e_b_sample()));
|
calibrationB.setCoeff3(Double.valueOf(anlyseResultIn.getParam_c_c2e_b_sample()));
|
||||||
calibrationSpectrumList.add(calibrationB);
|
calibrationSpectrumList.add(calibrationB);
|
||||||
GardsCalibrationSpectrum calibrationG = new GardsCalibrationSpectrum();
|
GardsCalibration calibrationG = new GardsCalibration();
|
||||||
calibrationG.setSampleId(sampleId);
|
calibrationG.setSampleId(sampleId);
|
||||||
calibrationG.setIdAnalysis(idAnalysis);
|
calibrationG.setIdAnalysis(idAnalysis);
|
||||||
calibrationG.setSampleType(SystemType.GAMMA.getType());
|
calibrationG.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
@ -3020,8 +3014,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
calibrationSpectrumList.add(calibrationG);
|
calibrationSpectrumList.add(calibrationG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Objects.nonNull(gasId)){
|
if (Objects.nonNull(gasId)) {
|
||||||
GardsCalibrationSpectrum calibrationB = new GardsCalibrationSpectrum();
|
GardsCalibration calibrationB = new GardsCalibration();
|
||||||
calibrationB.setSampleId(gasId);
|
calibrationB.setSampleId(gasId);
|
||||||
calibrationB.setIdAnalysis(idAnalysis);
|
calibrationB.setIdAnalysis(idAnalysis);
|
||||||
calibrationB.setSampleType(SystemType.BETA.getType());
|
calibrationB.setSampleType(SystemType.BETA.getType());
|
||||||
|
@ -3034,7 +3028,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
calibrationB.setCoeff2(Double.valueOf(anlyseResultIn.getParam_b_c2e_b_gas()));
|
calibrationB.setCoeff2(Double.valueOf(anlyseResultIn.getParam_b_c2e_b_gas()));
|
||||||
calibrationB.setCoeff3(Double.valueOf(anlyseResultIn.getParam_c_c2e_b_gas()));
|
calibrationB.setCoeff3(Double.valueOf(anlyseResultIn.getParam_c_c2e_b_gas()));
|
||||||
calibrationSpectrumList.add(calibrationB);
|
calibrationSpectrumList.add(calibrationB);
|
||||||
GardsCalibrationSpectrum calibrationG = new GardsCalibrationSpectrum();
|
GardsCalibration calibrationG = new GardsCalibration();
|
||||||
calibrationG.setSampleId(gasId);
|
calibrationG.setSampleId(gasId);
|
||||||
calibrationG.setIdAnalysis(idAnalysis);
|
calibrationG.setIdAnalysis(idAnalysis);
|
||||||
calibrationG.setSampleType(SystemType.BETA.getType());
|
calibrationG.setSampleType(SystemType.BETA.getType());
|
||||||
|
@ -3049,8 +3043,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
calibrationSpectrumList.add(calibrationG);
|
calibrationSpectrumList.add(calibrationG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Objects.nonNull(detId)){
|
if (Objects.nonNull(detId)) {
|
||||||
GardsCalibrationSpectrum calibrationB = new GardsCalibrationSpectrum();
|
GardsCalibration calibrationB = new GardsCalibration();
|
||||||
calibrationB.setSampleId(detId);
|
calibrationB.setSampleId(detId);
|
||||||
calibrationB.setIdAnalysis(idAnalysis);
|
calibrationB.setIdAnalysis(idAnalysis);
|
||||||
calibrationB.setSampleType(SystemType.BETA.getType());
|
calibrationB.setSampleType(SystemType.BETA.getType());
|
||||||
|
@ -3063,7 +3057,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
calibrationB.setCoeff2(Double.valueOf(anlyseResultIn.getParam_b_c2e_b_det()));
|
calibrationB.setCoeff2(Double.valueOf(anlyseResultIn.getParam_b_c2e_b_det()));
|
||||||
calibrationB.setCoeff3(Double.valueOf(anlyseResultIn.getParam_c_c2e_b_det()));
|
calibrationB.setCoeff3(Double.valueOf(anlyseResultIn.getParam_c_c2e_b_det()));
|
||||||
calibrationSpectrumList.add(calibrationB);
|
calibrationSpectrumList.add(calibrationB);
|
||||||
GardsCalibrationSpectrum calibrationG = new GardsCalibrationSpectrum();
|
GardsCalibration calibrationG = new GardsCalibration();
|
||||||
calibrationG.setSampleId(detId);
|
calibrationG.setSampleId(detId);
|
||||||
calibrationG.setIdAnalysis(idAnalysis);
|
calibrationG.setIdAnalysis(idAnalysis);
|
||||||
calibrationG.setSampleType(SystemType.GAMMA.getType());
|
calibrationG.setSampleType(SystemType.GAMMA.getType());
|
||||||
|
@ -3080,9 +3074,9 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
return calibrationSpectrumList;
|
return calibrationSpectrumList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getROIChannel(Integer sampleId, Integer idAnalysis, List<GardsROIChannelsSpectrum> roiChannelsSpectrumList, List<GardsROIChannelsSpectrum> roiChannelsList) {
|
public void getROIChannel(Integer sampleId, Integer idAnalysis, List<GardsROIChannelsSpectrum> roiChannelsSpectrumList, List<GardsRoiChannels> roiChannelsList) {
|
||||||
for (int i=0; i<roiChannelsSpectrumList.size(); i++){
|
for (int i=0; i<roiChannelsSpectrumList.size(); i++){
|
||||||
GardsROIChannelsSpectrum roiChannels = new GardsROIChannelsSpectrum();
|
GardsRoiChannels roiChannels = new GardsRoiChannels();
|
||||||
roiChannels.setSampleId(sampleId);
|
roiChannels.setSampleId(sampleId);
|
||||||
roiChannels.setIdAnalysis(idAnalysis);
|
roiChannels.setIdAnalysis(idAnalysis);
|
||||||
roiChannels.setRoi(i);
|
roiChannels.setRoi(i);
|
||||||
|
@ -3094,7 +3088,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GardsXeResultsSpectrum> getXeResults(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer idAnalysis) {
|
public List<GardsXeResultsSpectrum> getXeDataList(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer idAnalysis) {
|
||||||
List<GardsXeResultsSpectrum> xeResultsList = new LinkedList<>();
|
List<GardsXeResultsSpectrum> xeResultsList = new LinkedList<>();
|
||||||
//Xe131m
|
//Xe131m
|
||||||
GardsXeResultsSpectrum xe131m = new GardsXeResultsSpectrum();
|
GardsXeResultsSpectrum xe131m = new GardsXeResultsSpectrum();
|
||||||
|
@ -3143,9 +3137,58 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
return xeResultsList;
|
return xeResultsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<GardsXeResults> getXeResults(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer idAnalysis) {
|
||||||
|
List<GardsXeResults> xeResultsList = new LinkedList<>();
|
||||||
|
//Xe131m
|
||||||
|
GardsXeResults xe131m = new GardsXeResults();
|
||||||
|
xe131m.setSampleId(sampleId);
|
||||||
|
xe131m.setIdAnalysis(idAnalysis);
|
||||||
|
xe131m.setNuclideName(XeNuclideName.XE_131m.getType());
|
||||||
|
xe131m.setConc(anlyseResultIn.getXe131m_con());
|
||||||
|
xe131m.setConcErr(anlyseResultIn.getXe131m_uncer());
|
||||||
|
xe131m.setMdc(anlyseResultIn.getMDC_Xe131m());
|
||||||
|
xe131m.setLc(anlyseResultIn.getLC_Xe131m());
|
||||||
|
xe131m.setNidFlag(anlyseResultIn.getXe131mFlag());
|
||||||
|
xeResultsList.add(xe131m);
|
||||||
|
//Xe133
|
||||||
|
GardsXeResults xe133 = new GardsXeResults();
|
||||||
|
xe133.setSampleId(sampleId);
|
||||||
|
xe133.setIdAnalysis(idAnalysis);
|
||||||
|
xe133.setNuclideName(XeNuclideName.XE_133.getType());
|
||||||
|
xe133.setConc(anlyseResultIn.getXe133_con());
|
||||||
|
xe133.setConcErr(anlyseResultIn.getXe133_uncer());
|
||||||
|
xe133.setMdc(anlyseResultIn.getMDC_Xe133());
|
||||||
|
xe133.setLc(anlyseResultIn.getLC_Xe133());
|
||||||
|
xe133.setNidFlag(anlyseResultIn.getXe133Flag());
|
||||||
|
xeResultsList.add(xe133);
|
||||||
|
//Xe133m
|
||||||
|
GardsXeResults xe133m = new GardsXeResults();
|
||||||
|
xe133m.setSampleId(sampleId);
|
||||||
|
xe133m.setIdAnalysis(idAnalysis);
|
||||||
|
xe133m.setNuclideName(XeNuclideName.XE_133m.getType());
|
||||||
|
xe133m.setConc(anlyseResultIn.getXe133m_con());
|
||||||
|
xe133m.setConcErr(anlyseResultIn.getXe133m_uncer());
|
||||||
|
xe133m.setMdc(anlyseResultIn.getMDC_Xe133m());
|
||||||
|
xe133m.setLc(anlyseResultIn.getLC_Xe133m());
|
||||||
|
xe133m.setNidFlag(anlyseResultIn.getXe133mFlag());
|
||||||
|
xeResultsList.add(xe133m);
|
||||||
|
//Xe135
|
||||||
|
GardsXeResults xe135 = new GardsXeResults();
|
||||||
|
xe135.setSampleId(sampleId);
|
||||||
|
xe135.setIdAnalysis(idAnalysis);
|
||||||
|
xe135.setNuclideName(XeNuclideName.XE_135.getType());
|
||||||
|
xe135.setConc(anlyseResultIn.getXe135_con());
|
||||||
|
xe135.setConcErr(anlyseResultIn.getXe135_uncer());
|
||||||
|
xe135.setMdc(anlyseResultIn.getMDC_Xe135());
|
||||||
|
xe135.setLc(anlyseResultIn.getLC_Xe135());
|
||||||
|
xe135.setNidFlag(anlyseResultIn.getXe135Flag());
|
||||||
|
xeResultsList.add(xe135);
|
||||||
|
return xeResultsList;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean OriginalDataStore(String filePath, String fileName, String filePathName, String userName) {
|
public boolean OriginalDataStore(String filePath, String fileName, String filePathName, String userName) {
|
||||||
//根据新的文件路径名称查询数据是否存在
|
//根据新的文件路径名称查询数据是否存在
|
||||||
Integer isExist = spectrumAnalysisMapper.SampleIsExist(filePathName, userName);
|
GardsSampleData isExist = spectrumAnalysisMapper.findSampleByFile(filePathName);
|
||||||
//如果数据已经存入过数据库 则 修改状态后返回
|
//如果数据已经存入过数据库 则 修改状态后返回
|
||||||
if (Objects.nonNull(isExist)){
|
if (Objects.nonNull(isExist)){
|
||||||
//如果文件已经存入过数据库则修改状态
|
//如果文件已经存入过数据库则修改状态
|
||||||
|
@ -3263,32 +3306,28 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
return readLines;
|
return readLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GardsROIResultsSpectrum> getROIResult(BgDataAnlyseResultIn anlyseResultIn, Integer sampleId, Integer idAnalysis, Integer isExist) {
|
public List<GardsRoiResults> getROIResult(List<GardsROIResultsSpectrum> roiResultsSpectrumList, Integer sampleId, Integer idAnalysis, Integer isExist) {
|
||||||
List<GardsROIResultsSpectrum> roiResultsSpectrumList = new LinkedList<>();
|
List<GardsRoiResults> roiResultsList = new LinkedList<>();
|
||||||
for (int i=0; i<anlyseResultIn.getS_roi_cts().size(); i++) {
|
for (int i=0; i<roiResultsSpectrumList.size(); i++) {
|
||||||
GardsROIResultsSpectrum roiResults = new GardsROIResultsSpectrum();
|
GardsRoiResults roiResults = new GardsRoiResults();
|
||||||
roiResults.setSampleId(sampleId);
|
roiResults.setSampleId(sampleId);
|
||||||
roiResults.setIdAnalysis(idAnalysis);
|
roiResults.setIdAnalysis(idAnalysis);
|
||||||
roiResults.setRoi(i);
|
roiResults.setRoi(i);
|
||||||
roiResults.setLc(anlyseResultIn.getLC().get(i));
|
roiResults.setLc(roiResultsSpectrumList.get(i).getLc());
|
||||||
roiResults.setSGross(anlyseResultIn.getS_roi_cts().get(i));
|
roiResults.setSGross(roiResultsSpectrumList.get(i).getSGross());
|
||||||
roiResults.setGGross(anlyseResultIn.getG_roi_cts().get(i));
|
roiResults.setGGross(roiResultsSpectrumList.get(i).getGGross());
|
||||||
roiResults.setBGross(anlyseResultIn.getD_roi_cts().get(i));
|
roiResults.setBGross(roiResultsSpectrumList.get(i).getBGross());
|
||||||
roiResults.setSNet(anlyseResultIn.getS_deduct_d_cts().get(i));
|
roiResults.setSNet(roiResultsSpectrumList.get(i).getSNet());
|
||||||
roiResults.setGNet(anlyseResultIn.getG_deduct_d_cts().get(i));
|
roiResults.setGNet(roiResultsSpectrumList.get(i).getGNet());
|
||||||
roiResults.setNet(anlyseResultIn.getROI_net_coutns().get(i));
|
roiResults.setNet(roiResultsSpectrumList.get(i).getNet());
|
||||||
roiResults.setNetErr(anlyseResultIn.getROI_net_err().get(i));
|
roiResults.setNetErr(roiResultsSpectrumList.get(i).getNetErr());
|
||||||
roiResults.setConc(anlyseResultIn.getROI_con_uncer().get(i));
|
roiResults.setConc(roiResultsSpectrumList.get(i).getConc());
|
||||||
roiResults.setConcErr(anlyseResultIn.getROI_con_uncer().get(i));
|
roiResults.setConcErr(roiResultsSpectrumList.get(i).getConcErr());
|
||||||
roiResults.setMdc(anlyseResultIn.getMDC().get(i));
|
roiResults.setMdc(roiResultsSpectrumList.get(i).getMdc());
|
||||||
if(anlyseResultIn.getROI_con_uncer().get(i)>anlyseResultIn.getMDC().get(i)) {
|
roiResults.setNidFlag(roiResultsSpectrumList.get(i).getNidFlag());
|
||||||
roiResults.setNidFlag(1);
|
roiResultsList.add(roiResults);
|
||||||
} else {
|
|
||||||
roiResults.setNidFlag(0);
|
|
||||||
}
|
|
||||||
roiResultsSpectrumList.add(roiResults);
|
|
||||||
}
|
}
|
||||||
return roiResultsSpectrumList;
|
return roiResultsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user