|
|
|
@ -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')<![CDATA[ <= ]]>480 |
|
|
|
(case when a.item_state = '0' |
|
|
|
and getworkminute(a.created_time, now()) > 360 |
|
|
|
and getworkminute(a.created_time, now())<![CDATA[ <= ]]>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')<![CDATA[ <= ]]> 360 then 1 else 0 end))greenTotal |
|
|
|
sum((case when a.item_state = '0' and getworkminute(a.created_time, now())<![CDATA[ <= ]]> 360 then 1 else 0 end))greenTotal |
|
|
|
FROM |
|
|
|
epdc_item a |
|
|
|
LEFT JOIN ( |
|
|
|
|