<?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.DwjbxxMapper">
    <select id="getDwJbxx" resultType="com.zjrs.ggfw.sggfw.po.DwjbxxPO">
        select a.ztid AAB001,a.AAB004,a.AAB998,F_RLZY_TRANSCODE('JBXX_AAB019',a.AAB019) as AAB019,
        F_RLZY_TRANSCODE('JBXX_AAB022',a.AAB022) as AAB022,a.aab078 as AAB299,a.AAE006,a.BAE005
        from ab01 a where ztid = #{dwztid} 
    </select>


    <select id="xyUpdateDwjbxx" resultType="com.zjrs.ggfw.sggfw.po.DwjbxxPO">
        select c.TID, a.ztid AAB001,a.AAB004,a.AAB998,F_RLZY_TRANSCODE('JBXX_AAB019',a.AAB019) as AAB019,
        F_RLZY_TRANSCODE('JBXX_AAB022',a.AAB022) as AAB022,substr(a.aab078,1,6) as AAB299,a.AAE006,a.BAE005,
        a.AAB003,a.AAB007,a.AAE007,a.AAB013,a.BAB015 as AAB015,a.AAE004,a.AAE005,a.AAE159
        from ab01 a, RS_RLZY_SJSB_PUSHDATAS b,RS_RLZY_SJSB_IDDZ c where
        a.ztid = b.sid and a.ztid = c.sid and a.Bae005 != b.xgsj
    </select>

    <select id="getXsbDwJbxx" resultType="com.zjrs.ggfw.sggfw.po.DwjbxxPO">
        select distinct d.ztid AAB001,d.AAB004,d.AAB998,F_RLZY_TRANSCODE('JBXX_AAB019',nvl(d.AAB019,'10')) as AAB019,
        F_RLZY_TRANSCODE('JBXX_AAB022',nvl(d.AAB022,'1583')) as AAB022,substr(d.aab078,1,6) as AAB299,d.AAE006,d.BAE005,
        d.AAB003,d.AAB007,d.AAE007,d.AAB013,d.BAB015 as AAB015,d.AAE004,d.AAE005,d.AAE159
        from rs_rlzy_zwxx a,rs_rlzy_qyxx b,rs_ggfw_user c, ab01 d where
        a.rs_rlzy_qyxx_lsh = b.rs_rlzy_qyxx_lsh and c.userid = b.rs_yhlsh
    </select>
</mapper>
