<?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.bigholderSatisfy.BigholderSatisfyMapper">

	<resultMap id="BigholderSatisfyMap"
		type="cn.com.countrygarden.bi.main.model.BigholderSatisfacationInfo">
		<id column="id" jdbcType="INTEGER" property="id" />
		<result column="answer_finish_time" jdbcType="TIMESTAMP"
			property="answerFinishTime" />
		<result column="correspond_project" jdbcType="VARCHAR"
			property="correspondProject" />
		<result column="answer_use_time" jdbcType="VARCHAR" property="answerUseTime" />
		<result column="answer_source" jdbcType="VARCHAR" property="answerSource" />
		<result column="answer_source_info" jdbcType="VARCHAR"
			property="answerSourceInfo" />
		<result column="answer_source_ip" jdbcType="VARCHAR" property="answerSourceIp" />
		<result column="a1" jdbcType="VARCHAR" property="a1" />
		<result column="a2" jdbcType="INTEGER" property="a2" />
		<result column="a3" jdbcType="VARCHAR" property="a3" />
		<result column="a41" jdbcType="INTEGER" property="a41" />
		<result column="a42" jdbcType="INTEGER" property="a42" />
		<result column="a43" jdbcType="INTEGER" property="a43" />
		<result column="a44" jdbcType="INTEGER" property="a44" />
		<result column="a51" jdbcType="INTEGER" property="a51" />
		<result column="a52" jdbcType="INTEGER" property="a52" />
		<result column="a53" jdbcType="INTEGER" property="a53" />
		<result column="a54" jdbcType="INTEGER" property="a54" />
		<result column="a61" jdbcType="INTEGER" property="a61" />
		<result column="a62" jdbcType="INTEGER" property="a62" />
		<result column="a71" jdbcType="INTEGER" property="a71" />
		<result column="a72" jdbcType="INTEGER" property="a72" />
		<result column="a8" jdbcType="VARCHAR" property="a8" />
		<result column="a9" jdbcType="VARCHAR" property="a9" />
		<result column="a10" jdbcType="VARCHAR" property="a10" />
		<result column="area" jdbcType="VARCHAR" property="area" />
		<result column="project_name" jdbcType="VARCHAR" property="projectName" />
		<result column="name" jdbcType="VARCHAR" property="name" />
		<result column="job" jdbcType="VARCHAR" property="job" />
		<result column="estate_area" jdbcType="VARCHAR" property="estateArea" />
		<result column="create_by" jdbcType="VARCHAR" property="createBy" />
		<result column="last_update_by" jdbcType="VARCHAR" property="lastUpdateBy" />
		<result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
		<result column="last_update_date" jdbcType="TIMESTAMP" property="lastUpdateDate" />
		<result column="yearmon" jdbcType="DATE" property="yearmon" />
		<result column="exception_info_audit_struts" jdbcType="VARCHAR" property="exceptionInfoAuditStruts" />
		<result column="audit_status" jdbcType="VARCHAR" property="auditStatus" />
		<result column="exception_message" jdbcType="VARCHAR" property="exceptionMessage" />
		<result column="tb_user_code" jdbcType="VARCHAR" property="tbUserCode" />
		<result column="rejected_message" jdbcType="VARCHAR" property="rejectedMessage" />
	</resultMap>
		
	 <select id="getSelectByMonAndArea"  resultMap="BigholderSatisfyMap">
		SELECT id,tb_user_code,rejected_message,exception_message,audit_status,exception_info_audit_struts,correspond_project,answer_finish_time,answer_use_time,answer_source,answer_source_info,
		answer_source_ip,a1,a2,a3,a41,a42,a43,a44,a51,a52,a53,a54,a61,a62,a71,a72,a9,a10,
		area,project_name,name,job,estate_area,create_by,last_update_by,create_date,
		last_update_date FROM bigholder_satisfaction_info As b where
		<where>
			1=1 
            <if test="yearMonth!=null">
                AND DATE_FORMAT(b.create_date,'%Y-%m')=#{yearMonth}
            </if>
            <if test="area!=null">
                AND b.estate_area=#{area}
            </if>
        </where>
	</select>
	
	<select id="getViewInfo" parameterType="String" resultMap="BigholderSatisfyMap">
		SELECT id,exception_message,rejected_message,audit_status,exception_info_audit_struts,correspond_project,answer_finish_time,answer_use_time,answer_source,answer_source_info,
		answer_source_ip,a1,a2,a3,a41,a42,a43,a44,a51,a52,a53,a54,a61,a62,a71,a72,a9,a10,
		area,project_name,name,job,estate_area,create_by,last_update_by,create_date,
		last_update_date FROM bigholder_satisfaction_info As b where
		b.id=#{id}
	</select>
	
	<update id="updateExceptionStatus">
		UPDATE 
			bigholder_satisfaction_info b
		SET
		    b.exception_info_audit_struts=#{exceptionInfoAuditStruts},
		    b.exception_message=#{exception_message}
		WHERE
			b.id=#{id}
	</update>
	
	<update id="updateAuditStatus" parameterType="cn.com.countrygarden.bi.main.model.BigholderSatisfacationInfo">
		UPDATE 
			bigholder_satisfaction_info b
		SET
		    b.audit_status=#{auditStatus},
		WHERE
			b.id=#{id}
	</update>

	<update id="updateBigholderSatisfy">
		UPDATE 
			bigholder_satisfaction_info b
		SET
		    b.correspond_project=#{correspondProject}
		WHERE
			b.id=#{id}
	</update>
	
	 <update id="updateAreaOrProjectName">
		UPDATE 
			bigholder_satisfaction_info b
		<trim prefix="set" suffixOverrides=",">
			<if test="correspondProject">
				b.correspond_project=#{correspondProject},
			</if>
			<if test="area">
				b.area=#{area}
			</if>
		</trim>
		WHERE
			b.id=#{id}
	</update>
	
	<update id="updateRejectedInfo" parameterType="cn.com.countrygarden.bi.main.model.BigholderSatisfacationInfo">
		UPDATE 
			bigholder_area_audit b
		SET 
			b.audit_status=#{auditStatus},
			b.rejected_message=#{rejectedMessage}
		WHERE 
			b.id = #{id}
	</update>

	<!-- 覆盖当月已导入当月数据 -->
	<delete id="deleteImport">
		DELETE FROM bigholder_satisfaction_info
		WHERE
		DATE_FORMAT(answer_finish_time,'%Y-%m')=DATE_FORMAT(#{answerFinishTime},'%Y-%m')
	</delete>
	
	<delete id="deleteExceptionStatus">
		DELETE FROM bigholder_satisfaction_info AS b
		WHERE
		b.id=#{id}
	</delete>

	<!-- 批量插入调研数据 -->
	<insert id="addSatisfyList" parameterType="java.util.List">
		INSERT INTO bigholder_satisfaction_info (
		id,
		answer_finish_time,
		answer_use_time,
		answer_source,
		answer_source_info,
		answer_source_ip,
		a1,
		a2,
		a3,
		a41,
		a42,
		a43,
		a44,
		a51,
		a52,
		a53,
		a54,
		a61,
		a62,
		a71,
		a72,
		a73,
		a8,
		a9,
		a10,
		area,
		project_name,
		name,
		job,
		estate_area,
		create_by,
		last_update_by,
		create_date,
		last_update_date,
		estate_area_isred,
		is_exist_owner
		)
		VALUES
		<foreach collection="list" item="item" index="index"
			separator=",">
			(
			UUID(),
			#{item.answerFinishTime},
			#{item.answerUseTime},
			#{item.answerSource},
			#{item.answerSourceInfo},
			#{item.answerSourceIp},
			#{item.a1},
			#{item.a2},
			#{item.a3},
			#{item.a41},
			#{item.a42},
			#{item.a43},
			#{item.a44},
			#{item.a51},
			#{item.a52},
			#{item.a53},
			#{item.a54},
			#{item.a61},
			#{item.a62},
			#{item.a71},
			#{item.a72},
			#{item.a73},
			#{item.a8},
			#{item.a9},
			#{item.a10},
			#{item.area},
			#{item.projectName},
			#{item.name},
			#{item.job},
			#{item.estateArea},
			#{item.createBy},
			#{item.lastUpdateBy},
			#{item.createDate},
			#{item.lastUpdateDate},
			#{item.estateAreaIsRed},
			#{item.isExistOwner}
			)
		</foreach>
	</insert>
	
	<select id="findImportedList" parameterType="string" resultType="cn.com.countrygarden.bi.main.dto.BigholderImportedDto">
		SELECT
			t3.estate_area estateArea,
			t3.project_name projectName,
			t3.xmtotal,
			t3.yxtotal,
		<!-- 	rm.hand_user handUser, -->
			t4.estate_area_isred estateAreaIsRed
		FROM
			(
				SELECT
					t1.estate_area,
					t1.project_name,
					t1.xmtotal,
					t2.yxtotal
				FROM
					(
						SELECT
							bs.estate_area,
							bs.project_name,
							CONCAT(
								bs.estate_area,
								bs.project_name
							) area,
							count(bs.job) xmtotal
						FROM
							bigholder_satisfaction_info bs
						WHERE
							bs.job = '项目总经理/副总经理'
						AND DATE_FORMAT(create_date, '%Y-%m') = #{yearMonth}
						GROUP BY
							bs.estate_area,
							bs.project_name
					) t1
				INNER JOIN (
					SELECT
						bs.estate_area,
						bs.project_name,
						CONCAT(
							bs.estate_area,
							bs.project_name
						) area,
						count(bs.job) yxtotal
					FROM
						bigholder_satisfaction_info bs
					WHERE
						bs.job = '项目营销负责人'
					AND DATE_FORMAT(create_date, '%Y-%m') = #{yearMonth}
					GROUP BY
						bs.estate_area,
						bs.project_name
				) t2
				WHERE
					t1.area = t2.area
				UNION
					SELECT
						t1.estate_area,
						t1.project_name,
						t1.xmtotal,
						'0' yxtotal
					FROM
						(
							SELECT
								bs.estate_area,
								bs.project_name,
								count(bs.job) xmtotal
							FROM
								bigholder_satisfaction_info bs
							WHERE
								bs.job = '项目总经理/副总经理'
							AND DATE_FORMAT(create_date, '%Y-%m') = #{yearMonth}
							GROUP BY
								bs.estate_area,
								bs.project_name
							HAVING
								CONCAT(
									bs.estate_area,
									bs.project_name
								) NOT IN (
									SELECT
										t1.area
									FROM
										(
											SELECT
												CONCAT(
													bs.estate_area,
													bs.project_name
												) area,
												count(bs.job) xmtotal
											FROM
												bigholder_satisfaction_info bs
											WHERE
												bs.job = '项目总经理/副总经理'
											GROUP BY
												bs.estate_area,
												bs.project_name
										) t1
									INNER JOIN (
										SELECT
											CONCAT(
												bs.estate_area,
												bs.project_name
											) area,
											count(bs.job) yxtotal
										FROM
											bigholder_satisfaction_info bs
										WHERE
											bs.job = '项目营销负责人'
										GROUP BY
											bs.estate_area,
											bs.project_name
									) t2
									WHERE
										t1.area = t2.area
								)
						) t1
					UNION
						SELECT
							t2.estate_area,
							t2.project_name,
							'0' xmtotal,
							t2.yxtotal
						FROM
							(
								SELECT
									bs.estate_area,
									bs.project_name,
									count(bs.job) yxtotal
								FROM
									bigholder_satisfaction_info bs
								WHERE
									bs.job = '项目营销负责人'
								AND DATE_FORMAT(create_date, '%Y-%m') = #{yearMonth}
								GROUP BY
									bs.estate_area,
									bs.project_name
								HAVING
									CONCAT(
										bs.estate_area,
										bs.project_name
									) NOT IN (
										SELECT
											t1.area
										FROM
											(
												SELECT
													CONCAT(
														bs.estate_area,
														bs.project_name
													) area,
													count(bs.job) xmtotal
												FROM
													bigholder_satisfaction_info bs
												WHERE
													bs.job = '项目总经理/副总经理'
												GROUP BY
													bs.estate_area,
													bs.project_name
											) t1
										INNER JOIN (
											SELECT
												CONCAT(
													bs.estate_area,
													bs.project_name
												) area,
												count(bs.job) yxtotal
											FROM
												bigholder_satisfaction_info bs
											WHERE
												bs.job = '项目营销负责人'
											GROUP BY
												bs.estate_area,
												bs.project_name
										) t2
										WHERE
											t1.area = t2.area
									)
							) t2
			) t3
		<!-- LEFT JOIN (
			SELECT
				rm1.area,
				rm1.hand_user
			FROM
				bigholder_rights_manage rm1
			WHERE
				rm1.id = (
					SELECT
						rm2.id
					FROM
						bigholder_rights_manage rm2
					WHERE
						rm2.area = rm1.area
					LIMIT 1
				)
		) rm ON t3.estate_area = rm.area -->
		LEFT JOIN (
			SELECT
				bs.estate_area,
				bs.estate_area_isred,
				bs.is_exist_owner
			FROM
				bigholder_satisfaction_info bs
			GROUP BY
				bs.estate_area,
				bs.estate_area_isred,
				bs.is_exist_owner
		) t4 ON t4.estate_area = t3.estate_area
		ORDER BY
			t4.estate_area_isred DESC,t4.is_exist_owner,t3.estate_area,t3.project_name 
	</select>
	
	<update id="updateIsExistOwner" parameterType="map">
		UPDATE 
			bigholder_satisfaction_info bs
		SET 
			<if test='flag=="0"'>
				bs.is_exist_owner = '0'
			</if>
			<if test='flag=="1"'>
				bs.is_exist_owner = '1'
			</if>
		WHERE 
			bs.estate_area = #{area}
		AND	
			DATE_FORMAT(bs.create_date, '%Y-%m') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<update id="updateArea" parameterType="map">
		UPDATE 
			bigholder_satisfaction_info bs
		SET 
			bs.estate_area = #{area},
			bs.estate_area_isred = '0',
			bs.correspond_project = null
			<if test='isExistOwner=="1"'>
				,bs.is_exist_owner = '1'
			</if>
			<if test='isExistOwner=="0"'>
				,bs.is_exist_owner = '0'
			</if>
		WHERE
			bs.estate_area = #{estateArea}
		AND 
			bs.project_name = #{project}
		AND	
			DATE_FORMAT(bs.create_date, '%Y-%m') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<update id="updateAuditAreas" parameterType="map">
		UPDATE
			 bigholder_area_audit ba
		SET 
			ba.audit_status = '0',
			ba.push_perdata_status = '1',
			ba.exception_status = '0',
			ba.rejected_message = NULL
		WHERE 1=1
		<if test="updateAuditAreas != null and updateAuditAreas.size()>0">
			AND ba.area IN
			<foreach item="item" index="index" collection="updateAuditAreas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		AND
			ba.`year_mon` = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<update id="updateSatisfyAreas" parameterType="map">
		UPDATE 
			bigholder_satisfaction_info bs
		SET 
			bs.audit_status = '0',
			bs.push_perdata_status = '1',
			bs.exception_struts = '0'
		WHERE 1=1
		<if test="updateAuditAreas != null and updateAuditAreas.size()>0">
			AND bs.estate_area IN
			<foreach item="item" index="index" collection="updateAuditAreas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		AND
			DATE_FORMAT(bs.create_date, '%Y-%m') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<update id="updatePushDatas">
		UPDATE 
			bigholder_push_perdata bp
		SET 
			bp.push_status = '1'
		WHERE 1=1
		AND
			bp.year_mon = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<update id="updateExceptionDatas" parameterType="map">
		UPDATE 
			bigholder_exception_info be
		SET 
			be.exception_aduit_status = '0',
			be.exception_message = NULL
		WHERE 1=1
		<if test="updateAuditAreas != null and updateAuditAreas.size()>0">
			AND be.area IN
			<foreach item="item" index="index" collection="updateAuditAreas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		AND
			be.year_mon = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<update id="updateSatisfyProject" parameterType="map">
		UPDATE 
			bigholder_satisfaction_info bs
		SET 
			bs.audit_status = '0',
			bs.push_perdata_status = '1',
			bs.exception_struts = '0'
		WHERE 1=1
		AND bs.estate_area = #{estateArea}
		AND bs.project_name = #{project}
		AND	DATE_FORMAT(bs.create_date, '%Y-%m') = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<update id="updateExceptionProject" parameterType="map">
		UPDATE 
			bigholder_exception_info be
		SET 
			be.exception_aduit_status = '0',
			be.exception_message = NULL
		WHERE 1=1
		AND be.area = #{estateArea}
		AND be.original_project_name = #{project}
		AND be.year_mon = DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 MONTH), '%Y-%m')
	</update>
	
	<insert id="addLandEstateList" parameterType="list">
		INSERT INTO bigholder_land_estate (
		id,
		land_area,
		estate_area,
		a2,
		a3,
		a4,
		a8,
		a9,
		a10,
		a11,
		a12,
		create_by,
		last_update_by,
		create_date,
		last_update_date
		)
		VALUES
		<foreach collection="list" item="item" index="index"
			separator=",">
			(
			UUID(),
			#{item.landArea},
			#{item.estateArea},
			#{item.a2},
			#{item.a3},
			#{item.a4},
			#{item.a8},
			#{item.a9},
			#{item.a10},
			#{item.a11},
			#{item.a12},
			#{item.createBy},
			#{item.lastUpdateBy},
			#{item.createDate},
			#{item.lastUpdateDate}
			)
		</foreach>
	</insert>
	
	<select id="findDataByQuarters" parameterType="list" resultType="string">
		SELECT
			le.id
		FROM
			bigholder_land_estate le
		<where>
			<if test="quarters!=null and quarters.size()>0">
				DATE_FORMAT(le.create_date, '%Y-%m') IN 
				<foreach item="item" index="index" collection="quarters" open="(" separator="," close=")">  
					 #{item}  
				</foreach> 
			</if>
		</where>
	</select>
	
	<select id="projectRankList" resultType="cn.com.countrygarden.bi.main.dto.BigholderProjectDto" parameterType="map">
		SELECT
			t3.area estateArea,
			t3.correspond_project projectName,
			t3.rank1,
			FORMAT(t3.satisfy1, 2) satisfy1,
			CONVERT (
				(t3.satisfy1 - t4.satisfy2),
				DECIMAL (10, 2)
			) monUpVal,
			t4.rank2,
			(t3.rank1 - t4.rank2) rankChangeVal
		FROM
			(
				SELECT
					t1.area,
					t1.correspond_project,
					t1.satisfy1,
					t2.rank1,
					CONCAT(
						t1.area,
						t1.correspond_project
					) area1
				FROM
					(
						SELECT
							ba.area,
							ba.correspond_project,
							CONVERT (
								avg(ba.satisfaction_scores),
								DECIMAL (10, 2)
							) satisfy1
						FROM
							bigholder_area_audit ba
						WHERE
							1 = 1
						AND ba.audit_status = '3'
						<if test="nowMonthList!=null and nowMonthList.size()>0">
							AND ba.year_mon IN 
							<foreach item="item" index="index" collection="nowMonthList" open="(" separator="," close=")">  
								 #{item}  
							</foreach> 
						</if>
						<if test="areas!=null and areas.size()>0">
							AND ba.area IN 
							<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
								 #{item}  
							</foreach> 
						</if>
						GROUP BY
							ba.area,
							ba.correspond_project
					) t1
				LEFT JOIN (
					SELECT
						(@rowNO1 := @rowNo1 + 1) rank1,
						b2.satisfy1
					FROM
						(
							SELECT
								ba1.satisfy1
							FROM
								(
									SELECT
										CONVERT (
											avg(ba.satisfaction_scores),
											DECIMAL (10, 2)
										) satisfy1
									FROM
										bigholder_area_audit ba
									WHERE
										1 = 1
									AND ba.audit_status = '3'
									AND ba.satisfaction_scores IS NOT NULL
									<if test="nowMonthList!=null and nowMonthList.size()>0">
										AND ba.year_mon IN 
										<foreach item="item" index="index" collection="nowMonthList" open="(" separator="," close=")">  
											 #{item}  
										</foreach> 
									</if>
									<if test="areas!=null and areas.size()>0">
										AND ba.area IN 
										<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
											 #{item}  
										</foreach> 
									</if>
									GROUP BY
										ba.area,
										ba.correspond_project
								) ba1
							GROUP BY
								ba1.satisfy1
							ORDER BY
								ba1.satisfy1 DESC
						) b2,
						(SELECT @rowNO1 := 0) r1
				) t2 ON t1.satisfy1 = t2.satisfy1
				ORDER BY
					t1.satisfy1 DESC,
					t1.area,
					t1.correspond_project
			) t3
		LEFT JOIN (
			SELECT
				t1.area,
				t1.correspond_project,
				t1.satisfy2,
				t2.rank2,
				CONCAT(
					t1.area,
					t1.correspond_project
				) area2
			FROM
				(
					SELECT
						ba.area,
						ba.correspond_project,
						CONVERT (
							avg(ba.satisfaction_scores),
							DECIMAL (10, 2)
						) satisfy2
					FROM
						bigholder_area_audit ba
					WHERE
						1 = 1
					AND ba.audit_status = '3'
					<if test="lastMonthList!=null and lastMonthList.size()>0">
						AND ba.year_mon IN 
						<foreach item="item" index="index" collection="lastMonthList" open="(" separator="," close=")">  
							 #{item}  
						</foreach> 
					</if>
					<if test="areas!=null and areas.size()>0">
						AND ba.area IN 
						<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
							 #{item}  
						</foreach> 
					</if>
					GROUP BY
						ba.area,
						ba.correspond_project
				) t1
			LEFT JOIN (
				SELECT
					(@rowNO2 := @rowNo2 + 1) rank2,
					b2.satisfy2
				FROM
					(
						SELECT
							ba1.satisfy2
						FROM
							(
								SELECT
									CONVERT (
										avg(ba.satisfaction_scores),
										DECIMAL (10, 2)
									) satisfy2
								FROM
									bigholder_area_audit ba
								WHERE
									1 = 1
								AND ba.audit_status = '3'
								AND ba.satisfaction_scores IS NOT NULL
								<if test="lastMonthList!=null and lastMonthList.size()>0">
									AND ba.year_mon IN 
									<foreach item="item" index="index" collection="lastMonthList" open="(" separator="," close=")">  
										 #{item}  
									</foreach> 
								</if>
								<if test="areas!=null and areas.size()>0">
									AND ba.area IN 
									<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
										 #{item}  
									</foreach> 
								</if>
								GROUP BY
									ba.area,
									ba.correspond_project
							) ba1
						GROUP BY
							ba1.satisfy2
						ORDER BY
							ba1.satisfy2 DESC
					) b2,
					(SELECT @rowNO2 := 0) r1
			) t2 ON t1.satisfy2 = t2.satisfy2
			ORDER BY
				t1.satisfy2 DESC,
				t1.area,
				t1.correspond_project
		) t4 ON t3.area1 = t4.area2
		ORDER BY
			t3.satisfy1 IS NULL,
			t3.rank1,
			t3.area,
			t3.correspond_project
	</select>
	
	<!-- <select id="projectRankList" resultType="cn.com.countrygarden.bi.main.dto.BigholderProjectDto" parameterType="map">
		SELECT
			t3.area estateArea,
			t3.correspond_project projectName,
			t3.rank1,
			t3.satisfy1,
			CONVERT (
				(t3.satisfy1 - t4.satisfy2),
				DECIMAL (10, 2)
			) monUpVal,
			t4.rank2,
			(t3.rank1 - t4.rank2) rankChangeVal
		FROM
			(
				SELECT
					t1.area,
					t1.correspond_project,
					t1.satisfy1,
					t2.rank1,
					CONCAT(
						t1.area,
						t1.correspond_project
					) area1
				FROM
					(
						SELECT
							ba.area,
							ba.correspond_project,
							ba.satisfaction_scores satisfy1
						FROM
							bigholder_area_audit ba
						WHERE
							1 = 1
						AND ba.audit_status = '3' 
						<if test="nowMonthList!=null and nowMonthList.size()>0">
							AND ba.year_mon IN 
							<foreach item="item" index="index" collection="nowMonthList" open="(" separator="," close=")">  
								 #{item}  
							</foreach> 
						</if>
						<if test="areas!=null and areas.size()>0">
							AND ba.area IN 
							<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
								 #{item}  
							</foreach> 
						</if>
					) t1
				LEFT JOIN (
					SELECT
						(@rowNO1 := @rowNo1 + 1) rank1,
						b2.satisfy1
					FROM
						(
							SELECT
								ba.satisfaction_scores satisfy1
							FROM
								bigholder_area_audit ba
							WHERE
								1 = 1
							AND ba.audit_status = '3'
							AND ba.satisfaction_scores IS NOT NULL 
							<if test="nowMonthList!=null and nowMonthList.size()>0">
								AND ba.year_mon IN 
								<foreach item="item" index="index" collection="nowMonthList" open="(" separator="," close=")">  
									 #{item}  
								</foreach> 
							</if>
							<if test="areas!=null and areas.size()>0">
								AND ba.area IN 
								<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
									 #{item}  
								</foreach> 
							</if>
							GROUP BY 
								ba.satisfaction_scores
							ORDER BY
								ba.satisfaction_scores DESC
						) b2,
						(SELECT @rowNO1 := 0) r1
				) t2 ON t1.satisfy1 = t2.satisfy1
				ORDER BY
					t1.satisfy1 DESC,
					t1.area,
					t1.correspond_project
			) t3
		LEFT JOIN (
			SELECT
				t1.area,
				t1.correspond_project,
				t1.satisfy2,
				t2.rank2,
				CONCAT(
					t1.area,
					t1.correspond_project
				) area2
			FROM
				(
					SELECT
						ba.area,
						ba.correspond_project,
						ba.satisfaction_scores satisfy2
					FROM
						bigholder_area_audit ba
					WHERE
						1 = 1
					AND ba.audit_status = '3' 
					<if test="lastMonthList!=null and lastMonthList.size()>0">
						AND ba.year_mon IN 
						<foreach item="item" index="index" collection="lastMonthList" open="(" separator="," close=")">  
							 #{item}  
						</foreach> 
					</if>
					<if test="areas!=null and areas.size()>0">
						AND ba.area IN 
						<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
							 #{item}  
						</foreach> 
					</if>
				) t1
			LEFT JOIN (
				SELECT
					(@rowNO2 := @rowNo2 + 1) rank2,
					b2.satisfy2
				FROM
					(
						SELECT
							ba.satisfaction_scores satisfy2
						FROM
							bigholder_area_audit ba
						WHERE
							1 = 1
						AND ba.audit_status = '3'
						AND ba.satisfaction_scores IS NOT NULL 
						<if test="lastMonthList!=null and lastMonthList.size()>0">
							AND ba.year_mon IN 
							<foreach item="item" index="index" collection="lastMonthList" open="(" separator="," close=")">  
								 #{item}  
							</foreach> 
						</if>
						<if test="areas!=null and areas.size()>0">
							AND ba.area IN 
							<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
								 #{item}  
							</foreach> 
						</if>
						GROUP BY 
							ba.satisfaction_scores
						ORDER BY
							ba.satisfaction_scores DESC
					) b2,
					(SELECT @rowNO2 := 0) r1
			) t2 ON t1.satisfy2 = t2.satisfy2
			ORDER BY
				t1.satisfy2 DESC,
				t1.area,
				t1.correspond_project
		) t4 ON t3.area1 = t4.area2
		ORDER BY
			t3.satisfy1 IS NULL,
			t3.rank1,
			t3.area,
			t3.correspond_project
	</select> -->

	<select id="getRoleByUserCode" parameterType="string" resultType="string">
		SELECT
			ur.role_code
		FROM
			user_roles ur
		WHERE
			ur.user_code = #{userCode}
	</select>
		
	<!-- <select id="countrySatisfy" parameterType="map" resultType="string">
		SELECT
			convert(avg(t4.satisfy),decimal(10,2)) satisfy
		FROM
			(
				SELECT
					'country',
					t3.area,
					t3.satisfy
				FROM
					(
						SELECT
							t1.area,
							convert((t1.satisfy + t2.satisfy) / 2,decimal(10,4)) satisfy
						FROM
							(
								SELECT
									bs.estate_area area,
									convert(avg(bs.a2),decimal(10,4)) satisfy
								FROM
									bigholder_satisfaction_info bs
								WHERE
									bs.job = '项目营销负责人'
									<if test="areas!=null and areas.size()>0">
									AND bs.estate_area IN 
									<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
										 #{item}  
									</foreach> 
									</if>
									<if test="monthList!=null and monthList.size()>0">
										AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
										<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
											 #{item}  
										</foreach> 
									</if>
								GROUP BY
									bs.estate_area
							) t1
						INNER JOIN (
							SELECT
								bs.estate_area area,
								convert(avg(bs.a2),decimal(10,4)) satisfy
							FROM
								bigholder_satisfaction_info bs
							WHERE
								bs.job = '项目总经理/副总经理'
								<if test="areas!=null and areas.size()>0">
								AND bs.estate_area IN 
								<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
									 #{item}  
								</foreach> 
								</if>
								<if test="monthList!=null and monthList.size()>0">
									AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
									<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
										 #{item}  
									</foreach> 
								</if>
							GROUP BY
								bs.estate_area
						) t2 ON t1.area = t2.area
						UNION ALL
							SELECT
								bs.estate_area area,
								convert(avg(bs.a2),decimal(10,4)) satisfy
							FROM
								bigholder_satisfaction_info bs
							WHERE 1=1
								<if test="areas!=null and areas.size()>0">
									AND bs.estate_area IN 
									<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
										 #{item}  
									</foreach> 
								</if>
								<if test="monthList!=null and monthList.size()>0">
									AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
									<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
										 #{item}  
									</foreach> 
								</if>
							AND bs.estate_area NOT IN (
								SELECT
									t1.area
								FROM
									(
										SELECT
											bs.estate_area area
										FROM
											bigholder_satisfaction_info bs
										WHERE
											bs.job = '项目营销负责人'
											<if test="areas!=null and areas.size()>0">
												AND bs.estate_area IN 
												<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
													 #{item}  
												</foreach> 
											</if>
											<if test="monthList!=null and monthList.size()>0">
												AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
												<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
													 #{item}  
												</foreach> 
											</if>
										GROUP BY
											bs.estate_area
									) t1
								INNER JOIN (
									SELECT
										bs.estate_area area
									FROM
										bigholder_satisfaction_info bs
									WHERE
										bs.job = '项目总经理/副总经理'
										<if test="areas!=null and areas.size()>0">
											AND bs.estate_area IN 
											<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
												 #{item}  
											</foreach> 
										</if>
										<if test="monthList!=null and monthList.size()>0">
											AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
											<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
												 #{item}  
											</foreach> 
										</if>
									GROUP BY
										bs.estate_area
								) t2 ON t1.area = t2.area
							)
							GROUP BY
								bs.estate_area
				) t3
			) t4
		GROUP BY
			t4.country
	</select> -->
	
	<select id="satisfyInfosByMonth" parameterType="map" resultType="string">
		SELECT
			CONVERT(avg(ba.satisfaction_scores),DECIMAL (10, 2)) satisfy
		FROM
			bigholder_area_audit ba
		WHERE
			1 = 1
		AND ba.audit_status = '3'
		AND ba.satisfaction_scores IS NOT NULL
		<if test="monthList!=null and monthList.size()>0">
			AND ba.year_mon IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND ba.area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
	</select>
	
	<select id="projectSatisfyByMonth" parameterType="map" resultType="string">
		SELECT
			CONVERT(avg(ba.satisfaction_scores),DECIMAL (10, 2)) satisfy
		FROM
			bigholder_area_audit ba
		WHERE 1=1 
		AND ba.audit_status = '3'
		AND ba.satisfaction_scores IS NOT NULL
		<if test="monthList!=null and monthList.size()>0">
			AND ba.year_mon IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND ba.area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND ba.correspond_project = #{project}
		</if>
	</select>
	
	<select id="unsatisfyInfo" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a41' type
		FROM
		(SELECT count(bs.a41) total from bigholder_satisfaction_info bs where bs.a41 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a41) c1 from bigholder_satisfaction_info bs where bs.a41=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a41) c2 from bigholder_satisfaction_info bs where bs.a41=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a41) c3 from bigholder_satisfaction_info bs where bs.a41=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a41) c4 from bigholder_satisfaction_info bs where bs.a41=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a42' type
		FROM
		(SELECT count(bs.a42) total from bigholder_satisfaction_info bs where bs.a42 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a42) c1 from bigholder_satisfaction_info bs where bs.a42=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a42) c2 from bigholder_satisfaction_info bs where bs.a42=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a42) c3 from bigholder_satisfaction_info bs where bs.a42=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a42) c4 from bigholder_satisfaction_info bs where bs.a42=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a43' type
		FROM
		(SELECT count(bs.a43) total from bigholder_satisfaction_info bs where bs.a43 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a43) c1 from bigholder_satisfaction_info bs where bs.a43=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a43) c2 from bigholder_satisfaction_info bs where bs.a43=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a43) c3 from bigholder_satisfaction_info bs where bs.a43=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a43) c4 from bigholder_satisfaction_info bs where bs.a43=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a44' type
		FROM
		(SELECT count(bs.a44) total from bigholder_satisfaction_info bs where bs.a44 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a44) c1 from bigholder_satisfaction_info bs where bs.a44=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a44) c2 from bigholder_satisfaction_info bs where bs.a44=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a44) c3 from bigholder_satisfaction_info bs where bs.a44=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a44) c4 from bigholder_satisfaction_info bs where bs.a44=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a51' type
		FROM
		(SELECT count(bs.a51) total from bigholder_satisfaction_info bs where bs.a51 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a51) c1 from bigholder_satisfaction_info bs where bs.a51=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a51) c2 from bigholder_satisfaction_info bs where bs.a51=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a51) c3 from bigholder_satisfaction_info bs where bs.a51=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a51) c4 from bigholder_satisfaction_info bs where bs.a51=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a52' type
		FROM
		(SELECT count(bs.a52) total from bigholder_satisfaction_info bs where bs.a52 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a52) c1 from bigholder_satisfaction_info bs where bs.a52=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a52) c2 from bigholder_satisfaction_info bs where bs.a52=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a52) c3 from bigholder_satisfaction_info bs where bs.a52=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a52) c4 from bigholder_satisfaction_info bs where bs.a52=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a53' type
		FROM
		(SELECT count(bs.a53) total from bigholder_satisfaction_info bs where bs.a53 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a53) c1 from bigholder_satisfaction_info bs where bs.a53=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2, 
		(SELECT count(bs.a53) c2 from bigholder_satisfaction_info bs where bs.a53=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a53) c3 from bigholder_satisfaction_info bs where bs.a53=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a53) c4 from bigholder_satisfaction_info bs where bs.a53=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a54' type
		FROM
		(SELECT count(bs.a54) total from bigholder_satisfaction_info bs where bs.a54 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a54) c1 from bigholder_satisfaction_info bs where bs.a54=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a54) c2 from bigholder_satisfaction_info bs where bs.a54=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a54) c3 from bigholder_satisfaction_info bs where bs.a54=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a54) c4 from bigholder_satisfaction_info bs where bs.a54=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a61' type
		FROM
		(SELECT count(bs.a61) total from bigholder_satisfaction_info bs where bs.a61 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a61) c1 from bigholder_satisfaction_info bs where bs.a61=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a61) c2 from bigholder_satisfaction_info bs where bs.a61=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a61) c3 from bigholder_satisfaction_info bs where bs.a61=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a61) c4 from bigholder_satisfaction_info bs where bs.a61=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a62' type
		FROM
		(SELECT count(bs.a62) total from bigholder_satisfaction_info bs where bs.a62 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a62) c1 from bigholder_satisfaction_info bs where bs.a62=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a62) c2 from bigholder_satisfaction_info bs where bs.a62=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a62) c3 from bigholder_satisfaction_info bs where bs.a62=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a62) c4 from bigholder_satisfaction_info bs where bs.a62=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a71' type
		FROM
		(SELECT count(bs.a71) total from bigholder_satisfaction_info bs where bs.a71 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a71) c1 from bigholder_satisfaction_info bs where bs.a71=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a71) c2 from bigholder_satisfaction_info bs where bs.a71=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a71) c3 from bigholder_satisfaction_info bs where bs.a71=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a71) c4 from bigholder_satisfaction_info bs where bs.a71=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a72' type
		FROM
		(SELECT count(bs.a72) total from bigholder_satisfaction_info bs where bs.a72 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a72) c1 from bigholder_satisfaction_info bs where bs.a72=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a72) c2 from bigholder_satisfaction_info bs where bs.a72=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a72) c3 from bigholder_satisfaction_info bs where bs.a72=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a72) c4 from bigholder_satisfaction_info bs where bs.a72=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
		UNION ALL
		SELECT 
			t1.total,t2.c1,t3.c2,t4.c3,t5.c4,'a73' type
		FROM
		(SELECT count(bs.a73) total from bigholder_satisfaction_info bs where bs.a73 &lt;=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t1,
		(SELECT count(bs.a73) c1 from bigholder_satisfaction_info bs where bs.a73=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t2,
		(SELECT count(bs.a73) c2 from bigholder_satisfaction_info bs where bs.a73=2 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t3,
		(SELECT count(bs.a73) c3 from bigholder_satisfaction_info bs where bs.a73=3 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t4,
		(SELECT count(bs.a73) c4 from bigholder_satisfaction_info bs where bs.a73=4 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>) t5
	</select>
	
	<select id="trendA2" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a2),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA41" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a41),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA42" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a42),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA43" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a43),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA44" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a44),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA51" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a51),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA52" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a52),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA53" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a53),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA54" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a54),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA61" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a61),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA62" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a62),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA71" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a71),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA72" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a72),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	<select id="trendA73" parameterType="map" resultType="cn.com.countrygarden.bi.main.dto.bigholder.UnsatisfyDto">
		SELECT
			DATE_FORMAT(bs.create_date, '%Y-%m') yearMonth,
			convert(avg(bs.a73),decimal(10,2)) evaluateScore
		FROM
			bigholder_satisfaction_info bs
		WHERE 1=1 AND bs.audit_status = '3'
		<if test="monthList!=null and monthList.size()>0">
			AND DATE_FORMAT(bs.create_date, '%Y-%m') IN 
			<foreach item="item" index="index" collection="monthList" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="areas!=null and areas.size()>0">
			AND bs.estate_area IN 
			<foreach item="item" index="index" collection="areas" open="(" separator="," close=")">  
				 #{item}  
			</foreach> 
		</if>
		<if test="project!=null and project!=''">
			AND bs.correspond_project = #{project}
		</if>
		GROUP BY
			DATE_FORMAT(bs.create_date, '%Y-%m')
	</select>
	
	<select id="getEstateAreas" resultType="string">
		SELECT
			bs.estate_area
		FROM
			bigholder_satisfaction_info bs
		GROUP BY
			bs.estate_area
	</select>
</mapper>