From 9dd87ae260526c92d917d971c88666a28c0b4c0d Mon Sep 17 00:00:00 2001 From: zhaoyu Date: Tue, 7 May 2024 14:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=98=B2=E5=8A=9F=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/datasource/firemanager/FirePonitMapper.xml | 10 +++++++++- .../datasource/firemanager/FireRecordMapper.xml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mybatis/datasource/firemanager/FirePonitMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FirePonitMapper.xml index c8cbbf51..8ab49429 100644 --- a/src/main/resources/mybatis/datasource/firemanager/FirePonitMapper.xml +++ b/src/main/resources/mybatis/datasource/firemanager/FirePonitMapper.xml @@ -115,7 +115,8 @@ IFNULL( t.DEVICE_COUNT, 0 ) DEVICE_COUNT, d.`NAME` AS DEPARTMENT_NAME, u.`NAME` AS USERNAME, - r.FIRE_REGION_NAME + r.FIRE_REGION_NAME, + fp.FIRE_POINT_ID as POINT FROM bus_fire_point AS p LEFT JOIN bus_fire_qualified_photos fqp ON p.QUALIFIED_PHOTOS_ID = fqp.QUALIFIED_PHOTOS_ID @@ -123,6 +124,13 @@ LEFT JOIN ( SELECT count( FIRE_DEVICE_ID ) DEVICE_COUNT, FIRE_POINT_ID FROM bus_fire_device WHERE ISDELETE = 0 GROUP BY FIRE_POINT_ID ) t ON t.FIRE_POINT_ID = p.FIRE_POINT_ID LEFT JOIN sys_user AS u ON p.USER_ID = u.USER_ID LEFT JOIN oa_department AS d ON p.DEPARTMENT_ID = d.DEPARTMENT_ID + LEFT JOIN (SELECT DISTINCT + f.FIRE_POINT_ID + FROM + `bus_fire_device` f + LEFT JOIN bus_fire_device_prepared p ON f.FIRE_DEVICE_ID = p.FIRE_DEVICE_ID + WHERE + f.ISDELETE = '0') fp on fp.FIRE_POINT_ID = p.FIRE_POINT_ID WHERE r.CORPINFO_ID = #{pd.CORPINFO_ID} AND r.ISDELETE = 0 diff --git a/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml index 1c3b0c5d..6cf3beb4 100644 --- a/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml +++ b/src/main/resources/mybatis/datasource/firemanager/FireRecordMapper.xml @@ -897,7 +897,7 @@ GROUP BY FIRE_CHECK_ID - order by fr. CREATTIME + order by temp.FINISHED,fr. CREATTIME