| | |
| | | blade_dept bt |
| | | ON |
| | | sg.dept_id = bt.id |
| | | left join |
| | | sys_information si |
| | | on |
| | | si.departmentid = bt.id |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction |
| | | WHERE |
| | | 1=1 |
| | | <if test="gun.jurisdiction!=null and gun.jurisdiction!='' and gun.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{gun.jurisdiction} or sj.parent_id = #{gun.jurisdiction}) |
| | | </if> |
| | | <if test="gun.tenantName!=null and gun.tenantName!=''"> |
| | | and bt.dept_name like concat('%', #{gun.tenantName},'%') |
| | | </if> |
| | | <if test="gun.deptId!=null and gun.deptId!=''"> |
| | | and sg.dept_id = #{gun.deptId} |
| | | </if> |
| | | <if test="gun.gunCardNumber!=null and gun.gunCardNumber!=''"> |
| | | and sg.gun_card_number like concat('%', #{gun.gunCardNumber},'%') |
| | | </if> |