<?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.GrJlxxSbMapper">

    <select id="getGzjyWsbList" resultType="com.zjrs.ggfw.sggfw.po.GrJlxxPO">
        select a.RS_RLZY_GZJY_LSH as ACC0B0,c.ZTID as AAC001,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        F_RLZY_TRANSCODE('JBXX_AAC161',c.AAC161) AAC161,
        c.AAC003,
        F_RLZY_TRANSCODE('JBXX_AAC004',c.aac004) AAC004,
        c.AAC006,
        F_RLZY_TRANSCODE('JBXX_AAC011',c.aac011) AAC011,
        a.KSSJ as BCC309,
        c.AAC002,
        a.jssj as BCC310,
        a.GZDW as BAC128,
        a.SZZW as AHC451,
        a.GZZZ as ACC0B4,
        a.ts_cjsj as BAE003,
        a.ts_xgsj as BAE005
        from v_RS_RLZY_GZJY a, rs_ggfw_user b, ac01 c
        where a.RS_YHLSH = b.userid
        and b.ztid = c.ztid          
    </select>

    <select id="getJyjlWsbList" resultType="com.zjrs.ggfw.sggfw.po.GrJlxxPO">
        select a.rs_rlzy_jyjl_lsh as ACC0B0,c.ZTID as AAC001,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        F_RLZY_TRANSCODE('JBXX_AAC161',c.AAC161) AAC161,
        c.AAC003,
        F_RLZY_TRANSCODE('JBXX_AAC004',c.aac004) AAC004,
        c.AAC006,
        F_RLZY_TRANSCODE('JBXX_AAC011',c.aac011) AAC011,
        c.AAC002 as AAC002,
        a.rxsj as BCC309,
        a.bysj as BCC310,
        a.BYYX as BAC128,
        a.SXZY as AHC451,
        a.ts_xgsj as BAE005
        from v_RS_RLZY_JYJL a, rs_ggfw_user b, ac01 c
        where a.RS_YHLSH = b.userid
        and b.ztid = c.ztid
    </select>

    <select id="xyUpdateGzjyList" resultType="com.zjrs.ggfw.sggfw.po.GrJlxxPO">
        select a.RS_RLZY_GZJY_LSH as ACC0B0,c.ZTID as AAC001,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        F_RLZY_TRANSCODE('JBXX_AAC161',c.AAC161) AAC161,
        c.AAC003,
        F_RLZY_TRANSCODE('JBXX_AAC004',c.aac004) AAC004,
        c.AAC006,
        F_RLZY_TRANSCODE('JBXX_AAC011',c.aac011) AAC011,
        a.KSSJ as BCC309,
        c.AAC002,
        a.jssj as BCC310,
        a.GZDW as BAC128,
        a.SZZW as AHC451,
        a.GZZZ as ACC0B4,
        a.ts_cjsj as BAE003,
        a.ts_xgsj as BAE005
        from v_RS_RLZY_GZJY a, rs_ggfw_user b, ac01 c,RS_RLZY_SJSB_PUSHDATAS  f
        where a.RS_YHLSH = b.userid
        and b.ztid = c.ztid
        and a.RS_RLZY_GZJY_LSH = f.sid and a.TS_XGSJ != f.xgsj
    </select>

    <select id="xyUpdateJyjlList" resultType="com.zjrs.ggfw.sggfw.po.GrJlxxPO">
        select a.rs_rlzy_jyjl_lsh as ACC0B0,c.ZTID as AAC001,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        F_RLZY_TRANSCODE('JBXX_AAC161',c.AAC161) AAC161,
        c.AAC003,
        F_RLZY_TRANSCODE('JBXX_AAC004',c.aac004) AAC004,
        c.AAC006,
        F_RLZY_TRANSCODE('JBXX_AAC011',c.aac011) AAC011,
        c.AAC002 as AAC002,
        a.rxsj as BCC309,
        a.bysj as BCC310,
        a.BYYX as BAC128,
        a.SXZY as AHC451,
        a.ts_xgsj as BAE005
        from v_RS_RLZY_JYJL a, rs_ggfw_user b, ac01 c,RS_RLZY_SJSB_PUSHDATAS f
        where a.RS_YHLSH = b.userid
        and b.ztid = c.ztid
        and a.rs_rlzy_jyjl_lsh = f.sid
        and a.ts_xgsj != f.xgsj
    </select>

    <select id="xyDelJyjlList" resultType="com.zjrs.ggfw.sggfw.po.GrJlxxPO">
        select a.rs_rlzy_jyjl_lsh as ACC0B0,c.ZTID as AAC001,
        F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
        c.AAC147,
        F_RLZY_TRANSCODE('JBXX_AAC161',c.AAC161) AAC161,
        c.AAC003,
        F_RLZY_TRANSCODE('JBXX_AAC004',c.aac004) AAC004,
        c.AAC006,
        F_RLZY_TRANSCODE('JBXX_AAC011',c.aac011) AAC011,
        c.AAC002 as AAC002,
        a.rxsj as BCC309,
        a.bysj as BCC310,
        a.BYYX as BAC128,
        a.SXZY as AHC451,
        a.ts_xgsj as BAE005
        from v_RS_RLZY_JYJL a, rs_ggfw_user b, ac01 c,RS_RLZY_SJSB_PUSHDATAS f
        where a.RS_YHLSH = b.userid
        and b.ztid = c.ztid
        and a.rs_rlzy_jyjl_lsh = f.sid
    </select>

<select id="xyDelGzjyList" resultType="com.zjrs.ggfw.sggfw.po.GrJlxxPO">
    select a.RS_RLZY_GZJY_LSH as ACC0B0,c.ZTID as AAC001,
    F_RLZY_TRANSCODE('JBXX_AAC058',c.aac058) AAC058,
    c.AAC147,
    F_RLZY_TRANSCODE('JBXX_AAC161',c.AAC161) AAC161,
    c.AAC003,
    F_RLZY_TRANSCODE('JBXX_AAC004',c.aac004) AAC004,
    c.AAC006,
    F_RLZY_TRANSCODE('JBXX_AAC011',c.aac011) AAC011,
    a.KSSJ as BCC309,
    c.AAC002,
    a.jssj as BCC310,
    a.GZDW as BAC128,
    a.SZZW as AHC451,
    a.GZZZ as ACC0B4,
    a.ts_cjsj as BAE003,
    a.ts_xgsj as BAE005
    from v_RS_RLZY_GZJY a, rs_ggfw_user b, ac01 c,RS_RLZY_SJSB_PUSHDATAS f
    where a.RS_YHLSH = b.userid
    and b.ztid = c.ztid
    and a.rs_rlzy_gzjy_lsh = f.sid
</select>
</mapper>
