<?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.paramCollection.mapper.DaParamCollectionMapper">
|
|
<resultMap type="DaParamCollection" id="DaParamCollectionResult">
|
<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" />
|
</resultMap>
|
|
<sql id="selectDaParamCollectionVo">
|
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 from da_param_collection
|
</sql>
|
|
<select id="selectDaParamCollectionList" parameterType="DaParamCollection" resultMap="DaParamCollectionResult">
|
<include refid="selectDaParamCollectionVo"/>
|
<where>
|
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
|
<if test="type != null and type != ''"> and type = #{type}</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>
|
</where>
|
</select>
|
|
<select id="selectDaParamCollectionById" parameterType="Long" resultMap="DaParamCollectionResult">
|
<include refid="selectDaParamCollectionVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertDaParamCollection" parameterType="DaParamCollection">
|
insert into da_param_collection
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="workOrderNo != null and workOrderNo != ''">work_order_no,</if>
|
<if test="sfcCode != null and sfcCode != ''">sfc_code,</if>
|
<if test="productCode != null and productCode != ''">product_code,</if>
|
<if test="productionLine != null and productionLine != ''">production_line,</if>
|
<if test="locationCode != null and locationCode != ''">location_code,</if>
|
<if test="equipmentNo != null">equipment_no,</if>
|
<if test="paramCode != null and paramCode != ''">param_code,</if>
|
<if test="paramValue != null and paramValue != ''">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>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="workOrderNo != null and workOrderNo != ''">#{workOrderNo},</if>
|
<if test="sfcCode != null and sfcCode != ''">#{sfcCode},</if>
|
<if test="productCode != null and productCode != ''">#{productCode},</if>
|
<if test="productionLine != null and productionLine != ''">#{productionLine},</if>
|
<if test="locationCode != null and locationCode != ''">#{locationCode},</if>
|
<if test="equipmentNo != null">#{equipmentNo},</if>
|
<if test="paramCode != null and paramCode != ''">#{paramCode},</if>
|
<if test="paramValue != null and paramValue != ''">#{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>
|
</trim>
|
</insert>
|
|
<update id="updateDaParamCollection" parameterType="DaParamCollection">
|
update da_param_collection
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="workOrderNo != null and workOrderNo != ''">work_order_no = #{workOrderNo},</if>
|
<if test="sfcCode != null and sfcCode != ''">sfc_code = #{sfcCode},</if>
|
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
|
<if test="productionLine != null and productionLine != ''">production_line = #{productionLine},</if>
|
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if>
|
<if test="equipmentNo != null">equipment_no = #{equipmentNo},</if>
|
<if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if>
|
<if test="paramValue != null and paramValue != ''">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">spare_field_1 = #{moduleCode},</if>
|
<if test="spareField2 != null">spare_field_2 = #{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>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteDaParamCollectionById" parameterType="Long">
|
delete from da_param_collection where id = #{id}
|
</delete>
|
|
<delete id="deleteDaParamCollectionByIds" parameterType="String">
|
delete from da_param_collection where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|