<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zjrs.ggfw.sggfw.entity.GrQzyxMapper">

    <select id="getWsbList" resultType="com.zjrs.ggfw.sggfw.po.GrQzyxPO">
        select a.RS_RLZY_QZYX_LSH as ACC202,e.RS_RLZY_JLXX_lsh as ACC200,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        a.ts_cjsj as BAE003,
        c.AAC002,
        a.ts_xgsj as BAE005,
        a.ts_cjsj as AAE043,F_RLZY_TRANSCODE('RS_RLZY_ZYXX',a.qwzw) as ACC210,(select tcoden from RS_RLZY_SJSB_CNVCODES where scode  = a.qwzw and code_type = 'RS_RLZY_ZYXX')as BCE055,
        (select tcoden from RS_RLZY_SJSB_CNVCODES where scode  = a.qwzw and code_type = 'RS_RLZY_ZYXX') as BCC279
        from RS_RLZY_QZYX a,rs_ggfw_user b, ac01 c, RS_RLZY_QZYX_DYB d, RS_RLZY_JLXX e where a.rs_yhlsh = b.userid
        and b.ztid = c.ztid and  d.rs_rlzy_jlxx_lsh = e.rs_rlzy_jlxx_lsh
        and d.rs_rlzy_qzyx_lsh = a.RS_RLZY_QZYX_LSH
        
    </select>

    <select id="xyUpdateGrqzyxList" resultType="com.zjrs.ggfw.sggfw.po.GrQzyxPO">
        select a.RS_RLZY_QZYX_LSH as ACC202,e.RS_RLZY_JLXX_lsh as ACC200,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        a.ts_cjsj as BAE003,
        c.AAC002,
        a.ts_xgsj as BAE005,
        a.ts_cjsj as AAE043,F_RLZY_TRANSCODE('RS_RLZY_ZYXX',a.qwzw) as ACC210,(select tcoden from RS_RLZY_SJSB_CNVCODES where scode  = a.qwzw and code_type = 'RS_RLZY_ZYXX') as BCE055,
        (select tcoden from RS_RLZY_SJSB_CNVCODES where scode  = a.qwzw and code_type = 'RS_RLZY_ZYXX') as BCC279
        from RS_RLZY_QZYX a,rs_ggfw_user b, ac01 c, RS_RLZY_QZYX_DYB d, RS_RLZY_JLXX e where a.rs_yhlsh = b.userid
        and b.ztid = c.ztid and  d.rs_rlzy_jlxx_lsh = e.rs_rlzy_jlxx_lsh
        and d.rs_rlzy_qzyx_lsh = a.RS_RLZY_QZYX_LSH
        
    </select>

    <select id="xyDelGrqzyxList" resultType="com.zjrs.ggfw.sggfw.po.GrQzyxPO">
        select a.RS_RLZY_QZYX_LSH as ACC202,e.RS_RLZY_JLXX_lsh as ACC200,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        a.ts_cjsj as BAE003,
        c.AAC002,
        a.ts_xgsj as BAE005,
        a.ts_cjsj as AAE043,F_RLZY_TRANSCODE('RS_RLZY_ZYXX',a.qwzw) as ACC210,(select tcoden from RS_RLZY_SJSB_CNVCODES where scode  = a.qwzw and code_type = 'RS_RLZY_ZYXX') as BCE055,
        (select tcoden from RS_RLZY_SJSB_CNVCODES where scode  = a.qwzw and code_type = 'RS_RLZY_ZYXX') as BCC279
        from RS_RLZY_QZYX a,rs_ggfw_user b, ac01 c, RS_RLZY_QZYX_DYB d, RS_RLZY_JLXX e,RS_RLZY_SJSB_PUSHDATAS f where a.rs_yhlsh = b.userid
        and b.ztid = c.ztid and  d.rs_rlzy_jlxx_lsh = e.rs_rlzy_jlxx_lsh
        and d.rs_rlzy_qzyx_lsh = a.RS_RLZY_QZYX_LSH
        and a.rs_rlzy_qzyx_lsh = f.sid
        
    </select>

</mapper>
