fix:删除多余内容
This commit is contained in:
parent
812c734d1b
commit
f122544455
|
@ -1,60 +0,0 @@
|
|||
package org.jeecg.modules.base.dto;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.util.NumUtil;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
@Data
|
||||
public class MdcDto {
|
||||
|
||||
private String nuclideName;
|
||||
|
||||
private Double halflife;
|
||||
|
||||
private Double mdc;
|
||||
|
||||
private Double mda;
|
||||
|
||||
private String halfLifeStr;
|
||||
|
||||
private String mdcStr;
|
||||
|
||||
private String mdaStr;
|
||||
|
||||
public MdcDto(){
|
||||
halfLifeStr = "";
|
||||
mdcStr = "";
|
||||
mdaStr = "";
|
||||
}
|
||||
|
||||
public void format(){
|
||||
if (ObjectUtil.isNotNull(halflife))
|
||||
halfLifeStr = halfLifeStr(halflife);
|
||||
if (ObjectUtil.isNotNull(mdc))
|
||||
mdcStr = NumUtil.keep6ScienceStr(mdc);
|
||||
if (ObjectUtil.isNotNull(mda))
|
||||
mdaStr = NumUtil.keep6ScienceStr(mda);
|
||||
}
|
||||
|
||||
private String halfLifeStr(Double halflife){
|
||||
String units = "D";
|
||||
if (halflife >= 1000) {
|
||||
halflife = halflife / 365.25;
|
||||
units = "A";
|
||||
} else if (halflife < 0.1 && halflife >= 1.0 / 1440.0) {
|
||||
halflife = halflife * 1440.0;
|
||||
units = "M";
|
||||
} else if (halflife <= 1.0 / 1440.0 && halflife > 0.0) {
|
||||
halflife = halflife * 86400.0;
|
||||
units = "S";
|
||||
}
|
||||
|
||||
if (halflife < 1000)
|
||||
return String.format("%.3f", halflife) + units;
|
||||
NumberFormat numberFormat = new DecimalFormat("0.###E0");
|
||||
return numberFormat.format(halflife) + units;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.base.dto.MdcDto;
|
||||
import org.jeecg.modules.base.entity.rnman.GardsMDC;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GardsMDCSpectrumMapper extends BaseMapper<GardsMDC> {
|
||||
|
||||
List<MdcDto> mdcDtos(Integer idAnalysis);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.mapper.GardsMDCSpectrumMapper">
|
||||
<select id="mdcDtos" resultType="org.jeecg.modules.base.dto.MdcDto">
|
||||
SELECT
|
||||
mdc.NUCLIDENAME AS nuclideName,
|
||||
mdc.MDC,
|
||||
lib.HALFLIFE AS halfLife
|
||||
FROM
|
||||
RNMAN.GARDS_MDC mdc
|
||||
INNER JOIN CONFIGURATION.GARDS_NUCL_LIB lib ON mdc.NUCLIDENAME = lib.NAME
|
||||
WHERE
|
||||
mdc.IDANALYSIS = #{idAnalysis}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,7 +1,6 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.base.dto.MdcDto;
|
||||
import org.jeecg.modules.base.entity.rnman.GardsMDC;
|
||||
import org.jeecg.modules.entity.vo.PHDFile;
|
||||
|
||||
|
@ -10,6 +9,4 @@ import java.util.List;
|
|||
public interface IGardsMDCSpectrumService extends IService<GardsMDC> {
|
||||
|
||||
int saveMDCGamma(PHDFile phd, String idAnalysis);
|
||||
|
||||
List<MdcDto> mdcDtos(Integer idAnalysis);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ import org.jeecg.common.util.*;
|
|||
import org.jeecg.modules.base.abstracts.AbstractLogOrReport;
|
||||
import org.jeecg.modules.base.bizVo.GammaRLR;
|
||||
import org.jeecg.modules.base.dto.Info;
|
||||
import org.jeecg.modules.base.dto.MdcDto;
|
||||
import org.jeecg.modules.base.dto.NuclideActMdaDto;
|
||||
import org.jeecg.modules.base.dto.PeakInfoDto;
|
||||
import org.jeecg.modules.base.entity.configuration.GardsNuclLib;
|
||||
|
@ -4029,11 +4028,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
result.error500("Please select the parse file first!");
|
||||
return result;
|
||||
}
|
||||
List<MdcDto> mdcDtos = new ArrayList<>();
|
||||
String idAnalysis = phd.getId_analysis();
|
||||
Integer analysisId = StrUtil.isNotBlank(idAnalysis) ? Integer.valueOf(idAnalysis) : null;
|
||||
if (ObjectUtil.isNotNull(analysisId))
|
||||
mdcDtos = mdcSpectrumService.mdcDtos(analysisId);
|
||||
//生成对应报告内容
|
||||
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false, "log");
|
||||
result.setSuccess(true);
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.jeecg.modules.service.impl;
|
|||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.base.dto.MdcDto;
|
||||
import org.jeecg.modules.base.entity.rnman.GardsMDC;
|
||||
import org.jeecg.modules.entity.vo.CalMDCInfo;
|
||||
import org.jeecg.modules.entity.vo.PHDFile;
|
||||
|
@ -47,9 +46,4 @@ public class GardsMDCSpectrumServiceImpl extends ServiceImpl<GardsMDCSpectrumMap
|
|||
}
|
||||
return mdcList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MdcDto> mdcDtos(Integer idAnalysis) {
|
||||
return baseMapper.mdcDtos(idAnalysis);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user