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