预警单/告警单业务提交
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.njcn.process.pojo.po.ThsDeptAlarm;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-03-10
|
||||
*/
|
||||
public interface ThsDeptAlarmMapper extends BaseMapper<ThsDeptAlarm> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.njcn.process.pojo.po.ThsWarnStrategyAss;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-03-10
|
||||
*/
|
||||
public interface ThsWarnStrategyAssMapper extends BaseMapper<ThsWarnStrategyAss> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.njcn.process.pojo.param.StrategyParam;
|
||||
import com.njcn.process.pojo.po.ThsWarnStrategy;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-03-10
|
||||
*/
|
||||
public interface ThsWarnStrategyMapper extends BaseMapper<ThsWarnStrategy> {
|
||||
|
||||
/***
|
||||
* 预警单/告警单修改详细查询
|
||||
* @author wr
|
||||
* @date 2023-03-10 13:31
|
||||
* @param id
|
||||
* @return StrategyUpdateParam
|
||||
*/
|
||||
StrategyParam.StrategyUpdateParam selectUpdateStrategy(@Param("id") String id);
|
||||
|
||||
|
||||
/***
|
||||
* 获取指标明细id
|
||||
* @author wr
|
||||
* @date 2023-03-10 13:46
|
||||
* @param id
|
||||
* @return List<String>
|
||||
*/
|
||||
List<String> getStrategyDetail(@Param("id") String id);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.ThsDeptAlarmMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.ThsDeptAlarm">
|
||||
<id column="Dept_Id" property="deptId" />
|
||||
<result column="type" property="type" />
|
||||
<result column="Alarm_Id" property="alarmId" />
|
||||
<result column="Monitor_Id" property="monitorId" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.ThsWarnStrategyAssMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.ThsWarnStrategyAss">
|
||||
<id column="Warn_Id" property="warnId" />
|
||||
<result column="Ass_Id" property="assId" />
|
||||
<result column="Type" property="type" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.process.mapper.ThsWarnStrategyMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njcn.process.pojo.po.ThsWarnStrategy">
|
||||
<id column="Id" property="id" />
|
||||
<result column="Create_Time" property="createTime" />
|
||||
<result column="Update_TIme" property="updateTime" />
|
||||
<result column="Name" property="name" />
|
||||
<result column="Grade" property="grade" />
|
||||
<result column="Operation" property="operation" />
|
||||
<result column="type" property="type" />
|
||||
<result column="State" property="state" />
|
||||
<result column="Create_By" property="createBy" />
|
||||
<result column="Update_By" property="updateBy" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="StrategyResultMap" type="com.njcn.process.pojo.param.StrategyParam$StrategyUpdateParam">
|
||||
<id column="Id" property="id" />
|
||||
<result column="Name" property="name" />
|
||||
<result column="Grade" property="grade" />
|
||||
<result column="Operation" property="operation" />
|
||||
<result column="monitorTag" property="monitorTag" />
|
||||
<collection
|
||||
property="indicatorTypes"
|
||||
column="{id = id}"
|
||||
select="com.njcn.process.mapper.ThsWarnStrategyMapper.getStrategyDetail">
|
||||
</collection>
|
||||
</resultMap>
|
||||
<select id="selectUpdateStrategy" resultMap="StrategyResultMap">
|
||||
SELECT
|
||||
ts.Id AS id,
|
||||
ts.NAME AS NAME,
|
||||
ts.Grade AS grade,
|
||||
ts.Operation AS operation,
|
||||
ta.Ass_Id AS monitorTag
|
||||
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>
|
||||
<select id="getStrategyDetail" resultType="java.lang.String">
|
||||
SELECT
|
||||
Ass_Id
|
||||
FROM
|
||||
ths_warn_strategy_ass ts
|
||||
WHERE
|
||||
Warn_Id = #{id} and ts.Type=1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user