<?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.elephant.framework.galaxy.aroad.module.zhjc.mapper.ZhjcXmjcZtxmDdjglMapper">

  <resultMap id="zhjcXmjcZtxmDdjglMap" type="com.elephant.framework.galaxy.aroad.module.zhjc.entity.ZhjcXmjcZtxmDdjgl">
        <id property="id" column="id"/>
        <result property="year" column="year"/>
        <result property="city" column="city"/>
        <result property="county" column="county"/>
        <result property="lxbh" column="lxbh"/>
        <result property="lxmc" column="lxmc"/>
        <result property="qdmc" column="qdmc"/>
        <result property="zdmc" column="zdmc"/>
        <result property="qdzh" column="qdzh"/>
        <result property="zdzh" column="zdzh"/>
        <result property="lc" column="lc"/>
        <result property="dj" column="dj"/>
        <result property="cdfl" column="cdfl"/>
        <result property="mcfl" column="mcfl"/>
        <result property="lmkd" column="lmkd"/>
        <result property="ljkd" column="ljkd"/>
        <result property="xjnd" column="xjnd"/>
        <result property="gjnd" column="gjnd"/>
        <result property="zjycdxnd" column="zjycdxnd"/>
        <result property="cfbm" column="cfbm"/>
        <result property="cfxh" column="cfxh"/>
        <result property="cfldQdzh" column="cfld_qdzh"/>
        <result property="cfldZdzh" column="cfld_zdzh"/>
        <result property="gydw" column="gydw"/>
  </resultMap>

      <select id="getList" resultMap="zhjcXmjcZtxmDdjglMap">
            select ddj.*,shape.shape
            from t_zhjc_xmjc_ztxm_ddjgl ddj
            LEFT JOIN
            t_zhjc_xmjc_ztxm_ddjgl_shape shape
            on
            ddj.lxbh = shape.lxbm and ddj.qdzh =shape.qdzh and ddj.zdzh = shape.zdzh
            <where>
                  <if test="wr.year !=null">
                        ddj.year  =#{wr.year}
                  </if>
            </where>
      </select>
</mapper>
