From fb2c461dd21fa68d18bad40bcae6fea7b061f355 Mon Sep 17 00:00:00 2001 From: songwenxuan <1924103812@qq.com> Date: Fri, 10 May 2024 17:01:15 +0800 Subject: [PATCH] =?UTF-8?q?app=E6=A3=80=E6=9F=A5=E8=A1=A8=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=B8=85=E5=8D=95=E6=8E=92=E6=9F=A5=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=A9=BA=E7=9A=84=E6=B6=88=E9=98=B2=E7=82=B9?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../firemanager/FireCheckListMapper.xml | 72 ++++--- .../firemanager/FireRecordMapper.xml | 194 ++++++++++-------- 2 files changed, 149 insertions(+), 117 deletions(-) diff --git a/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml b/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml index 8cc7722d..ea67ee21 100644 --- a/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml +++ b/src/main/resources/mybatis/datasource/firemanager/FireCheckListMapper.xml @@ -25,9 +25,15 @@ UPDATE bus_fire_checklist SET FIRE_CHECK_STANDARD_NAME = #{FIRE_CHECK_STANDARD_NAME}, - FIRE_CHECK_TYPE = #{FIRE_CHECK_TYPE}, - OPERATOR = #{OPERATOR}, - OPERATTIME = #{OPERATTIME} + FIRE_CHECK_TYPE = #{FIRE_CHECK_TYPE}, + OPERATOR = #{OPERATOR}, + OPERATTIME = #{OPERATTIME} + + ,DEPARTMENT_ID = #{DEPARTMENT_ID} + + + ,USER_ID = #{USER_ID} + WHERE FIRE_CHECK_ID = #{FIRE_CHECK_ID} @@ -64,14 +70,15 @@ cl.FIRE_CHECK_STANDARD_NAME, cl.FIRE_CHECK_TYPE AS FIRE_CHECK_TYPE_ID, IFNULL( FINISHED, 0 ) FINISHED, - od.`NAME` AS DEPARTMENTNAME, + d.`NAME` AS DEPARTMENTNAME, su.`NAME` AS USERNAME, cl.STATE, sys_dictionaries.`NAME` AS FIRE_CHECK_TYPE, cl.FIRE_CHECK_ID, ifnull(tt.CHECK_NUM,0) CHECK_NUM FROM - bus_fire_checklist as cl + bus_fire_checklist AS cl + left JOIN oa_department AS d ON cl.DEPARTMENT_ID = d.DEPARTMENT_ID LEFT JOIN ( SELECT FIRE_CHECK_ID, @@ -85,8 +92,6 @@ AND CORPINFO_ID = #{pd.CORPINFO_ID} GROUP BY FIRE_CHECK_ID,PERIODSTART,PERIODEND ) AS t ON cl.FIRE_CHECK_ID = t.FIRE_CHECK_ID LEFT JOIN sys_user AS su ON cl.USER_ID = su.USER_ID - left join oa_department od - on od.DEPARTMENT_ID = su.DEPARTMENT_ID LEFT JOIN sys_dictionaries ON cl.FIRE_CHECK_TYPE = sys_dictionaries.BIANMA LEFT JOIN (SELECT FIRE_CHECK_ID, count(1) CHECK_NUM from bus_fire_record GROUP BY FIRE_CHECK_ID ) tt on cl.FIRE_CHECK_ID = tt.FIRE_CHECK_ID where cl.ISDELETE = 0 and cl.STATE != 2 @@ -95,7 +100,7 @@ - + and cl.CORPINFO_ID = #{pd.CORPINFO_ID} @@ -167,7 +172,7 @@ oa_department AS oa ON su.DEPARTMENT_ID = oa.DEPARTMENT_ID - INNER JOIN + LEFT JOIN sys_post AS sp ON su.POST_ID = sp.POST_ID @@ -223,13 +228,19 @@ fd.FIRE_DEVICE_TYPE_ID = sys_dictionaries.BIANMA WHERE fp.ISDELETE = 0 AND - fd.ISDELETE = 0 + fd.ISDELETE = 0 AND fr.ISDELETE = 0 and fp.USER_ID = #{USER_ID} and su.NAME like concat(#{USERNAME},'%') + + and fp.DEPARTMENT_ID in + + #{item} + + and fp.DEPARTMENT_ID = #{DEPARTMENT_ID} @@ -326,21 +337,26 @@ + +