| | |
| | | WHEN 3 THEN |
| | | '100周岁(含)以上' |
| | | END personnelCategory, |
| | | cpap.address, |
| | | cpar.address, |
| | | CASE |
| | | cpap.isAlive |
| | | cpap.is_alive |
| | | WHEN 1 THEN |
| | | '是' |
| | | WHEN 0 THEN |
| | | '否' |
| | | END is_alive, |
| | | cpar.auth_period, |
| | | cpar.auth_date, |
| | | END isAlive, |
| | | cpahr.auth_period, |
| | | cpahr.auth_date, |
| | | CASE |
| | | cpar.auth_method |
| | | cpahr.auth_method |
| | | WHEN 1 THEN |
| | | '视频认证' |
| | | WHEN 2 THEN |
| | | '人脸认证' |
| | | WHEN 3 THEN |
| | | '线下认证' |
| | | END authMethod, |
| | | cpar.mark, |
| | | cpahr.mark, |
| | | CASE |
| | | cpar.auth_status |
| | | cpahr.is_auth |
| | | WHEN 1 THEN |
| | | '已认证' |
| | | WHEN 0 THEN |
| | | WHEN 2 THEN |
| | | '未认证' |
| | | END authStatus |
| | | FROM |
| | | com_pension_auth_records cpar |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id |
| | | com_pension_auth_history_record as cpahr |
| | | LEFT JOIN com_pension_auth_records cpar on cpar.id = cpahr.auth_id |
| | | LEFT JOIN com_pension_auth_pensioners cpap ON cpahr.elderlies_id = cpap.id |
| | | LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id |
| | | WHERE |
| | | cpap.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | cpahr.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cpar.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | and cpahr.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cpar.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null"> |
| | | and cpahr.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and cpap.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (cpap.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cpar.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | or cpahr.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')) |
| | | </if> |
| | | order by cpar.create_at desc |
| | | order by cpahr.create_at desc |
| | | </select> |
| | | |
| | | <select id="queryRecordWithPage" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO"> |