|
@@ -7,16 +7,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getProcessParamInfoPage" resultType="com.lutao.cloud.oil.pojo.vo.ProcessParametersTagVO">
|
|
<select id="getProcessParamInfoPage" resultType="com.lutao.cloud.oil.pojo.vo.ProcessParametersTagVO">
|
|
|
- SELECT pi.platform_name AS platformName,
|
|
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ DISTINCT ppt.tag_code,
|
|
|
|
|
+ pi.platform_name AS platformName,
|
|
|
pi.oil_gas_name AS oilGasName,
|
|
pi.oil_gas_name AS oilGasName,
|
|
|
pi.operating_company AS operatingCompany,
|
|
pi.operating_company AS operatingCompany,
|
|
|
ai.app_name AS appName,
|
|
ai.app_name AS appName,
|
|
|
ppt.tag_type AS tagType,
|
|
ppt.tag_type AS tagType,
|
|
|
ppt.tag_name AS tagName,
|
|
ppt.tag_name AS tagName,
|
|
|
- CONCAT(CONCAT(CONCAT( threshold_lo, '~', threshold_up ),'(',CONCAT( threshold_los, '~', threshold_ups )),')') AS upperLimit,
|
|
|
|
|
|
|
+ CONCAT(CONCAT(CONCAT( threshold_lo, '~', threshold_up ),'(',CONCAT( threshold_los, '~', threshold_ups )),')') AS
|
|
|
|
|
+ upperLimit,
|
|
|
CONCAT(ppt.threshold_los, '~', ppt.threshold_ups) AS upperUpperLimit,
|
|
CONCAT(ppt.threshold_los, '~', ppt.threshold_ups) AS upperUpperLimit,
|
|
|
ppt.unit,
|
|
ppt.unit,
|
|
|
- ppt.tag_code,
|
|
|
|
|
|
|
+
|
|
|
ROUND(pd.rt_value, 2) AS rtValue,
|
|
ROUND(pd.rt_value, 2) AS rtValue,
|
|
|
ppt.status
|
|
ppt.status
|
|
|
FROM process_parameters_tag ppt
|
|
FROM process_parameters_tag ppt
|
|
@@ -26,7 +29,7 @@
|
|
|
<where>
|
|
<where>
|
|
|
pi.delete_flag = '0'
|
|
pi.delete_flag = '0'
|
|
|
<if test="param.platformId != null and param.platformId != ''">
|
|
<if test="param.platformId != null and param.platformId != ''">
|
|
|
- and ppt.platform_code = #{param.platformId}
|
|
|
|
|
|
|
+ and ppt.platform_code = #{param.platformId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="param.appId != null and param.appId != ''">
|
|
<if test="param.appId != null and param.appId != ''">
|
|
|
and ppt.app_id = #{param.appId}
|
|
and ppt.app_id = #{param.appId}
|
|
@@ -57,4 +60,26 @@
|
|
|
</where>
|
|
</where>
|
|
|
ORDER BY rtValue DESC, appName,platformName,oilGasName,operatingCompany,ppt.status ASC
|
|
ORDER BY rtValue DESC, appName,platformName,oilGasName,operatingCompany,ppt.status ASC
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="earlyWarningMonitoringPointStatistic" resultType="com.lutao.cloud.oil.pojo.vo.MonitorPointVO">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ COUNT(*) AS pointNum,
|
|
|
|
|
+ ai.app_name AS appName
|
|
|
|
|
+ FROM
|
|
|
|
|
+ process_parameters_tag ppt
|
|
|
|
|
+ LEFT JOIN app_info ai ON ai.id = ppt.app_id
|
|
|
|
|
+ LEFT JOIN platform_info pi ON ppt.platform_code = pi.platform_code
|
|
|
|
|
+ <where>
|
|
|
|
|
+ pi.delete_flag = '0'
|
|
|
|
|
+ AND ppt.tag_type IN ( 2, 3, 5 )
|
|
|
|
|
+ AND ppt.STATUS = '0'
|
|
|
|
|
+ <if test="param.platformId != null and param.platformId != ''">
|
|
|
|
|
+ and ppt.platform_code = #{param.platformId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="param.appId != null and param.appId != ''">
|
|
|
|
|
+ and ppt.app_id = #{param.appId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ GROUP BY ai.app_name
|
|
|
|
|
+
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|