策略代码提交

This commit is contained in:
wurui
2023-03-21 16:28:46 +08:00
parent 883524e182
commit f36bb0dc4d
12 changed files with 138 additions and 72 deletions

View File

@@ -37,6 +37,15 @@ public interface ThsWarnStrategyMapper extends BaseMapper<ThsWarnStrategy> {
*/
List<String> getStrategyDetail(@Param("id") String id);
/***
* 获取监测点标签id
* @author wr
* @date 2023-03-10 13:46
* @param id
* @return List<String>
*/
List<String> getMonitorTagDetail(@Param("id") String id);
/**
* 查询所有部门的策略列表
*

View File

@@ -21,7 +21,11 @@
<result column="Name" property="name" />
<result column="Grade" property="grade" />
<result column="Operation" property="operation" />
<result column="monitorTag" property="monitorTag" />
<collection
property="monitorTag"
column="{id = id}"
select="com.njcn.process.mapper.ThsWarnStrategyMapper.getMonitorTagDetail">
</collection>
<collection
property="indicatorTypes"
column="{id = id}"
@@ -33,12 +37,9 @@
ts.Id AS id,
ts.NAME AS NAME,
ts.Grade AS grade,
ts.Operation AS operation,
ta.Ass_Id AS monitorTag
ts.Operation AS operation
FROM
ths_warn_strategy ts
INNER JOIN ths_warn_strategy_ass ta ON ts.Id = ta.Warn_Id
AND ta.Type = 0
WHERE
id = #{id}
</select>
@@ -67,5 +68,13 @@
tws.State = 1 and tws.Grade in(0,2)
</select>
<select id="getMonitorTagDetail" resultType="java.lang.String">
SELECT
Ass_Id
FROM
ths_warn_strategy_ass ts
WHERE
Warn_Id = #{id} and ts.Type=0
</select>
</mapper>