yl
2024-10-24 e38242f0209423a24d3f41b175954f8201721d0d
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
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using VueWebCoreApi.DLL.DAL;
using VueWebCoreApi.Models;
using VueWebCoreApi.Tools;
 
namespace VueWebCoreApi.DLL.BLL
{
    public class ProductionManagementBLL
    {
        #region[获取单据号]
        public static ToMessage ProductInHouseOrderCodeSearch(string rightcode)
        {
            return ProductionManagementDAL.ProductInHouseOrderCodeSearch(rightcode);
        }
        #endregion
 
 
        
 
        #region[MES报废补单工单查询]
        public static ToMessage MesBadOrderSearch(string mesordercode, string sourceorder, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
        {
            return ProductionManagementDAL.MesBadOrderSearch(mesordercode, sourceorder, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order);
        }
        #endregion
 
        #region[产品编码查找工艺路线下拉接口]
        public static ToMessage PartSelectRoute(string partcode, string wkshopcode)
        {
            return ProductionManagementDAL.PartSelectRoute(partcode, wkshopcode);
        }
        #endregion
 
        #region[工艺路线查找车间下拉接口]
        public static ToMessage RouteSelectWkshop(string stu_torgcode, string stu_torgtypecode, string partcode)
        {
            return ProductionManagementDAL.RouteSelectWkshop(stu_torgcode, stu_torgtypecode, partcode);
        }
        #endregion
 
        #region[根据选择工艺路线查看工序接口]
        public static ToMessage SelectRouteStep(string routecode)
        {
            return ProductionManagementDAL.SelectRouteStep(routecode);
        }
        #endregion
 
        #region【生产管理、工单新增、编辑时,选择排程是时获取物料清单版本号】
        public static ToMessage JobCreationSonAddVison(string partnumber)
        {
            return ProductionManagementDAL.JobCreationSonAddVison(partnumber);
        }
        #endregion
 
        #region[工单派发选择工艺路线或选择生产车间时判断绑定条件]
        public static ToMessage SelectRouteOrWkshop(string partcode, string routecode, string wkshopcode)
        {
            return ProductionManagementDAL.SelectRouteOrWkshop(partcode, routecode, wkshopcode);
        }
        #endregion
 
        #region[MES工单新增、获取工单号]
        public static ToMessage AddMesOrderCodeSearch()
        {
            return ProductionManagementDAL.AddMesOrderCodeSearch();
        }
        #endregion
 
        #region[MES工单新增、编辑提交]
        public static ToMessage AddUpdateMesOrder(string mesorderstus, string mesordercode, string sourceorder, string ordertype, string partcode, string mesqty, string routecode, string wkshopcode, string planstartdate, string planenddate, string orderlev, string username, string opertype, string is_aps, string bom_id)
        {
            return ProductionManagementDAL.AddUpdateMesOrder(mesorderstus, mesordercode, sourceorder, ordertype, partcode, mesqty, routecode, wkshopcode, planstartdate, planenddate, orderlev, username, opertype, is_aps, bom_id);
        }
        #endregion
 
        #region[MES工单删除]
        public static ToMessage DeleteMesOrder(string souceid, string wocode, string m_po, string orderqty)
        {
            return ProductionManagementDAL.DeleteMesOrder(souceid, wocode, m_po, orderqty);
        }
        #endregion
 
        #region[MES工单关闭]
        public static ToMessage ClosedMesOrder(string username, string wocode, string m_po)
        {
            return ProductionManagementDAL.ClosedMesOrder(username, wocode, m_po);
        }
        #endregion
 
        #region[MES工单查看工序任务]
        public static ToMessage SearchWorkStep(string wo_code)
        {
            return ProductionManagementDAL.SearchWorkStep(wo_code);
        }
        #endregion
 
 
 
        #region[生产开报工扫码获取当前工序对应的设备(自制)]
        public static ToMessage MesOrderStepEqpSearch(string orderstepqrcode)
        {
            return ProductionManagementDAL.MesOrderStepEqpSearch(orderstepqrcode);
        }
        #endregion
 
        #region[生产开报工扫码获取当前工序对应的供方(外协)]
        public static ToMessage MesOrderWxStepEqpSearch(string orderstepqrcode)
        {
            return ProductionManagementDAL.MesOrderWxStepEqpSearch(orderstepqrcode);
        }
        #endregion
 
        #region[生产开报工扫码获取工单对应工序任务]
        public static ToMessage MesOrderStepSearch(string stu_torgcode, string stu_torgtypecode, string orderstepqrcode, int startNum, int endNum, string prop, string order)
        {
            return ProductionManagementDAL.MesOrderStepSearch(stu_torgcode, stu_torgtypecode, orderstepqrcode, startNum, endNum, prop, order);
        }
        #endregion
 
        #region[生产开报工扫码获取工单对应工序任务(外协)]
        public static ToMessage MesOrderWxStepSearch(string stu_torgcode, string stu_torgtypecode, string orderstepqrcode, int startNum, int endNum, string prop, string order)
        {
            return ProductionManagementDAL.MesOrderWxStepSearch(stu_torgcode, stu_torgtypecode, orderstepqrcode, startNum, endNum, prop, order);
        }
        #endregion
 
        #region[生产开报工扫码获取工单对应工序任务(不良)]
        public static ToMessage MesOrderNgStepSearch(string stu_torgcode, string stu_torgtypecode, string orderstepqrcode, int startNum, int endNum, string prop, string order)
        {
            return ProductionManagementDAL.MesOrderNgStepSearch(stu_torgcode, stu_torgtypecode, orderstepqrcode, startNum, endNum, prop, order);
        }
        #endregion
 
        #region[生产开报工扫码获取工单对应工序任务(不良明细)]
        public static ToMessage MesOrderNgSubStepSearch(string orderstepqrcode)
        {
            return ProductionManagementDAL.MesOrderNgSubStepSearch(orderstepqrcode);
        }
        #endregion
 
        #region [生产开报工:开工(开始/报工)/外协发料时条件判断及数据返回接口]
        public static ToMessage MesOrderStepStart(string OperType, string stu_torgcode, string SelectType, string orderstepqrcode)
        {
            return ProductionManagementDAL.MesOrderStepStart(OperType, stu_torgcode, SelectType, orderstepqrcode);
        }
        #endregion
 
        #region[生产开报工:开工时获取设备下拉列表]
        public static ToMessage MesOrderStepStartSelectEqp(string orderstepqrcode)
        {
            return ProductionManagementDAL.MesOrderStepStartSelectEqp(orderstepqrcode);
        }
        #endregion
 
        #region[生产开报工:报工时获取生产班组下拉框]
        public static ToMessage MesOrderStepReportSelectUserGroup(string stu_torgcode, string stu_torgtypecode, string wkshopcode)
        {
            return ProductionManagementDAL.MesOrderStepReportSelectUserGroup(stu_torgcode, stu_torgtypecode, wkshopcode);
        }
        #endregion
 
        #region[生产开报工:根据生产班组查找人员列表]
        public static ToMessage MesOrderGroupSelectUser(string stu_torgcode, string usergroupcode)
        {
            return ProductionManagementDAL.MesOrderGroupSelectUser(stu_torgcode, usergroupcode);
        }
        #endregion
 
        #region[生产开报工:人员下拉列表]
        public static ToMessage MesOrderSelectUser(string usercode)
        {
            return ProductionManagementDAL.MesOrderSelectUser(usercode);
        }
        #endregion
 
        #region[生产开报工:发料/收料时获取外协下拉列表]
        public static ToMessage MesOrderStepSelectWX(string orderstepqrcode)
        {
            return ProductionManagementDAL.MesOrderStepSelectWX(orderstepqrcode);
        }
        #endregion
 
        #region[生产报工:报工/外协收料 获取不良原因下拉列表]
        public static ToMessage MesOrderStepSelectCause(string orderstepqrcode)
        {
            return ProductionManagementDAL.MesOrderStepSelectCause(orderstepqrcode);
        }
        #endregion
 
        #region[生产开报工,开工(开始)提交]
        public static ToMessage SavaMesOrderStepStart(string mesordercode, string partcode, string stepseq, string stepcode, string eqpcode, string taskqty, string startqty, string username)
        {
            return ProductionManagementDAL.SavaMesOrderStepStart(mesordercode, partcode, stepseq, stepcode, eqpcode, taskqty, startqty, username);
        }
        #endregion
 
        #region[生产开报工,报工提交]
        public static ToMessage SavaMesOrderStepReport(string mesordercode, string partcode, string stepseq, string stepcode, string eqpcode, string inbarcode, string reckway, string usergroupcode, string reportuser, string taskqty, string startqty, string reportqty, string ngqty, string badcode, string remarks, string username)
        {
            return ProductionManagementDAL.SavaMesOrderStepReport(mesordercode, partcode, stepseq, stepcode, eqpcode, inbarcode, reckway, usergroupcode, reportuser, taskqty, startqty, reportqty, ngqty, badcode, remarks, username);
        }
        #endregion
 
        #region[生产开报工,发料提交]
        public static ToMessage SavaMesOrderStepOut(string mesordercode, string partcode, string stepseq, string stepcode, string wxcode, string outuser, string taskqty, string fqty, string username)
        {
            return ProductionManagementDAL.SavaMesOrderStepOut(mesordercode, partcode, stepseq, stepcode, wxcode, outuser, taskqty, fqty, username);
        }
        #endregion
 
        #region[生产开报工, 收料提交]
        public static ToMessage SavaMesOrderStepIn(string mesordercode, string partcode, string stepseq, string stepcode, string wxcode, string inbarcode, string inuser, string taskqty, string sqty, string ngqty, string badcode, string remarks, string username)
        {
            return ProductionManagementDAL.SavaMesOrderStepIn(mesordercode, partcode, stepseq, stepcode, wxcode, inbarcode, inuser, taskqty, sqty, ngqty, badcode, remarks, username);
        }
        #endregion
 
        #region[不良处理,提交]
        public static ToMessage EditOrderNgStepSeave(ReportDefectHandle json, string username)
        {
            return ProductionManagementDAL.EditOrderNgStepSeave(json, username);
        }
        #endregion
 
 
        #region[工序检验扫码获取任务信息]
        public static ToMessage MesOrderStepCheckSearch(string stu_torgcode, string orderstepqrcode, string checktype)
        {
            return ProductionManagementDAL.MesOrderStepCheckSearch(stu_torgcode, orderstepqrcode, checktype);
        }
        #endregion
 
        #region[工序检验根据选择的检验方案查找检验项目]
        public static ToMessage MesOrderStepCheckItemList(string checkstandcode)
        {
            return ProductionManagementDAL.MesOrderStepCheckItemList(checkstandcode);
        }
        #endregion
 
        #region[工序检验,提交]
        public static ToMessage SaveMesOrderStepCheckItem(string stu_torgcode, string wocode, string partcode, string stepcode, string checkstandcode, string check_type, string sampmethod, string qualitystatus, string labqty, string sampleqty, string goodqty, string ngqty, string checkitemcont, string username)
        {
            return ProductionManagementDAL.SaveMesOrderStepCheckItem(stu_torgcode, wocode, partcode, stepcode, checkstandcode, check_type, sampmethod, qualitystatus, labqty, sampleqty, goodqty, ngqty, checkitemcont, username);
        }
        #endregion
 
 
 
        #region[MES工单批量关闭查询]
        public static ToMessage MesOrderBitchClosedSearch(string stu_torgcode, string stu_torgtypecode, string mesorderstus, string mesordercode, string sourceorder, string ordertype, string partcode, string partname, string partspec, int startNum, string creatuser, string createdate, int endNum, string prop, string order)
        {
            return ProductionManagementDAL.MesOrderBitchClosedSearch(stu_torgcode, stu_torgtypecode, mesorderstus, mesordercode, sourceorder, ordertype, partcode, partname, partspec, startNum, creatuser, createdate, endNum, prop, order);
        }
        #endregion
 
        #region[MES工单批量关闭提交]
        public static ToMessage MesOrderBitchClosedSeave(string username, DataTable dt)
        {
            return ProductionManagementDAL.MesOrderBitchClosedSeave(username, dt);
        }
        #endregion
 
        #region[MES工单批量反关闭]
        public static ToMessage MesOrderBitchAntiClosedSeave(string username, DataTable dt)
        {
            return ProductionManagementDAL.MesOrderBitchAntiClosedSeave(username, dt);
        }
        #endregion
 
 
 
        #region[产能规划设置查询]
        public static ToMessage CapacityPlanningSetupSearch()
        {
            return ProductionManagementDAL.CapacityPlanningSetupSearch();
        }
        #endregion
 
        #region[产能规划设置新增]
        public static ToMessage CapacityPlanningSetupAddUpdate(string username, List<CapacityPlanningSetup> objs)
        {
            return ProductionManagementDAL.CapacityPlanningSetupAddUpdate(username, objs);
        }
        #endregion
 
        #region[产能规划方案设置删除]
        public static ToMessage CapacityPlanningSetupDelete(string username, string capsetupcode)
        {
            return ProductionManagementDAL.CapacityPlanningSetupDelete(username, capsetupcode);
        }
        #endregion
 
        #region[产能规划查询]
        public static ToMessage CapacityPlanningSearch(string workshop, string devicetype, string stustype, int startNum, int endNum, string prop, string order)
        {
            return ProductionManagementDAL.CapacityPlanningSearch(workshop, devicetype, stustype, startNum, endNum, prop, order);
        }
        #endregion
 
        #region[产能规划默认方案保存提交]
        public static ToMessage CapacityPlanSubmit(string type, string captplanid, string wkshopcode, string capunitcode, string capsetupcode, string captplantype, string username)
        {
            return ProductionManagementDAL.CapacityPlanSubmit(type, captplanid, wkshopcode, capunitcode, capsetupcode, captplantype, username);
        }
        #endregion
 
        #region[产能规划点击日历组件查找已关联的日期方案]
        public static ToMessage CapacityPlanningCalendar(string captplanid)
        {
            return ProductionManagementDAL.CapacityPlanningCalendar(captplanid);
        }
        #endregion
 
        #region[产能规划日历双击时带出对应的方案]
        public static ToMessage CapacityPlanningOnclickSelect(string captplanid, string datetime)
        {
            return ProductionManagementDAL.CapacityPlanningOnclickSelect(captplanid, datetime);
        }
        #endregion
 
        #region[产能规划工作日历选择提交]
        public static ToMessage CapacityPlanningGivePlanSubmit(string captplanid, string wkshopcode, string capunitcode, string capsetupcode, string captplantype, List<CapaPlan> objs, string type, string username)
        {
            return ProductionManagementDAL.CapacityPlanningGivePlanSubmit(captplanid, wkshopcode, capunitcode, capsetupcode, captplantype, objs, type, username);
        }
        #endregion
 
 
        #region[自动排程工单查询]
        public static ToMessage AdvancedSchedulingSearch(string workshop, string wocode, string partcode, string partname, int startNum, int endNum, string prop, string order)
        {
            return ProductionManagementDAL.AdvancedSchedulingSearch(workshop, wocode, partcode, partname, startNum, endNum, prop, order);
        }
        #endregion
 
        #region[排产设备信息]
        public static List<AdvancedSchedulingDevice> OnclickAdvancedSchedulingDevice(string wocode, string wkshpcode, string partcode, string startdate, string enddate, ref ToMessage mes)
        {
            return ProductionManagementDAL.OnclickAdvancedSchedulingDevice(wocode, wkshpcode, partcode, startdate, enddate, ref mes);
        }
        #endregion
 
        #region[设备已排程信息]
        public static DataTable AlreadyScheduling(string wocode, string wkshpcode, string partcode, string botproccode, string startdate, string enddate)
        {
            return ProductionManagementDAL.AlreadyScheduling(wocode, wkshpcode, partcode, botproccode, startdate, enddate);
        }
        #endregion
 
        #region[NEW排产设备信息]
        public static List<AdvancedSchedulingDevice> NewOnclickAdvancedSchedulingDevice(List<ApsOrderSerch> json, ref ToMessage mes)
        {
            return ProductionManagementDAL.NewOnclickAdvancedSchedulingDevice(json, ref mes);
        }
        #endregion
 
        #region[NEW设备已排程信息]
        public static List<DataTable> NewAlreadyScheduling(List<ApsOrderSerch> json)
        {
            return ProductionManagementDAL.NewAlreadyScheduling(json);
        }
        #endregion
 
        #region[排程数据提交]
        public static ToMessage SubmitAlreadyScheduling(string username, string wocode, string botprocecode, List<AlreadyScheduling> objs)
        {
            return ProductionManagementDAL.SubmitAlreadyScheduling(username, wocode, botprocecode, objs);
        }
        #endregion
 
 
        #region[生产入库条码补打]
        public static ToMessage ProductInHouseLabCode(string ordercode)
        {
            return ProductionManagementDAL.ProductInHouseLabCode(ordercode);
        }
        #endregion
 
        #region[生产入库通过车间查找生产订单]
        public static ToMessage ProductInHouseWkshopOrder(string ordertype, string wkshopcode)
        {
            return ProductionManagementDAL.ProductInHouseWkshopOrder(ordertype, wkshopcode);
        }
        #endregion
 
        #region[生产入库信息查询]
        public static ToMessage ProductInHouseOrderSearch(string wkshopcode, string erpordercode, string mesordercode, string partcode, string partname, string partspec, string startorderdate, string endorderdate)
        {
            return ProductionManagementDAL.ProductInHouseOrderSearch(wkshopcode, erpordercode, mesordercode, partcode, partname, partspec, startorderdate, endorderdate);
        }
        #endregion
 
        #region[生产入库提交]
        public static ToMessage ProductInHouseOrderSeave(string username, JObject obj)
        {
            return ProductionManagementDAL.ProductInHouseOrderSeave(username, obj);
        }
        #endregion
 
 
        #region[App生产入库扫描条码]
        public static ToMessage MesAppProductInHouseOrderBarCodeSearch(string labcode)
        {
            return ProductionManagementDAL.MesAppProductInHouseOrderBarCodeSearch(labcode);
        }
        #endregion
    }
}