修改核素活度浓度对比分析SQL
This commit is contained in:
parent
12ae5b0e99
commit
dd7f721dc0
|
|
@ -119,9 +119,9 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
||||||
List<SampleLevelData> getRnManNuclideTimeSeriesAnalysis(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<SampleLevelData> getRnManNuclideTimeSeriesAnalysis(String station, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 精确查询(单个站点 + 单个核素)
|
* 精确查询(单个站点 + 单个核素)
|
||||||
|
*
|
||||||
* @param stationId 站点ID (必填)
|
* @param stationId 站点ID (必填)
|
||||||
* @param nuclideName 核素名称 (必填)
|
* @param nuclideName 核素名称 (必填)
|
||||||
* @return 匹配的记录列表
|
* @return 匹配的记录列表
|
||||||
|
|
@ -136,6 +136,7 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多站点 + 多核素查询
|
* 多站点 + 多核素查询
|
||||||
|
*
|
||||||
* @param stationIds 站点ID集合 (非空)
|
* @param stationIds 站点ID集合 (非空)
|
||||||
* @param nuclideNames 核素名称集合 (非空)
|
* @param nuclideNames 核素名称集合 (非空)
|
||||||
* @return 匹配的记录列表
|
* @return 匹配的记录列表
|
||||||
|
|
@ -150,6 +151,7 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多站点 + 单核素查询
|
* 多站点 + 单核素查询
|
||||||
|
*
|
||||||
* @param stationIds 站点ID集合 (非空)
|
* @param stationIds 站点ID集合 (非空)
|
||||||
* @param nuclideName 单个核素名称 (必填)
|
* @param nuclideName 单个核素名称 (必填)
|
||||||
* @return 匹配的记录列表
|
* @return 匹配的记录列表
|
||||||
|
|
@ -164,6 +166,7 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单站点 + 多核素查询
|
* 单站点 + 多核素查询
|
||||||
|
*
|
||||||
* @param stationId 单个站点ID (必填)
|
* @param stationId 单个站点ID (必填)
|
||||||
* @param nuclideNames 核素名称集合 (非空)
|
* @param nuclideNames 核素名称集合 (非空)
|
||||||
* @return 匹配的记录列表
|
* @return 匹配的记录列表
|
||||||
|
|
@ -179,6 +182,7 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态条件查询(所有参数均可为空)
|
* 动态条件查询(所有参数均可为空)
|
||||||
|
*
|
||||||
* @param stationIds 站点ID集合 (可选)
|
* @param stationIds 站点ID集合 (可选)
|
||||||
* @param nuclideNames 核素名称集合 (可选)
|
* @param nuclideNames 核素名称集合 (可选)
|
||||||
* @param startTime 开始时间 (可选)
|
* @param startTime 开始时间 (可选)
|
||||||
|
|
@ -194,22 +198,13 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
|
|
||||||
//region 核素活度浓度对比分析
|
//region 核素活度浓度对比分析
|
||||||
List<NuclideActConcIntvl> getRnAutoAnalyzeNuclideActivityConc(String sampleType, String nuclideName, @Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<NuclideActConcIntvl> getRnAutoAnalyzeNuclideActivityConc(@Param("sampleType")String sampleType, @Param("nuclideName")String nuclideName, @Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
List<NuclideActConcIntvl> getRnManAnalyzeNuclideActivityConc(String sampleType, String nuclideName, @Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<NuclideActConcIntvl> getRnManAnalyzeNuclideActivityConc(@Param("sampleType")String sampleType, @Param("nuclideName")String nuclideName, @Param("stationIds") Integer[] stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region 样品监测结果
|
//region 样品监测结果
|
||||||
|
|
@ -218,8 +213,9 @@ public interface GardsSampleStatAnalysisMapper extends BaseMapper<GardsSampleDat
|
||||||
List<StationInfoData> getRnManSampleResult(String sampleType, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<StationInfoData> getRnManSampleResult(String sampleType, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
|
||||||
|
//endregion
|
||||||
|
//region 查询台站信息
|
||||||
|
List<GardsStations> findStationListByMenuName();
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -398,78 +398,114 @@
|
||||||
<!-- 核素活度浓度对比分析-->
|
<!-- 核素活度浓度对比分析-->
|
||||||
|
|
||||||
<select id="getRnAutoAnalyzeNuclideActivityConc" resultType="org.jeecg.entity.NuclideActConcIntvl">
|
<select id="getRnAutoAnalyzeNuclideActivityConc" resultType="org.jeecg.entity.NuclideActConcIntvl">
|
||||||
|
<if test='sampleType == "P"'>
|
||||||
SELECT
|
SELECT
|
||||||
t1.SAMPLE_ID AS sampleId,
|
t1.SAMPLE_ID AS sampleId,
|
||||||
t1.COLLECT_STOP AS collectStop,
|
t1.COLLECT_STOP AS collectStop,
|
||||||
t1.SAMPLE_TYPE AS sampleType,
|
t1.SAMPLE_TYPE AS sampleType,
|
||||||
t1.STATION_ID AS stationId,
|
t1.STATION_ID AS stationId,
|
||||||
t1.STATUS AS status,
|
t1.STATUS AS status,
|
||||||
CASE
|
TO_NUMBER(REGEXP_REPLACE(t2.MDC, '[^0-9.Ee-]', '')) AS MDC,
|
||||||
WHEN t1.SAMPLE_TYPE = 'P' THEN
|
t2.NUCLIDENAME AS NUCLIDE_NAME,
|
||||||
t2.NUCLIDENAME
|
TO_NUMBER(REGEXP_REPLACE(t2.CONCENTRATION, '[^0-9.Ee-]', '')) AS conc
|
||||||
WHEN t1.SAMPLE_TYPE = 'B' THEN
|
|
||||||
t3.NUCLIDE_NAME
|
|
||||||
END AS NUCLIDE_NAME,
|
|
||||||
CASE
|
|
||||||
WHEN t1.SAMPLE_TYPE = 'P' THEN
|
|
||||||
TO_NUMBER(REGEXP_REPLACE(t2.CONCENTRATION, '[^0-9.Ee-]', ''))
|
|
||||||
WHEN t1.SAMPLE_TYPE = 'B' THEN
|
|
||||||
t3.CONC
|
|
||||||
END AS conc
|
|
||||||
FROM
|
FROM
|
||||||
ORIGINAL.GARDS_SAMPLE_DATA t1
|
ORIGINAL.GARDS_SAMPLE_DATA t1
|
||||||
LEFT JOIN RNAUTO.GARDS_NUCL_IDED t2 ON t1.SAMPLE_TYPE = 'P'
|
LEFT JOIN RNAUTO.GARDS_NUCL_IDED t2 ON
|
||||||
AND t1.SAMPLE_ID = t2.SAMPLE_ID
|
t1.SAMPLE_ID = t2.SAMPLE_ID
|
||||||
LEFT JOIN RNAUTO.GARDS_XE_RESULTS t3 ON t1.SAMPLE_TYPE = 'B'
|
|
||||||
AND t1.SAMPLE_ID = t3.SAMPLE_ID
|
|
||||||
<where>
|
<where>
|
||||||
t1.STATION_ID IN
|
t1.STATION_ID IN
|
||||||
<foreach item="stationId" collection="stationIds" open="(" close=")" separator=",">
|
<foreach item="stationId" collection="stationIds" open="(" close=")" separator=",">
|
||||||
'${stationId}'
|
'${stationId}'
|
||||||
</foreach>
|
</foreach>
|
||||||
AND t1.SAMPLE_TYPE=#{sampleType}
|
AND t1.SAMPLE_TYPE=#{sampleType}
|
||||||
|
AND t2.NUCLIDENAME = #{nuclideName}
|
||||||
AND t1.COLLECT_STOP BETWEEN TO_DATE(#{ startTime }, 'YYYY-MM-DD HH24:MI:SS')
|
AND t1.COLLECT_STOP BETWEEN TO_DATE(#{ startTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
AND TO_DATE(#{ endTime }, 'YYYY-MM-DD HH24:MI:SS')
|
AND TO_DATE(#{ endTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
</where>
|
</where>
|
||||||
|
</if>
|
||||||
|
<if test='sampleType == "B"'>
|
||||||
|
SELECT
|
||||||
|
t1.SAMPLE_ID AS sampleId,
|
||||||
|
t1.COLLECT_STOP AS collectStop,
|
||||||
|
t1.SAMPLE_TYPE AS sampleType,
|
||||||
|
t1.STATION_ID AS stationId,
|
||||||
|
t1.STATUS AS status,
|
||||||
|
t3.MDC AS MDC,
|
||||||
|
t3.NUCLIDE_NAME AS NUCLIDE_NAME,
|
||||||
|
t3.CONC AS conc
|
||||||
|
FROM
|
||||||
|
ORIGINAL.GARDS_SAMPLE_DATA t1
|
||||||
|
LEFT JOIN RNAUTO.GARDS_XE_RESULTS t3 ON
|
||||||
|
t1.SAMPLE_ID = t3.SAMPLE_ID
|
||||||
|
<where>
|
||||||
|
t1.STATION_ID IN
|
||||||
|
<foreach item="stationId" collection="stationIds" open="(" close=")" separator=",">
|
||||||
|
'${stationId}'
|
||||||
|
</foreach>
|
||||||
|
AND t1.SAMPLE_TYPE=#{sampleType}
|
||||||
|
AND t3.NUCLIDE_NAME = #{nuclideName}
|
||||||
|
AND t1.COLLECT_STOP BETWEEN TO_DATE(#{ startTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
|
AND TO_DATE(#{ endTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
|
</where>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="getRnManAnalyzeNuclideActivityConc" resultType="org.jeecg.entity.NuclideActConcIntvl">
|
<select id="getRnManAnalyzeNuclideActivityConc" resultType="org.jeecg.entity.NuclideActConcIntvl">
|
||||||
|
|
||||||
|
<if test='sampleType == "P"'>
|
||||||
SELECT
|
SELECT
|
||||||
t1.SAMPLE_ID AS sampleId,
|
t1.SAMPLE_ID AS sampleId,
|
||||||
t1.COLLECT_STOP AS collectStop,
|
t1.COLLECT_STOP AS collectStop,
|
||||||
t1.SAMPLE_TYPE AS sampleType,
|
t1.SAMPLE_TYPE AS sampleType,
|
||||||
t1.STATION_ID AS stationId,
|
t1.STATION_ID AS stationId,
|
||||||
t1.STATUS AS status,
|
t1.STATUS AS status,
|
||||||
CASE
|
TO_NUMBER(REGEXP_REPLACE(t2.MDC, '[^0-9.Ee-]', '')) AS MDC,
|
||||||
WHEN t1.SAMPLE_TYPE = 'P' THEN
|
t2.NUCLIDENAME AS NUCLIDE_NAME,
|
||||||
t2.NUCLIDENAME
|
TO_NUMBER(REGEXP_REPLACE(t2.CONCENTRATION, '[^0-9.Ee-]', '')) AS conc
|
||||||
WHEN t1.SAMPLE_TYPE = 'B' THEN
|
|
||||||
t3.NUCLIDE_NAME
|
|
||||||
END AS NUCLIDE_NAME,
|
|
||||||
CASE
|
|
||||||
WHEN t1.SAMPLE_TYPE = 'P' THEN
|
|
||||||
TO_NUMBER(REGEXP_REPLACE(t2.CONCENTRATION, '[^0-9.Ee-]', ''))
|
|
||||||
WHEN t1.SAMPLE_TYPE = 'B' THEN
|
|
||||||
t3.CONC
|
|
||||||
END AS conc
|
|
||||||
FROM
|
FROM
|
||||||
ORIGINAL.GARDS_SAMPLE_DATA t1
|
ORIGINAL.GARDS_SAMPLE_DATA t1
|
||||||
LEFT JOIN RNMAN.GARDS_NUCL_IDED t2 ON t1.SAMPLE_TYPE = 'P'
|
LEFT JOIN RNMAN.GARDS_NUCL_IDED t2 ON
|
||||||
AND t1.SAMPLE_ID = t2.SAMPLE_ID
|
t1.SAMPLE_ID = t2.SAMPLE_ID
|
||||||
LEFT JOIN RNMAN.GARDS_XE_RESULTS t3 ON t1.SAMPLE_TYPE = 'B'
|
|
||||||
AND t1.SAMPLE_ID = t3.SAMPLE_ID
|
|
||||||
<where>
|
<where>
|
||||||
t1.STATION_ID IN
|
t1.STATION_ID IN
|
||||||
<foreach item="stationId" collection="stationIds" open="(" close=")" separator=",">
|
<foreach item="stationId" collection="stationIds" open="(" close=")" separator=",">
|
||||||
'${stationId}'
|
'${stationId}'
|
||||||
</foreach>
|
</foreach>
|
||||||
AND t1.SAMPLE_TYPE=#{sampleType}
|
AND t1.SAMPLE_TYPE=#{sampleType}
|
||||||
|
AND t2.NUCLIDENAME = #{nuclideName}
|
||||||
AND t1.COLLECT_STOP BETWEEN TO_DATE(#{ startTime }, 'YYYY-MM-DD HH24:MI:SS')
|
AND t1.COLLECT_STOP BETWEEN TO_DATE(#{ startTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
AND TO_DATE(#{ endTime }, 'YYYY-MM-DD HH24:MI:SS')
|
AND TO_DATE(#{ endTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
</where>
|
</where>
|
||||||
|
</if>
|
||||||
|
<if test='sampleType == "B"'>
|
||||||
|
SELECT
|
||||||
|
t1.SAMPLE_ID AS sampleId,
|
||||||
|
t1.COLLECT_STOP AS collectStop,
|
||||||
|
t1.SAMPLE_TYPE AS sampleType,
|
||||||
|
t1.STATION_ID AS stationId,
|
||||||
|
t1.STATUS AS status,
|
||||||
|
t3.MDC AS MDC,
|
||||||
|
t3.NUCLIDE_NAME AS NUCLIDE_NAME,
|
||||||
|
t3.CONC AS conc
|
||||||
|
FROM
|
||||||
|
ORIGINAL.GARDS_SAMPLE_DATA t1
|
||||||
|
LEFT JOIN RNMAN.GARDS_XE_RESULTS t3 ON
|
||||||
|
t1.SAMPLE_ID = t3.SAMPLE_ID
|
||||||
|
<where>
|
||||||
|
t1.STATION_ID IN
|
||||||
|
<foreach item="stationId" collection="stationIds" open="(" close=")" separator=",">
|
||||||
|
'${stationId}'
|
||||||
|
</foreach>
|
||||||
|
AND t1.SAMPLE_TYPE=#{sampleType}
|
||||||
|
AND t3.NUCLIDE_NAME = #{nuclideName}
|
||||||
|
AND t1.COLLECT_STOP BETWEEN TO_DATE(#{ startTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
|
AND TO_DATE(#{ endTime }, 'YYYY-MM-DD HH24:MI:SS')
|
||||||
|
</where>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -533,6 +569,4 @@
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user