From 0f22f8c1abc0ef4e7f99ed2a35bc848492ac38c8 Mon Sep 17 00:00:00 2001
From: wanggongfeng <1305282856@qq.com>
Date: Mon, 19 Sep 2022 11:01:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=A4=84=E7=90=86=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/mapper/item/ItemDao.xml | 33 +++++++++++--------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
index 646441d24..269eea9fe 100755
--- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
+++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/resources/mapper/item/ItemDao.xml
@@ -516,18 +516,21 @@
left join epdc_item_fusing_delay_record d on d.ITEM_ID = item.ID and d.DEL_FLAG = '0'
left join (
select b.ID,b.ITEM_ID,b.CREATED_TIME,b.state
- from epdc_item_handle_process b where b.DEL_FLAG = '0' and b.STATE != 1001 and b.CREATED_TIME = (
- SELECT
- max(CREATED_TIME)
- from epdc_item_handle_process
- where b.ITEM_ID = ITEM_ID
- and (HANDLER_DEPT != '网格化平台' or (HANDLER_DEPT = '网格化平台' and STATE in (1060,1065)))
- and DEL_FLAG = '0'
- )
+ from epdc_item_handle_process b
+ where b.DEL_FLAG = '0'
+ and b.STATE != 1001
+ and b.CREATED_TIME = (
+ SELECT
+ max(CREATED_TIME)
+ from epdc_item_handle_process
+ where b.ITEM_ID = ITEM_ID
+ and DEL_FLAG = '0'
+ )
+ and (b.HANDLER_DEPT != '网格化平台' or (b.HANDLER_DEPT = '网格化平台' and b.STATE in (1060,1065)))
) process on process.ITEM_ID = item.ID
WHERE item.DEL_FLAG = '0'
- and (item.IS_PEOPLE = '0' or (item.PEOPLE_FLAG = '0' and (process.state is null or process.state not in (11,15))))
- and (process.state != 14 or process.state is null)
+ and (item.IS_PEOPLE = '0' or (item.IS_PEOPLE = '1' and item.PEOPLE_FLAG = '0'))
+ and (process.state is not null and process.state not in (11,14,15))
and (process.state != 0 or process.state is null)
@@ -618,17 +621,21 @@
left join epdc_item_fusing_delay_record d on d.ITEM_ID = item.ID and d.DEL_FLAG = '0'
left join (
select b.ID,b.ITEM_ID,b.CREATED_TIME,b.state
- from epdc_item_handle_process b where b.DEL_FLAG = '0' and b.STATE != 1001 and b.CREATED_TIME = (
+ from epdc_item_handle_process b
+ where b.DEL_FLAG = '0'
+ and b.STATE != 1001
+ and b.CREATED_TIME = (
SELECT
max(CREATED_TIME)
from epdc_item_handle_process
where b.ITEM_ID = ITEM_ID
- and HANDLER_DEPT != '网格化平台'
and DEL_FLAG = '0'
)
+ and (b.HANDLER_DEPT != '网格化平台' or (b.HANDLER_DEPT = '网格化平台' and b.STATE in (1060,1065)))
) process on process.ITEM_ID = item.ID
WHERE item.DEL_FLAG = '0'
- and (item.IS_PEOPLE = '0' or (item.PEOPLE_FLAG = '0' and (process.state is null or process.state not in (11,15))))
+ and (item.IS_PEOPLE = '0' or (item.IS_PEOPLE = '1' and item.PEOPLE_FLAG = '0'))
+ and (process.state is not null and process.state not in (11,15))
and process.state = 14
AND item.PEOPLE_FLAG = #{peopleFlag}