| | |
| | | blade_dept bt1 |
| | | ON |
| | | bu1.dept_id = bt1.id |
| | | left join |
| | | sys_information si |
| | | on |
| | | bt.id = si.departmentid |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction |
| | | WHERE |
| | | 1=1 |
| | | and bu.status = 1 |
| | |
| | | <if test="accreditationRecords.securityNumber!=null and accreditationRecords.securityNumber!=''"> |
| | | and bu.securitynumber like concat('%', #{accreditationRecords.securityNumber},'%') |
| | | </if> |
| | | <if test="accreditationRecords.jurisdiction!=null and accreditationRecords.jurisdiction!='' and accreditationRecords.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{accreditationRecords.jurisdiction} or sj.parent_id = #{accreditationRecords.jurisdiction}) |
| | | </if> |
| | | <if test="accreditationRecords.status!=null"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.createUser!=null"> |
| | | and sar.create_user = #{accreditationRecords.createUser} |
| | | </if> |
| | | <if test="accreditationRecords.deptId!=null"> |
| | | and bt.id = #{accreditationRecords.deptId} |
| | | </if> |
| | | <if test="accreditationRecords.type!=null"> |
| | | and sar.type = #{accreditationRecords.type} |
| | | </if> |