diff --git a/web-infrastructure/src/main/resources/mapper/inspection/SafetyEnvironmentalInspectionMapper.xml b/web-infrastructure/src/main/resources/mapper/inspection/SafetyEnvironmentalInspectionMapper.xml index 04e1a78..65c13d4 100644 --- a/web-infrastructure/src/main/resources/mapper/inspection/SafetyEnvironmentalInspectionMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/inspection/SafetyEnvironmentalInspectionMapper.xml @@ -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 - 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'