修正安全环保检查用户名称查询逻辑
parent
252a3ea735
commit
3abe8cbda9
|
|
@ -17,7 +17,7 @@
|
|||
select
|
||||
i.*,
|
||||
kp.project_name,
|
||||
GROUP_CONCAT(DISTINCT iuu.name) inspection_user_name,
|
||||
GROUP_CONCAT(DISTINCT showu.name) inspection_user_name,
|
||||
indc.corp_name inspected_corpinfo_name,
|
||||
xmu.name xgf_master_user_name
|
||||
|
||||
|
|
@ -35,12 +35,12 @@
|
|||
AND iu_show.type = mt.max_type
|
||||
|
||||
<!-- 过滤用:最大 type 下 status = 0 的人员 -->
|
||||
JOIN safety_environmental_inspection_user iu
|
||||
LEFT JOIN safety_environmental_inspection_user iu
|
||||
ON iu.inspection_id = i.inspection_id
|
||||
AND iu.delete_enum = 'FALSE'
|
||||
AND iu.type = mt.max_type
|
||||
AND iu.STATUS = 0
|
||||
left join user iuu on iuu.id = iu.user_id
|
||||
left join user showu on showu.id = iu_show.user_id
|
||||
left join corp_info indc on indc.id = i.inspected_corpinfo_id
|
||||
left join user xmu on xmu.id = i.xgf_master_user_id
|
||||
where i.delete_enum = 'FALSE'
|
||||
|
|
|
|||
Loading…
Reference in New Issue