From 329c604f5f52beef90425d01552d41e0f0c4b62e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 14 Oct 2022 08:49:28 +0800 Subject: [PATCH] =?UTF-8?q?sql=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/item/ItemDao.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 58d579e35..8b421101e 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 @@ -2182,16 +2182,16 @@ SELECT COUNT(a.id)total, SUM(a.ITEM_STATE='10')closedTotal, - sum((case when a.ITEM_STATE='0' and b.STATE = 1001 then 1 else 0 end))pendingTotal, - sum((case when a.ITEM_STATE='0' and b.STATE != 1001 then 1 else 0 end))processingTotal, - sum((case when a.ITEM_STATE='0' and getworkminute(a.created_time,'2022-10-08 12:00:00')>=480 then 1 else 0 end))redTotal, + sum((case when a.item_state='0' and b.state = 1001 then 1 else 0 end))pendingTotal, + sum((case when a.item_state='0' and b.state != 1001 then 1 else 0 end))processingTotal, + sum((case when a.item_state='0' and getworkminute(a.created_time, now()) >= 480 then 1 else 0 end))redTotal, sum( - (case when a.ITEM_STATE='0' - and getworkminute(a.created_time,'2022-10-08 12:00:00')>360 - and getworkminute(a.created_time,'2022-10-08 12:00:00')480 + (case when a.item_state = '0' + and getworkminute(a.created_time, now()) > 360 + and getworkminute(a.created_time, now())480 then 1 else 0 end) )yellowTotal, - sum((case when a.ITEM_STATE='0' and getworkminute(a.created_time,'2022-10-08 12:00:00') 360 then 1 else 0 end))greenTotal + sum((case when a.item_state = '0' and getworkminute(a.created_time, now()) 360 then 1 else 0 end))greenTotal FROM epdc_item a LEFT JOIN (