<?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="cn.com.countrygarden.bi.main.dao.project.ProjectTargetMapper">
    <resultMap id="BaseResultMap" type="cn.com.countrygarden.bi.main.service.project.impl.vo.ProjectTargetDto">
        <!--
          WARNING - @mbg.generated
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="region" jdbcType="VARCHAR" property="region"/>
        <result column="organ_name" jdbcType="VARCHAR" property="organName"/>
        <result column="year" jdbcType="VARCHAR" property="year"/>
        <result column="province" jdbcType="VARCHAR" property="province"/>
       <result column="project_number" jdbcType="VARCHAR" property="projectNumber"/>
       <result column="intelligence_number_all" jdbcType="VARCHAR" property="intelligenceNumberAll"/>
       <result column="intelligence_number_one" jdbcType="VARCHAR" property="intelligenceNumberOne"/>
       <result column="intelligence_number_two" jdbcType="VARCHAR" property="intelligenceNumberTwo"/>
       <result column="intelligence_number_three" jdbcType="VARCHAR" property="intelligenceNumberThree"/>
       <result column="intelligence_number_four" jdbcType="VARCHAR" property="intelligenceNumberFour"/>
       <result column="saturation_income_all" jdbcType="VARCHAR" property="saturationIncomeAll"/>
       <result column="saturation_income_one" jdbcType="VARCHAR" property="saturationIncomeOne"/>
       <result column="saturation_income_two" jdbcType="VARCHAR" property="saturationIncomeTwo"/>
       <result column="saturation_income_three" jdbcType="VARCHAR" property="saturationIncomeThree"/>
       <result column="saturation_income_four" jdbcType="VARCHAR" property="saturationIncomeFour"/>
       <result column="be_income_all" jdbcType="VARCHAR" property="beIncomeAll"/>
       <result column="be_income_one" jdbcType="VARCHAR" property="beIncomeOne"/>
       <result column="be_income_two" jdbcType="VARCHAR" property="beIncomeTwo"/>
       <result column="be_income_three" jdbcType="VARCHAR" property="beIncomeThree"/>
       <result column="be_income_four" jdbcType="VARCHAR" property="beIncomeFour"/>    
    </resultMap>
	<select id="search" resultMap="BaseResultMap" parameterType="string">
		SELECT 
			pt.id,
			pt.region,
			pt.year,
			pt.province,
			pt.project_number,
			pt.intelligence_number_all,
			pt.intelligence_number_one,
			pt.intelligence_number_two,
			pt.intelligence_number_three,
			pt.intelligence_number_four,
			pt.saturation_income_all,
			pt.saturation_income_one,
			pt.saturation_income_two,
			pt.saturation_income_three,
			pt.saturation_income_four,
			pt.be_income_all,
			pt.be_income_one,
			pt.be_income_two,
			pt.be_income_three,
			pt.be_income_four,
			o.`name` organ_name
		FROM
			project_target pt
		LEFT JOIN organ o ON o.organ_code = pt.organ_id
		WHERE
			pt.`year` = #{year}
	
	</select>
	
	
</mapper>