提交 | 用户 | 时间
|
e57a89
|
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 |
|
|
50 |
</where> |
|
51 |
</select> |
|
52 |
|
|
53 |
<select id="selectRmRepairDataById" parameterType="Long" resultMap="RmRepairDataResult"> |
|
54 |
<include refid="selectRmRepairDataVo"/> |
|
55 |
where id = #{id} |
|
56 |
</select> |
|
57 |
|
|
58 |
<insert id="insertRmRepairData" parameterType="RmRepairData" useGeneratedKeys="true" keyProperty="id"> |
|
59 |
insert into rm_repair_data |
|
60 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
61 |
<if test="snCode != null">sn_code,</if> |
|
62 |
<if test="boxCode != null">box_code,</if> |
|
63 |
<if test="processesCode != null">processes_code,</if> |
|
64 |
<if test="tightenFrequency != null">tighten_frequency,</if> |
|
65 |
<if test="tightenPiecesNumber != null">tighten_pieces_number,</if> |
|
66 |
<if test="torqueForce != null">torque_force,</if> |
|
67 |
<if test="angle != null">angle,</if> |
|
68 |
<if test="result != null">result,</if> |
|
69 |
<if test="createUser != null">create_user,</if> |
|
70 |
<if test="createTime != null">create_time,</if> |
|
71 |
<if test="updateTime != null">update_time,</if> |
|
72 |
<if test="updateUser != null">update_user,</if> |
|
73 |
<if test="remarks != null">remarks,</if> |
|
74 |
<if test="spareField1 != null">spare_field_1,</if> |
|
75 |
<if test="spareField2 != null">spare_field_2,</if> |
|
76 |
<if test="station != null">station,</if> |
|
77 |
</trim> |
|
78 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
79 |
<if test="snCode != null">#{snCode},</if> |
|
80 |
<if test="boxCode != null">#{boxCode},</if> |
|
81 |
<if test="processesCode != null">#{processesCode},</if> |
|
82 |
<if test="tightenFrequency != null">#{tightenFrequency},</if> |
|
83 |
<if test="tightenPiecesNumber != null">#{tightenPiecesNumber},</if> |
|
84 |
<if test="torqueForce != null">#{torqueForce},</if> |
|
85 |
<if test="angle != null">#{angle},</if> |
|
86 |
<if test="result != null">#{result},</if> |
|
87 |
<if test="createUser != null">#{createUser},</if> |
|
88 |
<if test="createTime != null">#{createTime},</if> |
|
89 |
<if test="updateTime != null">#{updateTime},</if> |
|
90 |
<if test="updateUser != null">#{updateUser},</if> |
|
91 |
<if test="remarks != null">#{remarks},</if> |
|
92 |
<if test="spareField1 != null">#{spareField1},</if> |
|
93 |
<if test="spareField2 != null">#{spareField2},</if> |
|
94 |
<if test="station != null">#{station},</if> |
|
95 |
</trim> |
|
96 |
</insert> |
|
97 |
|
|
98 |
<update id="updateRmRepairData" parameterType="RmRepairData"> |
|
99 |
update rm_repair_data |
|
100 |
<trim prefix="SET" suffixOverrides=","> |
|
101 |
<if test="snCode != null">sn_code = #{snCode},</if> |
|
102 |
<if test="boxCode != null">box_code = #{boxCode},</if> |
|
103 |
<if test="processesCode != null">processes_code = #{processesCode},</if> |
|
104 |
<if test="tightenFrequency != null">tighten_frequency = #{tightenFrequency},</if> |
|
105 |
<if test="tightenPiecesNumber != null">tighten_pieces_number = #{tightenPiecesNumber},</if> |
|
106 |
<if test="torqueForce != null">torque_force = #{torqueForce},</if> |
|
107 |
<if test="angle != null">angle = #{angle},</if> |
|
108 |
<if test="result != null">result = #{result},</if> |
|
109 |
<if test="createUser != null">create_user = #{createUser},</if> |
|
110 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
111 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
112 |
<if test="updateUser != null">update_user = #{updateUser},</if> |
|
113 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
114 |
<if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
|
115 |
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
|
116 |
<if test="station != null">station = #{station},</if> |
|
117 |
</trim> |
|
118 |
where id = #{id} |
|
119 |
</update> |
|
120 |
|
|
121 |
<delete id="deleteRmRepairDataById" parameterType="Long"> |
|
122 |
delete from rm_repair_data where id = #{id} |
|
123 |
</delete> |
|
124 |
|
|
125 |
<delete id="deleteRmRepairDataByIds" parameterType="String"> |
|
126 |
delete from rm_repair_data where id in |
|
127 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
128 |
#{id} |
|
129 |
</foreach> |
|
130 |
</delete> |
|
131 |
</mapper> |