Merge remote-tracking branch 'origin/station' into station
This commit is contained in:
commit
dcb82ce493
|
@ -7,6 +7,7 @@ import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.modules.entity.vo.HistogramData;
|
import org.jeecg.modules.entity.vo.HistogramData;
|
||||||
import org.jeecg.modules.entity.vo.SeriseData;
|
import org.jeecg.modules.entity.vo.SeriseData;
|
||||||
import org.jeecg.modules.entity.vo.SpectrumData;
|
import org.jeecg.modules.entity.vo.SpectrumData;
|
||||||
|
import org.jeecg.modules.entity.vo.XeData;
|
||||||
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
import org.jeecg.modules.native_jni.EnergySpectrumHandler;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -40,7 +41,7 @@ public class PHDFileUtil {
|
||||||
//Collection Stop
|
//Collection Stop
|
||||||
Date CollectionStop = DateUtils.parseDate(struct.collection_stop_date.replace(StringPool.SLASH,StringPool.DASH) + StringPool.SPACE + struct.collection_stop_time.substring(0, struct.collection_stop_time.indexOf(StringPool.DOT)), "yyyy-MM-dd HH:mm:ss");
|
Date CollectionStop = DateUtils.parseDate(struct.collection_stop_date.replace(StringPool.SLASH,StringPool.DASH) + StringPool.SPACE + struct.collection_stop_time.substring(0, struct.collection_stop_time.indexOf(StringPool.DOT)), "yyyy-MM-dd HH:mm:ss");
|
||||||
//Collection Time
|
//Collection Time
|
||||||
String CollectionTime = String.format ("%.2f",Double.valueOf(CollectionStop.getTime() - CollectionStart.getTime()/ 1000));
|
String CollectionTime = String.format ("%.2f",Double.valueOf(CollectionStop.getTime()/1000 - CollectionStart.getTime()/ 1000));
|
||||||
//Acquisition Start
|
//Acquisition Start
|
||||||
Date AcquisitionStart = DateUtils.parseDate(struct.acquisition_start_date.replace(StringPool.SLASH,StringPool.DASH) + StringPool.SPACE + struct.acquisition_start_time.substring(0, struct.acquisition_start_time.indexOf(StringPool.DOT)), "yyyy-MM-dd HH:mm:ss");
|
Date AcquisitionStart = DateUtils.parseDate(struct.acquisition_start_date.replace(StringPool.SLASH,StringPool.DASH) + StringPool.SPACE + struct.acquisition_start_time.substring(0, struct.acquisition_start_time.indexOf(StringPool.DOT)), "yyyy-MM-dd HH:mm:ss");
|
||||||
//Acq Real Time
|
//Acq Real Time
|
||||||
|
@ -82,65 +83,126 @@ public class PHDFileUtil {
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
for (int j=0; j< list.size(); j++){
|
for (int j=0; j< list.size(); j++){
|
||||||
|
Long count = list.get(j);
|
||||||
|
if (count > 0){
|
||||||
HistogramData his = new HistogramData();
|
HistogramData his = new HistogramData();
|
||||||
his.setB(i);
|
his.setB(i);
|
||||||
his.setG(j);
|
his.setG(j);
|
||||||
Long count = list.get(j);
|
|
||||||
his.setC(count);
|
his.setC(count);
|
||||||
histogramDataList.add(his);
|
histogramDataList.add(his);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("histogramDataList", histogramDataList);
|
map.put("histogramDataList", histogramDataList);
|
||||||
|
|
||||||
//Gamma Spectrum Original
|
//Gamma Spectrum Original
|
||||||
List<Long> gammaOriginalData = new LinkedList<>();
|
long numGChannel = struct.num_g_channel;
|
||||||
|
List<Long> gCounts = struct.g_counts;
|
||||||
|
List<SeriseData> gammaOriginalSeriseData = new LinkedList<>();
|
||||||
|
for (int i=0; i<numGChannel; i++){
|
||||||
|
Long count = gCounts.get(i);
|
||||||
|
SeriseData seriseData = new SeriseData();
|
||||||
|
seriseData.setX(i);
|
||||||
|
seriseData.setY(count);
|
||||||
|
gammaOriginalSeriseData.add(seriseData);
|
||||||
|
}
|
||||||
|
map.put("gammaOriginalData", gammaOriginalSeriseData);
|
||||||
|
|
||||||
|
//Gamma Spectrum Projected
|
||||||
|
List<Long> gammaProjectedData = new LinkedList<>();
|
||||||
for (int i=0; i<gChannels; i++) {
|
for (int i=0; i<gChannels; i++) {
|
||||||
long i_count = 0;
|
long i_count = 0;
|
||||||
for (int j=0; j<bChannels; j++) {
|
for (int j=0; j<bChannels; j++) {
|
||||||
i_count += hCounts.get((int) (i*bChannels + j));
|
i_count += hCounts.get((int) (i*bChannels + j));
|
||||||
}
|
}
|
||||||
gammaOriginalData.add(i_count);
|
gammaProjectedData.add(i_count);
|
||||||
}
|
}
|
||||||
List<SeriseData> gammaSeriseData = new LinkedList<>();
|
List<SeriseData> gammaProjectedSeriseData = new LinkedList<>();
|
||||||
for (int i=0; i<gammaOriginalData.size(); i++){
|
for (int i=0; i<gammaProjectedData.size(); i++){
|
||||||
SeriseData seriseData = new SeriseData();
|
SeriseData seriseData = new SeriseData();
|
||||||
seriseData.setX(i);
|
seriseData.setX(i);
|
||||||
seriseData.setY(gammaOriginalData.get(i));
|
seriseData.setY(gammaProjectedData.get(i));
|
||||||
gammaSeriseData.add(seriseData);
|
gammaProjectedSeriseData.add(seriseData);
|
||||||
}
|
}
|
||||||
map.put("gammaOriginalData", gammaSeriseData);
|
map.put("gammaProjectedData", gammaProjectedSeriseData);
|
||||||
|
|
||||||
//Gamma Spectrum Projected
|
//Gamma Energy
|
||||||
|
List<List<Double>> gammaEnergyList = new LinkedList<>();
|
||||||
List<Double> gCentroidChannel = struct.g_centroid_channel;
|
List<Double> gCentroidChannel = struct.g_centroid_channel;
|
||||||
List<Double> gEnergy = struct.g_energy;
|
List<Double> gEnergy = struct.g_energy;
|
||||||
List<Double> gammaProjectedData = EnergySpectrumHandler.GetFileFittingPara(gCentroidChannel, gEnergy);
|
List<Double> gammaParam = EnergySpectrumHandler.GetFileFittingPara(gCentroidChannel, gEnergy);
|
||||||
map.put("gammaProjectedData", gammaProjectedData);
|
List<Double> gchannels = new ArrayList<>();
|
||||||
|
for (int i=0; i<numGChannel; i++){
|
||||||
|
gchannels.clear();
|
||||||
|
gchannels.add(Double.valueOf(i));
|
||||||
|
List<Double> gammaEnergy = EnergySpectrumHandler.GetFileFittingData(gchannels, gammaParam);
|
||||||
|
gammaEnergyList.add(gammaEnergy);
|
||||||
|
}
|
||||||
|
map.put("gammaEnergyData", gammaEnergyList);
|
||||||
|
|
||||||
|
|
||||||
//Beta Spectrum Original
|
//Beta Spectrum Original
|
||||||
List<Long> betaOriginalData = new LinkedList<>();
|
long numBChannel = struct.num_b_channel;
|
||||||
|
List<Long> bCounts = struct.b_counts;
|
||||||
|
List<SeriseData> betaOriginalSeriseData = new LinkedList<>();
|
||||||
|
for (int i=0; i<numBChannel; i++){
|
||||||
|
Long count = bCounts.get(i);
|
||||||
|
SeriseData seriseData = new SeriseData();
|
||||||
|
seriseData.setX(i);
|
||||||
|
seriseData.setY(count);
|
||||||
|
betaOriginalSeriseData.add(seriseData);
|
||||||
|
}
|
||||||
|
map.put("betaOriginalData", betaOriginalSeriseData);
|
||||||
|
|
||||||
|
//Beta Spectrum Projected
|
||||||
|
List<Long> betaProjectedData = new LinkedList<>();
|
||||||
for (int j=0; j<bChannels; ++j) {
|
for (int j=0; j<bChannels; ++j) {
|
||||||
long j_count = 0;
|
long j_count = 0;
|
||||||
for (int i=0; i<gChannels; ++i)
|
for (int i=0; i<gChannels; ++i)
|
||||||
{
|
{
|
||||||
j_count += hCounts.get((int) (i*bChannels + j));
|
j_count += hCounts.get((int) (i*bChannels + j));
|
||||||
}
|
}
|
||||||
betaOriginalData.add(j_count);
|
betaProjectedData.add(j_count);
|
||||||
}
|
}
|
||||||
List<SeriseData> betaSeriseData = new LinkedList<>();
|
List<SeriseData> betaProjectedSeriseData = new LinkedList<>();
|
||||||
for (int i=0; i<betaOriginalData.size(); i++){
|
for (int i=0; i<betaProjectedData.size(); i++){
|
||||||
SeriseData seriseData = new SeriseData();
|
SeriseData seriseData = new SeriseData();
|
||||||
seriseData.setX(i);
|
seriseData.setX(i);
|
||||||
seriseData.setY(betaOriginalData.get(i));
|
seriseData.setY(betaProjectedData.get(i));
|
||||||
betaSeriseData.add(seriseData);
|
betaProjectedSeriseData.add(seriseData);
|
||||||
}
|
}
|
||||||
map.put("betaOriginalData", betaSeriseData);
|
map.put("betaProjectedData", betaProjectedSeriseData);
|
||||||
|
//Beta Energy
|
||||||
//Beta Spectrum Projected
|
List<List<Double>> betaEnergyList = new LinkedList<>();
|
||||||
List<Double> bChannel = struct.b_channel;
|
List<Double> bChannel = struct.b_channel;
|
||||||
List<Double> bElectronEnergy = struct.b_electron_energy;
|
List<Double> bElectronEnergy = struct.b_electron_energy;
|
||||||
List<Double> betaProjectedData = EnergySpectrumHandler.GetFileFittingPara(bChannel, bElectronEnergy);
|
List<Double> betaParam = EnergySpectrumHandler.GetFileFittingPara(bChannel, bElectronEnergy);
|
||||||
map.put("betaProjectedData", betaProjectedData);
|
List<Double> bchannels = new ArrayList<>();
|
||||||
|
for (int i=0; i<numGChannel; i++){
|
||||||
|
bchannels.clear();
|
||||||
|
bchannels.add(Double.valueOf(i));
|
||||||
|
List<Double> betaEnergy = EnergySpectrumHandler.GetFileFittingData(bchannels, betaParam);
|
||||||
|
betaEnergyList.add(betaEnergy);
|
||||||
|
}
|
||||||
|
map.put("betaEnergyData", betaEnergyList);
|
||||||
|
|
||||||
|
//Xe
|
||||||
|
List<XeData> xeDataList = new LinkedList<>();
|
||||||
|
List<String> bgNuclideName = struct.bg_nuclide_name;
|
||||||
|
List<String> bgRoiNumber = struct.bg_ROI_number;
|
||||||
|
List<Double> bgEfficiency = struct.bg_efficiency;
|
||||||
|
List<Double> bgUncertainty = struct.bg_uncertainty;
|
||||||
|
for (int i=0; i< bgNuclideName.size(); i++){
|
||||||
|
XeData xeData = new XeData();
|
||||||
|
xeData.setIsotope(bgNuclideName.get(i));
|
||||||
|
xeData.setConcentration(bgRoiNumber.get(i));
|
||||||
|
xeData.setUncertainty(bgUncertainty.get(i));
|
||||||
|
xeData.setMDC(bgEfficiency.get(i));
|
||||||
|
xeDataList.add(xeData);
|
||||||
|
}
|
||||||
|
map.put("XeData", xeDataList);
|
||||||
|
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
@ -30,9 +30,9 @@ public class GammaController {
|
||||||
private ISpectrumAnalysisService spectrumAnalysisService;
|
private ISpectrumAnalysisService spectrumAnalysisService;
|
||||||
|
|
||||||
@GetMapping("gammaByFile")
|
@GetMapping("gammaByFile")
|
||||||
public Result gammaByFile(@RequestParam Integer[] sampleId,
|
public Result gammaByFile(@RequestParam Integer sampleId,
|
||||||
@RequestParam String dbName){
|
@RequestParam String dbName){
|
||||||
return spectrumAnalysisService.getDBSpectrumPie(dbName, sampleId);
|
return spectrumAnalysisService.getDBSpectrumChart(dbName, sampleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class SpectrumAnalysesController {
|
||||||
|
|
||||||
@GetMapping("getDBSpectrumChart")
|
@GetMapping("getDBSpectrumChart")
|
||||||
@ApiOperation(value = "查询折线图相关信息接口", notes = "查询折线图相关信息接口")
|
@ApiOperation(value = "查询折线图相关信息接口", notes = "查询折线图相关信息接口")
|
||||||
public Result getDBSpectrumPie(String dbName, Integer[] sampleId){
|
public Result getDBSpectrumPie(String dbName, Integer sampleId){
|
||||||
return spectrumAnalysisService.getDBSpectrumPie(dbName, sampleId);
|
return spectrumAnalysisService.getDBSpectrumChart(dbName, sampleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,24 +18,24 @@ public class SpectrumData implements Serializable {
|
||||||
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date CollectionStart;
|
private Date collectionStart;
|
||||||
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date CollectionStop;
|
private Date collectionStop;
|
||||||
|
|
||||||
private String CollectionTime;
|
private String collectionTime;
|
||||||
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date AcquisitionStart;
|
private Date acquisitionStart;
|
||||||
|
|
||||||
private double AcquisitionRealTime;
|
private double acquisitionRealTime;
|
||||||
|
|
||||||
private double AcquisitionLiveTime;
|
private double acquisitionLiveTime;
|
||||||
|
|
||||||
private double AirVolume;
|
private double airVolume;
|
||||||
|
|
||||||
private double XeVolume;
|
private double xeVolume;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package org.jeecg.modules.entity.vo;
|
package org.jeecg.modules.entity.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -24,6 +26,8 @@ public class SpectrumFileRecord implements Serializable {
|
||||||
|
|
||||||
private String siteDetCode;
|
private String siteDetCode;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date collectStart;
|
private Date collectStart;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package org.jeecg.modules.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class XeData implements Serializable {
|
||||||
|
|
||||||
|
private String Isotope;
|
||||||
|
|
||||||
|
private String Concentration;
|
||||||
|
|
||||||
|
private Double Uncertainty;
|
||||||
|
|
||||||
|
private Double MDC;
|
||||||
|
|
||||||
|
}
|
|
@ -4,13 +4,17 @@ 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.jeecg.modules.base.entity.GardsSampleData;
|
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||||
import org.jeecg.modules.entity.vo.SpectrumFileRecord;
|
import org.jeecg.modules.entity.vo.SpectrumFileRecord;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface SpectrumAnalysisMapper {
|
public interface SpectrumAnalysisMapper {
|
||||||
|
|
||||||
Page<GardsSampleData> getDBSpectrumList(IPage<GardsSampleData> page, GardsSampleData gardsSampleData, String dbName, List<String> stationTypes, boolean CollectStop, boolean AcqStart, String startTime, String endTime);
|
Page<GardsSampleData> getDBSpectrumList(IPage<GardsSampleData> page, GardsSampleData gardsSampleData, String dbName, List<String> stationTypes, boolean CollectStop, boolean AcqStart, String startTime, String endTime);
|
||||||
|
|
||||||
SpectrumFileRecord getDBSpectrumFilePath(String dbName, List<Integer> sampleIds);
|
SpectrumFileRecord getDBSpectrumFilePath(String dbName, Integer sampleId);
|
||||||
|
|
||||||
|
String getQCFilePath(String siteDetCode, String collectStartStr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
<select id="getDBSpectrumList" resultType="org.jeecg.modules.base.entity.GardsSampleData">
|
<select id="getDBSpectrumList" resultType="org.jeecg.modules.base.entity.GardsSampleData">
|
||||||
select c.sample_id,
|
select c.sample_id,
|
||||||
b.station_code,
|
b.station_code stationName,
|
||||||
a.detector_code,
|
a.detector_code detectorsName,
|
||||||
c.sample_type,
|
c.sample_type,
|
||||||
c.data_type,
|
c.data_type,
|
||||||
c.spectral_qualifie,
|
c.spectral_qualifie,
|
||||||
|
@ -78,13 +78,22 @@
|
||||||
FROM ORIGINAL.GARDS_SAMPLE_DATA org_sample,
|
FROM ORIGINAL.GARDS_SAMPLE_DATA org_sample,
|
||||||
${dbName} analyses
|
${dbName} analyses
|
||||||
<where>
|
<where>
|
||||||
analyses.SAMPLE_ID IN
|
analyses.SAMPLE_ID = #{sampleId}
|
||||||
<foreach collection="sampleIds" item="sampleId" open="(" close=")" separator=",">
|
|
||||||
#{sampleId}
|
|
||||||
</foreach>
|
|
||||||
AND org_sample.SAMPLE_ID=analyses.SAMPLE_ID
|
AND org_sample.SAMPLE_ID=analyses.SAMPLE_ID
|
||||||
</where>
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getQCFilePath" resultType="java.lang.String">
|
||||||
|
SELECT org_sample_data.INPUT_FILE_NAME
|
||||||
|
FROM ORIGINAL.GARDS_SAMPLE_DATA org_sample_data
|
||||||
|
<where>
|
||||||
|
org_sample_data.ACQUISITION_START=
|
||||||
|
(SELECT MAX(qc_samples.ACQUISITION_START) FROM ORIGINAL.GARDS_SAMPLE_DATA qc_samples WHERE qc_samples.SITE_DET_CODE= '${siteDetCode}'
|
||||||
|
AND qc_samples.DATA_TYPE='Q'
|
||||||
|
AND qc_samples.SPECTRAL_QUALIFIE='FULL'
|
||||||
|
AND qc_samples.ACQUISITION_START <= TO_DATE('${collectStartStr}', 'YYYY-MM-DD hh24:mi:ss'))
|
||||||
|
AND org_sample_data.SITE_DET_CODE= '${siteDetCode}'
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,5 +1,6 @@
|
||||||
package org.jeecg.modules.native_jni;
|
package org.jeecg.modules.native_jni;
|
||||||
|
|
||||||
|
import org.jeecg.modules.native_jni.struct.BgAnalyseResult;
|
||||||
import org.jeecg.modules.native_jni.struct.BgBoundary;
|
import org.jeecg.modules.native_jni.struct.BgBoundary;
|
||||||
import org.jeecg.modules.native_jni.struct.CalcBgBoundaryParam;
|
import org.jeecg.modules.native_jni.struct.CalcBgBoundaryParam;
|
||||||
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
|
||||||
|
@ -41,4 +42,14 @@ public class EnergySpectrumHandler {
|
||||||
*/
|
*/
|
||||||
public static native List<Double> GetFileFittingData(List<Double> centroid_channel, List<Double> fittingPara);
|
public static native List<Double> GetFileFittingData(List<Double> centroid_channel, List<Double> fittingPara);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BetaGamma 分析算法
|
||||||
|
* @param sampleFile 样品谱文件
|
||||||
|
* @param gasFile 气体谱文件
|
||||||
|
* @param detFile 探测器本地谱文件
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static native BgAnalyseResult bgAnalyse(String sampleFile, String gasFile, String detFile);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package org.jeecg.modules.native_jni.struct;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class BgAnalyseResult {
|
||||||
|
/************************** BgMDCPara **************************/
|
||||||
|
/** MDC XE135 */
|
||||||
|
double MDC_Xe135;
|
||||||
|
/** MDC XE131m */
|
||||||
|
double MDC_Xe131m;
|
||||||
|
/** MDC XE133m*/
|
||||||
|
double MDC_Xe133m;
|
||||||
|
/** MDC XE133 */
|
||||||
|
double MDC_Xe133;
|
||||||
|
List<Double> MDC;
|
||||||
|
List<Double> MDC_CTS;
|
||||||
|
|
||||||
|
/************************** BgXeConUncer **************************/
|
||||||
|
/** 135不浓度 */
|
||||||
|
double Xe135_con;
|
||||||
|
/** 135不确定度 */
|
||||||
|
double Xe135_uncer;
|
||||||
|
double Xe131m_con;
|
||||||
|
double Xe131m_uncer;
|
||||||
|
double Xe133m_con;
|
||||||
|
double Xe133m_uncer;
|
||||||
|
double Xe133_con;
|
||||||
|
double Xe133_uncer;
|
||||||
|
}
|
|
@ -12,6 +12,6 @@ public interface ISpectrumAnalysisService {
|
||||||
|
|
||||||
Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleData gardsSampleData, String dbName, String[] menuTypes, boolean CollectStop, boolean AcqStart, Date startDate, Date endDate);
|
Result getDBSpectrumList(QueryRequest queryRequest, GardsSampleData gardsSampleData, String dbName, String[] menuTypes, boolean CollectStop, boolean AcqStart, Date startDate, Date endDate);
|
||||||
|
|
||||||
Result getDBSpectrumPie(String dbName, Integer[] sampleId);
|
Result getDBSpectrumChart(String dbName, Integer sampleId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
result.error500("请勾选数据库类型");
|
result.error500("请勾选数据库类型");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
String tempDBName = dbName;
|
||||||
if (dbName.equalsIgnoreCase("auto")){
|
if (dbName.equalsIgnoreCase("auto")){
|
||||||
dbName = "RNAUTO.GARDS_ANALYSES";
|
dbName = "RNAUTO.GARDS_ANALYSES";
|
||||||
}else if (dbName.equalsIgnoreCase("man")){
|
}else if (dbName.equalsIgnoreCase("man")){
|
||||||
|
@ -124,18 +125,26 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
//声明分页page
|
//声明分页page
|
||||||
Page<GardsSampleData> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
Page<GardsSampleData> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||||
Page<GardsSampleData> sampleDataPage = spectrumAnalysisMapper.getDBSpectrumList(page, gardsSampleData, dbName, stationTypes, CollectStop, AcqStart, startTime, endTime);
|
Page<GardsSampleData> sampleDataPage = spectrumAnalysisMapper.getDBSpectrumList(page, gardsSampleData, dbName, stationTypes, CollectStop, AcqStart, startTime, endTime);
|
||||||
|
sampleDataPage.getRecords().stream().forEach(item->{
|
||||||
|
item.setDbName(tempDBName);
|
||||||
|
});
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
result.setResult(sampleDataPage);
|
result.setResult(sampleDataPage);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result getDBSpectrumPie(String dbName, Integer[] sampleId) {
|
public Result getDBSpectrumChart(String dbName, Integer sampleId) {
|
||||||
Result result = new Result();
|
Result result = new Result();
|
||||||
Map<String, Map<String, Object>> resultMap = new HashMap<>();
|
Map<String, Map<String, Object>> resultMap = new HashMap<>();
|
||||||
List<Integer> sampleIds = Arrays.asList(sampleId);
|
if (redisUtil.hasKey("Spectrum_"+sampleId)){
|
||||||
if (CollectionUtils.isEmpty(sampleIds)){
|
resultMap = (Map<String, Map<String, Object>>) redisUtil.get("Spectrum_" + sampleId);
|
||||||
result.error500("至少需要选择一个数据");
|
result.setSuccess(true);
|
||||||
|
result.setResult(resultMap);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if (Objects.isNull(sampleId)){
|
||||||
|
result.error500("请选择一条数据");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
if (dbName.equalsIgnoreCase("auto")){
|
if (dbName.equalsIgnoreCase("auto")){
|
||||||
|
@ -147,7 +156,8 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
//查询数据库文件信息
|
//查询数据库文件信息
|
||||||
SpectrumFileRecord dbSpectrumFilePath = spectrumAnalysisMapper.getDBSpectrumFilePath(dbName, sampleIds);
|
SpectrumFileRecord dbSpectrumFilePath = spectrumAnalysisMapper.getDBSpectrumFilePath(dbName, sampleId);
|
||||||
|
if (Objects.nonNull(dbSpectrumFilePath)) {
|
||||||
if(StringUtils.isNotBlank(dbSpectrumFilePath.getSampleFilePath())){
|
if(StringUtils.isNotBlank(dbSpectrumFilePath.getSampleFilePath())){
|
||||||
String sampleFilePath = dbSpectrumFilePath.getSampleFilePath();
|
String sampleFilePath = dbSpectrumFilePath.getSampleFilePath();
|
||||||
String pathName = sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH));
|
String pathName = sampleFilePath.substring(0, sampleFilePath.lastIndexOf(StringPool.SLASH));
|
||||||
|
@ -160,18 +170,26 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
||||||
String pathName = gasBgFilePath.substring(0, gasBgFilePath.lastIndexOf(StringPool.SLASH));
|
String pathName = gasBgFilePath.substring(0, gasBgFilePath.lastIndexOf(StringPool.SLASH));
|
||||||
String fileName = gasBgFilePath.substring(gasBgFilePath.lastIndexOf(StringPool.SLASH)+1);
|
String fileName = gasBgFilePath.substring(gasBgFilePath.lastIndexOf(StringPool.SLASH)+1);
|
||||||
Map<String, Object> map = this.fenxi(pathName, fileName);
|
Map<String, Object> map = this.fenxi(pathName, fileName);
|
||||||
|
resultMap.put("gasBg",map);
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(dbSpectrumFilePath.getDetBgFilePath())){
|
if(StringUtils.isNotBlank(dbSpectrumFilePath.getDetBgFilePath())){
|
||||||
String detBgFilePath = dbSpectrumFilePath.getDetBgFilePath();
|
String detBgFilePath = dbSpectrumFilePath.getDetBgFilePath();
|
||||||
String pathName = detBgFilePath.substring(0, detBgFilePath.lastIndexOf(StringPool.SLASH));
|
String pathName = detBgFilePath.substring(0, detBgFilePath.lastIndexOf(StringPool.SLASH));
|
||||||
String fileName = detBgFilePath.substring(detBgFilePath.lastIndexOf(StringPool.SLASH)+1);
|
String fileName = detBgFilePath.substring(detBgFilePath.lastIndexOf(StringPool.SLASH)+1);
|
||||||
Map<String, Object> map = this.fenxi(pathName, fileName);
|
Map<String, Object> map = this.fenxi(pathName, fileName);
|
||||||
|
resultMap.put("detBg",map);
|
||||||
}
|
}
|
||||||
|
String collectStartStr = DateUtils.formatDate(dbSpectrumFilePath.getCollectStart(), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
String dbQcFilePath = spectrumAnalysisMapper.getQCFilePath(dbSpectrumFilePath.getSiteDetCode(), collectStartStr);
|
||||||
|
dbSpectrumFilePath.setQcFilePath(dbQcFilePath);
|
||||||
if(StringUtils.isNotBlank(dbSpectrumFilePath.getQcFilePath())){
|
if(StringUtils.isNotBlank(dbSpectrumFilePath.getQcFilePath())){
|
||||||
String qcFilePath = dbSpectrumFilePath.getQcFilePath();
|
String qcFilePath = dbSpectrumFilePath.getQcFilePath();
|
||||||
String pathName = qcFilePath.substring(0, qcFilePath.lastIndexOf(StringPool.SLASH));
|
String pathName = qcFilePath.substring(0, qcFilePath.lastIndexOf(StringPool.SLASH));
|
||||||
String fileName = qcFilePath.substring(qcFilePath.lastIndexOf(StringPool.SLASH)+1);
|
String fileName = qcFilePath.substring(qcFilePath.lastIndexOf(StringPool.SLASH)+1);
|
||||||
Map<String, Object> map = this.fenxi(pathName, fileName);
|
Map<String, Object> map = this.fenxi(pathName, fileName);
|
||||||
|
resultMap.put("qc",map);
|
||||||
|
}
|
||||||
|
redisUtil.set("Spectrum_"+sampleId, resultMap);
|
||||||
}
|
}
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
result.setResult(resultMap);
|
result.setResult(resultMap);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user