<?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.ZhtjGlqsqkSdqkMapper">

    <resultMap id="zhtjGlqsqkSdqkMap" type="com.elephant.framework.galaxy.aroad.module.zhtj.entity.ZhtjGlqsqkSdqk">
        <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="tcsdCd" column="tcsd_cd"/>
        <result property="tcsdSl" column="tcsd_sl"/>
        <result property="csdCd" column="csd_cd"/>
        <result property="csdSl" column="csd_sl"/>
        <result property="zsdCd" column="zsd_cd"/>
        <result property="zsdSl" column="zsd_sl"/>
        <result property="dsdCd" column="dsd_cd"/>
        <result property="dsdSl" column="dsd_sl"/>
        <result property="xzjtCd" column="xzjt_cd"/>
        <result property="xzjtSl" column="xzjt_sl"/>
        <result property="swlCd" column="swl_cd"/>
        <result property="swlSl" column="swl_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_sdqk
      </select>
    <select id="selectOneForPtgsd" resultType="com.elephant.framework.galaxy.aroad.module.zhtj.entity.ZhtjGlqsqkSdqk">
        select * from t_zhtj_glqsqk_sdqk_ptgsd
        <where>
            <if test="sd.year !=null and sd.year!=''">
                year =#{sd.year}
            </if>
            <if test="sd.area !=null and sd.area!=''">
                and area =#{sd.area}
            </if>
        </where>


    </select>
</mapper>
