部门查询
parent
aa5a53137d
commit
9986f6e3ea
|
@ -64,15 +64,14 @@
|
|||
cl.FIRE_CHECK_STANDARD_NAME,
|
||||
cl.FIRE_CHECK_TYPE AS FIRE_CHECK_TYPE_ID,
|
||||
IFNULL( FINISHED, 0 ) FINISHED,
|
||||
d.`NAME` AS DEPARTMENTNAME,
|
||||
od.`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
|
||||
left JOIN oa_department AS d ON cl.DEPARTMENT_ID = d.DEPARTMENT_ID
|
||||
bus_fire_checklist as cl
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
FIRE_CHECK_ID,
|
||||
|
@ -86,6 +85,8 @@
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue