<?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.jcdm.main.da.paramCollectionTemp.mapper.DaParamCollectionTempMapper">
|
|
<resultMap type="DaParamCollectionTemp" id="DaParamCollectionTempResult">
|
<result property="id" column="id" />
|
<result property="workOrderNo" column="work_order_no" />
|
<result property="sfcCode" column="sfc_code" />
|
<result property="productCode" column="product_code" />
|
<result property="productionLine" column="production_line" />
|
<result property="locationCode" column="location_code" />
|
<result property="equipmentNo" column="equipment_no" />
|
<result property="paramCode" column="param_code" />
|
<result property="paramValue" column="param_value" />
|
<result property="paramUpper" column="param_upper" />
|
<result property="paramLower" column="param_lower" />
|
<result property="paramStandard" column="param_standard" />
|
<result property="collectionTime" column="collection_time" />
|
<result property="moduleCode" column="module_code" />
|
<result property="spareField2" column="spare_field2" />
|
<result property="createUser" column="create_user" />
|
<result property="createTime" column="create_time" />
|
<result property="updateUser" column="update_user" />
|
<result property="updateTime" column="update_time" />
|
<result property="state" column="state" />
|
<result property="paramName" column="param_name" />
|
<result property="unit" column="unit" />
|
<result property="type" column="type" />
|
<result property="parameterSetCode" column="parameter_set_code" />
|
<result property="parameterSetName" column="parameter_set_name" />
|
<result property="processesCode" column="processes_code" />
|
<result property="processesName" column="processes_name" />
|
</resultMap>
|
|
<sql id="selectDaParamCollectionTempVo">
|
select id, work_order_no, sfc_code, product_code, production_line, location_code, equipment_no, param_code, param_value, param_upper, param_lower, param_standard, collection_time, module_code, spare_field2, create_user, create_time, update_user, update_time, state, param_name, unit, type, parameter_set_code, parameter_set_name, processes_code, processes_name from da_param_collection_temp
|
</sql>
|
|
<select id="selectDaParamCollectionTempList" parameterType="DaParamCollectionTemp" resultMap="DaParamCollectionTempResult">
|
<include refid="selectDaParamCollectionTempVo"/>
|
<where>
|
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
|
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
|
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
<if test="productionLine != null and productionLine != ''"> and production_line = #{productionLine}</if>
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
<if test="equipmentNo != null and equipmentNo != ''"> and equipment_no = #{equipmentNo}</if>
|
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if>
|
<if test="paramValue != null and paramValue != ''"> and param_value = #{paramValue}</if>
|
<if test="paramUpper != null and paramUpper != ''"> and param_upper = #{paramUpper}</if>
|
<if test="paramLower != null and paramLower != ''"> and param_lower = #{paramLower}</if>
|
<if test="paramStandard != null and paramStandard != ''"> and param_standard = #{paramStandard}</if>
|
<if test="collectionTime != null and collectionTime != ''"> and collection_time = #{collectionTime}</if>
|
<if test="moduleCode != null and moduleCode != ''"> and module_code = #{moduleCode}</if>
|
<if test="spareField2 != null and spareField2 != ''"> and spare_field2 = #{spareField2}</if>
|
<if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if>
|
<if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if>
|
<if test="state != null and state != ''"> and state = #{state}</if>
|
<if test="paramName != null and paramName != ''"> and param_name like concat('%', #{paramName}, '%')</if>
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="parameterSetCode != null and parameterSetCode != ''"> and parameter_set_code = #{parameterSetCode}</if>
|
<if test="parameterSetName != null and parameterSetName != ''"> and parameter_set_name like concat('%', #{parameterSetName}, '%')</if>
|
<if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if>
|
<if test="processesName != null and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
|
</where>
|
</select>
|
|
<select id="selectDaParamCollectionTempById" parameterType="Long" resultMap="DaParamCollectionTempResult">
|
<include refid="selectDaParamCollectionTempVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertDaParamCollectionTemp" parameterType="DaParamCollectionTemp" useGeneratedKeys="true" keyProperty="id">
|
insert into da_param_collection_temp
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="workOrderNo != null">work_order_no,</if>
|
<if test="sfcCode != null">sfc_code,</if>
|
<if test="productCode != null">product_code,</if>
|
<if test="productionLine != null">production_line,</if>
|
<if test="locationCode != null">location_code,</if>
|
<if test="equipmentNo != null">equipment_no,</if>
|
<if test="paramCode != null">param_code,</if>
|
<if test="paramValue != null">param_value,</if>
|
<if test="paramUpper != null">param_upper,</if>
|
<if test="paramLower != null">param_lower,</if>
|
<if test="paramStandard != null">param_standard,</if>
|
<if test="collectionTime != null">collection_time,</if>
|
<if test="moduleCode != null">module_code,</if>
|
<if test="spareField2 != null">spare_field2,</if>
|
<if test="createUser != null">create_user,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateUser != null">update_user,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="state != null">state,</if>
|
<if test="paramName != null">param_name,</if>
|
<if test="unit != null">unit,</if>
|
<if test="type != null">type,</if>
|
<if test="parameterSetCode != null">parameter_set_code,</if>
|
<if test="parameterSetName != null">parameter_set_name,</if>
|
<if test="processesCode != null">processes_code,</if>
|
<if test="processesName != null">processes_name,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="workOrderNo != null">#{workOrderNo},</if>
|
<if test="sfcCode != null">#{sfcCode},</if>
|
<if test="productCode != null">#{productCode},</if>
|
<if test="productionLine != null">#{productionLine},</if>
|
<if test="locationCode != null">#{locationCode},</if>
|
<if test="equipmentNo != null">#{equipmentNo},</if>
|
<if test="paramCode != null">#{paramCode},</if>
|
<if test="paramValue != null">#{paramValue},</if>
|
<if test="paramUpper != null">#{paramUpper},</if>
|
<if test="paramLower != null">#{paramLower},</if>
|
<if test="paramStandard != null">#{paramStandard},</if>
|
<if test="collectionTime != null">#{collectionTime},</if>
|
<if test="moduleCode != null">#{moduleCode},</if>
|
<if test="spareField2 != null">#{spareField2},</if>
|
<if test="createUser != null">#{createUser},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="state != null">#{state},</if>
|
<if test="paramName != null">#{paramName},</if>
|
<if test="unit != null">#{unit},</if>
|
<if test="type != null">#{type},</if>
|
<if test="parameterSetCode != null">#{parameterSetCode},</if>
|
<if test="parameterSetName != null">#{parameterSetName},</if>
|
<if test="processesCode != null">#{processesCode},</if>
|
<if test="processesName != null">#{processesName},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDaParamCollectionTemp" parameterType="DaParamCollectionTemp">
|
update da_param_collection_temp
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="workOrderNo != null">work_order_no = #{workOrderNo},</if>
|
<if test="sfcCode != null">sfc_code = #{sfcCode},</if>
|
<if test="productCode != null">product_code = #{productCode},</if>
|
<if test="productionLine != null">production_line = #{productionLine},</if>
|
<if test="locationCode != null">location_code = #{locationCode},</if>
|
<if test="equipmentNo != null">equipment_no = #{equipmentNo},</if>
|
<if test="paramCode != null">param_code = #{paramCode},</if>
|
<if test="paramValue != null">param_value = #{paramValue},</if>
|
<if test="paramUpper != null">param_upper = #{paramUpper},</if>
|
<if test="paramLower != null">param_lower = #{paramLower},</if>
|
<if test="paramStandard != null">param_standard = #{paramStandard},</if>
|
<if test="collectionTime != null">collection_time = #{collectionTime},</if>
|
<if test="moduleCode != null">module_code = #{moduleCode},</if>
|
<if test="spareField2 != null">spare_field2 = #{spareField2},</if>
|
<if test="createUser != null">create_user = #{createUser},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateUser != null">update_user = #{updateUser},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="state != null">state = #{state},</if>
|
<if test="paramName != null">param_name = #{paramName},</if>
|
<if test="unit != null">unit = #{unit},</if>
|
<if test="type != null">type = #{type},</if>
|
<if test="parameterSetCode != null">parameter_set_code = #{parameterSetCode},</if>
|
<if test="parameterSetName != null">parameter_set_name = #{parameterSetName},</if>
|
<if test="processesCode != null">processes_code = #{processesCode},</if>
|
<if test="processesName != null">processes_name = #{processesName},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteDaParamCollectionTempById" parameterType="Long">
|
delete from da_param_collection_temp where id = #{id}
|
</delete>
|
|
<delete id="deleteDaParamCollectionTempBySfcCodeAndLocationCode" parameterType="DaParamCollectionTemp">
|
delete from da_param_collection_temp where sfc_code = #{sfcCode} and location_code = #{locationCode}
|
</delete>
|
|
<delete id="deleteDaParamCollectionTempByIds" parameterType="String">
|
delete from da_param_collection_temp where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|