新增预警/告警事务首页以及技术监督管理接口
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.LimitRate;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author lxp
|
||||
* @since 2023-03-16
|
||||
*/
|
||||
@DS("master")
|
||||
@Mapper
|
||||
public interface LimitRateMapper extends BaseMapper<LimitRate> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author yzh
|
||||
* @date 2022/10/17
|
||||
*/
|
||||
@DS("master")
|
||||
@Mapper
|
||||
public interface PmsMonitorMapper extends BaseMapper<Monitor> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.process.pojo.po.ThsAlarmFormwork;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author lee
|
||||
* @since 2023-03-29
|
||||
*/
|
||||
@Mapper
|
||||
public interface ThsAlarmFormworkMapper extends BaseMapper<ThsAlarmFormwork> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.po.ThsOverRunLog;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 告警/预警监测点列表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author lxp
|
||||
* @since 2023-03-16
|
||||
*/
|
||||
@DS("process")
|
||||
@Mapper
|
||||
public interface ThsOverRunLogMapper extends BaseMapper<ThsOverRunLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.SuperviseDto;
|
||||
import com.njcn.prepare.harmonic.pojo.po.ThsSupervise;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.SuperviseVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author lxp
|
||||
* @since 2023-03-16
|
||||
*/
|
||||
@DS("process")
|
||||
@Mapper
|
||||
public interface ThsSuperviseMapper extends BaseMapper<ThsSupervise> {
|
||||
/**
|
||||
* 查询技术监督列表
|
||||
*
|
||||
* @param superviseDto
|
||||
* @return
|
||||
*/
|
||||
Page<SuperviseVo> querySuperviseList(Page<SuperviseVo> page, @Param("param") SuperviseDto superviseDto);
|
||||
}
|
||||
@@ -1,21 +1,24 @@
|
||||
package com.njcn.process.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.vo.ThsStrategyVo;
|
||||
import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
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 接口
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-03-10
|
||||
*/
|
||||
@DS("process")
|
||||
public interface ThsWarnStrategyMapper extends BaseMapper<ThsWarnStrategy> {
|
||||
|
||||
/***
|
||||
@@ -47,10 +50,8 @@ public interface ThsWarnStrategyMapper extends BaseMapper<ThsWarnStrategy> {
|
||||
List<String> getMonitorTagDetail(@Param("id") String id);
|
||||
|
||||
/**
|
||||
* 查询所有部门的策略列表
|
||||
*
|
||||
* @return
|
||||
* 查询策略的集合
|
||||
*/
|
||||
List<ThsStrategyVo> selectStrategyList();
|
||||
List<ThsStrategyVo> selectStrategyList(@Param("param") SuperviseParam superviseParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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.ThsSuperviseMapper">
|
||||
<!--查询技术监督列表-->
|
||||
<select id="querySuperviseList" parameterType="com.njcn.prepare.harmonic.pojo.dto.SuperviseDto"
|
||||
resultType="com.njcn.prepare.harmonic.pojo.vo.SuperviseVo">
|
||||
select ts.* from ths_supervise ts where 1=1
|
||||
<if test="param.searchValue != null and param.searchValue != ''">
|
||||
AND ts.name like CONCAT(CONCAT('%', #{param.searchValue}), '%')
|
||||
</if>
|
||||
<if test="param.searchBeginTime != null and param.searchBeginTime != ''">
|
||||
AND DATE_FORMAT(ts.create_time, '%Y-%m-%d') >= DATE_FORMAT(#{param.searchBeginTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="param.searchEndTime != null and param.searchEndTime != ''">
|
||||
AND DATE_FORMAT(ts.create_time, '%Y-%m-%d') <= DATE_FORMAT(#{param.searchEndTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="param.searchState != null">
|
||||
AND ts.progress=#{param.searchState}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND ts.type=#{param.type}
|
||||
</if>
|
||||
order by ts.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -4,23 +4,23 @@
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<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" />
|
||||
<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" />
|
||||
<id column="Id" property="id"/>
|
||||
<result column="Name" property="name"/>
|
||||
<result column="Grade" property="grade"/>
|
||||
<result column="Operation" property="operation"/>
|
||||
<collection
|
||||
property="monitorTag"
|
||||
column="{id = id}"
|
||||
@@ -32,49 +32,72 @@
|
||||
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
|
||||
<select id="selectUpdateStrategy" resultMap="StrategyResultMap">
|
||||
SELECT
|
||||
ts.Id AS id,
|
||||
ts.NAME AS NAME,
|
||||
ts.Grade AS grade,
|
||||
ts.Operation AS operation
|
||||
FROM
|
||||
ths_warn_strategy ts
|
||||
ths_warn_strategy ts
|
||||
WHERE
|
||||
id = #{id}
|
||||
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
|
||||
Ass_Id
|
||||
FROM
|
||||
ths_warn_strategy_ass ts
|
||||
WHERE
|
||||
Warn_Id = #{id} and ts.Type=1
|
||||
</select>
|
||||
<!--查询所有部门的策略列表-->
|
||||
<select id="selectStrategyList" resultType="com.njcn.harmonic.pojo.vo.ThsStrategyVo">
|
||||
<!--查询策略的集合-->
|
||||
<select id="selectStrategyList" parameterType="com.njcn.prepare.harmonic.pojo.param.SuperviseParam"
|
||||
resultType="com.njcn.harmonic.pojo.vo.ThsStrategyVo">
|
||||
select
|
||||
tws.id,
|
||||
tws.name,
|
||||
tws.grade,
|
||||
tws.operation,
|
||||
tws.type,
|
||||
Monitor_Id as monitorId,
|
||||
tda.dept_Id as deptId
|
||||
from
|
||||
ths_warn_strategy tws
|
||||
left join ths_dept_alarm tda on
|
||||
INNER join ths_dept_alarm tda on
|
||||
tws.Id = tda.Alarm_Id
|
||||
where
|
||||
tws.State = 1 and tws.Grade in(0,2)
|
||||
<where>
|
||||
<choose>
|
||||
<when test="param.initType==0">
|
||||
tws.State = 1 and tws.Grade in(0,2)
|
||||
</when>
|
||||
<when test="param.initType==1">
|
||||
tws.State = 1 and tws.Grade in(1,2)
|
||||
</when>
|
||||
</choose>
|
||||
<if test="param.deptId !=null and param.deptId !=''">
|
||||
and tda.Dept_Id=#{param.deptId}
|
||||
</if>
|
||||
<if test="param.type !=null">
|
||||
and tda.type=#{param.type}
|
||||
</if>
|
||||
<!-- <if test="param != null and param.overRunLog != null and param.overRunLog.size > 0">
|
||||
AND tda.Monitor_Id IN
|
||||
<foreach collection='param.overRunLog' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item.lineIndex}
|
||||
</foreach>
|
||||
</if>-->
|
||||
and tws.Big_Type=1
|
||||
</where>
|
||||
</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
|
||||
Ass_Id
|
||||
FROM
|
||||
ths_warn_strategy_ass ts
|
||||
WHERE
|
||||
Warn_Id = #{id} and ts.Type=0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user