| | |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | cear.id, |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | cear.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_video, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.approval_status, |
| | | cear.approver_id, |
| | | su1.`name` as approverName, |
| | | cear.approval_date, |
| | | cear.auth_status |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id |
| | | WHERE |
| | | ceae.community_id = ${pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cear.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cear.auth_date <![CDATA[ >= ]]> #{pageElderAuthRecordsDTO.authDateBegin} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateEnd != null and pageElderAuthRecordsDTO.authDateEnd != ''"> |
| | | and cear.auth_date <![CDATA[ <= ]]> #{pageElderAuthRecordsDTO.authDateEnd} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.approvalStatus != null and pageElderAuthRecordsDTO.approvalStatus != 0"> |
| | | and cear.approval_status = #{pageElderAuthRecordsDTO.approvalStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or ceae.id_card = #{pageElderAuthRecordsDTO.idCard}) |
| | | </if> |
| | | order by cear.create_at desc |
| | | </select> |
| | | <!-- <select id="export" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO">--> |
| | | <!-- SELECT--> |
| | | <!-- cear.id,--> |
| | | <!-- su.`name` submitUserName,--> |
| | | <!-- ceae.phone,--> |
| | | <!-- ceae.`name`,--> |
| | | <!-- ceae.id_card,--> |
| | | <!-- ceae.sex,--> |
| | | <!-- ceae.birthday,--> |
| | | <!-- ceae.personnel_category,--> |
| | | <!-- cear.address,--> |
| | | <!-- ceae.is_alive,--> |
| | | <!-- cear.auth_method,--> |
| | | <!-- cear.auth_period,--> |
| | | <!-- cear.auth_video,--> |
| | | <!-- cear.auth_date,--> |
| | | <!-- cear.mark,--> |
| | | <!-- cear.approval_status,--> |
| | | <!-- cear.approver_id,--> |
| | | <!-- su1.`name` as approverName,--> |
| | | <!-- cear.approval_date,--> |
| | | <!-- cear.auth_status--> |
| | | <!-- FROM--> |
| | | <!-- com_elder_auth_records cear--> |
| | | <!-- LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id--> |
| | | <!-- LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id--> |
| | | <!-- LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id--> |
| | | <!-- WHERE--> |
| | | <!-- ceae.community_id = ${pageElderAuthRecordsDTO.communityId}--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''">--> |
| | | <!-- and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0">--> |
| | | <!-- and cear.auth_method = #{pageElderAuthRecordsDTO.authMethod}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''">--> |
| | | <!-- and cear.auth_date <![CDATA[ >= ]]> #{pageElderAuthRecordsDTO.authDateBegin}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.authDateEnd != null and pageElderAuthRecordsDTO.authDateEnd != ''">--> |
| | | <!-- and cear.auth_date <![CDATA[ <= ]]> #{pageElderAuthRecordsDTO.authDateEnd}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.approvalStatus != null and pageElderAuthRecordsDTO.approvalStatus != 0">--> |
| | | <!-- and cear.approval_status = #{pageElderAuthRecordsDTO.approvalStatus}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0">--> |
| | | <!-- and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0">--> |
| | | <!-- and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0">--> |
| | | <!-- and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''">--> |
| | | <!-- and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')--> |
| | | <!-- or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%')--> |
| | | <!-- or ceae.id_card = #{pageElderAuthRecordsDTO.idCard})--> |
| | | <!-- </if>--> |
| | | <!-- order by cear.create_at desc--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="detailElderAuthRecords" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |