zhuguifei
2026-03-10 58402bd5e762361363a0f7d7907153c77dbb819f
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
422
package com.shlanbao.tzsc.pms.sch.workorder.service;
 
import java.util.List;
import java.util.Map;
 
import com.shlanbao.tzsc.base.mapping.ChangeShiftDatas;
import com.shlanbao.tzsc.base.mapping.MdMat;
import com.shlanbao.tzsc.base.mapping.MdMatType;
import com.shlanbao.tzsc.base.mapping.QualityCheckInfo;
import com.shlanbao.tzsc.base.mapping.QualityCheckInfoParams;
import com.shlanbao.tzsc.base.mapping.SchCalendar;
import com.shlanbao.tzsc.base.mapping.SchWorkorder;
import com.shlanbao.tzsc.base.mapping.SchWorkorderBom;
import com.shlanbao.tzsc.base.mapping.SysMessageQueue;
import com.shlanbao.tzsc.base.model.*;
import com.shlanbao.tzsc.pms.sch.workorder.beans.TransmitterOutput;
import com.shlanbao.tzsc.pms.sch.workorder.beans.TransmitterWorkOrderBean;
import com.shlanbao.tzsc.pms.sch.workorder.beans.WorkOrderBean;
 
/**
 * 工单业务接口
 * @author Leejean
 * @create 2014年11月18日下午3:53:04
 */
public interface WorkOrderServiceI {
    /**
     * 根据设备CODE 获取正在运行的工单 并填充辅料
     * @throws Exception
     */
    SchWorkorder getWork(String eqp) throws Exception;
    /**
     * 查询所有工单
     * @author Leejean
     * @create 2014年11月18日下午3:55:00
     * @param workOrderBean 查询条件
     * @param pageParams 分页参数
     * @return
     */
    DataGrid getAllWorkOrders(WorkOrderBean workOrderBean,PageParams pageParams) throws Exception;
    /**
     * 审核工单 单个
     * @author Leejean
     * @create 2014年11月25日下午1:09:15
     * @param id 工单id号
     * @throws Exception
     */
    String checkWorkOrder(String id) throws Exception;
    /**
     * 审核工单 批量
     * @author Leejean
     * @create 2014年11月25日下午1:09:15
     * @param ids
     * @throws Exception
     */
    String checkWorkOrders(String ids) throws Exception;
    /**
     * 修改工单状态
     * @author Leejean
     * @create 2014年11月25日下午1:12:11
     * @param id
     * 1,下发 <br>
     * 2,运行 -->运行时在生产实绩中保存val=0的数据,即采集程序只做update操作<br>
     * 3,暂停 -->MES取消撤销工单时<br>
     * 4,完成 -->工单完成,更新工单结束时间<br>
     * 5,终止 -->错误的工单运行时,执行本操作删除生产实绩相关数据<br>
     * 6,结束 -->工单已经反馈<br>
     * 7,锁定 -->MES发起撤销时<br>
     * 8,撤销 -->MES确定撤销时<br>
     * @throws Exception
     */
    void editWorkOrderStatus(String id,Long sts) throws Exception;
    /**
     * 根据id获取工单
     * @author Leejean
     * @create 2014年12月4日上午10:59:07
     * @param id
     * @return
     * @throws Exception
     */
    WorkOrderBean getWorkOrderById(String id) throws Exception;
    SchWorkorder getSchWorkorderById(String id);
    /**
     * 新增工单
     * @author Leejean
     * @create 2014年12月24日下午1:22:48
     * @param workOrderBean
     * @return
     */
    void addOrder(WorkOrderBean workOrderBean) throws Exception;
    /**
     * 初始化所有运行的工单辅料计数参数
     * @author Leejean
     * @create 2015年1月20日下午3:25:36
     */
    void initAllRunnedWorkOrderCalcValues() throws Exception;
 
 
 
    /**
     * 运行的工单
     * @param code
     * @return
     */
    SchWorkorder getRunSchWorkorder(String code)throws Exception;
    /**
     * 根据设备CODE 获取正在运行的工单 并填充辅料
     * @throws Exception
     */
    void queryRunWorkFl(SchWorkorder workorder) throws Exception;
 
 
    /**
     * 新增排班
     * @param workOrderBean
     * @return
     */
    boolean addPbWork(WorkOrderBean workOrderBean) throws Exception;
    /**
     * 批量新增指定机台数据
     * @author luther.zhang
     * @create 2015-04-29
     */
    boolean saveBatckWork(WorkOrderBean workBean) throws Exception;
    //END================================================================
 
 
    /**
     * 查询上一班次采集数据详细
     * @createTime 2015年10月26日08:35:09
     * @author wanchanghuang
     * */
    Map<Integer,List<ChangeShiftDatas>> getMapChangeShiftDates(ChangeShiftDatas csd);
    /**
     * 删除工单
     * @param ids
     * shisihai
     */
    void deleteWorkOrders(String ids,String eqpName,String team,String date,String mat,SessionInfo info);
    /**
     * 批量删除工单
     * @param ids
     * shisihai
     */
    void deleteBeatchWorkOrders(String ids, String eqpName, String team, String date, String mat,
            SessionInfo info);
    /**
     * 【功能说明】:MES工单撤销
     * @author wanchanghuang
     * @createTime 2015年12月29日13:35:28
     * */
    boolean updateTntryCancel(SchWorkorder pxd);
    /**
     * 【功能说明】:工单信号
     * @author wch
     * @return
     * @createTime 2015年12月18日09:07:30
     *
     * */
    boolean deleteAndCancelWS(ParsingXmlDataBean pxd);
    /**
     * [功能说明]:质量接口-基础表QUALITY_INSPECTION
     * @author wanchanghuang
     * @crateTime 2016年1月12日16:40:37
     *
     * */
    QualityCheckInfo saveQualityInfo(QualityCheckInfo qci);
    /**
     * [功能说明]:质量接口-基础详细QUALITY_INSPECTION_PARAM
     * @author wanchanghuang
     * @crateTime 2016年1月12日16:40:37
     *
     * */
    void saveQualityParamInfo(QualityCheckInfoParams qcip);
 
    /**
     * [功能描述]:接口解析完成,调用日志
     * @author wanchanghuang
     * @createTime 2016年1月12日17:36:35
     * */
    void saveAndReturn(SysMessageQueue log);
    /**
     * [功能描述]:接口解析,保存工厂日历
     * @author wanchanghuang
     * @createTime 2016年1月13日09:37:12
     * */
    void saveSchCalendar(SchCalendar scr1);
    /**
     * [功能描述]:接口解析,批量保存工厂日历
     * @author shisihia
     * @createTime 2016年1月13日09:37:12
     * */
    boolean batchInsertAndReturn(List<SchCalendar> schCalendars);
    /**
     * [功能描述]:接口解析,删除日历,防止重复
     * @author shisihia
     * @createTime 2016年1月13日09:37:12
     * */
    void deleteCalendar(SchCalendar sCalendars,SchCalendar eCalendars);
 
    /**
     * [功能描述]:接口解析,工单下发,保存工单主数据
     * @author wanchanghuang
     * @createTime 2016年1月13日09:37:12
     * */
    SchWorkorder addSchWorkOrder(SchWorkorder swd);
    /**
     * [功能描述]:接口解析,工单下发,保存工单对应的辅料主数据
     * @author wanchanghuang
     * @createTime 2016年1月13日09:37:12
     * */
    void saveSchWorkOrderBom(SchWorkorderBom swb);
 
    /**
     * [功能描述]:物料主数据
     * @return
     *
     * */
    String queryRetByCode(MdMatType mmt);
    /**
     * [功能描述]:插入md_mat表数据
     *
     * */
    void saveMdMatByCode(MdMat mm);
 
 
    /**
     * 判断该工单是否处于非运行和非完成状态
     * @param workCode
     * @return
     * @throws Exception
     */
    /**
     *
     * @param workCode
     * @param CancelRequest  true  请求撤销     false MES返回的工单撤销确认信息
     * @return
     * @throws Exception
     */
    String CancelRequestWorkOrderByCode(String workCode,boolean CancelRequest) throws Exception;
 
    /**
     * 反馈MES请求工单撤销处理结果
     * @throws Exception
     */
    void MESRequestCancelWorkOrder(String workOrderId,Long sts) throws Exception;
 
    /**
     * 改变已反馈的工单的反馈状态
     * @param ids
     * @return
     * @throws Exception
     */
    void updateOrder(String ids)throws Exception;
    /**
     * 接口批量插入工单
     * @param mats
     * @throws Exception
     */
    void batchAddSchWorkOrder(List<SchWorkorder> orders) throws Exception;
    /**
     * 改变已反馈的发射工单的反馈状态
     * @param ids
     * @return
     * @throws Exception
     */
    void updateFSJOrder(String ids)throws Exception;
 
    /**
     * 接口批量插入工单bom
     * @param mats
     * @throws Exception
     */
    void batchAddSchWorkOrderBom(List<SchWorkorderBom> ordersBoms) throws Exception;
 
