Histogram取值修改
This commit is contained in:
parent
7ad22f79a1
commit
09e1d791d4
|
@ -28,7 +28,7 @@ public class PHDFileUtil {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FTPUtil ftpUtil;
|
private FTPUtil ftpUtil;
|
||||||
|
|
||||||
public Map<String, Object> getSourceData(String filePath, String fileName, List<GardsXeResults> xeDataList){
|
public Map<String, Object> getSourceData(String filePath, String fileName, List<GardsXeResults> xeDataList, Integer sampleId, String status){
|
||||||
//加载dll工具库
|
//加载dll工具库
|
||||||
System.loadLibrary("ReadPHDFile");
|
System.loadLibrary("ReadPHDFile");
|
||||||
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(filePath);
|
EnergySpectrumStruct struct = EnergySpectrumHandler.getSourceData(filePath);
|
||||||
|
@ -78,6 +78,8 @@ public class PHDFileUtil {
|
||||||
String detectorBkMeasurementId = struct.detector_bk_measurement_id;
|
String detectorBkMeasurementId = struct.detector_bk_measurement_id;
|
||||||
//measurementId
|
//measurementId
|
||||||
String measurementId = struct.measurement_id;
|
String measurementId = struct.measurement_id;
|
||||||
|
spectrumData.setSampleId(sampleId);
|
||||||
|
spectrumData.setStatus(status);
|
||||||
spectrumData.setStationCode(stationCode);
|
spectrumData.setStationCode(stationCode);
|
||||||
spectrumData.setDetectorCode(detectorCode);
|
spectrumData.setDetectorCode(detectorCode);
|
||||||
spectrumData.setDataType(dataType);
|
spectrumData.setDataType(dataType);
|
||||||
|
@ -104,33 +106,25 @@ public class PHDFileUtil {
|
||||||
List<HistogramData> histogramDataList = new LinkedList<>();
|
List<HistogramData> histogramDataList = new LinkedList<>();
|
||||||
List<HistogramData> histogramDataDList = new LinkedList<>();
|
List<HistogramData> histogramDataDList = new LinkedList<>();
|
||||||
for (int i=0; i<bChannels; i++){
|
for (int i=0; i<bChannels; i++){
|
||||||
//按照大小切割数组
|
for (int j=0; j< gChannels; j++){
|
||||||
List<Long> list = null;
|
Long index = i * bChannels + j;
|
||||||
if (i != bChannels-1){
|
Long count = hCounts.get(index.intValue());
|
||||||
list = hCounts.subList((int) (i * bChannels), (int) ((i + 1) * bChannels));
|
|
||||||
}else {
|
|
||||||
list = hCounts.subList((int) (i * bChannels), hCounts.size());
|
|
||||||
}
|
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
|
||||||
for (int j=0; j< list.size(); j++){
|
|
||||||
Long count = list.get(j);
|
|
||||||
if (count > 0){
|
if (count > 0){
|
||||||
HistogramData his = new HistogramData();
|
HistogramData his = new HistogramData();
|
||||||
his.setB(i);
|
his.setG(i);
|
||||||
his.setG(j);
|
his.setB(j);
|
||||||
his.setC(count);
|
his.setC(count);
|
||||||
histogramDataList.add(his);
|
histogramDataList.add(his);
|
||||||
histogramDataDList.add(his);
|
histogramDataDList.add(his);
|
||||||
}else {
|
}else {
|
||||||
HistogramData his = new HistogramData();
|
HistogramData his = new HistogramData();
|
||||||
his.setB(i);
|
his.setG(i);
|
||||||
his.setG(j);
|
his.setB(j);
|
||||||
his.setC(count);
|
his.setC(count);
|
||||||
histogramDataDList.add(his);
|
histogramDataDList.add(his);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
map.put("histogramDataList", histogramDataList);
|
map.put("histogramDataList", histogramDataList);
|
||||||
map.put("histogramDataDList", histogramDataDList);
|
map.put("histogramDataDList", histogramDataDList);
|
||||||
//Gamma Spectrum Original
|
//Gamma Spectrum Original
|
||||||
|
|
Loading…
Reference in New Issue
Block a user