| | |
| | | bu.sex,bu.cardid idCardNo, |
| | | bu.securitynumber securityNumber, |
| | | bu.avatar, |
| | | ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age |
| | | ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age, |
| | | bu1.real_name applyName, |
| | | bt1.dept_name applyUnit, |
| | | bu.registered, |
| | | bu.user_type userType |
| | | FROM |
| | | sys_accreditation_records sar |
| | | left join |
| | |
| | | blade_dept bt |
| | | ON |
| | | bu.dept_id = bt.id |
| | | left join |
| | | blade_user bu1 |
| | | on |
| | | sar.create_user = bu1.id |
| | | LEFT JOIN |
| | | blade_dept bt1 |
| | | ON |
| | | bu1.dept_id = bt1.id |
| | | WHERE |
| | | 1=1 |
| | | and bu.status = 1 |
| | |
| | | <if test="accreditationRecords.idCardNo!=null and accreditationRecords.idCardNo!=''"> |
| | | and bu.cardid like concat('%', #{accreditationRecords.idCardNo},'%') |
| | | </if> |
| | | <if test="accreditationRecords.applyUnit!=null and accreditationRecords.applyUnit!=''"> |
| | | and bt1.dept_name like concat('%', #{accreditationRecords.applyUnit},'%') |
| | | </if> |
| | | <if test="accreditationRecords.securityNumber!=null and accreditationRecords.securityNumber!=''"> |
| | | and bu.securitynumber like concat('%', #{accreditationRecords.securityNumber},'%') |
| | | </if> |
| | | <if test="accreditationRecords.status!=null"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.type!=null"> |
| | | and sar.type = #{accreditationRecords.type} |
| | | </if> |
| | | <if test="accreditationRecords.auditStatus!=null"> |
| | | and sar.audit_status = #{accreditationRecords.auditStatus} |
| | | </if> |
| | | <if test="accreditationRecords.isAvatar==1"> |
| | | and bu.avatar is not null and bu.avatar!="" |
| | | </if> |