    /**
     * 查询工单是否已经存在
     * @param orderCode
     * @return
     * @throws Exception
     */
    boolean isExistByWorkOrderCode(String orderCode) throws Exception;
 
    /**
     * 接口删除处于撤销状态的工单
     */
    void deleteOrderByCode(String orderId) throws Exception;
 
    /**
     * 运行时间修改
     */
     String editRuntime(String stim,String etim,String ids);
     /**
         * 运行时间查询
         */
     WorkOrderBean getRuntime(String ids);
 
     //-------------------------发射机工单------------------------
     /**通过工单code,查询数据库 */
    boolean isExistByWorkOrderCodeFSJ(String workOrderCode);
 
    /**保存发射机工单*/
    void saveTransmitterWorkOrder(TransmitterWorkOrderBean tbean);
 
 
    /**
     * 根据设备CODE 获取正在运行的工单 并填充辅料
     * @throws Exception
     */
    TransmitterWorkOrderBean getRunOrders(String eqp) throws Exception;
    /**
     * 查询所有工单
     * @author Leejean
     * @create 2014年11月18日下午3:55:00
     * @param workOrderBean 查询条件
     * @param pageParams 分页参数
     * @return
     */
    DataGrid getAllFSJOrders(TransmitterWorkOrderBean workOrderBean,PageParams pageParams) throws Exception;
    /**
     * 审核工单 单个
     * @author Leejean
     * @create 2014年11月25日下午1:09:15
     * @param id 工单id号
     * @throws Exception
     */
    void checkFSJOrder(String id) throws Exception;
    /**
     * 审核工单 批量
     * @author Leejean
     * @create 2014年11月25日下午1:09:15
     * @param ids
     * @throws Exception
     */
    void checkFSJOrders(String ids) throws Exception;
    /**
     * @title editFSJOrderStatus
     * @description 修改发射机工单状态
     * @author bsw
     * @params [id, sts]
     * @updateTime 11:02 2019/8/5 0005
     * @return void
     **/
    void editFSJOrderStatus(String id,Long sts) throws Exception;
    /**
     * 根据id获取工单
     * @author Leejean
     * @create 2014年12月4日上午10:59:07
     * @param id
     * @return
     * @throws Exception
     */
    TransmitterWorkOrderBean getFSJOrderById(String id) throws Exception;
    /**
     * 新增工单
     * @author Leejean
     * @create 2014年12月24日下午1:22:48
     * @param workOrderBean
     * @return
     */
    void addFSJOrder(TransmitterWorkOrderBean workOrderBean) throws Exception;
    /**
     * 删除工单
     * @param ids
     * shisihai
     */
    void deleteFSJOrders(String ids,String eqpName,String team,String date,String mat,SessionInfo info);
    /**
     * 批量删除工单
     * @param ids
     * shisihai
     */
    void deleteBeatchFSJOrders(String ids, String eqpName, String team, String date, String mat,
            SessionInfo info);
    String editFSJRuntime(String stim, String etim, String ids);
    TransmitterWorkOrderBean getFSJRuntime(String ids);
    DataGrid getAllFSJOrderDetails(TransmitterWorkOrderBean workOrderBean, PageParams pageParams);
 
    TransmitterOutput querytransmitterOutPut(String id);
 
    void saveFSJDatas(TransmitterOutput tobean);
 
    /**
     * [说明]: 查询
     * @author wanchanghuang
     * @date 2019年5月8日09:42:23
     */
    long querySchWorkOrderByCode(SchWorkorder schWk);
    /**
     * [说明]:添加
     * @author wanchanghuang
     * @date 2019年5月8日09:42:29
     */
    void addSchWorkOrderObj(SchWorkorder schWk);
    /**
     * [说明]:工单撤销-查询
     * @author wanchanghuang
     * @date 2019年5月8日09:42:29
     */
    long querySchworkOrderByCodes(SchWorkorder wkorder);
    /**
     * [说明]:工单撤销-修改工单状态
     * @author wanchanghuang
     * @date 2019年5月8日09:42:29
     */
    void updateSchWorkOrderStatus(SchWorkorder wkorder);
 
    List<Combobox> queryBomVersionByProd(String matid);
 
    List<Combobox> getParamVersionByProd(String matid);
 
    DataGrid getBomDetail(String bomVersion);
 
    boolean saveBatckWorkFSJ(TransmitterWorkOrderBean bean, String date1, String date2) throws Exception;
 
    long queryTransmitterOrderByCode(String workOrderCode);
 
    SchWorkorder findWorkOrderByDateShiftEqp(String date,String shift,String eqp);
 
    String sendOrderChange(String ids);
 
    SchCalendar queryTeamByDateShift(String actualDate, String shift);
}