<?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.foreverwin.mesnac.equip.mapper.ResourceInspectTaskParamMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.foreverwin.mesnac.equip.model.ResourceInspectTaskParam">
        <id column="HANDLE" property="handle" />
        <result column="INSPECT_NO" property="inspectNo" />
        <result column="RESOURCE_INSPECT_TASK_BO" property="resourceInspectTaskBo" />
        <result column="DESCRIPTION" property="description" />
        <result column="INSPECT_METHOD" property="inspectMethod" />
        <result column="INSPECT_DATA_TYPE" property="inspectDataType" />
        <result column="PARAM_UNIT" property="paramUnit" />
        <result column="REQUIRED" property="required" />
        <result column="MIN_VALUE" property="minValue" />
        <result column="MAX_VALUE" property="maxValue" />
        <result column="STANDARD_VALUE" property="standardValue" />
        <result column="RESULT_VALUE" property="resultValue" />
        <result column="RESULT" property="result" />
        <result column="REMARK" property="remark" />
        <result column="CREATE_USER" property="createUser" />
        <result column="CREATED_DATE_TIME" property="createdDateTime" />
        <result column="MODIFY_USER" property="modifyUser" />
        <result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        HANDLE, INSPECT_NO, RESOURCE_INSPECT_TASK_BO, DESCRIPTION, INSPECT_METHOD, INSPECT_DATA_TYPE, PARAM_UNIT, REQUIRED, MIN_VALUE, MAX_VALUE, STANDARD_VALUE, RESULT_VALUE, RESULT, REMARK, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
    </sql>

    <!-- BaseMapper标准查询/修改/删除 -->
    <select id="selectById" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List"></include> FROM Z_RESOURCE_INSPECT_TASK_PARAM WHERE HANDLE=#{handle}
    </select>

    <select id="selectByMap" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List"></include>
        FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <if test="cm!=null and !cm.isEmpty">
            <where>
                <foreach collection="cm.keys" item="k" separator="AND">
                    <if test="cm[k] != null">
                        ${k} = #{cm[${k}]}
                    </if>
                </foreach>
            </where>
        </if>
    </select>

    <select id="selectBatchIds" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List"></include>
        FROM Z_RESOURCE_INSPECT_TASK_PARAM WHERE HANDLE IN (
        <foreach item="item" index="index" collection="coll" separator=",">#{item}
        </foreach>)
    </select>

    <select id="selectOne" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List"></include> FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew.entity.handle!=null">
              HANDLE=#{ew.handle}
            </if>
            <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
            <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
            <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
            <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
            <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
            <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
            <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
            <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
            <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
            <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
            <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
            <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
            <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
            <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
            <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
            <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
            <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
        </where>
    </select>

    <select id="selectCount" resultType="Integer">
        SELECT COUNT(1) FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                <if test="ew.entity.handle!=null">
                    HANDLE=#{ew.entity.handle}
                </if>
                <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </select>

    <select id="selectList" resultMap="BaseResultMap">
        SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                    <if test="ew.entity.handle!=null">
                        HANDLE=#{ew.entity.handle}
                    </if>
                    <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                    <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                    <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                    <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                    <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                    <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                    <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                    <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                    <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                    <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                    <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                    <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                    <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                    <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                    <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                    <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                    <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </select>

    <select id="selectMaps" resultType="HashMap">
        SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                    <if test="ew.entity.handle!=null">
                        HANDLE=#{ew.entity.handle}
                    </if>
                    <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                    <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                    <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                    <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                    <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                    <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                    <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                    <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                    <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                    <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                    <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                    <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                    <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                    <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                    <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                    <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                    <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </select>

    <select id="selectObjs" resultType="Object">
        SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                    <if test="ew.entity.handle!=null">
                        HANDLE=#{ew.entity.handle}
                    </if>
                    <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                    <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                    <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                    <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                    <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                    <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                    <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                    <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                    <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                    <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                    <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                    <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                    <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                    <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                    <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                    <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                    <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </select>

    <select id="selectPage" resultMap="BaseResultMap">
        SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                    <if test="ew.entity.handle!=null">
                        HANDLE=#{ew.entity.handle}
                    </if>
                    <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                    <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                    <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                    <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                    <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                    <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                    <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                    <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                    <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                    <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                    <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                    <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                    <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                    <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                    <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                    <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                    <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </select>

    <select id="selectMapsPage" resultType="HashMap">
        SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                    <if test="ew.entity.handle!=null">
                        HANDLE=#{ew.entity.handle}
                    </if>
                    <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                    <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                    <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                    <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                    <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                    <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                    <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                    <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                    <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                    <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                    <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                    <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                    <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                    <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                    <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                    <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                    <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </select>

    <insert id="insert" parameterType="com.foreverwin.mesnac.equip.model.ResourceInspectTaskParam">
        INSERT INTO Z_RESOURCE_INSPECT_TASK_PARAM
        <trim prefix="(" suffix=")" suffixOverrides=",">
            HANDLE,
            <if test="inspectNo!=null">INSPECT_NO,</if>
            <if test="resourceInspectTaskBo!=null">RESOURCE_INSPECT_TASK_BO,</if>
            <if test="description!=null">DESCRIPTION,</if>
            <if test="inspectMethod!=null">INSPECT_METHOD,</if>
            <if test="inspectDataType!=null">INSPECT_DATA_TYPE,</if>
            <if test="paramUnit!=null">PARAM_UNIT,</if>
            <if test="required!=null">REQUIRED,</if>
            <if test="minValue!=null">MIN_VALUE,</if>
            <if test="maxValue!=null">MAX_VALUE,</if>
            <if test="standardValue!=null">STANDARD_VALUE,</if>
            <if test="resultValue!=null">RESULT_VALUE,</if>
            <if test="result!=null">RESULT,</if>
            <if test="remark!=null">REMARK,</if>
            <if test="createUser!=null">CREATE_USER,</if>
            <if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
            <if test="modifyUser!=null">MODIFY_USER,</if>
            <if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
        </trim> VALUES
        <trim prefix="(" suffix=")" suffixOverrides=",">
            #{handle},
            <if test="inspectNo!=null">#{inspectNo},</if>
            <if test="resourceInspectTaskBo!=null">#{resourceInspectTaskBo},</if>
            <if test="description!=null">#{description},</if>
            <if test="inspectMethod!=null">#{inspectMethod},</if>
            <if test="inspectDataType!=null">#{inspectDataType},</if>
            <if test="paramUnit!=null">#{paramUnit},</if>
            <if test="required!=null">#{required},</if>
            <if test="minValue!=null">#{minValue},</if>
            <if test="maxValue!=null">#{maxValue},</if>
            <if test="standardValue!=null">#{standardValue},</if>
            <if test="resultValue!=null">#{resultValue},</if>
            <if test="result!=null">#{result},</if>
            <if test="remark!=null">#{remark},</if>
            <if test="createUser!=null">#{createUser},</if>
            <if test="createdDateTime!=null">#{createdDateTime},</if>
            <if test="modifyUser!=null">#{modifyUser},</if>
            <if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
        </trim>
    </insert>

    <insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.equip.model.ResourceInspectTaskParam">
        INSERT INTO Z_RESOURCE_INSPECT_TASK_PARAM
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <include refid="Base_Column_List"></include>
        </trim> VALUES
        <trim prefix="(" suffix=")" suffixOverrides=",">
            #{handle},
            #{inspectNo},
            #{resourceInspectTaskBo},
            #{description},
            #{inspectMethod},
            #{inspectDataType},
            #{paramUnit},
            #{required},
            #{minValue},
            #{maxValue},
            #{standardValue},
            #{resultValue},
            #{result},
            #{remark},
            #{createUser},
            #{createdDateTime},
            #{modifyUser},
            #{modifiedDateTime},
        </trim>
    </insert>


    <update id="updateById">
        UPDATE Z_RESOURCE_INSPECT_TASK_PARAM <trim prefix="SET" suffixOverrides=",">
        <if test="et.inspectNo!=null">INSPECT_NO=#{et.inspectNo},</if>
        <if test="et.resourceInspectTaskBo!=null">RESOURCE_INSPECT_TASK_BO=#{et.resourceInspectTaskBo},</if>
        <if test="et.description!=null">DESCRIPTION=#{et.description},</if>
        <if test="et.inspectMethod!=null">INSPECT_METHOD=#{et.inspectMethod},</if>
        <if test="et.inspectDataType!=null">INSPECT_DATA_TYPE=#{et.inspectDataType},</if>
        <if test="et.paramUnit!=null">PARAM_UNIT=#{et.paramUnit},</if>
        <if test="et.required!=null">REQUIRED=#{et.required},</if>
        <if test="et.minValue!=null">MIN_VALUE=#{et.minValue},</if>
        <if test="et.maxValue!=null">MAX_VALUE=#{et.maxValue},</if>
        <if test="et.standardValue!=null">STANDARD_VALUE=#{et.standardValue},</if>
        <if test="et.resultValue!=null">RESULT_VALUE=#{et.resultValue},</if>
        <if test="et.result!=null">RESULT=#{et.result},</if>
        <if test="et.remark!=null">REMARK=#{et.remark},</if>
        <if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
        <if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
        <if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
        <if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
        </trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
    </update>


    <update id="updateAllColumnById">
        UPDATE Z_RESOURCE_INSPECT_TASK_PARAM <trim prefix="SET" suffixOverrides=",">
        INSPECT_NO=#{et.inspectNo},
        RESOURCE_INSPECT_TASK_BO=#{et.resourceInspectTaskBo},
        DESCRIPTION=#{et.description},
        INSPECT_METHOD=#{et.inspectMethod},
        INSPECT_DATA_TYPE=#{et.inspectDataType},
        PARAM_UNIT=#{et.paramUnit},
        REQUIRED=#{et.required},
        MIN_VALUE=#{et.minValue},
        MAX_VALUE=#{et.maxValue},
        STANDARD_VALUE=#{et.standardValue},
        RESULT_VALUE=#{et.resultValue},
        RESULT=#{et.result},
        REMARK=#{et.remark},
        CREATE_USER=#{et.createUser},
        CREATED_DATE_TIME=#{et.createdDateTime},
        MODIFY_USER=#{et.modifyUser},
        MODIFIED_DATE_TIME=#{et.modifiedDateTime},
     </trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
    </update>


    <update id="update">
        UPDATE Z_RESOURCE_INSPECT_TASK_PARAM <trim prefix="SET" suffixOverrides=",">
        <if test="et.inspectNo!=null">INSPECT_NO=#{et.inspectNo},</if>
        <if test="et.resourceInspectTaskBo!=null">RESOURCE_INSPECT_TASK_BO=#{et.resourceInspectTaskBo},</if>
        <if test="et.description!=null">DESCRIPTION=#{et.description},</if>
        <if test="et.inspectMethod!=null">INSPECT_METHOD=#{et.inspectMethod},</if>
        <if test="et.inspectDataType!=null">INSPECT_DATA_TYPE=#{et.inspectDataType},</if>
        <if test="et.paramUnit!=null">PARAM_UNIT=#{et.paramUnit},</if>
        <if test="et.required!=null">REQUIRED=#{et.required},</if>
        <if test="et.minValue!=null">MIN_VALUE=#{et.minValue},</if>
        <if test="et.maxValue!=null">MAX_VALUE=#{et.maxValue},</if>
        <if test="et.standardValue!=null">STANDARD_VALUE=#{et.standardValue},</if>
        <if test="et.resultValue!=null">RESULT_VALUE=#{et.resultValue},</if>
        <if test="et.result!=null">RESULT=#{et.result},</if>
        <if test="et.remark!=null">REMARK=#{et.remark},</if>
        <if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
        <if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
        <if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
        <if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
    </trim>
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                    HANDLE=#{ew.entity.handle}
                    <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                    <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                    <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                    <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                    <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                    <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                    <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                    <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                    <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                    <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                    <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                    <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                    <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                    <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                    <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                    <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                    <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </update>

    <delete id="deleteById">
        DELETE FROM Z_RESOURCE_INSPECT_TASK_PARAM WHERE HANDLE=#{handle}
    </delete>

    <delete id="deleteByMap">
        DELETE FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <if test="cm!=null and !cm.isEmpty">
            <where>
                <foreach collection="cm.keys" item="k" separator="AND">
                    <if test="cm[k] != null">
                        ${k} = #{cm[${k}]}
                    </if>
                </foreach>
            </where>
        </if>
    </delete>

    <delete id="delete">
        DELETE FROM Z_RESOURCE_INSPECT_TASK_PARAM
        <where>
            <if test="ew!=null">
                <if test="ew.entity!=null">
                    <if test="ew.entity.handle!=null">
                        HANDLE=#{ew.entity.handle}
                    </if>
                    <if test="ew.entity.inspectNo!=null"> AND INSPECT_NO=#{ew.entity.inspectNo}</if>
                    <if test="ew.entity.resourceInspectTaskBo!=null"> AND RESOURCE_INSPECT_TASK_BO=#{ew.entity.resourceInspectTaskBo}</if>
                    <if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
                    <if test="ew.entity.inspectMethod!=null"> AND INSPECT_METHOD=#{ew.entity.inspectMethod}</if>
                    <if test="ew.entity.inspectDataType!=null"> AND INSPECT_DATA_TYPE=#{ew.entity.inspectDataType}</if>
                    <if test="ew.entity.paramUnit!=null"> AND PARAM_UNIT=#{ew.entity.paramUnit}</if>
                    <if test="ew.entity.required!=null"> AND REQUIRED=#{ew.entity.required}</if>
                    <if test="ew.entity.minValue!=null"> AND MIN_VALUE=#{ew.entity.minValue}</if>
                    <if test="ew.entity.maxValue!=null"> AND MAX_VALUE=#{ew.entity.maxValue}</if>
                    <if test="ew.entity.standardValue!=null"> AND STANDARD_VALUE=#{ew.entity.standardValue}</if>
                    <if test="ew.entity.resultValue!=null"> AND RESULT_VALUE=#{ew.entity.resultValue}</if>
                    <if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
                    <if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
                    <if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
                    <if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
                    <if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
                    <if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
                </if>
                <if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
                    ${ew.sqlSegment}
                </if>
            </if>
        </where>
        <if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
            ${ew.sqlSegment}
        </if>
    </delete>

    <delete id="deleteBatchIds">
        DELETE FROM Z_RESOURCE_INSPECT_TASK_PARAM WHERE HANDLE IN (
        <foreach item="item" index="index" collection="coll" separator=",">#{item}
        </foreach>)
    </delete>
    <!-- BaseMapper标准查询/修改/删除 -->

</mapper>
