log-Manage功能修改

gamma功能计算被除数为0问题修改
计算台站半径范围内设备接口返回的核设施数据无法显示问题修改
This commit is contained in:
qiaoqinzheng 2023-10-30 09:01:11 +08:00
parent 89a3de3f0b
commit 039bc8f46e
6 changed files with 67 additions and 8 deletions

View File

@ -55,6 +55,10 @@ public class FTPUtil {
return this.encoding;
}
public String getFtpRootPath() {
return this.ftpRootPath;
}
/**
* 登录ftp
* @return

View File

@ -36,6 +36,7 @@ public class LogManageServiceImpl implements ILogManageService {
ftpClient.setControlEncoding("UTF-8");
ftpClient.setFileTransferMode(FTPClient.STREAM_TRANSFER_MODE);
//切换工作文件路径
workPath = ftpUtil.getFtpRootPath()+StringPool.SLASH+workPath;
ftpClient.changeWorkingDirectory(workPath);
List<FTPFile> ftpFiles = Arrays.asList(ftpClient.listDirectories());
if (CollectionUtils.isNotEmpty(ftpFiles)){

View File

@ -4476,7 +4476,10 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
}
String efficiency = NumberFormatUtil.numberFormat(String.valueOf(nuc.getEfficiency()));
String activity = NumberFormatUtil.numberFormat(String.valueOf(nuc.getActivity()));
String actErr = NumberFormatUtil.numberFormat(String.valueOf(nuc.getAct_err() / nuc.getActivity() * 100));
String actErr = "";
if (nuc.getActivity() > 0) {
actErr = NumberFormatUtil.numberFormat(String.valueOf(nuc.getAct_err() / nuc.getActivity() * 100));
}
String mda = NumberFormatUtil.numberFormat(String.valueOf(nuc.getMda()));
String conc = NumberFormatUtil.numberFormat(String.valueOf(nuc.getConcentration()));
String mdc = NumberFormatUtil.numberFormat(String.valueOf(nuc.getMdc()));
@ -4603,7 +4606,10 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
double activityValue = nuclideActMda.getActivity();
String activity = NumberFormatUtil.numberFormat(String.valueOf(activityValue));
nuclideActMdaDto.setActivity(activity);
String actErr = NumberFormatUtil.numberFormat(String.valueOf(actErrValue / activityValue * 100));
String actErr = "";
if (activityValue > 0) {
actErr = NumberFormatUtil.numberFormat(String.valueOf(actErrValue / activityValue * 100));
}
nuclideActMdaDto.setActErr(actErr);
String mda = NumberFormatUtil.numberFormat(String.valueOf(nuclideActMda.getMda()));
nuclideActMdaDto.setMda(mda);

View File

@ -251,16 +251,18 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
Point point = new Point();
point.setNuclearFacilityId(String.valueOf(facilityInfoValue.getFacilityId()));
point.setNuclearFacilityName(facilityInfoValue.getFacilityName());
String lon = "";
String lat = "";
if (StringUtils.isNotBlank(facilityInfoValue.getLongitude())){
String pointValue = PointUtil.calculate(facilityInfoValue.getLongitude());
// facilityInfoValue.setLatitude(pointValue);
point.setLat(pointValue);
lat = PointUtil.calculate(facilityInfoValue.getLongitude());
point.setLat(lat);
}
if (StringUtils.isNotBlank(facilityInfoValue.getLatitude())){
String pointValue = PointUtil.calculate(facilityInfoValue.getLatitude());
// facilityInfoValue.setLongitude(pointValue);
point.setLon(pointValue);
lon = PointUtil.calculate(facilityInfoValue.getLatitude());
point.setLon(lon);
}
facilityInfoValue.setLatitude(lat);
facilityInfoValue.setLongitude(lon);
nuclearPoints.add(point);
}
for (String stationId:stationIds) {

View File

@ -15,4 +15,6 @@ public interface GardsSampleDataWebMapper extends BaseMapper<GardsSampleDataWeb>
Page<GardsSampleDataWeb> findReviewedPage(String startDate, String endDate, List<Integer> stationIdList, Page<GardsSampleDataWeb> page);
Page<GardsSampleDataWeb> findParticulatePage(String dataType, String spectralQualifie, String startDate, String endDate, List<Integer> stationIdList, Page<GardsSampleDataWeb> page);
}

View File

@ -82,4 +82,48 @@
ORDER BY sam.ACQUISITION_START DESC
</select>
<select id="findParticulatePage" resultType="org.jeecg.modules.entity.GardsSampleDataWeb">
SELECT
SAMPLE_ID,
SITE_DET_CODE,
STATION_ID,
DETECTOR_ID,
INPUT_FILE_NAME,
SAMPLE_TYPE,
DATA_TYPE,
GEOMETRY,
SPECTRAL_QUALIFIE,
TRANSMIT_DTG,
COLLECT_START,
COLLECT_STOP,
ACQUISITION_START,
ACQUISITION_STOP,
ACQUISITION_REAL_SEC,
ACQUISITION_LIVE_SEC,
QUANTITY,
STATUS,
MODDATE
FROM
ORIGINAL.GARDS_SAMPLE_DATA
<where>
DATA_TYPE = '${dataType}'
<if test=" spectralQualifie != '' and spectralQualifie != null ">
AND SPECTRAL_QUALIFIE = '${spectralQualifie}'
AND COLLECT_START >= TO_DATE( '${startDate}', 'YYYY-MM-DD hh24:mi:ss' )
AND COLLECT_STOP &lt;= TO_DATE( '${endDate}', 'YYYY-MM-DD hh24:mi:ss' )
</if>
<if test=" spectralQualifie == '' or spectralQualifie == null ">
AND ACQUISITION_START >= TO_DATE( '${startDate}', 'YYYY-MM-DD hh24:mi:ss' )
AND ACQUISITION_STOP &lt;= TO_DATE( '${endDate}', 'YYYY-MM-DD hh24:mi:ss' )
</if>
<if test="stationIdList.size>0 and stationIdList != null">
AND STATION_ID in
<foreach collection="stationIdList" item="stationId" open="(" close=")" separator=",">
${stationId}
</foreach>
</if>
</where>
ORDER BY ACQUISITION_START DESC
</select>
</mapper>