<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hotent.project.dao.CostVerifyProjectDataDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.project.model.CostVerifyProjectData">
        <id column="id" property="id" />
    <result column="survey_template_id" property="surveyTemplateId" />
    <result column="headers_id" property="headersId" />
    <result column="version_id" property="versionId" />
    <result column="order_num" property="orderNum" />
    <result column="order_text" property="orderText" />
    <result column="rkey" property="rkey" />
    <result column="rvalue" property="rvalue" />
    <result column="json_str" property="jsonStr" />
    <result column="cell_code" property="cellCode" />
    <result column="calculation_formula" property="calculationFormula" />
    <result column="unit" property="unit" />
    <result column="create_time" property="createTime" />
    <result column="create_by" property="createBy" />
    <result column="update_time" property="updateTime" />
    <result column="update_by" property="updateBy" />
    <result column="project_id" property="projectId" />
    <result column="task_id" property="taskId" />
        <result column="rowid" property="rowid" />
        <result column="parentid" property="parentid" />
        <result column="calculation_template_id" property="calculationTemplateId" />
        <result column="orgin_survey_template_id" property="orginSurveyTemplateId" />
        <result column="orgin_headerid" property="orginHeaderid" />
        <result column="orgin_itemid" property="orginItemid" />
        <result column="calculation_value" property="calculationValue" />
        <result column="year" property="year" />

    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, survey_template_id, headers_id, version_id, order_num, order_text, rkey, rvalue, json_str, cell_code, calculation_formula, unit, create_time, create_by, update_time, update_by, project_id, task_id, rowid, parentid, calculation_template_id , orgin_survey_template_id, orgin_headerid, orgin_itemid, calculation_value, year
    </sql>

	<select id="selectPage" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			cost_verify_project_data
		${ew.customSqlSegment}
	</select>
	
	<select id="selectList" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			cost_verify_project_data
		${ew.customSqlSegment}
	</select>
	
	<select id="selectById" resultMap="BaseResultMap">
		select 
			<include refid="Base_Column_List"/> 
		from
			cost_verify_project_data
		where 
		    id = ${id}
	</select>
</mapper>
