<?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.zhtj.mapper.ZhtjGlqsqkQlqkMapper">

    <resultMap id="zhtjGlqsqkQlqkMap" type="com.elephant.framework.galaxy.aroad.module.zhtj.entity.ZhtjGlqsqkQlqk">
        <id property="id" column="id"/>
        <result property="year" column="year"/>
        <result property="area" column="area"/>
        <result property="zjCd" column="zj_cd"/>
        <result property="zjSl" column="zj_sl"/>
        <result property="tdqCd" column="tdq_cd"/>
        <result property="tdqSl" column="tdq_sl"/>
        <result property="dqCd" column="dq_cd"/>
        <result property="dqSl" column="dq_sl"/>
        <result property="zqCd" column="zq_cd"/>
        <result property="zqSl" column="zq_sl"/>
        <result property="xqCd" column="xq_cd"/>
        <result property="xqSl" column="xq_sl"/>
        <result property="ljqCd" column="ljq_cd"/>
        <result property="ljqSl" column="ljq_sl"/>
        <result property="wqCd" column="wq_cd"/>
        <result property="wqSl" column="wq_sl"/>
        <result property="xzjtCd" column="xzjt_sl"/>
        <result property="xzjtSl" column="xzjt_sl"/>
        <result property="sort" column="sort"/>
        <result property="creator" column="creator"/>
        <result property="createTime" column="create_time"/>
        <result property="updatePerson" column="update_person"/>
        <result property="updateTime" column="update_time"/>
        <result property="status" column="status"/>
        <result property="delFlag" column="del_flag"/>
        <result property="remarks" column="remarks"/>
    </resultMap>
    <select id="newYear" resultType="string">
            select max(year) from t_zhtj_glqsqk_qlqk
      </select>
    <select id="selectOneForPtgsd" resultType="com.elephant.framework.galaxy.aroad.module.zhtj.entity.ZhtjGlqsqkQlqk">
        select * from t_zhtj_glqsqk_qlqk_ptgsd
        <where>
            <if test="ql.year !=null and ql.year!=''">
                year =#{ql.year}
            </if>
            <if test="ql.area !=null and ql.area!=''">
              and  area =#{ql.area}
            </if>
        </where>


    </select>
</mapper>
