修正安全环保检查用户名称查询逻辑

main
zhangyue 2026-05-07 17:13:22 +08:00
parent 252a3ea735
commit 3abe8cbda9
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@
select select
i.*, i.*,
kp.project_name, 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, indc.corp_name inspected_corpinfo_name,
xmu.name xgf_master_user_name xmu.name xgf_master_user_name
@ -35,12 +35,12 @@
AND iu_show.type = mt.max_type AND iu_show.type = mt.max_type
<!-- 过滤用:最大 type 下 status = 0 的人员 --> <!-- 过滤用:最大 type 下 status = 0 的人员 -->
JOIN safety_environmental_inspection_user iu LEFT JOIN safety_environmental_inspection_user iu
ON iu.inspection_id = i.inspection_id ON iu.inspection_id = i.inspection_id
AND iu.delete_enum = 'FALSE' AND iu.delete_enum = 'FALSE'
AND iu.type = mt.max_type AND iu.type = mt.max_type
AND iu.STATUS = 0 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 corp_info indc on indc.id = i.inspected_corpinfo_id
left join user xmu on xmu.id = i.xgf_master_user_id left join user xmu on xmu.id = i.xgf_master_user_id
where i.delete_enum = 'FALSE' where i.delete_enum = 'FALSE'