<?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.rm.repairData.mapper.RmRepairDataMapper">
|
|
<resultMap type="RmRepairData" id="RmRepairDataResult">
|
<result property="id" column="id" />
|
<result property="snCode" column="sn_code" />
|
<result property="boxCode" column="box_code" />
|
<result property="processesCode" column="processes_code" />
|
<result property="tightenFrequency" column="tighten_frequency" />
|
<result property="tightenPiecesNumber" column="tighten_pieces_number" />
|
<result property="torqueForce" column="torque_force" />
|
<result property="angle" column="angle" />
|
<result property="result" column="result" />
|
<result property="createUser" column="create_user" />
|
<result property="createTime" column="create_time" />
|
<result property="updateTime" column="update_time" />
|
<result property="updateUser" column="update_user" />
|
<result property="remarks" column="remarks" />
|
<result property="spareField1" column="spare_field_1" />
|
<result property="spareField2" column="spare_field_2" />
|
<result property="station" column="station" />
|
|
</resultMap>
|
|
<sql id="selectRmRepairDataVo">
|
select id, sn_code, box_code, processes_code, tighten_frequency, tighten_pieces_number, torque_force, angle, result, create_user, create_time, update_time, update_user, remarks, spare_field_1, spare_field_2,station from rm_repair_data
|
</sql>
|
|
<select id="selectRmRepairDataList" parameterType="RmRepairData" resultMap="RmRepairDataResult">
|
<include refid="selectRmRepairDataVo"/>
|
<where>
|
<if test="snCode != null and snCode != ''"> and sn_code = #{snCode}</if>
|
<if test="boxCode != null and boxCode != ''"> and box_code = #{boxCode}</if>
|
<if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if>
|
<if test="tightenFrequency != null and tightenFrequency != ''"> and tighten_frequency = #{tightenFrequency}</if>
|
<if test="tightenPiecesNumber != null and tightenPiecesNumber != ''"> and tighten_pieces_number = #{tightenPiecesNumber}</if>
|
<if test="torqueForce != null and torqueForce != ''"> and torque_force = #{torqueForce}</if>
|
<if test="angle != null and angle != ''"> and angle = #{angle}</if>
|
<if test="result != null and result != ''"> and result = #{result}</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="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
<if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
|
<if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
|
<if test="station != null and station != ''"> and station = #{station}</if>
|
</where>
|
</select>
|
|
<select id="selectRmRepairDataById" parameterType="Long" resultMap="RmRepairDataResult">
|
<include refid="selectRmRepairDataVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertRmRepairData" parameterType="RmRepairData" useGeneratedKeys="true" keyProperty="id">
|
insert into rm_repair_data
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="snCode != null">sn_code,</if>
|
<if test="boxCode != null">box_code,</if>
|
<if test="processesCode != null">processes_code,</if>
|
<if test="tightenFrequency != null">tighten_frequency,</if>
|
<if test="tightenPiecesNumber != null">tighten_pieces_number,</if>
|
<if test="torqueForce != null">torque_force,</if>
|
<if test="angle != null">angle,</if>
|
<if test="result != null">result,</if>
|
<if test="createUser != null">create_user,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="updateUser != null">update_user,</if>
|
<if test="remarks != null">remarks,</if>
|
<if test="spareField1 != null">spare_field_1,</if>
|
<if test="spareField2 != null">spare_field_2,</if>
|
<if test="station != null">station,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="snCode != null">#{snCode},</if>
|
<if test="boxCode != null">#{boxCode},</if>
|
<if test="processesCode != null">#{processesCode},</if>
|
<if test="tightenFrequency != null">#{tightenFrequency},</if>
|
<if test="tightenPiecesNumber != null">#{tightenPiecesNumber},</if>
|
<if test="torqueForce != null">#{torqueForce},</if>
|
<if test="angle != null">#{angle},</if>
|
<if test="result != null">#{result},</if>
|
<if test="createUser != null">#{createUser},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
<if test="remarks != null">#{remarks},</if>
|
<if test="spareField1 != null">#{spareField1},</if>
|
<if test="spareField2 != null">#{spareField2},</if>
|
<if test="station != null">#{station},</if>
|
</trim>
|
</insert>
|
|
<update id="updateRmRepairData" parameterType="RmRepairData">
|
update rm_repair_data
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="snCode != null">sn_code = #{snCode},</if>
|
<if test="boxCode != null">box_code = #{boxCode},</if>
|
<if test="processesCode != null">processes_code = #{processesCode},</if>
|
<if test="tightenFrequency != null">tighten_frequency = #{tightenFrequency},</if>
|
<if test="tightenPiecesNumber != null">tighten_pieces_number = #{tightenPiecesNumber},</if>
|
<if test="torqueForce != null">torque_force = #{torqueForce},</if>
|
<if test="angle != null">angle = #{angle},</if>
|
<if test="result != null">result = #{result},</if>
|
<if test="createUser != null">create_user = #{createUser},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateUser != null">update_user = #{updateUser},</if>
|
<if test="remarks != null">remarks = #{remarks},</if>
|
<if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
|
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
|
<if test="station != null">station = #{station},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteRmRepairDataById" parameterType="Long">
|
delete from rm_repair_data where id = #{id}
|
</delete>
|
|
<delete id="deleteRmRepairDataByIds" parameterType="String">
|
delete from rm_repair_data where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|