按照IDC程序修改web-statistic下的查询台站具体样例详情信息接口
This commit is contained in:
parent
7af968c5df
commit
86895dad3b
|
@ -0,0 +1,75 @@
|
||||||
|
package org.jeecg.common.util;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
||||||
|
import org.apache.commons.net.ftp.FTPClient;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class ReadLineUtil {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FTPUtil ftpUtil;
|
||||||
|
|
||||||
|
public List<Integer> readLine(String filePath){
|
||||||
|
List<Integer> lineValue = new LinkedList<>();
|
||||||
|
|
||||||
|
lineValue.add(1);
|
||||||
|
lineValue.add(2859);
|
||||||
|
lineValue.add(6965);
|
||||||
|
lineValue.add(4344);
|
||||||
|
lineValue.add(3088);
|
||||||
|
lineValue.add(3149);
|
||||||
|
lineValue.add(2917);
|
||||||
|
lineValue.add(2375);
|
||||||
|
lineValue.add(1829);
|
||||||
|
lineValue.add(1760);
|
||||||
|
lineValue.add(1914);
|
||||||
|
lineValue.add(2128);
|
||||||
|
lineValue.add(2238);
|
||||||
|
lineValue.add(1954);
|
||||||
|
lineValue.add(1899);
|
||||||
|
lineValue.add(2146);
|
||||||
|
lineValue.add(2758);
|
||||||
|
lineValue.add(3177);
|
||||||
|
lineValue.add(2846);
|
||||||
|
lineValue.add(2507);
|
||||||
|
lineValue.add(2456);
|
||||||
|
lineValue.add(2723);
|
||||||
|
lineValue.add(3227);
|
||||||
|
lineValue.add(3461);
|
||||||
|
lineValue.add(3464);
|
||||||
|
lineValue.add(3144);
|
||||||
|
lineValue.add(3081);
|
||||||
|
lineValue.add(3381);
|
||||||
|
lineValue.add(3234);
|
||||||
|
lineValue.add(3163);
|
||||||
|
lineValue.add(3357);
|
||||||
|
lineValue.add(3534);
|
||||||
|
lineValue.add(3756);
|
||||||
|
lineValue.add(3911);
|
||||||
|
lineValue.add(3552);
|
||||||
|
|
||||||
|
// //连接ftp
|
||||||
|
// FTPClient ftpClient = ftpUtil.LoginFTP();
|
||||||
|
// //判断ftp是否连接成功
|
||||||
|
// if (Objects.isNull(ftpClient)){
|
||||||
|
// throw new RuntimeException("ftp连接失败!");
|
||||||
|
// }
|
||||||
|
// //根据字符切割文件路径
|
||||||
|
// List<String> paths = Arrays.asList(filePath.split(StringPool.SLASH));
|
||||||
|
// if (CollectionUtils.isNotEmpty(paths)){
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
return lineValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -62,35 +62,10 @@ public class WebStatisticsController {
|
||||||
return gardsSohDataService.findSohPage(queryRequest, stationIds, startTime, endTime);
|
return gardsSohDataService.findSohPage(queryRequest, stationIds, startTime, endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("findParticulateInfo")
|
@GetMapping("findGeneratedReport")
|
||||||
@ApiOperation(value = "查看IMS DATA下气溶胶数据详情", notes = "查看IMS DATA下气溶胶数据详情")
|
@ApiOperation(value = "查询报告详情页面", notes = "查询报告详情页面")
|
||||||
public Result findParticulateInfo(Integer sampleId){
|
public Result findGeneratedReport(Integer sampleId){
|
||||||
return gardsSampleDataService.findParticulateInfo(sampleId);
|
return gardsSampleDataService.findGeneratedReport(sampleId);
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("findParticulateEnergy")
|
|
||||||
@ApiOperation(value = "查看IMS DATA下气溶胶ENERGY数据", notes = "查看IMS DATA下气溶胶ENERGY数据")
|
|
||||||
public Result findParticulateEnergy(Integer sampleId){
|
|
||||||
return gardsSampleDataService.findParticulateEnergy(sampleId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("findParticulateResolution")
|
|
||||||
@ApiOperation(value = "查看IMS DATA下气溶胶RESOLUTION数据", notes = "查看IMS DATA下气溶胶RESOLUTION数据")
|
|
||||||
public Result findParticulateResolution(Integer sampleId){
|
|
||||||
return gardsSampleDataService.findParticulateResolution(sampleId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("findParticulateEfficiency")
|
|
||||||
@ApiOperation(value = "查看IMS DATA下气溶胶EFFICIENCY数据", notes = "查看IMS DATA下气溶胶EFFICIENCY数据")
|
|
||||||
public Result findParticulateEfficiency(Integer sampleId){
|
|
||||||
return gardsSampleDataService.findParticulateEfficiency(sampleId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("findParticulateCertificate")
|
|
||||||
@ApiOperation(value = "查看IMS DATA下气溶胶CERTIFICATE数据", notes = "查看IMS DATA下气溶胶CERTIFICATE数据")
|
|
||||||
public Result findParticulateCertificate(Integer sampleId){
|
|
||||||
return gardsSampleCertService.findParticulateCertificate(sampleId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
package org.jeecg.modules.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName(value = "GARDS_BG_EFFICIENCY_PAIRS")
|
||||||
|
public class GardsBgEfficiencyPairs implements Serializable {
|
||||||
|
|
||||||
|
@TableField(value = "SAMPLE_ID")
|
||||||
|
private Integer sampleId;
|
||||||
|
|
||||||
|
@TableField(value = "ROI")
|
||||||
|
private Integer roi;
|
||||||
|
|
||||||
|
@TableField(value = "NUCLIDE_NAME")
|
||||||
|
private String nuclideName;
|
||||||
|
|
||||||
|
@TableField(value = "BG_EFFICIENCY")
|
||||||
|
private Double bgEfficiency;
|
||||||
|
|
||||||
|
@TableField(value = "BG_EFFIC_ERROR")
|
||||||
|
private Double bgEfficError;
|
||||||
|
|
||||||
|
@TableField(value = "MODDATE")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date moddate;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.jeecg.modules.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName(value = "GARDS_HISTOGRAM")
|
||||||
|
public class GardsHistogram implements Serializable {
|
||||||
|
|
||||||
|
@TableField(value = "SAMPLE_ID")
|
||||||
|
private Integer sampleId;
|
||||||
|
|
||||||
|
@TableField(value = "FILENAME")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@TableField(value = "G_CHANNELS")
|
||||||
|
private Integer GChannels;
|
||||||
|
|
||||||
|
@TableField(value = "B_CHANNELS")
|
||||||
|
private Integer BChannels;
|
||||||
|
|
||||||
|
@TableField(value = "G_ENERGY_SPAN")
|
||||||
|
private Integer GEnergySpan;
|
||||||
|
|
||||||
|
@TableField(value = "B_ENERGY_SPAN")
|
||||||
|
private Integer BEnergySpan;
|
||||||
|
|
||||||
|
@TableField(value = "MODDATE")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date moddate;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.jeecg.modules.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName(value = "GARDS_ROI_LIMITS")
|
||||||
|
public class GardsRoiLimits implements Serializable {
|
||||||
|
|
||||||
|
@TableField(value = "SAMPLE_ID")
|
||||||
|
private Integer sampleId;
|
||||||
|
|
||||||
|
@TableField(value = "ROI")
|
||||||
|
private Integer roi;
|
||||||
|
|
||||||
|
@TableField(value = "B_ENERGY_START")
|
||||||
|
private Double BEnergyStart;
|
||||||
|
|
||||||
|
@TableField(value = "B_ENERGY_STOP")
|
||||||
|
private Double BEnergyStop;
|
||||||
|
|
||||||
|
@TableField(value = "G_ENERGY_START")
|
||||||
|
private Double GEnergyStart;
|
||||||
|
|
||||||
|
@TableField(value = "G_ENERGY_STOP")
|
||||||
|
private Double GEnergyStop;
|
||||||
|
|
||||||
|
@TableField(value = "MODDATE")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date moddate;
|
||||||
|
|
||||||
|
}
|
|
@ -23,7 +23,7 @@ public class GardsSampleCert implements Serializable {
|
||||||
* 刻度源活度(Bq)total_source_activity
|
* 刻度源活度(Bq)total_source_activity
|
||||||
*/
|
*/
|
||||||
@TableField(value = "QUANTITY")
|
@TableField(value = "QUANTITY")
|
||||||
private Integer quantity;
|
private Double quantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 鉴定日期
|
* 鉴定日期
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class GardsSampleCertLine implements Serializable {
|
||||||
* 台站ID号
|
* 台站ID号
|
||||||
*/
|
*/
|
||||||
@TableField(value = "SAMPLE_ID")
|
@TableField(value = "SAMPLE_ID")
|
||||||
private Integer sampleId;
|
private Double sampleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核素名称
|
* 核素名称
|
||||||
|
@ -32,37 +32,37 @@ public class GardsSampleCertLine implements Serializable {
|
||||||
* γ能量(keV)
|
* γ能量(keV)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ENERGY")
|
@TableField(value = "ENERGY")
|
||||||
private Integer energy;
|
private Double energy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核素活度(Bq)
|
* 核素活度(Bq)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ACTIVITY")
|
@TableField(value = "ACTIVITY")
|
||||||
private Integer activity;
|
private Double activity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 核素活度不确定度(%)
|
* 核素活度不确定度(%)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ERROR")
|
@TableField(value = "ERROR")
|
||||||
private Integer error;
|
private Double error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* γ射线强度(%)
|
* γ射线强度(%)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "ABUNDANCE")
|
@TableField(value = "ABUNDANCE")
|
||||||
private Integer abundance;
|
private Double abundance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* β射线强度(%)
|
* β射线强度(%)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "B_ABUNDANCE")
|
@TableField(value = "B_ABUNDANCE")
|
||||||
private Integer bAbundance;
|
private Double bAbundance;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* β能量
|
* β能量
|
||||||
*/
|
*/
|
||||||
@TableField(value = "B_ENERGY")
|
@TableField(value = "B_ENERGY")
|
||||||
private Integer bEnergy;
|
private Double bEnergy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 衰变模式:
|
* 衰变模式:
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.jeecg.modules.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName(value = "GARDS_SAMPLE_RATIOS")
|
||||||
|
public class GardsSampleRatios implements Serializable {
|
||||||
|
|
||||||
|
@TableField(value = "SAMPLE_ID")
|
||||||
|
private Integer sampleId;
|
||||||
|
|
||||||
|
@TableField(value = "RATIO_ID")
|
||||||
|
private String ratioId;
|
||||||
|
|
||||||
|
@TableField(value = "UPPER_ROI_NUMBER")
|
||||||
|
private Integer upperRoiNumber;
|
||||||
|
|
||||||
|
@TableField(value = "LOWER_ROI_NUMBER")
|
||||||
|
private Integer lowerRoiNumber;
|
||||||
|
|
||||||
|
@TableField(value = "COUNT_RATIO")
|
||||||
|
private Double countRatio;
|
||||||
|
|
||||||
|
@TableField(value = "COUNT_RATIO_ERR")
|
||||||
|
private Double countRatioErr;
|
||||||
|
|
||||||
|
@TableField(value = "MODDATE")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date moddate;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.jeecg.modules.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName(value = "GARDS_SPECTRUM")
|
||||||
|
public class GardsSpectrum implements Serializable {
|
||||||
|
|
||||||
|
@TableField(value = "SAMPLE_ID")
|
||||||
|
private Integer sampleId;
|
||||||
|
|
||||||
|
@TableField(value = "SAMPLE_TYPE")
|
||||||
|
private String sampleType;
|
||||||
|
|
||||||
|
@TableField(value = "FILENAME")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@TableField(value = "CHANNELS")
|
||||||
|
private Integer channels;
|
||||||
|
|
||||||
|
@TableField(value = "ENERGY_SPAN")
|
||||||
|
private Integer energySpan;
|
||||||
|
|
||||||
|
@TableField(value = "START_CHANNEL")
|
||||||
|
private Integer startChannel;
|
||||||
|
|
||||||
|
@TableField(value = "MODDATE")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date moddate;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Acquisition implements Serializable {
|
||||||
|
|
||||||
|
private String acquisitionStartDate;
|
||||||
|
|
||||||
|
private Double acquisitionRealTime;
|
||||||
|
|
||||||
|
private Double acquisitionLiveTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BEfficiency implements Serializable {
|
||||||
|
|
||||||
|
private String nuclideName;
|
||||||
|
|
||||||
|
private Integer roiNumber;
|
||||||
|
|
||||||
|
private Double coincidenceEfficiency;
|
||||||
|
|
||||||
|
private Date roiGRangeStart;
|
||||||
|
|
||||||
|
private Double uncertainty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BEnergy implements Serializable {
|
||||||
|
|
||||||
|
private Double electronEnergy;
|
||||||
|
|
||||||
|
private String decayModeDescriptor;
|
||||||
|
|
||||||
|
private Double maximumChannel;
|
||||||
|
|
||||||
|
private Double uncertainty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BResolution implements Serializable {
|
||||||
|
|
||||||
|
private Double electronEnergy;
|
||||||
|
|
||||||
|
private Double FWHM;
|
||||||
|
|
||||||
|
private Double uncertainty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BetaSpectrum implements Serializable {
|
||||||
|
|
||||||
|
private Integer numberBChannels;
|
||||||
|
|
||||||
|
private Integer energySpan;
|
||||||
|
|
||||||
|
private List<Integer> bSpectrumSubBlock;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Calibration implements Serializable {
|
||||||
|
|
||||||
|
private String dateOfLastCalibration;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecg.modules.entity.GardsSampleCertLine;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Certificate implements Serializable {
|
||||||
|
|
||||||
|
private Double totalSourceActivity;
|
||||||
|
|
||||||
|
private String assayDate;
|
||||||
|
|
||||||
|
private String unitsOfActivity;
|
||||||
|
|
||||||
|
private List<CertificateLine> certificateSubBlock;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CertificateLine implements Serializable {
|
||||||
|
|
||||||
|
private String nuclideName;
|
||||||
|
|
||||||
|
private String halfLife;
|
||||||
|
|
||||||
|
private Double Genergy;
|
||||||
|
|
||||||
|
private Double nuclideActivity;
|
||||||
|
|
||||||
|
private Double uncertainty;
|
||||||
|
|
||||||
|
private Double intensity;
|
||||||
|
|
||||||
|
private String electronDecayModeDescriptor;
|
||||||
|
|
||||||
|
private Double maxBParticleEnergy;
|
||||||
|
|
||||||
|
private Double particleBIntensity;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Comment implements Serializable {
|
||||||
|
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GEfficiency implements Serializable {
|
||||||
|
|
||||||
|
private Double energy;
|
||||||
|
|
||||||
|
private Double efficiency;
|
||||||
|
|
||||||
|
private Double uncertainty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GEnergy implements Serializable {
|
||||||
|
|
||||||
|
private Double energy;
|
||||||
|
|
||||||
|
private Double centroid;
|
||||||
|
|
||||||
|
private Double uncertainty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GResolution implements Serializable {
|
||||||
|
|
||||||
|
private Double energy;
|
||||||
|
|
||||||
|
private Double FWHM;
|
||||||
|
|
||||||
|
private Double uncertainty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GammaSpectrum implements Serializable {
|
||||||
|
|
||||||
|
private Integer numberGChannels;
|
||||||
|
|
||||||
|
private Integer energySpan;
|
||||||
|
|
||||||
|
private List<Integer> gSpectrumSubBlock;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class GeneralInformation implements Serializable {
|
||||||
|
|
||||||
|
private String siteCode;
|
||||||
|
|
||||||
|
private String detectorCode;
|
||||||
|
|
||||||
|
private String systemType;
|
||||||
|
|
||||||
|
private String sampleGeometry;
|
||||||
|
|
||||||
|
private String spectrumQualifier;
|
||||||
|
|
||||||
|
private String sampleReferenceIdentification;
|
||||||
|
|
||||||
|
private String measurementIdentification;
|
||||||
|
|
||||||
|
private String detectorBackgroundMeasurementId;
|
||||||
|
|
||||||
|
private String gasBackgroundMeasurementId;
|
||||||
|
|
||||||
|
private String transmitDate;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Histogram implements Serializable {
|
||||||
|
|
||||||
|
private Integer BChannels;
|
||||||
|
|
||||||
|
private Integer BEnergySpan;
|
||||||
|
|
||||||
|
private Integer GChannels;
|
||||||
|
|
||||||
|
private Integer GEnergySpan;
|
||||||
|
|
||||||
|
private List<Integer> histogramSubBlock;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Ratios implements Serializable {
|
||||||
|
|
||||||
|
private String ratioId;
|
||||||
|
|
||||||
|
private Integer roiNumberHigherEnergy;
|
||||||
|
|
||||||
|
private Integer roiNumberLowerEnergy;
|
||||||
|
|
||||||
|
private Double countRatio;
|
||||||
|
|
||||||
|
private Double countRatioUncertainty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Report implements Serializable {
|
||||||
|
|
||||||
|
private GeneralInformation headerBlock;
|
||||||
|
|
||||||
|
private Comment commentBlock;
|
||||||
|
|
||||||
|
private Acquisition acquisitionBlock;
|
||||||
|
|
||||||
|
private Calibration calibrationBlock;
|
||||||
|
|
||||||
|
private List<GEnergy> gEnergyBlock;
|
||||||
|
|
||||||
|
private List<BEnergy> bEnergyBlock;
|
||||||
|
|
||||||
|
private List<GResolution> gResolutionBlock;
|
||||||
|
|
||||||
|
private List<BResolution> bResolutionBlock;
|
||||||
|
|
||||||
|
private List<GEfficiency> gEfficiencyBlock;
|
||||||
|
|
||||||
|
private List<BEfficiency> bgEfficiencyBlock;
|
||||||
|
|
||||||
|
private List<Roi> roiLimitsBlock;
|
||||||
|
|
||||||
|
private List<Ratios> ratiosBlock;
|
||||||
|
|
||||||
|
private GammaSpectrum gSpectrumBlock;
|
||||||
|
|
||||||
|
private BetaSpectrum bSpectrumBlock;
|
||||||
|
|
||||||
|
private Histogram histogramBlock;
|
||||||
|
|
||||||
|
private Certificate certificateBlock;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.jeecg.modules.entity.data;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Roi implements Serializable {
|
||||||
|
|
||||||
|
private Integer roiNumber;
|
||||||
|
|
||||||
|
private Double roiBRangeStart;
|
||||||
|
|
||||||
|
private Double roiBRangeStop;
|
||||||
|
|
||||||
|
private Double roiGRangeStart;
|
||||||
|
|
||||||
|
private Double roiGRangeStop;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.entity.GardsBgEfficiencyPairs;
|
||||||
|
|
||||||
|
public interface GardsBgEfficiencyPairsMapper extends BaseMapper<GardsBgEfficiencyPairs> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.entity.GardsHistogram;
|
||||||
|
|
||||||
|
public interface GardsHistogramMapper extends BaseMapper<GardsHistogram> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.entity.GardsRoiLimits;
|
||||||
|
|
||||||
|
public interface GardsRoiLimitsMapper extends BaseMapper<GardsRoiLimits> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.entity.GardsSampleRatios;
|
||||||
|
|
||||||
|
public interface GardsSampleRatiosMapper extends BaseMapper<GardsSampleRatios> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package org.jeecg.modules.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.entity.GardsSpectrum;
|
||||||
|
|
||||||
|
public interface GardsSpectrumMapper extends BaseMapper<GardsSpectrum> {
|
||||||
|
}
|
|
@ -28,28 +28,7 @@ public interface IGardsSampleDataService extends IService<GardsSampleData> {
|
||||||
* @param sampleId
|
* @param sampleId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Result findParticulateInfo(Integer sampleId);
|
Result findGeneratedReport(Integer sampleId);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询谱数据的能量数据
|
|
||||||
* @param sampleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Result findParticulateEnergy(Integer sampleId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询
|
|
||||||
* @param sampleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Result findParticulateResolution(Integer sampleId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询
|
|
||||||
* @param sampleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Result findParticulateEfficiency(Integer sampleId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询全部基础数据
|
* 查询全部基础数据
|
||||||
|
|
|
@ -9,15 +9,12 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.api.QueryRequest;
|
import org.jeecg.common.api.QueryRequest;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.util.DateUtils;
|
import org.jeecg.common.util.DateUtils;
|
||||||
|
import org.jeecg.common.util.ReadLineUtil;
|
||||||
import org.jeecg.common.util.RedisUtil;
|
import org.jeecg.common.util.RedisUtil;
|
||||||
import org.jeecg.modules.entity.GardsCalibrationPairsOrig;
|
import org.jeecg.modules.entity.*;
|
||||||
import org.jeecg.modules.entity.GardsSampleAux;
|
|
||||||
import org.jeecg.modules.base.entity.GardsSampleData;
|
import org.jeecg.modules.base.entity.GardsSampleData;
|
||||||
import org.jeecg.modules.entity.GardsSampleDescription;
|
import org.jeecg.modules.entity.data.*;
|
||||||
import org.jeecg.modules.mapper.GardsCalibrationPairsOrigMapper;
|
import org.jeecg.modules.mapper.*;
|
||||||
import org.jeecg.modules.mapper.GardsSampleAuxMapper;
|
|
||||||
import org.jeecg.modules.mapper.GardsSampleDataMapper;
|
|
||||||
import org.jeecg.modules.mapper.GardsSampleDescriptionMapper;
|
|
||||||
import org.jeecg.modules.service.IGardsSampleDataService;
|
import org.jeecg.modules.service.IGardsSampleDataService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -40,6 +37,22 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
|
||||||
private GardsCalibrationPairsOrigMapper gardsCalibrationPairsOrigMapper;
|
private GardsCalibrationPairsOrigMapper gardsCalibrationPairsOrigMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private GardsSampleDescriptionMapper gardsSampleDescriptionMapper;
|
private GardsSampleDescriptionMapper gardsSampleDescriptionMapper;
|
||||||
|
@Autowired
|
||||||
|
private GardsBgEfficiencyPairsMapper gardsBgEfficiencyPairsMapper;
|
||||||
|
@Autowired
|
||||||
|
private GardsRoiLimitsMapper gardsRoiLimitsMapper;
|
||||||
|
@Autowired
|
||||||
|
private GardsSampleRatiosMapper gardsSampleRatiosMapper;
|
||||||
|
@Autowired
|
||||||
|
private GardsSpectrumMapper gardsSpectrumMapper;
|
||||||
|
@Autowired
|
||||||
|
private GardsHistogramMapper gardsHistogramMapper;
|
||||||
|
@Autowired
|
||||||
|
private GardsSampleCertMapper gardsSampleCertMapper;
|
||||||
|
@Autowired
|
||||||
|
private GardsSampleCertLineMapper gardsSampleCertLineMapper;
|
||||||
|
@Autowired
|
||||||
|
private ReadLineUtil readLineUtil;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result findParticulatePage(QueryRequest queryRequest, Integer[] stationIds, String dataType, String spectralQualifie, Date startTime,Date endTime) {
|
public Result findParticulatePage(QueryRequest queryRequest, Integer[] stationIds, String dataType, String spectralQualifie, Date startTime,Date endTime) {
|
||||||
|
@ -99,9 +112,46 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result findParticulateInfo(Integer sampleId) {
|
public Result findGeneratedReport(Integer sampleId) {
|
||||||
Result result = new Result();
|
Result result = new Result();
|
||||||
Map<String, Object> map = new HashMap<>();
|
Report report = new Report();
|
||||||
|
//查询info
|
||||||
|
this.findInfo(sampleId, report);
|
||||||
|
//查询G_energy
|
||||||
|
this.findGEnergy(sampleId, report);
|
||||||
|
//查询B_energy
|
||||||
|
this.findBEnergy(sampleId, report);
|
||||||
|
//查询G_Resolution
|
||||||
|
this.findGResolution(sampleId, report);
|
||||||
|
//查询B_Resolution
|
||||||
|
this.findBResolution(sampleId, report);
|
||||||
|
//查询G_Efficiency
|
||||||
|
this.findGEfficiency(sampleId, report);
|
||||||
|
//查询B_gEfficiency
|
||||||
|
this.findBgEfficiency(sampleId, report);
|
||||||
|
//查询ROI
|
||||||
|
this.findRoiLimits(sampleId, report);
|
||||||
|
//查询RATIOS
|
||||||
|
this.findRatios(sampleId, report);
|
||||||
|
//查询 GAMMA SPECTRUM
|
||||||
|
this.findGSpectrum(sampleId, report);
|
||||||
|
//查询 BETA SPECTRUM
|
||||||
|
this.findBSpectrum(sampleId, report);
|
||||||
|
//查询Histogram
|
||||||
|
this.findHistogram(sampleId, report);
|
||||||
|
//查询Certificate
|
||||||
|
this.findCertificate(sampleId, report);
|
||||||
|
result.setSuccess(true);
|
||||||
|
result.setResult(report);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findInfo(Integer sampleId, Report report) {
|
||||||
|
//声明多个对象 分别封装独立的信息
|
||||||
|
GeneralInformation generalInformation = new GeneralInformation();
|
||||||
|
Comment comment = new Comment();
|
||||||
|
Acquisition acquisition = new Acquisition();
|
||||||
|
Calibration calibration = new Calibration();
|
||||||
//获取redis中缓存的台站信息
|
//获取redis中缓存的台站信息
|
||||||
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
Map<Integer, String> stationMap = (Map<Integer, String>)redisUtil.get("stationMap");
|
||||||
//根据sample_id查询sample_data内容
|
//根据sample_id查询sample_data内容
|
||||||
|
@ -122,128 +172,261 @@ public class GardsSampleDataServiceImpl extends ServiceImpl<GardsSampleDataMappe
|
||||||
GardsSampleDescription gardsSampleDescription = gardsSampleDescriptionMapper.selectOne(descriptionQueryWrapper);
|
GardsSampleDescription gardsSampleDescription = gardsSampleDescriptionMapper.selectOne(descriptionQueryWrapper);
|
||||||
if (Objects.nonNull(gardsSampleData)){
|
if (Objects.nonNull(gardsSampleData)){
|
||||||
//封装数据内容
|
//封装数据内容
|
||||||
map.put("Site Code", gardsSampleData.getStationName());
|
generalInformation.setSiteCode(gardsSampleData.getStationName());
|
||||||
map.put("Detector Code",gardsSampleData.getSiteDetCode());
|
generalInformation.setDetectorCode(gardsSampleData.getSiteDetCode());
|
||||||
map.put("System Type",gardsSampleData.getSampleType());
|
generalInformation.setSystemType(gardsSampleData.getSampleType());
|
||||||
map.put("Sample Geometry",gardsSampleData.getGeometry());
|
generalInformation.setSampleGeometry(gardsSampleData.getGeometry());
|
||||||
map.put("Spectrum Qualifier",gardsSampleData.getSpectralQualifie());
|
generalInformation.setSpectrumQualifier(gardsSampleData.getSpectralQualifie());
|
||||||
map.put("Transmit Time", gardsSampleData.getTransmitDtg());
|
generalInformation.setTransmitDate(DateUtils.formatDate(gardsSampleData.getTransmitDtg(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
map.put("Acquisition Time", gardsSampleData.getAcquisitionStart());
|
acquisition.setAcquisitionStartDate(DateUtils.formatDate(gardsSampleData.getAcquisitionStart(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
map.put("Acquisition Real Time", gardsSampleData.getAcquisitionRealSec());
|
acquisition.setAcquisitionRealTime(gardsSampleData.getAcquisitionRealSec());
|
||||||
map.put("Acquisition Live Time", gardsSampleData.getAcquisitionLiveSec());
|
acquisition.setAcquisitionLiveTime(gardsSampleData.getAcquisitionLiveSec());
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(gardsSampleAux)){
|
if (Objects.nonNull(gardsSampleAux)){
|
||||||
map.put("Sample Reference Identification", gardsSampleAux.getSampleRefId());
|
generalInformation.setSampleReferenceIdentification(gardsSampleAux.getSampleRefId());
|
||||||
map.put("Measurement Identification", gardsSampleAux.getMeasurementId());
|
generalInformation.setMeasurementIdentification(gardsSampleAux.getMeasurementId());
|
||||||
map.put("Detector Background Measurement Identification", gardsSampleAux.getBkgdMeasurementId());
|
generalInformation.setDetectorBackgroundMeasurementId(gardsSampleAux.getBkgdMeasurementId());
|
||||||
map.put("Gas Background Measurement Identification", gardsSampleAux.getGasBkgdMeasurementId());
|
generalInformation.setGasBackgroundMeasurementId(gardsSampleAux.getGasBkgdMeasurementId());
|
||||||
map.put("Date of Last Calibration", gardsSampleAux.getCalibrationDtg());
|
calibration.setDateOfLastCalibration(DateUtils.formatDate(gardsSampleAux.getCalibrationDtg(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(gardsSampleDescription)){
|
if (Objects.nonNull(gardsSampleDescription)){
|
||||||
map.put("COMMENT", gardsSampleDescription.getDescription());
|
comment.setText(gardsSampleDescription.getDescription());
|
||||||
}
|
}
|
||||||
result.setSuccess(true);
|
report.setHeaderBlock(generalInformation);
|
||||||
result.setResult(map);
|
report.setCommentBlock(comment);
|
||||||
return result;
|
report.setAcquisitionBlock(acquisition);
|
||||||
|
report.setCalibrationBlock(calibration);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private void findGEnergy(Integer sampleId, Report report) {
|
||||||
public Result findParticulateEnergy(Integer sampleId) {
|
List<GEnergy> gEnergySubBlock = new LinkedList<>();
|
||||||
Result result = new Result();
|
|
||||||
//map 封装三个数组
|
|
||||||
Map<String, List<Double>> map = new HashMap<>();
|
|
||||||
//封装存储 g_energy
|
|
||||||
List<Double> GEnergyList = new LinkedList<>();
|
|
||||||
//封装存储 Centroid channel
|
|
||||||
List<Double> centroidChannelList = new LinkedList<>();
|
|
||||||
//封装存储 Uncertainty
|
|
||||||
List<Double> uncertaintyList = new LinkedList<>();
|
|
||||||
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleType, "G");
|
||||||
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
||||||
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
||||||
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item-> item.getCaltype().trim().equals("energy")).collect(Collectors.toList());
|
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item->item.getCaltype().trim().equals("energy")).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
// Xvalue 对应 centroid channel
|
GEnergy gEnergy = new GEnergy();
|
||||||
centroidChannelList.add(orig.getXvalue());
|
gEnergy.setEnergy(orig.getYvalue());
|
||||||
// Yvalue 对应 g_energy
|
gEnergy.setCentroid(orig.getXvalue());
|
||||||
GEnergyList.add(orig.getYvalue());
|
gEnergy.setUncertainty(orig.getUncyvalue());
|
||||||
// Uncyvalue 对应 Uncertainty
|
gEnergySubBlock.add(gEnergy);
|
||||||
uncertaintyList.add(orig.getUncyvalue());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("G_Energy", GEnergyList);
|
report.setGEnergyBlock(gEnergySubBlock);
|
||||||
map.put("Centroid channel", centroidChannelList);
|
|
||||||
map.put("Uncertainty", uncertaintyList);
|
|
||||||
result.setSuccess(true);
|
|
||||||
result.setResult(map);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private void findBEnergy(Integer sampleId, Report report) {
|
||||||
public Result findParticulateResolution(Integer sampleId) {
|
List<BEnergy> bEnergySubBlock = new LinkedList<>();
|
||||||
Result result = new Result();
|
|
||||||
//map 封装三个数组
|
|
||||||
Map<String, List<Double>> map = new HashMap<>();
|
|
||||||
//封装存储 g_energy
|
|
||||||
List<Double> GEnergyList = new LinkedList<>();
|
|
||||||
//封装存储 FWHM
|
|
||||||
List<Double> FWHMList = new LinkedList<>();
|
|
||||||
//封装存储 Uncertainty
|
|
||||||
List<Double> uncertaintyList = new LinkedList<>();
|
|
||||||
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleType, "B");
|
||||||
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
||||||
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
||||||
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item-> item.getCaltype().trim().equals("Resolution")).collect(Collectors.toList());
|
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item->item.getCaltype().trim().equals("energy")).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
// Xvalue 对应 energy
|
BEnergy bEnergy = new BEnergy();
|
||||||
GEnergyList.add(orig.getXvalue());
|
bEnergy.setElectronEnergy(orig.getYvalue());
|
||||||
// YValue 对应 efficiency
|
bEnergy.setMaximumChannel(orig.getXvalue());
|
||||||
FWHMList.add(orig.getYvalue());
|
bEnergy.setUncertainty(orig.getUncyvalue());
|
||||||
// UncyValue 对应 Uncertainty
|
bEnergy.setDecayModeDescriptor(orig.getDecayMode());
|
||||||
uncertaintyList.add(orig.getUncyvalue());
|
bEnergySubBlock.add(bEnergy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("G_energy", GEnergyList);
|
report.setBEnergyBlock(bEnergySubBlock);
|
||||||
map.put("FWHM", FWHMList);
|
|
||||||
map.put("Uncertainty", uncertaintyList);
|
|
||||||
result.setSuccess(true);
|
|
||||||
result.setResult(map);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private void findGResolution(Integer sampleId, Report report) {
|
||||||
public Result findParticulateEfficiency(Integer sampleId) {
|
List<GResolution> gResolutionSubBlock = new LinkedList<>();
|
||||||
Result result = new Result();
|
|
||||||
//map 封装三个数组
|
|
||||||
Map<String, List<Double>> map = new HashMap<>();
|
|
||||||
//封装存储 energy
|
|
||||||
List<Double> energyList = new LinkedList<>();
|
|
||||||
//封装存储 efficiency
|
|
||||||
List<Double> efficiencyList = new LinkedList<>();
|
|
||||||
//封装存储 Uncertainty
|
|
||||||
List<Double> uncertaintyList = new LinkedList<>();
|
|
||||||
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleType, "G");
|
||||||
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
||||||
|
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
||||||
|
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item->item.getCaltype().trim().equals("Resolution")).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
||||||
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
|
GResolution gResolution = new GResolution();
|
||||||
|
gResolution.setEnergy(orig.getXvalue());
|
||||||
|
gResolution.setFWHM(orig.getYvalue());
|
||||||
|
gResolution.setUncertainty(orig.getUncyvalue());
|
||||||
|
gResolutionSubBlock.add(gResolution);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
report.setGResolutionBlock(gResolutionSubBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findBResolution(Integer sampleId, Report report) {
|
||||||
|
List<BResolution> bResolutionSubBlock = new LinkedList<>();
|
||||||
|
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleType, "B");
|
||||||
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
||||||
|
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
||||||
|
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item->item.getCaltype().trim().equals("Resolution")).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
||||||
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
|
BResolution bResolution = new BResolution();
|
||||||
|
bResolution.setElectronEnergy(orig.getXvalue());
|
||||||
|
bResolution.setFWHM(orig.getYvalue());
|
||||||
|
bResolution.setUncertainty(orig.getUncyvalue());
|
||||||
|
bResolutionSubBlock.add(bResolution);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
report.setBResolutionBlock(bResolutionSubBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findGEfficiency(Integer sampleId, Report report) {
|
||||||
|
List<GEfficiency> gEfficiencySubBlock = new LinkedList<>();
|
||||||
|
LambdaQueryWrapper<GardsCalibrationPairsOrig> calibrationPairsOrigQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleType, "G");
|
||||||
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
calibrationPairsOrigQueryWrapper.eq(GardsCalibrationPairsOrig::getSampleId, sampleId);
|
||||||
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
List<GardsCalibrationPairsOrig> gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigMapper.selectList(calibrationPairsOrigQueryWrapper);
|
||||||
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item->item.getCaltype().trim().equals("efficiency")).collect(Collectors.toList());
|
gardsCalibrationPairsOrigs = gardsCalibrationPairsOrigs.stream().filter(item->item.getCaltype().trim().equals("efficiency")).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
if (CollectionUtils.isNotEmpty(gardsCalibrationPairsOrigs)){
|
||||||
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
for (GardsCalibrationPairsOrig orig:gardsCalibrationPairsOrigs) {
|
||||||
// Xvalue 对应 energy
|
GEfficiency gEfficiency = new GEfficiency();
|
||||||
energyList.add(orig.getXvalue());
|
gEfficiency.setEnergy(orig.getXvalue());
|
||||||
// YValue 对应 efficiency
|
gEfficiency.setEfficiency(orig.getYvalue());
|
||||||
efficiencyList.add(orig.getYvalue());
|
gEfficiency.setUncertainty(orig.getUncyvalue());
|
||||||
// UncyValue 对应 Uncertainty
|
gEfficiencySubBlock.add(gEfficiency);
|
||||||
uncertaintyList.add(orig.getUncyvalue());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
map.put("Energy", energyList);
|
report.setGEfficiencyBlock(gEfficiencySubBlock);
|
||||||
map.put("Efficiency", efficiencyList);
|
}
|
||||||
map.put("Uncertainty", uncertaintyList);
|
|
||||||
result.setSuccess(true);
|
private void findBgEfficiency(Integer sampleId, Report report) {
|
||||||
result.setResult(map);
|
List<BEfficiency> bgEfficiencySubBlock = new LinkedList<>();
|
||||||
return result;
|
LambdaQueryWrapper<GardsBgEfficiencyPairs> bgEfficiencyPairsQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
bgEfficiencyPairsQueryWrapper.eq(GardsBgEfficiencyPairs::getSampleId, sampleId);
|
||||||
|
List<GardsBgEfficiencyPairs> gardsBgEfficiencyPairs = gardsBgEfficiencyPairsMapper.selectList(bgEfficiencyPairsQueryWrapper);
|
||||||
|
if (CollectionUtils.isNotEmpty(gardsBgEfficiencyPairs)){
|
||||||
|
for (GardsBgEfficiencyPairs pairs:gardsBgEfficiencyPairs) {
|
||||||
|
BEfficiency bEfficiency = new BEfficiency();
|
||||||
|
bEfficiency.setRoiNumber(pairs.getRoi());
|
||||||
|
bEfficiency.setNuclideName(pairs.getNuclideName());
|
||||||
|
bEfficiency.setCoincidenceEfficiency(pairs.getBgEfficiency());
|
||||||
|
bEfficiency.setUncertainty(pairs.getBgEfficError());
|
||||||
|
bgEfficiencySubBlock.add(bEfficiency);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
report.setBgEfficiencyBlock(bgEfficiencySubBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findRoiLimits(Integer sampleId, Report report) {
|
||||||
|
List<Roi> roiLimitsSubBlock = new LinkedList<>();
|
||||||
|
LambdaQueryWrapper<GardsRoiLimits> roiLimitsQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
roiLimitsQueryWrapper.eq(GardsRoiLimits::getSampleId, sampleId);
|
||||||
|
List<GardsRoiLimits> gardsRoiLimitsList = gardsRoiLimitsMapper.selectList(roiLimitsQueryWrapper);
|
||||||
|
if (CollectionUtils.isNotEmpty(gardsRoiLimitsList)){
|
||||||
|
for (GardsRoiLimits roiLimits:gardsRoiLimitsList) {
|
||||||
|
Roi roi = new Roi();
|
||||||
|
roi.setRoiNumber(roiLimits.getRoi());
|
||||||
|
roi.setRoiGRangeStart(roiLimits.getGEnergyStart());
|
||||||
|
roi.setRoiGRangeStop(roiLimits.getGEnergyStop());
|
||||||
|
roi.setRoiBRangeStart(roiLimits.getBEnergyStart());
|
||||||
|
roi.setRoiBRangeStop(roiLimits.getBEnergyStop());
|
||||||
|
roiLimitsSubBlock.add(roi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
report.setRoiLimitsBlock(roiLimitsSubBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findRatios(Integer sampleId, Report report) {
|
||||||
|
List<Ratios> ratiosSubBlock = new LinkedList<>();
|
||||||
|
LambdaQueryWrapper<GardsSampleRatios> ratiosQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
ratiosQueryWrapper.eq(GardsSampleRatios::getSampleId, sampleId);
|
||||||
|
List<GardsSampleRatios> sampleRatiosList = gardsSampleRatiosMapper.selectList(ratiosQueryWrapper);
|
||||||
|
if (CollectionUtils.isNotEmpty(sampleRatiosList)){
|
||||||
|
for (GardsSampleRatios sampleRatios:sampleRatiosList) {
|
||||||
|
Ratios ratios = new Ratios();
|
||||||
|
ratios.setCountRatio(sampleRatios.getCountRatio());
|
||||||
|
ratios.setRatioId(sampleRatios.getRatioId());
|
||||||
|
ratios.setCountRatioUncertainty(sampleRatios.getCountRatioErr());
|
||||||
|
ratios.setRoiNumberLowerEnergy(sampleRatios.getLowerRoiNumber());
|
||||||
|
ratios.setRoiNumberHigherEnergy(sampleRatios.getUpperRoiNumber());
|
||||||
|
ratiosSubBlock.add(ratios);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
report.setRatiosBlock(ratiosSubBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findGSpectrum(Integer sampleId, Report report) {
|
||||||
|
GammaSpectrum gSpectrumBlock = new GammaSpectrum();
|
||||||
|
LambdaQueryWrapper<GardsSpectrum> spectrumQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
spectrumQueryWrapper.eq(GardsSpectrum::getSampleType, "G");
|
||||||
|
spectrumQueryWrapper.eq(GardsSpectrum::getSampleId, sampleId);
|
||||||
|
GardsSpectrum gardsSpectrum = gardsSpectrumMapper.selectOne(spectrumQueryWrapper);
|
||||||
|
if (Objects.nonNull(gardsSpectrum)){
|
||||||
|
List<Integer> gSpectrumSubBlock = readLineUtil.readLine(gardsSpectrum.getFileName());
|
||||||
|
gSpectrumBlock.setGSpectrumSubBlock(gSpectrumSubBlock);
|
||||||
|
gSpectrumBlock.setEnergySpan(gardsSpectrum.getEnergySpan());
|
||||||
|
gSpectrumBlock.setNumberGChannels(gardsSpectrum.getChannels());
|
||||||
|
}
|
||||||
|
report.setGSpectrumBlock(gSpectrumBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findBSpectrum(Integer sampleId, Report report) {
|
||||||
|
BetaSpectrum bSpectrumBlock = new BetaSpectrum();
|
||||||
|
LambdaQueryWrapper<GardsSpectrum> spectrumQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
spectrumQueryWrapper.eq(GardsSpectrum::getSampleType, "B");
|
||||||
|
spectrumQueryWrapper.eq(GardsSpectrum::getSampleId, sampleId);
|
||||||
|
GardsSpectrum gardsSpectrum = gardsSpectrumMapper.selectOne(spectrumQueryWrapper);
|
||||||
|
if (Objects.nonNull(gardsSpectrum)){
|
||||||
|
List<Integer> bSpectrumSubBlock = readLineUtil.readLine(gardsSpectrum.getFileName());
|
||||||
|
bSpectrumBlock.setBSpectrumSubBlock(bSpectrumSubBlock);
|
||||||
|
bSpectrumBlock.setEnergySpan(gardsSpectrum.getEnergySpan());
|
||||||
|
bSpectrumBlock.setNumberBChannels(gardsSpectrum.getChannels());
|
||||||
|
}
|
||||||
|
report.setBSpectrumBlock(bSpectrumBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findHistogram(Integer sampleId, Report report) {
|
||||||
|
Histogram histogramBlock = new Histogram();
|
||||||
|
LambdaQueryWrapper<GardsHistogram> histogramQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
histogramQueryWrapper.eq(GardsHistogram::getSampleId, sampleId);
|
||||||
|
GardsHistogram gardsHistogram = gardsHistogramMapper.selectOne(histogramQueryWrapper);
|
||||||
|
if (Objects.nonNull(gardsHistogram)){
|
||||||
|
List<Integer> histogramSubBlock = readLineUtil.readLine(gardsHistogram.getFileName());
|
||||||
|
histogramBlock.setHistogramSubBlock(histogramSubBlock);
|
||||||
|
histogramBlock.setBChannels(gardsHistogram.getBChannels());
|
||||||
|
histogramBlock.setBEnergySpan(gardsHistogram.getBEnergySpan());
|
||||||
|
histogramBlock.setGChannels(gardsHistogram.getGChannels());
|
||||||
|
histogramBlock.setGEnergySpan(gardsHistogram.getGEnergySpan());
|
||||||
|
}
|
||||||
|
report.setHistogramBlock(histogramBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findCertificate(Integer sampleId, Report report) {
|
||||||
|
Certificate certificateBlock = new Certificate();
|
||||||
|
List<CertificateLine> certificateSubBlock = new LinkedList<>();
|
||||||
|
LambdaQueryWrapper<GardsSampleCert> sampleCertQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
sampleCertQueryWrapper.eq(GardsSampleCert::getSampleId, sampleId);
|
||||||
|
GardsSampleCert gardsSampleCert = gardsSampleCertMapper.selectOne(sampleCertQueryWrapper);
|
||||||
|
if (Objects.nonNull(gardsSampleCert)){
|
||||||
|
certificateBlock.setTotalSourceActivity(gardsSampleCert.getQuantity());
|
||||||
|
certificateBlock.setAssayDate(DateUtils.formatDate(gardsSampleCert.getAssayDate(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
certificateBlock.setUnitsOfActivity(gardsSampleCert.getUnit());
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<GardsSampleCertLine> sampleCertLineQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
sampleCertLineQueryWrapper.eq(GardsSampleCertLine::getSampleId, sampleId);
|
||||||
|
List<GardsSampleCertLine> gardsSampleCertLines = gardsSampleCertLineMapper.selectList(sampleCertLineQueryWrapper);
|
||||||
|
if (CollectionUtils.isNotEmpty(gardsSampleCertLines)){
|
||||||
|
for (GardsSampleCertLine sampleCertLine:gardsSampleCertLines) {
|
||||||
|
CertificateLine certificateLine = new CertificateLine();
|
||||||
|
certificateLine.setNuclideName(sampleCertLine.getNuclName());
|
||||||
|
certificateLine.setHalfLife(sampleCertLine.getHalflife());
|
||||||
|
certificateLine.setNuclideActivity(sampleCertLine.getActivity());
|
||||||
|
certificateLine.setUncertainty(sampleCertLine.getError());
|
||||||
|
certificateLine.setGenergy(sampleCertLine.getEnergy());
|
||||||
|
certificateLine.setIntensity(sampleCertLine.getAbundance());
|
||||||
|
certificateLine.setElectronDecayModeDescriptor(sampleCertLine.getDecayMode());
|
||||||
|
certificateLine.setMaxBParticleEnergy(sampleCertLine.getBEnergy());
|
||||||
|
certificateLine.setParticleBIntensity(sampleCertLine.getBAbundance());
|
||||||
|
certificateSubBlock.add(certificateLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
certificateBlock.setCertificateSubBlock(certificateSubBlock);
|
||||||
|
report.setCertificateBlock(certificateBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW,rollbackFor = Exception.class)
|
@Transactional(propagation = Propagation.REQUIRES_NEW,rollbackFor = Exception.class)
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class GardsStations implements Serializable {
|
||||||
|
|
||||||
@TableField(value = "MODDATE")
|
@TableField(value = "MODDATE")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date moddate;
|
private Date moddate;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,4 +15,4 @@ spring:
|
||||||
config:
|
config:
|
||||||
import:
|
import:
|
||||||
- optional:nacos:jeecg.yaml
|
- optional:nacos:jeecg.yaml
|
||||||
- optional:nacos:jeecg-web-statistics-@profile.name@.yaml
|
- optional:nacos:jeecg-@profile.name@.yaml
|
Loading…
Reference in New Issue
Block a user