gamma功能查看nuclide Review接口数字部分保留6位有效数字
gamma功能查看radionuclideActivity接口数字部分保留6位有效数字并根据核素名称排序 beta功能fitting返回数据增加部分内容
This commit is contained in:
parent
96df7732d0
commit
9984f0f022
|
@ -40,8 +40,10 @@ import javax.xml.parsers.ParserConfigurationException;
|
|||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
|
@ -3610,29 +3612,36 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
|||
halflife /= 3600;
|
||||
units = 'H';
|
||||
}
|
||||
tableNuclideActivity.setHalfLife(halflife+StringPool.SPACE+units);
|
||||
tableNuclideActivity.setEnergy(nuc.getVEnergy().get(nuc.getCalculateIdx()).toString());
|
||||
tableNuclideActivity.setYield(String.valueOf(nuc.getVYield().get(nuc.getCalculateIdx())*100));
|
||||
tableNuclideActivity.setHalfLife(NumberFormatUtil.numberFormat(String.valueOf(halflife))+StringPool.SPACE+units);
|
||||
tableNuclideActivity.setEnergy(NumberFormatUtil.numberFormat(String.valueOf(nuc.getVEnergy().get(nuc.getCalculateIdx()))));
|
||||
tableNuclideActivity.setYield(NumberFormatUtil.numberFormat(String.valueOf(nuc.getVYield().get(nuc.getCalculateIdx())*100)));
|
||||
|
||||
String str_effi = (nuc.getEfficiency() <= 0 ? "null" : String.valueOf(nuc.getEfficiency()));
|
||||
String str_effi = (nuc.getEfficiency() <= 0 ? "null" : NumberFormatUtil.numberFormat(String.valueOf(nuc.getEfficiency())));
|
||||
tableNuclideActivity.setEfficiency(str_effi);
|
||||
|
||||
String str_act = (nuc.getActivity() <= 0 ? "null" : String.valueOf(nuc.getActivity()));
|
||||
String str_act = (nuc.getActivity() <= 0 ? "null" : NumberFormatUtil.numberFormat(String.valueOf(nuc.getActivity())));
|
||||
tableNuclideActivity.setActivity(str_act);
|
||||
|
||||
String str_act_err = (nuc.getActivity() <= 0 ? "null" : String.valueOf(nuc.getAct_err() / nuc.getActivity() * 100));
|
||||
String str_act_err = (nuc.getActivity() <= 0 ? "null" : NumberFormatUtil.numberFormat(String.valueOf(nuc.getAct_err() / nuc.getActivity() * 100)));
|
||||
tableNuclideActivity.setActErr(str_act_err);
|
||||
|
||||
String str_mda = (nuc.getMda() <= 0 ? "null" : String.valueOf(nuc.getMda()));
|
||||
String str_mda = (nuc.getMda() <= 0 ? "null" : NumberFormatUtil.numberFormat(String.valueOf(nuc.getMda())));
|
||||
tableNuclideActivity.setMda(str_mda);
|
||||
|
||||
String str_con = (nuc.getConcentration() <= 0 ? "null" : String.valueOf(nuc.getConcentration()));
|
||||
if (nuc.getConcentration() > 1000000) {
|
||||
DecimalFormat decimalFormat = new DecimalFormat("0.###E0");
|
||||
nuc.setConcentration(Double.valueOf(decimalFormat.format(nuc.getConcentration())));
|
||||
}
|
||||
String str_con = (nuc.getConcentration() <= 0 ? "null" : NumberFormatUtil.numberFormat(String.valueOf(nuc.getConcentration())));
|
||||
tableNuclideActivity.setConc(str_con);
|
||||
|
||||
String str_mdc = (nuc.getMdc() <= 0 ? "null" : String.valueOf(nuc.getMdc()));
|
||||
if (nuc.getMdc() > 1000000) {
|
||||
DecimalFormat decimalFormat = new DecimalFormat("0.###E0");
|
||||
nuc.setConcentration(Double.valueOf(decimalFormat.format(nuc.getMdc())));
|
||||
}
|
||||
String str_mdc = (nuc.getMdc() <= 0 ? "null" : NumberFormatUtil.numberFormat(String.valueOf(nuc.getMdc())));
|
||||
tableNuclideActivity.setMdc(str_mdc);
|
||||
nuclideActivityList.add(tableNuclideActivity);
|
||||
}
|
||||
nuclideActivityList = nuclideActivityList.stream().sorted(Comparator.comparing(TableNuclideActivity::getNuclide)).collect(Collectors.toList());
|
||||
map.put("table", nuclideActivityList);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -1841,6 +1841,12 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
long span = phd.getSpec().getG_energy_span();
|
||||
List<GardsNuclLinesLib> nuclideTableList = spectrumAnalysisMapper.getNuclideTable(name, span);
|
||||
if (CollectionUtils.isNotEmpty(nuclideTableList)) {
|
||||
nuclideTableList.stream().forEach(item-> {
|
||||
item.setEnergy(Double.valueOf(NumberFormatUtil.numberFormat(String.valueOf(item.getEnergy()))));
|
||||
item.setEnergyUncert(Double.valueOf(NumberFormatUtil.numberFormat(String.valueOf(item.getEnergyUncert()))));
|
||||
item.setYield(Double.valueOf(NumberFormatUtil.numberFormat(String.valueOf(item.getYield()))));
|
||||
item.setYieldUncert(Double.valueOf(NumberFormatUtil.numberFormat(String.valueOf(item.getYieldUncert()))));
|
||||
});
|
||||
map.put("table", nuclideTableList);
|
||||
gammaFileUtil.InitChart(nuclideTableList, phd, map, colorMap);
|
||||
}
|
||||
|
@ -3521,6 +3527,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
if (StringUtils.isNotBlank(phd.getOriTotalCmt())) {
|
||||
String temp = phd.getOriTotalCmt().trim();
|
||||
if (StringUtils.isNotBlank(temp)) {
|
||||
comments += "Comments From Original Spectrum:\n" + temp;
|
||||
|
@ -3534,6 +3541,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(comments);
|
||||
return result;
|
||||
|
|
|
@ -2840,6 +2840,23 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
newLineSeries.add(seriseData);
|
||||
}
|
||||
map.put("newLineSeries", newLineSeries);
|
||||
List<SeriseData> seriseDataList = new LinkedList<>();
|
||||
List<TableWidget> tableWidgets = new LinkedList<>();
|
||||
for (int i=0; i<tempPoints.size(); i++) {
|
||||
//表单数据信息
|
||||
TableWidget tableWidget = new TableWidget();
|
||||
tableWidget.setRowCount(i+1);
|
||||
tableWidget.setChannel(tempPoints.get(i).getX());
|
||||
tableWidget.setEnergy(tempPoints.get(i).getY());
|
||||
tableWidgets.add(tableWidget);
|
||||
//折线图位置信息
|
||||
SeriseData seriseData = new SeriseData();
|
||||
seriseData.setX(tempPoints.get(i).getX());
|
||||
seriseData.setY(tempPoints.get(i).getY());
|
||||
seriseDataList.add(seriseData);
|
||||
}
|
||||
map.put("tableWidgets", tableWidgets);
|
||||
map.put("newScatterSeriesData", seriseDataList);
|
||||
//E to C
|
||||
List<Double> fittingParaToUi = EnergySpectrumHandler.GetFileFittingPara(ys, xs);
|
||||
List<String> fittingParaToUiStr = new LinkedList<>();
|
||||
|
@ -2862,6 +2879,7 @@ public class SpectrumAnalysisServiceImpl implements ISpectrumAnalysisService {
|
|||
fittingParaStr.add(String.valueOf(paramA));
|
||||
fittingParaStr.add(String.valueOf(paramB));
|
||||
fittingParaStr.add(String.valueOf(paramC));
|
||||
map.put("CToE", fittingParaStr);
|
||||
List<Double> xs = new LinkedList<>();
|
||||
for (int i=0; i<tempPoints.size(); i++){
|
||||
xs.add(tempPoints.get(i).getX());
|
||||
|
|
Loading…
Reference in New Issue
Block a user