Commit f2ab9ba4 by liuyang

2024-05-24 1.设备点检预警预警逻辑调整

2.设备保养逻辑调整
parent bee2e13e
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1 where 1 = 1
and PLAN_END_DATE < DATE_FORMAT(CURDATE(), '%Y%m%d') and PLAN_END_DATE < DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1' AND B.PLAN_STATUS = '1' and B.TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode# B.COMPANY_CODE = #companyCode#
...@@ -214,9 +214,8 @@ ...@@ -214,9 +214,8 @@
<include refid="column002"/> <include refid="column002"/>
from ${hggpSchema}.HGSB002A A from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1 where 1 = 1 and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d')
and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d') AND B.PLAN_STATUS = '1' AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode# B.COMPANY_CODE = #companyCode#
......
...@@ -177,8 +177,8 @@ ...@@ -177,8 +177,8 @@
from ${hggpSchema}.HGSB002A A from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1 where 1 = 1
and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d') AND PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2' AND B.PLAN_STATUS = '1' AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode# B.COMPANY_CODE = #companyCode#
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
A.PLAN_START_DATE desc, A.PLAN_END_DATE desc A.PLAN_END_DATE desc, A.PLAN_START_DATE desc, A.PLAN_CODE desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1 where 1 = 1
and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d') and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2' AND B.PLAN_STATUS = '1' AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
<include refid="authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode# B.COMPANY_CODE = #companyCode#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment