<?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="org.springblade.modules.mapper.RkxxMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="blogResultMap" type="org.springblade.modules.entity.RkxxEntity">
        <result column="id" property="id"/>
    </resultMap>

    <select id="selectRyxxBySfzh" resultType="org.springblade.modules.entity.RkxxEntity">
        select
            ryxm as fzXm,
            rydh as fzDh,
            rydzxz as hjdz,
            gzdw as fzDw,
            ryzp as fzZp,
            ryxb,
            rydz,
            rd.pcsjgdm,
            rd.dqm,
            rd.pcsjgmc,
            br.province_name || br.city_name || br.name as hjdssq,
            ry_mz,
            ry_mz_dm,
            ry_hyzk,
            ry_hyzk_dm,
            ry_whcd,
            ry_whcd_dm,
            ry_zzmm,
            ry_zzmm_dm,
            ry_byzk,
            ry_byzk_dm,
            jzdpcs,
            jzdpcsdm
        from sspt.ybss_xx yx
        left join sspt.rk_dzxx rd on yx.rydz = rd.dzbm
        left join jdrh.blade_region br on rd.ssxq = br.code
        where rysfzh = #{rySfzh}
    </select>

    <select id="selectClxxByCphm" resultType="org.springblade.modules.entity.ClxxEntity">
        select * from sspt.zdr_clxx where cphm = #{cphm}
    </select>
</mapper>
