| | |
| | | <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"> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.createUser!=null"> |
| | |
| | | <if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'"> |
| | | and sar.create_time <= #{accreditationRecords.endTime} |
| | | </if> |
| | | order by sar.id desc |
| | | </select> |
| | | |
| | | <!--自定义详情信息--> |
| | |
| | | </select> |
| | | |
| | | |
| | | <!--导出保安员证信息--> |
| | | <!--导出保安员证信息(上岗证)--> |
| | | <select id="exportSecurityPaperList" resultType="org.springblade.modules.accreditation.vo.AccreditationRecordsVo"> |
| | | SELECT |
| | | sar.*, |
| | |
| | | <if test="accreditationRecords.idCardNo!=null and accreditationRecords.idCardNo!=''"> |
| | | and bu.cardid like concat('%', #{accreditationRecords.idCardNo},'%') |
| | | </if> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.securityNumber!=null and accreditationRecords.securityNumber!=''"> |
| | | and bu.securitynumber like concat('%', #{accreditationRecords.securityNumber},'%') |
| | | </if> |
| | |
| | | <if test="accreditationRecords.isAvatar==2"> |
| | | and (bu.avatar is null or bu.avatar="") |
| | | </if> |
| | | <if test="accreditationRecords.auditStatus!=null"> |
| | | and sar.audit_status = #{accreditationRecords.auditStatus} |
| | | </if> |
| | | <if test="accreditationRecords.startTime!=null and accreditationRecords.startTime!='' and accreditationRecords.startTime!='undefined'"> |
| | | and sar.create_time >= #{accreditationRecords.startTime} |
| | | </if> |
| | | <if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'"> |
| | | and sar.create_time <= #{accreditationRecords.endTime} |
| | | </if> |
| | | order by sar.id desc |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="accreditationRecords.securityNumber!=null and accreditationRecords.securityNumber!=''"> |
| | | and bu.securitynumber like concat('%', #{accreditationRecords.securityNumber},'%') |
| | | </if> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </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.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'"> |
| | | and sar.create_time <= #{accreditationRecords.endTime} |
| | | </if> |
| | | order by sar.id desc |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="accreditationRecords.status!=null"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.createUser!=null"> |
| | | and sar.create_user = #{accreditationRecords.createUser} |
| | | </if> |
| | |
| | | <if test="accreditationRecords.endTime!=null and accreditationRecords.endTime!='' and accreditationRecords.endTime!='undefined'"> |
| | | and sar.create_time <= #{accreditationRecords.endTime} |
| | | </if> |
| | | order by sar.id desc |
| | | </select> |
| | | |
| | | <!--根据用户 id 查询上岗证申请记录--> |
| | | <select id="getAccreditationRecordsByUserIdCount" resultType="java.lang.Integer"> |
| | | select count(*) from sys_accreditation_records where user_id = #{userId} and type = 1 |
| | | </select> |
| | | |
| | | |
| | | <!--根据用户 id 查询当前人员是否有待审核和审核通过的记录数--> |
| | | <select id="getAccreditationRecordsByUserIdAuditCount" resultType="java.lang.Integer"> |
| | | select count(*) from sys_accreditation_records where (audit_status = 1 or audit_status = 2) and user_id = #{userId} and type = #{type} |
| | | </select> |
| | | </mapper> |