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 @@ + +