提交 | 用户 | 时间
|
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.om.productionOrde.mapper.OmProductionOrdeInfoMapper"> |
|
6 |
|
|
7 |
<resultMap type="OmProductionOrdeInfo" id="OmProductionOrdeInfoResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="workOrderNo" column="work_order_no" /> |
|
10 |
<result property="salesOrderCode" column="sales_order_code" /> |
|
11 |
<result property="productCode" column="product_code" /> |
|
12 |
<result property="productName" column="product_name" /> |
|
13 |
<result property="workshopCode" column="workshop_code" /> |
|
14 |
<result property="lineCode" column="line_code" /> |
|
15 |
<result property="routeCode" column="route_code" /> |
|
16 |
<result property="bomCode" column="bom_code" /> |
|
17 |
<result property="recipeCode" column="recipe_code" /> |
|
18 |
<result property="planQty" column="plan_qty" /> |
|
19 |
<result property="actualQty" column="actual_qty" /> |
|
20 |
<result property="badQty" column="bad_qty" /> |
|
21 |
<result property="scrapQty" column="scrap_qty" /> |
|
22 |
<result property="repairQty" column="repair_qty" /> |
|
23 |
<result property="actualOnlineQty" column="actual_online_qty" /> |
|
24 |
<result property="onlineCompletionMark" column="online_completion_mark" /> |
|
25 |
<result property="demandDate" column="demand_date" /> |
|
26 |
<result property="planStartTime" column="plan_start_time" /> |
|
27 |
<result property="planEndTime" column="plan_end_time" /> |
|
28 |
<result property="actualStartTime" column="actual_start_time" /> |
|
29 |
<result property="actualEndTime" column="actual_end_time" /> |
|
30 |
<result property="serialNumber" column="serial_number" /> |
|
31 |
<result property="orderStatus" column="order_status" /> |
|
32 |
<result property="createTime" column="create_time" /> |
|
33 |
<result property="updateTime" column="update_time" /> |
|
34 |
<result property="createUser" column="create_user" /> |
|
35 |
<result property="updateUser" column="update_user" /> |
|
36 |
<result property="remarks" column="remarks" /> |
|
37 |
<result property="streamNumber" column="stream_number" /> |
|
38 |
<result property="custom" column="custom" /> |
c860ca
|
39 |
<result property="materialCode" column="material_code" /> |
e57a89
|
40 |
<result property="softwareVersionCode" column="software_version_code" /> |
懒 |
41 |
<result property="productCompanyCode" column="product_company_code" /> |
a75d86
|
42 |
<result property="trolleyYard" column="trolley_yard" /> |
523903
|
43 |
<result property="spareField2" column="spare_field2" /> |
懒 |
44 |
<result property="spareField3" column="spare_field3" /> |
|
45 |
<result property="spareField4" column="spare_field4" /> |
648160
|
46 |
<result property="siteCode" column="site_code" /> |
H |
47 |
<result property="productNum" column="product_num" /> |
|
48 |
<result property="stationCode" column="station_code" /> |
|
49 |
<result property="resultCode" column="result_code" /> |
|
50 |
<result property="resultText" column="result_text" /> |
|
51 |
<result property="sfResult" column="sf_result" /> |
b64ed2
|
52 |
<result property="productModel" column="product_model" /> |
273d64
|
53 |
<result property="automaticNgFlag" column="automatic_ng_flag" /> |
A |
54 |
<result property="automaticNgStation" column="automatic_ng_station" /> |
|
55 |
<result property="automaticNgScrewNumber" column="automatic_ng_screw_number" /> |
|
56 |
<result property="artificialNgFlag" column="artificial_ng_flag" /> |
b64ed2
|
57 |
|
e57a89
|
58 |
</resultMap> |
懒 |
59 |
|
|
60 |
<sql id="selectOmProductionOrdeInfoVo"> |
273d64
|
61 |
select id,site_code,product_num,station_code, product_model,result_code,result_text,sf_result ,work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, material_code, software_version_code, product_company_code, trolley_yard, spare_field2, spare_field3, spare_field4, automatic_ng_flag, automatic_ng_station, automatic_ng_screw_number, artificial_ng_flag from om_production_orde_info |
e57a89
|
62 |
</sql> |
懒 |
63 |
|
|
64 |
<select id="selectOmProductionOrdeInfoList" parameterType="OmProductionOrdeInfo" resultMap="OmProductionOrdeInfoResult"> |
|
65 |
<include refid="selectOmProductionOrdeInfoVo"/> |
|
66 |
<where> |
|
67 |
<if test="id != null and id != ''"> and id like concat('%', #{id}, '%')</if> |
|
68 |
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no like concat('%', #{workOrderNo}, '%')</if> |
|
69 |
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code like concat('%', #{salesOrderCode}, '%')</if> |
|
70 |
<if test="productCode != null and productCode != ''"> and product_code like concat('%', #{productCode}, '%')</if> |
|
71 |
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
|
72 |
<if test="workshopCode != null and workshopCode != ''"> and workshop_code like concat('%', #{workshopCode}, '%')</if> |
|
73 |
<if test="lineCode != null and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if> |
|
74 |
<if test="routeCode != null and routeCode != ''"> and route_code like concat('%', #{routeCode}, '%')</if> |
|
75 |
<if test="bomCode != null and bomCode != ''"> and bom_code like concat('%', #{bomCode}, '%')</if> |
|
76 |
<if test="recipeCode != null and recipeCode != ''"> and recipe_code like concat('%', #{recipeCode}, '%')</if> |
|
77 |
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if> |
|
78 |
<if test="custom != null and custom != ''"> and custom like concat('%', #{custom}, '%')</if> |
c860ca
|
79 |
<if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if> |
e57a89
|
80 |
<if test="softwareVersionCode != null and softwareVersionCode != ''"> and software_version_code like concat('%', #{softwareVersionCode}, '%')</if> |
懒 |
81 |
<if test="productCompanyCode != null and productCompanyCode != ''"> and product_company_code like concat('%', #{productCompanyCode}, '%')</if> |
648160
|
82 |
<if test="siteCode != null and siteCode != ''"> and site_code = #{siteCode}</if> |
H |
83 |
<if test="productNum != null and productNum != ''"> and product_num = #{productNum}</if> |
|
84 |
<if test="stationCode != null and stationCode != ''"> and station_code = #{stationCode}</if> |
|
85 |
<if test="resultText != null and resultText != ''"> and result_text = #{resultText}</if> |
|
86 |
<if test="resultCode != null and resultCode != ''"> and result_code = #{resultCode}</if> |
|
87 |
<if test="sfResult != null and sfResult != ''"> and sf_result = #{sfResult}</if> |
768498
|
88 |
<if test="onlineCompletionMark != null and sfResult != ''"> and online_completion_mark = #{onlineCompletionMark}</if> |
A |
89 |
|
e57a89
|
90 |
</where> |
懒 |
91 |
ORDER BY stream_number DESC |
|
92 |
</select> |
|
93 |
|
|
94 |
<select id="selectOmProductionOrdeInfoById" parameterType="Long" resultMap="OmProductionOrdeInfoResult"> |
|
95 |
<include refid="selectOmProductionOrdeInfoVo"/> |
|
96 |
where id = #{id} |
|
97 |
</select> |
|
98 |
|
|
99 |
<insert id="insertOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo"> |
|
100 |
insert into om_production_orde_info |
|
101 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
102 |
<if test="id != null">id,</if> |
|
103 |
<if test="workOrderNo != null">work_order_no,</if> |
|
104 |
<if test="salesOrderCode != null">sales_order_code,</if> |
|
105 |
<if test="productCode != null">product_code,</if> |
|
106 |
<if test="productName != null">product_name,</if> |
|
107 |
<if test="workshopCode != null">workshop_code,</if> |
|
108 |
<if test="lineCode != null">line_code,</if> |
|
109 |
<if test="routeCode != null">route_code,</if> |
|
110 |
<if test="bomCode != null">bom_code,</if> |
|
111 |
<if test="recipeCode != null">recipe_code,</if> |
|
112 |
<if test="planQty != null">plan_qty,</if> |
|
113 |
<if test="actualQty != null">actual_qty,</if> |
|
114 |
<if test="badQty != null">bad_qty,</if> |
|
115 |
<if test="scrapQty != null">scrap_qty,</if> |
|
116 |
<if test="repairQty != null">repair_qty,</if> |
|
117 |
<if test="actualOnlineQty != null">actual_online_qty,</if> |
|
118 |
<if test="onlineCompletionMark != null">online_completion_mark,</if> |
|
119 |
<if test="demandDate != null">demand_date,</if> |
|
120 |
<if test="planStartTime != null">plan_start_time,</if> |
|
121 |
<if test="planEndTime != null">plan_end_time,</if> |
|
122 |
<if test="actualStartTime != null">actual_start_time,</if> |
|
123 |
<if test="actualEndTime != null">actual_end_time,</if> |
|
124 |
<if test="serialNumber != null">serial_number,</if> |
|
125 |
<if test="orderStatus != null">order_status,</if> |
|
126 |
<if test="createTime != null">create_time,</if> |
|
127 |
<if test="updateTime != null">update_time,</if> |
|
128 |
<if test="createUser != null">create_user,</if> |
|
129 |
<if test="updateUser != null">update_user,</if> |
|
130 |
<if test="remarks != null">remarks,</if> |
|
131 |
<if test="streamNumber != null">stream_number,</if> |
|
132 |
<if test="custom != null">custom,</if> |
c860ca
|
133 |
<if test="materialCode != null">material_code,</if> |
e57a89
|
134 |
<if test="softwareVersionCode != null">software_version_code,</if> |
懒 |
135 |
<if test="productCompanyCode != null">product_company_code,</if> |
a75d86
|
136 |
<if test="trolleyYard != null">trolley_yard,</if> |
e57a89
|
137 |
<if test="spareField2 != null">spare_field_2,</if> |
懒 |
138 |
<if test="spareField3 != null">spare_field_3,</if> |
|
139 |
<if test="spareField4 != null">spare_field_4,</if> |
648160
|
140 |
<if test="siteCode != null">site_code,</if> |
H |
141 |
<if test="productNum != null">product_num,</if> |
|
142 |
<if test="stationCode != null">station_code,</if> |
|
143 |
<if test="resultText != null">result_text,</if> |
|
144 |
<if test="resultCode != null">result_code,</if> |
|
145 |
<if test="sfResult != null">sf_result,</if> |
b64ed2
|
146 |
<if test="productModel != null">product_model,</if> |
273d64
|
147 |
<if test="automaticNgFlag != null">automatic_ng_flag,</if> |
A |
148 |
<if test="automaticNgStation != null">automatic_ng_station,</if> |
|
149 |
<if test="automaticNgScrewNumber != null">automatic_ng_screw_number,</if> |
|
150 |
<if test="artificialNgFlag != null">artificial_ng_flag,</if> |
b64ed2
|
151 |
|
懒 |
152 |
</trim> |
e57a89
|
153 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
懒 |
154 |
<if test="id != null">#{id},</if> |
|
155 |
<if test="workOrderNo != null">#{workOrderNo},</if> |
|
156 |
<if test="salesOrderCode != null">#{salesOrderCode},</if> |
|
157 |
<if test="productCode != null">#{productCode},</if> |
|
158 |
<if test="productName != null">#{productName},</if> |
|
159 |
<if test="workshopCode != null">#{workshopCode},</if> |
|
160 |
<if test="lineCode != null">#{lineCode},</if> |
|
161 |
<if test="routeCode != null">#{routeCode},</if> |
|
162 |
<if test="bomCode != null">#{bomCode},</if> |
|
163 |
<if test="recipeCode != null">#{recipeCode},</if> |
|
164 |
<if test="planQty != null">#{planQty},</if> |
|
165 |
<if test="actualQty != null">#{actualQty},</if> |
|
166 |
<if test="badQty != null">#{badQty},</if> |
|
167 |
<if test="scrapQty != null">#{scrapQty},</if> |
|
168 |
<if test="repairQty != null">#{repairQty},</if> |
|
169 |
<if test="actualOnlineQty != null">#{actualOnlineQty},</if> |
|
170 |
<if test="onlineCompletionMark != null">#{onlineCompletionMark},</if> |
|
171 |
<if test="demandDate != null">#{demandDate},</if> |
|
172 |
<if test="planStartTime != null">#{planStartTime},</if> |
|
173 |
<if test="planEndTime != null">#{planEndTime},</if> |
|
174 |
<if test="actualStartTime != null">#{actualStartTime},</if> |
|
175 |
<if test="actualEndTime != null">#{actualEndTime},</if> |
|
176 |
<if test="serialNumber != null">#{serialNumber},</if> |
|
177 |
<if test="orderStatus != null">#{orderStatus},</if> |
|
178 |
<if test="createTime != null">#{createTime},</if> |
|
179 |
<if test="updateTime != null">#{updateTime},</if> |
|
180 |
<if test="createUser != null">#{createUser},</if> |
|
181 |
<if test="updateUser != null">#{updateUser},</if> |
|
182 |
<if test="remarks != null">#{remarks},</if> |
|
183 |
<if test="streamNumber != null">#{streamNumber},</if> |
|
184 |
<if test="custom != null">#{custom},</if> |
c860ca
|
185 |
<if test="materialCode != null">#{materialCode},</if> |
e57a89
|
186 |
<if test="softwareVersionCode != null">#{softwareVersionCode},</if> |
懒 |
187 |
<if test="productCompanyCode != null">#{productCompanyCode},</if> |
a75d86
|
188 |
<if test="trolleyYard != null">#{trolleyYard},</if> |
e57a89
|
189 |
<if test="spareField2 != null">#{spareField2},</if> |
懒 |
190 |
<if test="spareField3 != null">#{spareField3},</if> |
|
191 |
<if test="spareField4 != null">#{spareField4},</if> |
648160
|
192 |
<if test="siteCode != null">#{siteCode},</if> |
H |
193 |
<if test="productNum != null">#{productNum},</if> |
|
194 |
<if test="stationCode != null">#{stationCode},</if> |
|
195 |
<if test="resultText != null">#{resultText},</if> |
|
196 |
<if test="resultCode != null">#{resultCode},</if> |
|
197 |
<if test="sfResult != null">#{sfResult},</if> |
b64ed2
|
198 |
<if test="productModel != null">#{productModel},</if> |
273d64
|
199 |
<if test="automaticNgFlag != null">#{automaticNgFlag},</if> |
A |
200 |
<if test="automaticNgStation != null">#{automaticNgStation},</if> |
|
201 |
<if test="automaticNgScrewNumber != null">#{automaticNgScrewNumber},</if> |
|
202 |
<if test="artificialNgFlag != null">#{artificialNgFlag},</if> |
b64ed2
|
203 |
|
懒 |
204 |
</trim> |
e57a89
|
205 |
</insert> |
懒 |
206 |
|
|
207 |
<update id="updateOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo"> |
|
208 |
update om_production_orde_info |
|
209 |
<trim prefix="SET" suffixOverrides=","> |
|
210 |
<if test="workOrderNo != null">work_order_no = #{workOrderNo},</if> |
|
211 |
<if test="salesOrderCode != null">sales_order_code = #{salesOrderCode},</if> |
|
212 |
<if test="productCode != null">product_code = #{productCode},</if> |
|
213 |
<if test="productName != null">product_name = #{productName},</if> |
|
214 |
<if test="workshopCode != null">workshop_code = #{workshopCode},</if> |
|
215 |
<if test="lineCode != null">line_code = #{lineCode},</if> |
|
216 |
<if test="routeCode != null">route_code = #{routeCode},</if> |
|
217 |
<if test="bomCode != null">bom_code = #{bomCode},</if> |
|
218 |
<if test="recipeCode != null">recipe_code = #{recipeCode},</if> |
|
219 |
<if test="planQty != null">plan_qty = #{planQty},</if> |
|
220 |
<if test="actualQty != null">actual_qty = #{actualQty},</if> |
|
221 |
<if test="badQty != null">bad_qty = #{badQty},</if> |
|
222 |
<if test="scrapQty != null">scrap_qty = #{scrapQty},</if> |
|
223 |
<if test="repairQty != null">repair_qty = #{repairQty},</if> |
|
224 |
<if test="actualOnlineQty != null">actual_online_qty = #{actualOnlineQty},</if> |
|
225 |
<if test="onlineCompletionMark != null">online_completion_mark = #{onlineCompletionMark},</if> |
|
226 |
<if test="demandDate != null">demand_date = #{demandDate},</if> |
|
227 |
<if test="planStartTime != null">plan_start_time = #{planStartTime},</if> |
|
228 |
<if test="planEndTime != null">plan_end_time = #{planEndTime},</if> |
|
229 |
<if test="actualStartTime != null">actual_start_time = #{actualStartTime},</if> |
|
230 |
<if test="actualEndTime != null">actual_end_time = #{actualEndTime},</if> |
|
231 |
<if test="serialNumber != null">serial_number = #{serialNumber},</if> |
|
232 |
<if test="orderStatus != null">order_status = #{orderStatus},</if> |
|
233 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
234 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
235 |
<if test="createUser != null">create_user = #{createUser},</if> |
|
236 |
<if test="updateUser != null">update_user = #{updateUser},</if> |
|
237 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
238 |
<if test="streamNumber != null">stream_number = #{streamNumber},</if> |
|
239 |
<if test="custom != null">custom = #{custom},</if> |
c860ca
|
240 |
<if test="materialCode != null">material_code = #{materialCode},</if> |
e57a89
|
241 |
<if test="softwareVersionCode != null">software_version_code = #{softwareVersionCode},</if> |
懒 |
242 |
<if test="productCompanyCode != null">product_company_code = #{productCompanyCode},</if> |
a75d86
|
243 |
<if test="trolleyYard != null">trolley_yard = #{trolleyYard},</if> |
e57a89
|
244 |
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
懒 |
245 |
<if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
|
246 |
<if test="spareField4 != null">spare_field_4 = #{spareField4},</if> |
648160
|
247 |
<if test="siteCode != null">site_code = #{siteCode},</if> |
H |
248 |
<if test="productNum != null">product_num = #{productNum},</if> |
|
249 |
<if test="stationCode != null">station_code = #{stationCode},</if> |
|
250 |
<if test="resultText != null">result_text = #{resultText},</if> |
|
251 |
<if test="resultCode != null">result_code = #{resultCode},</if> |
|
252 |
<if test="sfResult != null">sf_result = #{sfResult},</if> |
b64ed2
|
253 |
<if test="productModel != null">product_model = #{productModel},</if> |
273d64
|
254 |
<if test="automaticNgFlag != null">automatic_ng_flag = #{automaticNgFlag},</if> |
A |
255 |
<if test="automaticNgStation != null">automatic_ng_station = #{automaticNgStation},</if> |
|
256 |
<if test="automaticNgScrewNumber != null">automatic_ng_screw_number = #{automaticNgScrewNumber},</if> |
|
257 |
<if test="artificialNgFlag != null">artificial_ng_flag = #{artificialNgFlag},</if> |
e57a89
|
258 |
</trim> |
懒 |
259 |
where id = #{id} |
|
260 |
</update> |
|
261 |
|
|
262 |
<delete id="deleteOmProductionOrdeInfoById" parameterType="Long"> |
|
263 |
delete from om_production_orde_info where id = #{id} |
|
264 |
</delete> |
|
265 |
|
|
266 |
<delete id="deleteOmProductionOrdeInfoByIds" parameterType="String"> |
|
267 |
delete from om_production_orde_info where id in |
|
268 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
269 |
#{id} |
|
270 |
</foreach> |
|
271 |
</delete> |
|
272 |
|
|
273 |
<select id="getMaxStreamNumber" resultType="Integer"> |
|
274 |
SELECT MAX(stream_number) AS streamNumber FROM om_production_orde_info |
|
275 |
</select> |
|
276 |
</mapper> |