预警数据过滤
This commit is contained in:
parent
9dd653ba4c
commit
b645ab383a
|
|
@ -179,6 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getApproachingAndTimeout" resultType="com.bonus.material.push.domain.StaticsNumsBean">
|
<select id="getApproachingAndTimeout" resultType="com.bonus.material.push.domain.StaticsNumsBean">
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(CASE
|
COUNT(CASE
|
||||||
WHEN mm.next_check_time BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 30 DAY)
|
WHEN mm.next_check_time BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 30 DAY)
|
||||||
|
|
@ -201,10 +202,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and sai.`status`='0' and sai.end_time is null
|
and sai.`status`='0' and sai.end_time is null
|
||||||
and bp.external_id is not null
|
and bp.external_id is not null
|
||||||
and mm.ma_status = 2
|
and mm.ma_status = 2
|
||||||
|
and mt2.type_id not in (6032,6008,6270)
|
||||||
<if test="deptId != null">
|
<if test="deptId != null">
|
||||||
AND sd.dept_id = #{deptId}
|
AND sd.dept_id = #{deptId}
|
||||||
</if>
|
</if>
|
||||||
AND mm.next_check_time IS NOT NULL
|
AND mm.next_check_time IS NOT NULL
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getApproachingDetails" resultType="com.bonus.material.push.domain.MachineInfoBean">
|
<select id="getApproachingDetails" resultType="com.bonus.material.push.domain.MachineInfoBean">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -233,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
and bp.external_id is not null
|
and bp.external_id is not null
|
||||||
and sai.`status`='0' and sai.end_time is null
|
and sai.`status`='0' and sai.end_time is null
|
||||||
and mm.ma_status = 2
|
and mm.ma_status = 2
|
||||||
|
and mt2.type_id not in (6032,6008,6270)
|
||||||
<if test="proId != null">
|
<if test="proId != null">
|
||||||
AND bp.pro_id = #{proId}
|
AND bp.pro_id = #{proId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue