<?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.JyzdglMapper">
    <select id="getJyzdglList" parameterType="com.zjrs.zwnw.rlzysc.dto.JyzdQueryDTO" resultType="HashMap">
        select xm as "xm",
        zjlx as "zjlx",
        sfzxx as "sfzxx",
        lxfs as "lxfs",
        xyzdgz as "xyzdgz",
        xwzdsj as "xwzdsj",
        sffk as "sffk",
        rs_rlzy_jyzd_lsh as "rsrlzyjyzdlsh",
        rs_yhlsh as "rsyhlsh",
        f_jbxxgl_getAllAreaNameLine(xjzdxzqh) as "xjzdxzqh"
        from v_rs_rlzy_jyzd_xzqh
        where rs_rlzy_jyzd_lx = #{dto.rsrlzyjyzdlx}
        <if test="dto.xjzdxzqh != null and dto.xjzdxzqh != '' and dto.xjzdxzqh != '440800'">
            and xjzdxzqh = #{dto.xjzdxzqh}
        </if>
        <if test="dto.userregioncode != '440800'">
            and xjzdxzqh = #{dto.userregioncode}
        </if>
    </select>

</mapper>
