云
3 小时以前 1f6a660180d4e6fccd1ec83a27b79ea93a121817
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
START TRANSACTION;
insert into `mdm_item` (`id`,`code`,`name`,`specification`,`category_id`,`unit_measure_id`,`item_type`,`status`,`is_batch_managed`,`is_serial_managed`,`high_value`,`warehouse_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1998,'12100271','黑果枸杞','90克',13,8,3,0,1,0,0,18,'来源10月15日电商未缴库计划;配方及投料BOM待工艺维护,不套用其他规格配方。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_md_item` (`id`,`mdm_item_id`,`code`,`name`,`specification`,`unit_measure_id`,`status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1998,1998,'12100271','黑果枸杞','90克',8,0,'来源10月15日电商未缴库计划','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mdm_item` (`id`,`code`,`name`,`specification`,`category_id`,`unit_measure_id`,`item_type`,`status`,`is_batch_managed`,`is_serial_managed`,`high_value`,`warehouse_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1999,'UC000017','雪菊','50g',6,8,3,0,1,0,0,18,'来源10月15日电商未缴库计划;配方及投料BOM待工艺维护,不套用其他规格配方。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_md_item` (`id`,`mdm_item_id`,`code`,`name`,`specification`,`unit_measure_id`,`status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1999,1999,'UC000017','雪菊','50g',8,0,'来源10月15日电商未缴库计划','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mdm_item` (`id`,`code`,`name`,`specification`,`category_id`,`unit_measure_id`,`item_type`,`status`,`is_batch_managed`,`is_serial_managed`,`high_value`,`warehouse_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2000,'U2100282','桑椹原浆','500ml(50ml×10)',9,9,3,0,1,0,0,18,'来源10月15日电商未缴库计划;配方及投料BOM待工艺维护,不套用其他规格配方。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_md_item` (`id`,`mdm_item_id`,`code`,`name`,`specification`,`unit_measure_id`,`status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2000,2000,'U2100282','桑椹原浆','500ml(50ml×10)',9,0,'来源10月15日电商未缴库计划','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route` (`code`,`name`,`status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('RT-FLOWER-BOTTLE-PACK','花类瓶装分装包装工艺路线',0,'用于50g雪菊分装包装;工序沿用现有基础工序,不新增配方参数。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_process` (`param_template_id`,`yield_rate`,`color_code`,`route_id`,`process_id`,`sort`,`next_process_id`,`link_type`,`key_flag`,`check_flag`,`backflush_flag`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,0.980000,NULL,59,1,10,2,3,0,0,0,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_process` (`param_template_id`,`yield_rate`,`color_code`,`route_id`,`process_id`,`sort`,`next_process_id`,`link_type`,`key_flag`,`check_flag`,`backflush_flag`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,0.980000,NULL,59,2,20,3,3,0,0,0,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_process` (`param_template_id`,`yield_rate`,`color_code`,`route_id`,`process_id`,`sort`,`next_process_id`,`link_type`,`key_flag`,`check_flag`,`backflush_flag`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,0.980000,NULL,59,3,30,10,3,0,0,0,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_process` (`param_template_id`,`yield_rate`,`color_code`,`route_id`,`process_id`,`sort`,`next_process_id`,`link_type`,`key_flag`,`check_flag`,`backflush_flag`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,0.980000,NULL,59,10,40,11,3,1,0,0,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_process` (`param_template_id`,`yield_rate`,`color_code`,`route_id`,`process_id`,`sort`,`next_process_id`,`link_type`,`key_flag`,`check_flag`,`backflush_flag`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,0.980000,NULL,59,11,50,12,3,0,0,0,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_process` (`param_template_id`,`yield_rate`,`color_code`,`route_id`,`process_id`,`sort`,`next_process_id`,`link_type`,`key_flag`,`check_flag`,`backflush_flag`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,0.980000,NULL,59,12,60,13,3,0,1,0,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_process` (`param_template_id`,`yield_rate`,`color_code`,`route_id`,`process_id`,`sort`,`next_process_id`,`link_type`,`key_flag`,`check_flag`,`backflush_flag`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,0.980000,NULL,59,13,70,NULL,3,0,0,0,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
update `mdm_item` set `unit_measure_id`=9 where id=517;
update `mes_md_item` set `unit_measure_id`=9 where id=517;
update `mdm_item` set `name`='γ-氨基丁酸营养素饮品(蜜桃味)',`specification`='350ml(35ml×10)' where id=517;
update `mes_md_item` set `name`='γ-氨基丁酸营养素饮品(蜜桃味)',`specification`='350ml(35ml×10)' where id=517;
update `mdm_item` set `unit_measure_id`=9 where id=512;
update `mes_md_item` set `unit_measure_id`=9 where id=512;
update `mdm_item` set `name`='γ-氨基丁酸酸枣仁饮品(桃子味)',`specification`='350ml(35ml×10)' where id=512;
update `mes_md_item` set `name`='γ-氨基丁酸酸枣仁饮品(桃子味)',`specification`='350ml(35ml×10)' where id=512;
update `mdm_item` set `name`='血蛋白营养素饮',`specification`='500ml(50ml*10)' where id=1541;
update `mes_md_item` set `name`='血蛋白营养素饮',`specification`='500ml(50ml*10)' where id=1541;
update `mdm_item` set `unit_measure_id`=9 where id=502;
update `mes_md_item` set `unit_measure_id`=9 where id=502;
update `mdm_item` set `name`='红黑枸杞原浆礼盒-1800ml(30ml*60袋)',`specification`='1800ml' where id=502;
update `mes_md_item` set `name`='红黑枸杞原浆礼盒-1800ml(30ml*60袋)',`specification`='1800ml' where id=502;
insert into `mes_pro_route_product` (`route_id`,`item_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(57,502,'按10月15日计划产品配置;配方及投料沿用产品自身BOM,不套用其他规格。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
update `mdm_item` set `unit_measure_id`=9 where id=485;
update `mes_md_item` set `unit_measure_id`=9 where id=485;
update `mdm_item` set `name`='黑枸杞250克(50克*5)',`specification`='250克(50克*5)' where id=485;
update `mes_md_item` set `name`='黑枸杞250克(50克*5)',`specification`='250克(50克*5)' where id=485;
update `mdm_item` set `name`='黑红枸杞原浆-30ml',`specification`='30ml' where id=1510;
update `mes_md_item` set `name`='黑红枸杞原浆-30ml',`specification`='30ml' where id=1510;
insert into `mes_pro_route_product` (`route_id`,`item_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(18,1510,'按10月15日计划产品配置;配方及投料沿用产品自身BOM,不套用其他规格。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
update `mdm_item` set `unit_measure_id`=64 where id=487;
update `mes_md_item` set `unit_measure_id`=64 where id=487;
update `mdm_item` set `name`='黑枸杞 大果 500克(250克*2)特优级',`specification`='500克(250克*2)' where id=487;
update `mes_md_item` set `name`='黑枸杞 大果 500克(250克*2)特优级',`specification`='500克(250克*2)' where id=487;
update `mdm_item` set `unit_measure_id`=9 where id=497;
update `mes_md_item` set `unit_measure_id`=9 where id=497;
update `mdm_item` set `name`='枸杞原浆-300ml',`specification`='300ml' where id=497;
update `mes_md_item` set `name`='枸杞原浆-300ml',`specification`='300ml' where id=497;
update `mdm_item` set `unit_measure_id`=8 where id=486;
update `mes_md_item` set `unit_measure_id`=8 where id=486;
update `mdm_item` set `name`='黑果枸杞-250克甲级',`specification`='250克' where id=486;
update `mes_md_item` set `name`='黑果枸杞-250克甲级',`specification`='250克' where id=486;
update `mdm_item` set `name`='黑果枸杞-90克',`specification`='90克' where id=1998;
update `mes_md_item` set `name`='黑果枸杞-90克',`specification`='90克' where id=1998;
insert into `mes_pro_route_product` (`route_id`,`item_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,1998,'按10月15日计划产品配置;配方及投料沿用产品自身BOM,不套用其他规格。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_route_product` (`route_id`,`item_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(59,1999,'按10月15日计划产品配置;配方及投料沿用产品自身BOM,不套用其他规格。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
update `mdm_item` set `name`='桑椹原浆',`specification`='500ml(50ml*10)' where id=2000;
update `mes_md_item` set `name`='桑椹原浆',`specification`='500ml(50ml*10)' where id=2000;
insert into `mes_pro_route_product` (`route_id`,`item_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(17,2000,'按10月15日计划产品配置;配方及投料沿用产品自身BOM,不套用其他规格。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation` (`no`,`name`,`customer_id`,`owner_user_id`,`status`,`quotation_time`,`valid_until`,`total_product_price`,`discount_percent`,`discount_price`,`total_price`,`tax_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('QT20261015000001','总公司10月营养保健供货报价',1613,291,10,'2026-10-15 08:05:00','2026-10-30 18:00:00',1475658.40,0,0,1475658.40,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。','291','291','2026-10-15 08:05:00','2026-10-15 08:05:00',0,0);
insert into `crm_contract` (`no`,`name`,`customer_id`,`owner_user_id`,`audit_status`,`order_date`,`start_time`,`end_time`,`total_product_price`,`total_price`,`discount_percent`,`deposit_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('HT20261015000001','总公司10月营养保健供货合同',1613,291,20,'2026-10-15 08:20:00','2026-10-15 08:20:00','2026-11-30 18:00:00',1475658.40,1475658.40,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 月结,2026年11月30日回款;未录实际收款。','291','291','2026-10-15 08:20:00','2026-10-15 08:20:00',0);
insert into `erp_sale_order` (`no`,`status`,`customer_id`,`contract_id`,`contract_no`,`sale_user_id`,`order_time`,`total_count`,`total_product_price`,`total_tax_price`,`total_price`,`discount_percent`,`discount_price`,`deposit_price`,`out_count`,`out_status`,`production_status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('XSDD20261015000001',20,1613,554,'HT20261015000001',291,'2026-10-15 08:40:00',67208,1475658.40,0,1475658.40,0,0,0,0,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 未缴库、未发货。','291','291','2026-10-15 08:40:00','2026-10-15 08:40:00',0);
update `crm_contract` set `order_id`=1067,`order_no`='XSDD20261015000001' where id=554;
update `crm_sale_quotation` set `contract_id`=554,`contract_no`='HT20261015000001' where id=554;
insert into `crm_receivable_plan` (`period`,`customer_id`,`contract_id`,`owner_user_id`,`return_time`,`return_type`,`price`,`remind_days`,`remind_time`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1613,554,291,'2026-11-30 16:00:00',8,1475658.40,3,'2026-11-27 09:00:00','总公司10月供货月结,11月30日一次回款;仅建计划,尚未收款。','291','291','2026-10-15 08:25:00','2026-10-15 08:25:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,554,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,554,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,55,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(554,517,9,15.4,19216,295926.40,15.4,0,'291','291','2026-10-15 08:10:00','2026-10-15 08:10:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(554,517,9,15.4,19216,295926.40,15.4,'291','291','2026-10-15 08:20:00','2026-10-15 08:20:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1067,517,9,15.4,19216,295926.40,0,0,1,'原项目号:Q2100202;半成品已生产完毕等通知发货','291','291','2026-10-15 08:40:00','2026-10-15 08:40:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015004',4,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015004','γ-氨基丁酸营养素饮品(蜜桃味)生产工单',1,1,'XSDD20261015000001',517,19216,0,0,0,1613,23,'2026-10-20 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月15日;半成品已生产完毕等通知发货','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015001',1,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015001',1,1067,'XSDD20261015000001',4200,517,19216,0,9,1613,'2026-10-20 18:00:00','2026-10-15 09:10:00',118,'WO_20261015004',0,'来源:营养保健第3行;计划开工10月15日;原项目号:Q2100202;半成品已生产完毕等通知发货','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3519 where id=4200;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,118,10,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,118,20,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,118,30,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,667,538.048000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,668,1076.096000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,672,1.095312,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,675,7.340512,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,676,29.323616,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,677,1.460416,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,680,15.372800,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,681,3.670256,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,683,219927.120000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,701,1320.139200,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,702,73.020800,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,703,19216.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,704,1095312.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,705,7330.904000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,706,16862.040000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,707,13927.756800,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,708,4250.579200,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,709,3666.412800,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,710,1466.180800,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,711,586.088000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,712,659.108800,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(554,512,9,14.9,30000,447000.00,14.9,0,'291','291','2026-10-15 08:10:00','2026-10-15 08:10:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(554,512,9,14.9,30000,447000.00,14.9,'291','291','2026-10-15 08:20:00','2026-10-15 08:20:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1067,512,9,14.9,30000,447000.00,0,0,1,'原项目号:Q2100201;','291','291','2026-10-15 08:40:00','2026-10-15 08:40:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015005',5,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015005','γ-氨基丁酸酸枣仁饮品(桃子味)生产工单',1,1,'XSDD20261015000001',512,30000,0,0,0,1613,20,'2026-10-23 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月20日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015002',2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015002',1,1067,'XSDD20261015000001',4201,512,30000,0,9,1613,'2026-10-23 18:00:00','2026-10-15 09:10:00',119,'WO_20261015005',0,'来源:营养保健第4行;计划开工10月20日;原项目号:Q2100201;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3520 where id=4201;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,30,3,36,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(36,44,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,40,3,42,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(42,55,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,50,3,43,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(43,56,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,60,3,21,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(21,22,0.980000,NULL,0,1,0,NULL,NULL,NULL,119,70,3,22,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(22,23,0.980000,NULL,0,1,0,NULL,NULL,NULL,119,80,3,23,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(23,24,0.980000,NULL,0,1,0,NULL,NULL,NULL,119,90,3,24,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(24,57,0.980000,NULL,0,1,0,NULL,NULL,NULL,119,100,3,25,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(25,58,0.980000,NULL,0,1,0,NULL,NULL,NULL,119,110,3,26,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(26,27,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,120,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,119,130,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,119,140,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,119,150,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,610,30000.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,667,834.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,668,1680.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,670,1515.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,671,462.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,672,6.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,673,6.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,674,12.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,675,48.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,676,99.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,677,6.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,678,6.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,679,6.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,680,36.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,681,24.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,682,30000.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,683,346500.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(119,684,12.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(554,1541,9,46.5,10000,465000.00,46.5,0,'291','291','2026-10-15 08:10:00','2026-10-15 08:10:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(554,1541,9,46.5,10000,465000.00,46.5,'291','291','2026-10-15 08:20:00','2026-10-15 08:20:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1067,1541,9,46.5,10000,465000.00,0,0,1,'原项目号:U2100335;','291','291','2026-10-15 08:40:00','2026-10-15 08:40:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015006',6,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015006','血蛋白营养素饮生产工单',1,1,'XSDD20261015000001',1541,10000,0,0,0,1613,56,'2026-10-27 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月22日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015003',3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015003',1,1067,'XSDD20261015000001',4202,1541,10000,0,9,1613,'2026-10-27 18:00:00','2026-10-15 09:10:00',120,'WO_20261015006',0,'来源:营养保健第5行;计划开工10月22日;原项目号:U2100335;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3521 where id=4202;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,30,3,10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,10,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,40,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,120,50,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,120,60,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,70,3,23,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(23,23,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,80,3,24,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(24,24,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,90,3,25,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(25,25,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,100,3,30,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,30,0.980000,NULL,0,0,0,NULL,NULL,NULL,120,110,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(554,1542,9,33.5,7992,267732.00,33.5,0,'291','291','2026-10-15 08:10:00','2026-10-15 08:10:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(554,1542,9,33.5,7992,267732.00,33.5,'291','291','2026-10-15 08:20:00','2026-10-15 08:20:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1067,1542,9,33.5,7992,267732.00,0,0,1,'原项目号:U2100336;半成品已生产完毕等通知发货','291','291','2026-10-15 08:40:00','2026-10-15 08:40:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015007',7,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015007','血红素铁红枣饮生产工单',1,1,'XSDD20261015000001',1542,7992,0,0,0,1613,56,'2026-10-21 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月19日;半成品已生产完毕等通知发货','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015004',4,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015004',1,1067,'XSDD20261015000001',4203,1542,7992,0,9,1613,'2026-10-21 18:00:00','2026-10-15 09:10:00',121,'WO_20261015007',0,'来源:营养保健第6行;计划开工10月19日;原项目号:U2100336;半成品已生产完毕等通知发货','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3522 where id=4203;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,121,10,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,121,20,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,121,30,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation` (`no`,`name`,`customer_id`,`owner_user_id`,`status`,`quotation_time`,`valid_until`,`total_product_price`,`discount_percent`,`discount_price`,`total_price`,`tax_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('QT20261015000002','总公司10月原浆供货供货报价',1613,291,10,'2026-10-15 08:06:00','2026-10-30 18:00:00',424723.00,0,0,424723.00,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。','291','291','2026-10-15 08:06:00','2026-10-15 08:06:00',0,0);
insert into `crm_contract` (`no`,`name`,`customer_id`,`owner_user_id`,`audit_status`,`order_date`,`start_time`,`end_time`,`total_product_price`,`total_price`,`discount_percent`,`deposit_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('HT20261015000002','总公司10月原浆供货供货合同',1613,291,20,'2026-10-15 08:21:00','2026-10-15 08:21:00','2026-11-30 18:00:00',424723.00,424723.00,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 月结,2026年11月30日回款;未录实际收款。','291','291','2026-10-15 08:21:00','2026-10-15 08:21:00',0);
insert into `erp_sale_order` (`no`,`status`,`customer_id`,`contract_id`,`contract_no`,`sale_user_id`,`order_time`,`total_count`,`total_product_price`,`total_tax_price`,`total_price`,`discount_percent`,`discount_price`,`deposit_price`,`out_count`,`out_status`,`production_status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('XSDD20261015000002',20,1613,555,'HT20261015000002',291,'2026-10-15 08:41:00',104433,424723.00,0,424723.00,0,0,0,0,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 未缴库、未发货。','291','291','2026-10-15 08:41:00','2026-10-15 08:41:00',0);
update `crm_contract` set `order_id`=1068,`order_no`='XSDD20261015000002' where id=555;
update `crm_sale_quotation` set `contract_id`=555,`contract_no`='HT20261015000002' where id=555;
insert into `crm_receivable_plan` (`period`,`customer_id`,`contract_id`,`owner_user_id`,`return_time`,`return_type`,`price`,`remind_days`,`remind_time`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1613,555,291,'2026-11-30 16:00:00',8,424723.00,3,'2026-11-27 09:00:00','总公司10月供货月结,11月30日一次回款;仅建计划,尚未收款。','291','291','2026-10-15 08:26:00','2026-10-15 08:26:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,555,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,555,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,56,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(555,502,9,63,3033,191079.00,63,0,'291','291','2026-10-15 08:11:00','2026-10-15 08:11:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(555,502,9,63,3033,191079.00,63,'291','291','2026-10-15 08:21:00','2026-10-15 08:21:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1068,502,9,63,3033,191079.00,0,0,1,'原项目号:Q2100197、Q2100196、81013526;','291','291','2026-10-15 08:41:00','2026-10-15 08:41:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015008',8,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015008','红黑枸杞原浆礼盒-1800ml(30ml*60袋)生产工单',1,1,'XSDD20261015000002',502,3033,0,0,0,1613,57,'2026-10-22 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月20日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015005',5,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015005',1,1068,'XSDD20261015000002',4204,502,3033,0,9,1613,'2026-10-22 18:00:00','2026-10-15 09:10:00',122,'WO_20261015008',0,'来源:电商已下单10月份缴库产品第3行;计划开工10月20日;原项目号:Q2100197、Q2100196、81013526;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3523 where id=4204;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,122,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,122,20,3,10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,10,0.980000,NULL,0,0,0,NULL,NULL,NULL,122,30,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,122,40,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,122,50,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,122,60,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(122,628,90990.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(122,630,3033.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(122,631,758.250000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(122,632,379.125000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(122,642,3033.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(122,643,90990.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(555,1510,3,2.12,100000,212000.00,2.12,0,'291','291','2026-10-15 08:11:00','2026-10-15 08:11:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(555,1510,3,2.12,100000,212000.00,2.12,'291','291','2026-10-15 08:21:00','2026-10-15 08:21:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1068,1510,3,2.12,100000,212000.00,0,0,1,'原项目号:Q2100314;','291','291','2026-10-15 08:41:00','2026-10-15 08:41:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015009',9,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015009','黑红枸杞原浆-30ml生产工单',1,1,'XSDD20261015000002',1510,100000,0,0,0,1613,18,'2026-10-30 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月21日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015006',6,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015006',1,1068,'XSDD20261015000002',4205,1510,100000,0,3,1613,'2026-10-30 18:00:00','2026-10-15 09:10:00',123,'WO_20261015009',0,'来源:电商已下单10月份缴库产品第5行;计划开工10月21日;原项目号:Q2100314;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3524 where id=4205;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,30,3,40,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(40,53,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,40,3,41,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(41,54,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,50,3,20,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(20,21,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,60,3,21,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(21,22,0.980000,NULL,0,1,0,NULL,NULL,NULL,123,70,3,22,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(22,23,0.980000,NULL,0,1,0,NULL,NULL,NULL,123,80,3,23,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(23,24,0.980000,NULL,0,1,0,NULL,NULL,NULL,123,90,3,24,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(24,25,0.980000,NULL,0,1,0,NULL,NULL,NULL,123,100,3,25,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(25,26,0.980000,NULL,0,1,0,NULL,NULL,NULL,123,110,3,26,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(26,27,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,120,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,123,130,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,123,140,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,123,150,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(555,497,9,15.46,1400,21644.00,15.46,0,'291','291','2026-10-15 08:11:00','2026-10-15 08:11:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(555,497,9,15.46,1400,21644.00,15.46,'291','291','2026-10-15 08:21:00','2026-10-15 08:21:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1068,497,9,15.46,1400,21644.00,0,0,1,'原项目号:Q2100080;','291','291','2026-10-15 08:41:00','2026-10-15 08:41:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015010',10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015010','枸杞原浆-300ml生产工单',1,1,'XSDD20261015000002',497,1400,0,0,0,1613,36,'2026-10-19 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月16日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015007',7,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015007',1,1068,'XSDD20261015000002',4206,497,1400,0,9,1613,'2026-10-19 18:00:00','2026-10-15 09:10:00',124,'WO_20261015010',0,'来源:电商已下单10月份缴库产品第7行;计划开工10月16日;原项目号:Q2100080;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3525 where id=4206;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,124,10,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,124,20,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,124,30,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(124,610,1400.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(124,625,1400.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(124,626,39.200000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(124,627,78.400000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(124,628,14000.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation` (`no`,`name`,`customer_id`,`owner_user_id`,`status`,`quotation_time`,`valid_until`,`total_product_price`,`discount_percent`,`discount_price`,`total_price`,`tax_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('QT20261015000003','总公司10月枸杞及雪菊供货报价',1613,291,10,'2026-10-15 08:07:00','2026-10-30 18:00:00',133911.78,0,0,133911.78,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。','291','291','2026-10-15 08:07:00','2026-10-15 08:07:00',0,0);
insert into `crm_contract` (`no`,`name`,`customer_id`,`owner_user_id`,`audit_status`,`order_date`,`start_time`,`end_time`,`total_product_price`,`total_price`,`discount_percent`,`deposit_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('HT20261015000003','总公司10月枸杞及雪菊供货合同',1613,291,20,'2026-10-15 08:22:00','2026-10-15 08:22:00','2026-11-30 18:00:00',133911.78,133911.78,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 月结,2026年11月30日回款;未录实际收款。','291','291','2026-10-15 08:22:00','2026-10-15 08:22:00',0);
insert into `erp_sale_order` (`no`,`status`,`customer_id`,`contract_id`,`contract_no`,`sale_user_id`,`order_time`,`total_count`,`total_product_price`,`total_tax_price`,`total_price`,`discount_percent`,`discount_price`,`deposit_price`,`out_count`,`out_status`,`production_status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('XSDD20261015000003',20,1613,556,'HT20261015000003',291,'2026-10-15 08:42:00',2904,133911.78,0,133911.78,0,0,0,0,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 未缴库、未发货。','291','291','2026-10-15 08:42:00','2026-10-15 08:42:00',0);
update `crm_contract` set `order_id`=1069,`order_no`='XSDD20261015000003' where id=556;
update `crm_sale_quotation` set `contract_id`=556,`contract_no`='HT20261015000003' where id=556;
insert into `crm_receivable_plan` (`period`,`customer_id`,`contract_id`,`owner_user_id`,`return_time`,`return_type`,`price`,`remind_days`,`remind_time`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1613,556,291,'2026-11-30 16:00:00',8,133911.78,3,'2026-11-27 09:00:00','总公司10月供货月结,11月30日一次回款;仅建计划,尚未收款。','291','291','2026-10-15 08:27:00','2026-10-15 08:27:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,556,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,556,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,57,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(556,485,9,122.74,168,20620.32,122.74,0,'291','291','2026-10-15 08:12:00','2026-10-15 08:12:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(556,485,9,122.74,168,20620.32,122.74,'291','291','2026-10-15 08:22:00','2026-10-15 08:22:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1069,485,9,122.74,168,20620.32,0,0,1,'原项目号:Q2100073;','291','291','2026-10-15 08:42:00','2026-10-15 08:42:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015011',11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015011','黑枸杞250克(50克*5)生产工单',1,1,'XSDD20261015000003',485,168,0,0,0,1613,13,'2026-10-21 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月19日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015008',8,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015008',1,1069,'XSDD20261015000003',4207,485,168,0,9,1613,'2026-10-21 18:00:00','2026-10-15 09:10:00',125,'WO_20261015011',0,'来源:电商已下单10月份缴库产品第4行;计划开工10月19日;原项目号:Q2100073;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3526 where id=4207;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,30,3,4,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(4,4,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,40,3,5,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,5,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,50,3,6,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(6,6,0.980000,NULL,0,1,0,NULL,NULL,NULL,125,60,3,7,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(7,7,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,70,3,8,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,8,0.980000,NULL,0,1,0,NULL,NULL,NULL,125,80,3,9,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,9,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,90,3,10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,10,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,100,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,125,110,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,125,120,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,125,130,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,560,42.336000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,568,840.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,569,840.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,570,168.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,571,168.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,572,21.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,573,42.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(125,574,840.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(556,487,64,75.81,666,50489.46,75.81,0,'291','291','2026-10-15 08:12:00','2026-10-15 08:12:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(556,487,64,75.81,666,50489.46,75.81,'291','291','2026-10-15 08:22:00','2026-10-15 08:22:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1069,487,64,75.81,666,50489.46,0,0,1,'原项目号:Q2100077;','291','291','2026-10-15 08:42:00','2026-10-15 08:42:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015012',12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015012','黑枸杞 大果 500克(250克*2)特优级生产工单',1,1,'XSDD20261015000003',487,666,0,0,0,1613,13,'2026-10-26 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月22日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015009',9,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015009',1,1069,'XSDD20261015000003',4208,487,666,0,64,1613,'2026-10-26 18:00:00','2026-10-15 09:10:00',126,'WO_20261015012',0,'来源:电商已下单10月份缴库产品第6行;计划开工10月22日;原项目号:Q2100077;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3527 where id=4208;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,30,3,4,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(4,4,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,40,3,5,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,5,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,50,3,6,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(6,6,0.980000,NULL,0,1,0,NULL,NULL,NULL,126,60,3,7,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(7,7,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,70,3,8,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,8,0.980000,NULL,0,1,0,NULL,NULL,NULL,126,80,3,9,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,9,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,90,3,10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,10,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,100,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,126,110,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,126,120,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,126,130,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,574,1332.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,576,1332.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,577,1332.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,582,335.664000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,583,1332.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,584,1332.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,585,666.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,586,55.944000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,587,111.222000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(126,588,666.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(556,486,8,21.48,1800,38664.00,21.48,0,'291','291','2026-10-15 08:12:00','2026-10-15 08:12:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(556,486,8,21.48,1800,38664.00,21.48,'291','291','2026-10-15 08:22:00','2026-10-15 08:22:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1069,486,8,21.48,1800,38664.00,0,0,1,'原项目号:Q2100078;','291','291','2026-10-15 08:42:00','2026-10-15 08:42:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015013',13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015013','黑果枸杞-250克甲级生产工单',1,1,'XSDD20261015000003',486,1800,0,0,0,1613,13,'2026-10-28 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月26日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015010',10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015010',1,1069,'XSDD20261015000003',4209,486,1800,0,8,1613,'2026-10-28 18:00:00','2026-10-15 09:10:00',127,'WO_20261015013',0,'来源:电商已下单10月份缴库产品第8行;计划开工10月26日;原项目号:Q2100078;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3528 where id=4209;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,30,3,4,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(4,4,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,40,3,5,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,5,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,50,3,6,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(6,6,0.980000,NULL,0,1,0,NULL,NULL,NULL,127,60,3,7,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(7,7,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,70,3,8,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,8,0.980000,NULL,0,1,0,NULL,NULL,NULL,127,80,3,9,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,9,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,90,3,10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,10,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,100,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,127,110,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,127,120,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,127,130,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,574,1800.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,575,453.600000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,576,1800.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,577,1800.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,578,1800.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,579,1800.000000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,580,75.600000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_bom` (`work_order_id`,`item_id`,`quantity`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(127,581,151.200000,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(556,1998,8,179.1,90,16119.00,179.1,0,'291','291','2026-10-15 08:12:00','2026-10-15 08:12:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(556,1998,8,179.1,90,16119.00,179.1,'291','291','2026-10-15 08:22:00','2026-10-15 08:22:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1069,1998,8,179.1,90,16119.00,0,0,1,'原项目号:12100271;','291','291','2026-10-15 08:42:00','2026-10-15 08:42:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015014',14,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015014','黑果枸杞-90克生产工单',1,1,'XSDD20261015000003',1998,90,0,0,0,1613,13,'2026-10-29 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月27日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015011',11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015011',1,1069,'XSDD20261015000003',4210,1998,90,0,8,1613,'2026-10-29 18:00:00','2026-10-15 09:10:00',128,'WO_20261015014',0,'来源:电商已下单10月份缴库产品第9行;计划开工10月27日;原项目号:12100271;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3529 where id=4210;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,30,3,4,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(4,4,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,40,3,5,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,5,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,50,3,6,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(6,6,0.980000,NULL,0,1,0,NULL,NULL,NULL,128,60,3,7,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(7,7,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,70,3,8,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,8,0.980000,NULL,0,1,0,NULL,NULL,NULL,128,80,3,9,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,9,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,90,3,10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,10,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,100,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,1,0,0,NULL,NULL,NULL,128,110,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,128,120,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,128,130,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(556,1999,8,44.55,180,8019.00,44.55,0,'291','291','2026-10-15 08:12:00','2026-10-15 08:12:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(556,1999,8,44.55,180,8019.00,44.55,'291','291','2026-10-15 08:22:00','2026-10-15 08:22:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1069,1999,8,44.55,180,8019.00,0,0,1,'原项目号:UC000017;','291','291','2026-10-15 08:42:00','2026-10-15 08:42:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015015',15,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015015','雪菊生产工单',1,1,'XSDD20261015000003',1999,180,0,0,0,1613,59,'2026-10-30 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月28日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015012',12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015012',1,1069,'XSDD20261015000003',4211,1999,180,0,8,1613,'2026-10-30 18:00:00','2026-10-15 09:10:00',129,'WO_20261015015',0,'来源:电商已下单10月份缴库产品第10行;计划开工10月28日;原项目号:UC000017;','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3530 where id=4211;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,129,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,129,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,129,30,3,10,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(10,10,0.980000,NULL,1,0,0,NULL,NULL,NULL,129,40,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,0,0,0,NULL,NULL,NULL,129,50,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,129,60,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,129,70,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation` (`no`,`name`,`customer_id`,`owner_user_id`,`status`,`quotation_time`,`valid_until`,`total_product_price`,`discount_percent`,`discount_price`,`total_price`,`tax_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('QT20261015000004','总公司10月桑椹原浆供货报价',1613,291,10,'2026-10-15 08:08:00','2026-10-30 18:00:00',28060.00,0,0,28060.00,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。','291','291','2026-10-15 08:08:00','2026-10-15 08:08:00',0,0);
insert into `crm_contract` (`no`,`name`,`customer_id`,`owner_user_id`,`audit_status`,`order_date`,`start_time`,`end_time`,`total_product_price`,`total_price`,`discount_percent`,`deposit_price`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('HT20261015000004','总公司10月桑椹原浆供货合同',1613,291,20,'2026-10-15 08:23:00','2026-10-15 08:23:00','2026-11-30 18:00:00',28060.00,28060.00,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 月结,2026年11月30日回款;未录实际收款。','291','291','2026-10-15 08:23:00','2026-10-15 08:23:00',0);
insert into `erp_sale_order` (`no`,`status`,`customer_id`,`contract_id`,`contract_no`,`sale_user_id`,`order_time`,`total_count`,`total_product_price`,`total_tax_price`,`total_price`,`discount_percent`,`discount_price`,`deposit_price`,`out_count`,`out_status`,`production_status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('XSDD20261015000004',20,1613,557,'HT20261015000004',291,'2026-10-15 08:43:00',1000,28060.00,0,28060.00,0,0,0,0,0,0,'来源:10月15日电商未缴库计划;按表列订单数量及结算单价执行,未另加税额。 未缴库、未发货。','291','291','2026-10-15 08:43:00','2026-10-15 08:43:00',0);
update `crm_contract` set `order_id`=1070,`order_no`='XSDD20261015000004' where id=557;
update `crm_sale_quotation` set `contract_id`=557,`contract_no`='HT20261015000004' where id=557;
insert into `crm_receivable_plan` (`period`,`customer_id`,`contract_id`,`owner_user_id`,`return_time`,`return_type`,`price`,`remind_days`,`remind_time`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1613,557,291,'2026-11-30 16:00:00',8,28060.00,3,'2026-11-27 09:00:00','总公司10月供货月结,11月30日一次回款;仅建计划,尚未收款。','291','291','2026-10-15 08:28:00','2026-10-15 08:28:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(9,557,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(5,557,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_permission` (`biz_type`,`biz_id`,`user_id`,`level`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(8,58,291,1,'291','291','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `crm_sale_quotation_product` (`quotation_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`quotation_price`,`tax_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values(557,2000,9,28.06,1000,28060.00,28.06,0,'291','291','2026-10-15 08:13:00','2026-10-15 08:13:00',0,0);
insert into `crm_contract_product` (`contract_id`,`item_id`,`item_unit_id`,`item_price`,`count`,`total_price`,`contract_price`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(557,2000,9,28.06,1000,28060.00,28.06,'291','291','2026-10-15 08:23:00','2026-10-15 08:23:00',0);
insert into `erp_sale_order_items` (`order_id`,`product_id`,`product_unit_id`,`product_price`,`count`,`total_price`,`tax_price`,`out_count`,`need_production`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1070,2000,9,28.06,1000,28060.00,0,0,1,'原项目号:U2100282;;原进度:10月15号左右发货','291','291','2026-10-15 08:43:00','2026-10-15 08:43:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(30,'WO_20261015016',16,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order` (`code`,`name`,`type`,`order_source_type`,`order_source_code`,`product_id`,`quantity`,`quantity_produced`,`quantity_scheduled`,`quantity_changed`,`client_id`,`route_id`,`request_date`,`parent_id`,`status`,`auto_finish_flag`,`is_feedback_approve`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('WO_20261015016','桑椹原浆生产工单',1,1,'XSDD20261015000004',2000,1000,0,0,0,1613,17,'2026-10-16 18:00:00',0,1,1,0,'来源10月15日未缴库计划;计划开工10月16日;待排产;未提前报工','244','244','2026-10-15 09:10:00','2026-10-15 09:10:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(65,'MPS20261015013',13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_mps` (`code`,`status`,`sale_order_id`,`sale_order_no`,`sale_order_item_id`,`product_id`,`quantity`,`quantity_produced`,`unit_measure_id`,`client_id`,`request_date`,`issue_date`,`work_order_id`,`work_order_code`,`merge_flag`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`,`tenant_id`) values('MPS20261015013',1,1070,'XSDD20261015000004',4212,2000,1000,0,9,1613,'2026-10-16 18:00:00','2026-10-15 09:10:00',130,'WO_20261015016',0,'来源:电商已下单10月份缴库产品第11行;计划开工10月16日;原项目号:U2100282;;原进度:10月15号左右发货','244','244','2026-10-15 09:00:00','2026-10-15 09:00:00',0,0);
update `erp_sale_order_items` set `mps_id`=3531 where id=4212;
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1,1,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,10,3,2,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(2,2,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,20,3,3,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(3,3,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,30,3,20,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(20,21,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,40,3,21,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(21,31,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,50,3,22,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(22,32,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,60,3,23,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(23,33,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,70,3,24,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(24,52,0.980000,NULL,1,0,0,NULL,NULL,NULL,130,80,3,25,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(25,51,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,90,3,27,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(27,28,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,100,3,11,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(11,11,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,110,3,12,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(12,12,0.980000,NULL,0,1,0,NULL,NULL,NULL,130,120,3,13,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_process` (`process_id`,`param_template_id`,`yield_rate`,`color_code`,`key_flag`,`check_flag`,`backflush_flag`,`output_item_id`,`prepare_time`,`wait_time`,`work_order_id`,`sort`,`link_type`,`next_process_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(13,13,0.980000,NULL,0,0,0,NULL,NULL,NULL,130,130,3,NULL,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(31,'TK_20261015015',15,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_task` (`code`,`name`,`work_order_id`,`workstation_id`,`route_id`,`process_id`,`param_template_id`,`item_id`,`quantity`,`produced_quantity`,`qualify_quantity`,`unqualify_quantity`,`changed_quantity`,`client_id`,`start_time`,`end_time`,`duration`,`status`,`first_feedback_time`,`last_feedback_time`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('TK_20261015015','γ-氨基丁酸营养素饮品(蜜桃味)-11',118,11,23,11,11,517,20009,800,800,0,0,1613,'2026-10-15 13:43:00','2026-10-15 16:43:00',3,2,'2026-10-15 14:38:49','2026-10-15 14:38:49','半成品已生产完毕;本次仅排剩余包装、检验及缴库,尚未成品入库。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_task_assignee` (`task_id`,`user_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1058,244,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(33,'FB_20261015001',1,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_feedback` (`code`,`type`,`feedback_time`,`workstation_id`,`route_id`,`process_id`,`work_order_id`,`task_id`,`item_id`,`scheduled_quantity`,`feedback_quantity`,`qualified_quantity`,`unqualified_quantity`,`uncheck_quantity`,`labor_scrap_quantity`,`material_scrap_quantity`,`other_scrap_quantity`,`feedback_user_id`,`approve_user_id`,`status`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('FB_20261015001',1,'2026-10-15 14:38:49',11,23,11,118,1058,517,20009,800,800,0,0,0,0,0,244,244,4,'按本次录入要求记录今日包装部分完成800盒;非末道工序,不增加成品库存。','244','244','2026-10-15 14:38:49','2026-10-15 14:38:49',0);
insert into `mes_pro_work_order_param_record` (`work_order_id`,`task_id`,`template_id`,`template_code`,`template_name`,`record_no`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,1058,11,'PT-STP-011','外包装参数模板-011','TASK-1058','排产生成参数快照;实际参数待现场填写。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_param_record_detail` (`record_id`,`template_detail_id`,`param_code`,`param_name`,`param_type`,`required`,`unit_measure_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(204,16,'PP-STP-COUNT','包装数量',1,0,24,'要求:原文未指定统一数值,记录实际值;不得套用其他产品标准。;;来源:STP-SG-003-01、STP-DY-007-00、STP-SG-002-04、STP-GT-015-04、STP-GT-016-04、STP-GY-001-06、STP-DY-001-02、STP-GT-009-07、STP-GY-002-05、STP-SG-001-09、STP-GT-010-05、STP-FB-005-00、STP-YL-006-00、STP-YL-016-00、STP-YL-008-00、STP-YL-010-00、STP-YL-015-00、STP-YL-018-00、STP-YL-009-00、STP-YL-012-00、STP-YL-017-00、STP-YL-011-00、STP-YL-007-00、STP-YL-013-00;实际值由现场录入。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(31,'TK_20261015016',16,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_task` (`code`,`name`,`work_order_id`,`workstation_id`,`route_id`,`process_id`,`param_template_id`,`item_id`,`quantity`,`produced_quantity`,`qualify_quantity`,`unqualify_quantity`,`changed_quantity`,`client_id`,`start_time`,`end_time`,`duration`,`status`,`first_feedback_time`,`last_feedback_time`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('TK_20261015016','γ-氨基丁酸营养素饮品(蜜桃味)-12',118,12,23,12,12,517,19609,0,0,0,0,1613,'2026-10-15 16:43:00','2026-10-19 15:43:00',17,0,NULL,NULL,'半成品已生产完毕;本次仅排剩余包装、检验及缴库,尚未成品入库。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_task_assignee` (`task_id`,`user_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1059,244,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_param_record` (`work_order_id`,`task_id`,`template_id`,`template_code`,`template_name`,`record_no`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,1059,12,'PT-STP-012','成品检验参数模板-012','TASK-1059','排产生成参数快照;实际参数待现场填写。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_param_record_detail` (`record_id`,`template_detail_id`,`param_code`,`param_name`,`param_type`,`required`,`unit_measure_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(205,17,'PP-STP-SAMPLE','检验抽样数量',1,0,24,'要求:原文未指定统一数值,记录实际值;不得套用其他产品标准。;;来源:STP-SG-003-01、STP-DY-007-00、STP-SG-002-04、STP-GT-015-04、STP-GT-016-04、STP-GY-001-06、STP-DY-001-02、STP-GT-009-07、STP-GY-002-05、STP-SG-001-09、STP-GT-010-05、STP-FB-005-00、STP-YL-006-00、STP-YL-016-00、STP-YL-008-00、STP-YL-010-00、STP-YL-015-00、STP-YL-018-00、STP-YL-009-00、STP-YL-012-00、STP-YL-017-00、STP-YL-011-00、STP-YL-007-00、STP-YL-013-00;实际值由现场录入。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_md_auto_code_record` (`rule_id`,`result`,`serial_no`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(31,'TK_20261015017',17,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_task` (`code`,`name`,`work_order_id`,`workstation_id`,`route_id`,`process_id`,`param_template_id`,`item_id`,`quantity`,`produced_quantity`,`qualify_quantity`,`unqualify_quantity`,`changed_quantity`,`client_id`,`start_time`,`end_time`,`duration`,`status`,`first_feedback_time`,`last_feedback_time`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values('TK_20261015017','γ-氨基丁酸营养素饮品(蜜桃味)-13',118,13,23,13,13,517,19216,0,0,0,0,1613,'2026-10-19 15:43:00','2026-10-23 09:43:00',30,0,NULL,NULL,'半成品已生产完毕;本次仅排剩余包装、检验及缴库,尚未成品入库。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_task_assignee` (`task_id`,`user_id`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(1060,244,'244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_param_record` (`work_order_id`,`task_id`,`template_id`,`template_code`,`template_name`,`record_no`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(118,1060,13,'PT-STP-013','成品入库参数模板-013','TASK-1060','排产生成参数快照;实际参数待现场填写。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
insert into `mes_pro_work_order_param_record_detail` (`record_id`,`template_detail_id`,`param_code`,`param_name`,`param_type`,`required`,`unit_measure_id`,`remark`,`creator`,`updater`,`create_time`,`update_time`,`deleted`) values(206,18,'PP-STP-COUNT','包装数量',1,0,24,'要求:原文未指定统一数值,记录实际值;不得套用其他产品标准。;;来源:STP-SG-003-01、STP-DY-007-00、STP-SG-002-04、STP-GT-015-04、STP-GT-016-04、STP-GY-001-06、STP-DY-001-02、STP-GT-009-07、STP-GY-002-05、STP-SG-001-09、STP-GT-010-05、STP-FB-005-00、STP-YL-006-00、STP-YL-016-00、STP-YL-008-00、STP-YL-010-00、STP-YL-015-00、STP-YL-018-00、STP-YL-009-00、STP-YL-012-00、STP-YL-017-00、STP-YL-011-00、STP-YL-007-00、STP-YL-013-00;实际值由现场录入。','244','244','2026-10-15 08:00:00','2026-10-15 08:00:00',0);
update `mes_pro_work_order` set `quantity_scheduled`=19216 where id=118;
update `mes_pro_work_order` set `request_date`='2026-10-23 18:00:00' where id=118;
update `mes_pro_mps` set `request_date`='2026-10-23 18:00:00' where id=3519;
ROLLBACK;