春风项目四线(合箱线、总装线)
wujian
2024-02-01 8aafc584df15a97743e3c4ddf4f60fa9dda5be3e
提交 | 用户 | 时间
fd2207 1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 <mapper namespace="com.jcdm.main.rm.repairData.mapper.RmRepairDataMapper">
6     
7     <resultMap type="RmRepairData" id="RmRepairDataResult">
8         <result property="id"    column="id"    />
9         <result property="snCode"    column="sn_code"    />
10         <result property="boxCode"    column="box_code"    />
11         <result property="processesCode"    column="processes_code"    />
12         <result property="tightenFrequency"    column="tighten_frequency"    />
13         <result property="tightenPiecesNumber"    column="tighten_pieces_number"    />
14         <result property="torqueForce"    column="torque_force"    />
15         <result property="angle"    column="angle"    />
16         <result property="result"    column="result"    />
17         <result property="createUser"    column="create_user"    />
18         <result property="createTime"    column="create_time"    />
19         <result property="updateTime"    column="update_time"    />
20         <result property="updateUser"    column="update_user"    />
21         <result property="remarks"    column="remarks"    />
22         <result property="spareField1"    column="spare_field_1"    />
23         <result property="spareField2"    column="spare_field_2"    />
24         <result property="station"    column="station"    />
25
26     </resultMap>
27
28     <sql id="selectRmRepairDataVo">
29         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
30     </sql>
31
32     <select id="selectRmRepairDataList" parameterType="RmRepairData" resultMap="RmRepairDataResult">
33         <include refid="selectRmRepairDataVo"/>
34         <where>  
35             <if test="snCode != null  and snCode != ''"> and sn_code = #{snCode}</if>
36             <if test="boxCode != null  and boxCode != ''"> and box_code = #{boxCode}</if>
37             <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
38             <if test="tightenFrequency != null  and tightenFrequency != ''"> and tighten_frequency = #{tightenFrequency}</if>
39             <if test="tightenPiecesNumber != null  and tightenPiecesNumber != ''"> and tighten_pieces_number = #{tightenPiecesNumber}</if>
40             <if test="torqueForce != null  and torqueForce != ''"> and torque_force = #{torqueForce}</if>
41             <if test="angle != null  and angle != ''"> and angle = #{angle}</if>
42             <if test="result != null  and result != ''"> and result = #{result}</if>
43             <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
44             <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
45             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
46             <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
47             <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
48             <if test="station != null  and station != ''"> and station = #{station}</if>
49         </where>
50     </select>
51     
52     <select id="selectRmRepairDataById" parameterType="Long" resultMap="RmRepairDataResult">
53         <include refid="selectRmRepairDataVo"/>
54         where id = #{id}
55     </select>
56         
57     <insert id="insertRmRepairData" parameterType="RmRepairData" useGeneratedKeys="true" keyProperty="id">
58         insert into rm_repair_data
59         <trim prefix="(" suffix=")" suffixOverrides=",">
60             <if test="snCode != null">sn_code,</if>
61             <if test="boxCode != null">box_code,</if>
62             <if test="processesCode != null">processes_code,</if>
63             <if test="tightenFrequency != null">tighten_frequency,</if>
64             <if test="tightenPiecesNumber != null">tighten_pieces_number,</if>
65             <if test="torqueForce != null">torque_force,</if>
66             <if test="angle != null">angle,</if>
67             <if test="result != null">result,</if>
68             <if test="createUser != null">create_user,</if>
69             <if test="createTime != null">create_time,</if>
70             <if test="updateTime != null">update_time,</if>
71             <if test="updateUser != null">update_user,</if>
72             <if test="remarks != null">remarks,</if>
73             <if test="spareField1 != null">spare_field_1,</if>
74             <if test="spareField2 != null">spare_field_2,</if>
75             <if test="station != null">station,</if>
76          </trim>
77         <trim prefix="values (" suffix=")" suffixOverrides=",">
78             <if test="snCode != null">#{snCode},</if>
79             <if test="boxCode != null">#{boxCode},</if>
80             <if test="processesCode != null">#{processesCode},</if>
81             <if test="tightenFrequency != null">#{tightenFrequency},</if>
82             <if test="tightenPiecesNumber != null">#{tightenPiecesNumber},</if>
83             <if test="torqueForce != null">#{torqueForce},</if>
84             <if test="angle != null">#{angle},</if>
85             <if test="result != null">#{result},</if>
86             <if test="createUser != null">#{createUser},</if>
87             <if test="createTime != null">#{createTime},</if>
88             <if test="updateTime != null">#{updateTime},</if>
89             <if test="updateUser != null">#{updateUser},</if>
90             <if test="remarks != null">#{remarks},</if>
91             <if test="spareField1 != null">#{spareField1},</if>
92             <if test="spareField2 != null">#{spareField2},</if>
93             <if test="station != null">#{station},</if>
94          </trim>
95     </insert>
96
97     <update id="updateRmRepairData" parameterType="RmRepairData">
98         update rm_repair_data
99         <trim prefix="SET" suffixOverrides=",">
100             <if test="snCode != null">sn_code = #{snCode},</if>
101             <if test="boxCode != null">box_code = #{boxCode},</if>
102             <if test="processesCode != null">processes_code = #{processesCode},</if>
103             <if test="tightenFrequency != null">tighten_frequency = #{tightenFrequency},</if>
104             <if test="tightenPiecesNumber != null">tighten_pieces_number = #{tightenPiecesNumber},</if>
105             <if test="torqueForce != null">torque_force = #{torqueForce},</if>
106             <if test="angle != null">angle = #{angle},</if>
107             <if test="result != null">result = #{result},</if>
108             <if test="createUser != null">create_user = #{createUser},</if>
109             <if test="createTime != null">create_time = #{createTime},</if>
110             <if test="updateTime != null">update_time = #{updateTime},</if>
111             <if test="updateUser != null">update_user = #{updateUser},</if>
112             <if test="remarks != null">remarks = #{remarks},</if>
113             <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
114             <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
115             <if test="station != null">station = #{station},</if>
116         </trim>
117         where id = #{id}
118     </update>
119
120     <delete id="deleteRmRepairDataById" parameterType="Long">
121         delete from rm_repair_data where id = #{id}
122     </delete>
123
124     <delete id="deleteRmRepairDataByIds" parameterType="String">
125         delete from rm_repair_data where id in 
126         <foreach item="id" collection="array" open="(" separator="," close=")">
127             #{id}
128         </foreach>
129     </delete>
130 </mapper>