fix:解决gamma报告不能生成的问题;解决gamma交互工具添加核素之后mdc没有核素的问题
This commit is contained in:
parent
d71544534c
commit
4a0bb05232
|
@ -3,10 +3,7 @@ package org.jeecg.modules.entity.vo;
|
|||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
public class GStoreMiddleProcessData implements Serializable {
|
||||
|
@ -421,6 +418,7 @@ public class GStoreMiddleProcessData implements Serializable {
|
|||
Collection_Station_Comments = "";
|
||||
NDC_Analysis_General_Comments = "";
|
||||
setting_specSetup = new SpecSetup();
|
||||
mdcInfos = new ArrayList<>();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.jeecg.common.util;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
@ -11,8 +11,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.net.ftp.FTP;
|
||||
import org.apache.commons.net.ftp.FTPClient;
|
||||
import org.ejml.simple.SimpleMatrix;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.properties.ParameterProperties;
|
||||
|
@ -3125,9 +3123,10 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
}
|
||||
return strBuffer.toString();
|
||||
} catch (Exception e) {
|
||||
log.error("错误文件名称:"+ middleData.analyses_save_filePath+" 错误内容:"+e.getMessage());
|
||||
e.printStackTrace();
|
||||
log.error("错误文件名称:"+ middleData.analyses_save_filePath+" 错误内容:", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public List<String> DoubleLimit(List data) {
|
||||
|
@ -3208,6 +3207,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
public boolean GetMiddleData(PHDFile fileAnlyse, String userName,Map<String, NuclideLines> nucline,GStoreMiddleProcessData middleData, String type, String flag) throws ParseException {
|
||||
boolean bRet=true;
|
||||
//标准名称规范化
|
||||
middleData.mdcInfos = ListUtil.toList(fileAnlyse.getMdcInfoMap().values());
|
||||
String dataType = fileAnlyse.getMsgInfo().getData_type();
|
||||
String subDirSavePath = "";
|
||||
subDirSavePath+=nameStandUtil.GetSysTemSubdir(fileAnlyse.getHeader().getSystem_type());
|
||||
|
@ -4156,7 +4156,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
return result;
|
||||
}
|
||||
|
||||
public void CalcNuclideMDA(PHDFile phd, NuclideLines lines, String nucName, List<Integer> vPeakIdx) {
|
||||
public void CalcNuclideMDA(PHDFile phd, NuclideLines lines, String nucName, List<Integer> vPeakIdx, Integer energyTolerance) {
|
||||
if(lines.halflife <= 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -4168,7 +4168,9 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
List<String> vNuclides = new LinkedList<>(); // 只识别不计算活度/浓度的核素
|
||||
ReadSpecialNuclides(mapHalflife, vNuclides);
|
||||
|
||||
double energyWidth = phd.getUsedSetting().getEnergyTolerance();
|
||||
// double energyWidth = phd.getUsedSetting().getEnergyTolerance();
|
||||
// fix:改为使用页面传递的公差 20241114,结果用户插入修改公差之后的核素,mda无法计算到的问题
|
||||
double energyWidth = energyTolerance;
|
||||
List<Double> vEnergy = lines.venergy; // 该核素的所有γ射线能量
|
||||
double maxYield = 0;
|
||||
int mainPeakIdx = -1; // 记录核素主γ峰的索引下标
|
||||
|
|
|
@ -160,7 +160,8 @@ public class GammaController {
|
|||
@PostMapping("addNuclide")
|
||||
@ApiOperation(value = "InteractiveTool页面增加核素信息接口", notes = "InteractiveTool页面增加核素信息接口")
|
||||
public Result addNuclide(@RequestBody NuclideInfo nuclideInfo, HttpServletRequest request) {
|
||||
return gammaService.addNuclide(nuclideInfo.getCurRow(), nuclideInfo.getNuclideName(), nuclideInfo.getFileName(), nuclideInfo.getList_identify(), request);
|
||||
return gammaService.addNuclide(nuclideInfo.getCurRow(), nuclideInfo.getNuclideName(), nuclideInfo.getFileName(),
|
||||
nuclideInfo.getList_identify(), nuclideInfo.getEnergyTolerance(), request);
|
||||
}
|
||||
|
||||
@PostMapping("deleteNuclide")
|
||||
|
|
|
@ -16,4 +16,6 @@ public class NuclideInfo implements Serializable {
|
|||
|
||||
private List<String> list_identify;
|
||||
|
||||
private Integer energyTolerance;
|
||||
|
||||
}
|
||||
|
|
|
@ -53,7 +53,8 @@ public interface IGammaService{
|
|||
|
||||
Result getSelPosNuclide(Integer sampleId, String fileName, int channel, HttpServletRequest request);
|
||||
|
||||
Result addNuclide(Integer curRow, String nuclideName, String fileName, List<String> list_identify, HttpServletRequest request);
|
||||
Result addNuclide(Integer curRow, String nuclideName, String fileName, List<String> list_identify, Integer energyTolerance,
|
||||
HttpServletRequest request);
|
||||
|
||||
Result deleteNuclide(Integer curRow, String nuclideName, String fileName, List<String> list_identify, HttpServletRequest request);
|
||||
|
||||
|
|
|
@ -1663,7 +1663,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
|
||||
@Override
|
||||
public Result addNuclide(Integer curRow, String nuclideName, String fileName, List<String> list_identify, HttpServletRequest request) {
|
||||
public Result addNuclide(Integer curRow, String nuclideName, String fileName, List<String> list_identify,
|
||||
Integer energyTolerance, HttpServletRequest request) {
|
||||
Result result = new Result();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String userName = JwtUtil.getUserNameByToken(request);
|
||||
|
@ -1708,7 +1709,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
t_idx++;
|
||||
}
|
||||
//重新计算核素的MDA值
|
||||
gammaFileUtil.CalcNuclideMDA(phd, it_line, nuclideName, vPeakIdx);
|
||||
gammaFileUtil.CalcNuclideMDA(phd, it_line, nuclideName, vPeakIdx, energyTolerance);
|
||||
map.put("identify", list_identify);
|
||||
//格式化核素表单内容
|
||||
List<PeakInfo> vPeak = gammaFileUtil.InitPeakTable(phd.getVPeak());
|
||||
|
|
Loading…
Reference in New Issue
Block a user