From 23675f571a6ba7275eab00e06a05366718d24afc Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 4 Mar 2024 15:50:28 +0800 Subject: [PATCH] =?UTF-8?q?#=E8=AE=BE=E5=A4=87=E6=A1=A3=E6=A1=88=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=A5=A8=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml | 2 +- .../hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml index 226952a..3f04203 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/mapper/OperAccessTaskMapper.xml @@ -219,7 +219,7 @@ select info.em_code as emCode,info.`type`,count(*) as payment, - (select count(*) from hzims_work_ticket_info i where flow_description = '结束' and i.id = info.id) as finish, - (select count(*) from hzims_work_ticket_info i where flow_description = '作废' and i.id = info.id) as invalid, - (select count(*) from hzims_ticket_info_evaluate e where evaluate = '合格!' and e.id = eval.id) as qualified + SUM( IF ( info.flow_description = '结束', 1, 0 )) AS finish, + SUM( IF ( info.flow_description IN ( '作废', '错票' ), 1, 0 )) AS invalid, + SUM( IF ( eval.evaluate = '合格!', 1, 0 )) AS qualified from hzims_work_ticket_info info LEFT JOIN hzims_ticket_info_evaluate eval ON info.id = eval.ticket_id