<?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.ProjectSignInfoMapper">
  <resultMap id="BaseResultMap" type="cn.com.countrygarden.bi.main.model.project.ProjectSignInfo">
    <result column="id" jdbcType="INTEGER" property="id" />
    <result column="provincesName" jdbcType="VARCHAR" property="provincesName" />
    <result column="organName" jdbcType="VARCHAR" property="organName" />
    <result column="first_quarter_target" jdbcType="DECIMAL" property="firstQuarterTarget" />
    <result column="first_quarter_progress" jdbcType="DECIMAL" property="firstQuarterProgress" />
    <result column="two_quarter_target" jdbcType="DECIMAL" property="twoQuarterTarget" />
    <result column="two_quarter_progress" jdbcType="DECIMAL" property="twoQuarterProgress" />
    <result column="three_quarter_target" jdbcType="DECIMAL" property="threeQuarterTarget" />
    <result column="three_quarter_progress" jdbcType="DECIMAL" property="threeQuarterProgress" />
    <result column="four_quarter_target" jdbcType="DECIMAL" property="fourQuarterTarget" />
    <result column="four_quarter_progress" jdbcType="DECIMAL" property="fourQuarterProgress" />
    <result column="year_quarter_target" jdbcType="DECIMAL" property="yearQuarterTarget" />
    <result column="year_quarter_progress" jdbcType="DECIMAL" property="yearQuarterProgress" />
     <result column="year" jdbcType="VARCHAR" property="year" />
  </resultMap>
  <select id="search" resultMap="BaseResultMap" resultType="string">
  	SELECT
  		 id, 
  		 provincesName, 
  		 organName, 
  		 first_quarter_target, 
  		 first_quarter_progress, 
  		 two_quarter_target, 
  		 two_quarter_progress, 
  		 three_quarter_target, 
  		 three_quarter_progress, 
  		 four_quarter_target, 
    	 four_quarter_progress, 
    	 year_quarter_target, 
    	 year_quarter_progress,
    	 year
    FROM
    	project_sign_info
    WHERE
    	year = #{year}
    ORDER BY year_quarter_progress DESC
  </select>
</mapper>