<?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.zwnw.rlzysc.entity.JllrMapper">
    <select id="getJllrList" resultType="java.util.Map">
        select
        a.rs_rlzy_jlxx_lsh "rsrlzyjlxxlsh",
        b.qwzw "qwzw",
        a.rs_yhlsh "rsyhlsh",
        a.jlmc "jlmc",
        a.aac003 "xm",
        a.aac058 "zjlx",
        a.aac147 "sfzhm",
        a.ts_qzlx "tsqzlx",
        a.ts_xgsj "tsxgsj",
        a.rs_rg_jbxx_jlzt "rsrgjbxxjlzt",
        a.sftjnwsh "sftjnwsh",
        a.sfmrjl "sfmrjl",
        a.fbzt "fbzt"
        from v_rs_rlzy_jlxx a,v_rs_rlzy_qzyx b,v_rs_rlzy_qzyx_dyb c
        where a.rs_rlzy_jlxx_lsh = c.rs_rlzy_jlxx_lsh and b.rs_rlzy_qzyx_lsh = c.rs_rlzy_qzyx_lsh
        and b.ts_yxbz = '1'
        <if test="dto.zjlx != null and dto.zjlx != ''">
            and a.aac058 = #{dto.zjlx}
        </if>
        <if test="dto.sfzhm != null and dto.sfzhm != ''">
            and a.aac147 = #{dto.sfzhm}
        </if>
        order by a.ts_cjsj desc
    </select>

</mapper>
