| | |
| | | else '□' end whetherResumeWorkNo |
| | | from cnas_person_supervision_control_sheet scs |
| | | left join user u1 on u1.id = scs.department_head_id -- 部门负责人 |
| | | left join department_lims dl1 on find_in_set(dl1.id, u1.depart_lims_id) and dl1.id != 1 |
| | | left join department_lims dl1 on dl1.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u1.depart_lims_id, ',', -2), ',', 1) and dl1.id != 1 |
| | | left join user u2 on u2.id = scs.discoverer_id -- 发现部门 |
| | | left join department_lims dl2 on find_in_set(dl2.id, u2.depart_lims_id) and dl2.id != 1 |
| | | left join department_lims dl2 on dl2.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u2.depart_lims_id, ',', -2), ',', 1) and dl2.id != 1 |
| | | left join user u3 on u3.id = scs.supervised_person_id -- 被监督人 |
| | | left join user u4 on u4.id = scs.responsible_department_person_id -- 责任部门 |
| | | left join department_lims dl4 on find_in_set(dl4.id, u4.depart_lims_id) and dl4.id != 1 |
| | | left join department_lims dl4 on dl4.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u4.depart_lims_id, ',', -2), ',', 1) and dl4.id != 1 |
| | | where scs.supervision_record_id = #{supervisionRecordId} |
| | | </select> |
| | | </mapper> |