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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
package com.shlanbao.tzsc.pms.qm.onlineCheck.controller;
 
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
import com.alibaba.fastjson.JSON;
import com.shlanbao.tzsc.base.controller.BaseController;
import com.shlanbao.tzsc.base.mapping.QMFinishedAddTo;
import com.shlanbao.tzsc.base.mapping.QmOnlineCheckHsYsd;
import com.shlanbao.tzsc.base.mapping.SchWorkorder;
import com.shlanbao.tzsc.base.model.DataGrid;
import com.shlanbao.tzsc.base.model.Json;
import com.shlanbao.tzsc.base.model.PageParams;
import com.shlanbao.tzsc.pms.md.FilterCount.SchFilterCountBean;
import com.shlanbao.tzsc.pms.qm.onlineCheck.bean.QMOnlineCheckBean;
import com.shlanbao.tzsc.pms.qm.onlineCheck.bean.QMOnlineCheckHsYsdBean;
import com.shlanbao.tzsc.pms.qm.onlineCheck.bean.QmCxOnlineCHKGY;
import com.shlanbao.tzsc.pms.qm.onlineCheck.service.QMOnlineCheckService;
import com.shlanbao.tzsc.pms.qm.onlineCheck.service.impl.QmOnlineCheckServiceImpl;
import com.shlanbao.tzsc.pms.qm.self.beans.QmAppearanceDataBean;
import com.shlanbao.tzsc.pms.sch.workorder.beans.WorkOrderBean;
/**
 * 综合测试台数据
 * @author shisihai
 *
 */
@Controller
@RequestMapping("/pms/onlineCheck")
public class OnlineCheckController extends BaseController{
    @Autowired
    private QMOnlineCheckService service;
    
    /** 成品检验查询*/
    @ResponseBody
    @RequestMapping("/getList")
    public DataGrid getList(WorkOrderBean orderBean,String orderType,PageParams pageParams){
        try {
            orderBean.setParam("cp");
            DataGrid grid = service.productqueryList(orderBean,pageParams);
            return grid;
        } catch (Exception e) {
            log.error(message, e);
        }
        return null;
    }
    
    /** 成品检验查询*/
    @ResponseBody
    @RequestMapping("/getCxGyList")
    public DataGrid getCxGyList(WorkOrderBean orderBean,String orderType,PageParams pageParams){
        try {
            orderBean.setParam("cp");
            DataGrid grid = service.getCxGyList(orderBean,pageParams);
            return grid;
        } catch (Exception e) {
            log.error(message, e);
        }
        return null;
    }
    /** 查询详细*/
    @ResponseBody
    @RequestMapping("/getListDetail")
    public DataGrid getListDetail(String pid,String orderType,PageParams pageParams){
        try {
            DataGrid grid = service.queryDetailList(pid,orderType,pageParams);
            return grid;
        } catch (Exception e) {
            log.error(message, e);
        }
        return null;
    }
    
    /** 查询详细(成品)*/
    @ResponseBody
    @RequestMapping("/getProdListDetail")
    public DataGrid getProdListDetail(String pid,String orderType,PageParams pageParams){
        try {
            DataGrid grid = service.queryProdDetailList(pid,orderType,pageParams);
            return grid;
        } catch (Exception e) {
            log.error(message, e);
        }
        return null;
    }
    /** 过程检验查询*/
    @ResponseBody
    @RequestMapping("/getProductList")
    public DataGrid getProductList(WorkOrderBean  orderBean,PageParams pageParams){
        try {
            DataGrid grid = service.productqueryList(orderBean,pageParams);
            return grid;
        } catch (Exception e) {
            log.error(message, e);
        }
        return null;
    }
    
    @ResponseBody
    @RequestMapping("/sendMsg")
    public Json sendMsg(String id,String param){
        Json json=new Json();
        try {
            String result = service.sendMsg(id,param);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    @ResponseBody
    @RequestMapping("/sendMsgBz")
    public Json sendMsgBz(String id,String param){
        Json json=new Json();
        try {
            String result = service.sendMsgBz(id,param);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * [功能说明]:成品,成型成品
     * @author wanchanghuang
     * @date 2017年4月11日15:43:52
     * */
    @ResponseBody
    @RequestMapping("/sendMsgCP")
    public Json sendMsgCP(String id,String param){
        Json json=new Json();
        try {
            service.sendMsgCP(id,param);
            json.setSuccess(true);
            json.setMsg("反馈MES成功!");
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * [功能说明]:成品,成型成品
     * @author wanchanghuang
     * @date 2017年4月11日15:43:52
     * */
    @ResponseBody
    @RequestMapping("/sendMESToData")
    public Json sendMESToData(String id,String param){
        Json json=new Json();
        try {
            service.sendMESToData(id,param);
            json.setSuccess(true);
            json.setMsg("反馈MES成功!");
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * [功能说明]:成型在线甘油施加量上传mes
     * @author bsw
     * @date 2017年4月11日15:43:52
     * */
    @ResponseBody
    @RequestMapping("/sendGYSJLToMES")
    public Json sendGYSJLToMES(String id,String param){
        Json json=new Json();
        try {
            service.sendGYSJLToMES(id,param);
            json.setSuccess(true);
            json.setMsg("反馈MES成功!");
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * [功能说明]:成型成品含水率上传mes
     * @author bsw
     * @date 2018年3月6日15:43:52
     * */
    @ResponseBody
    @RequestMapping("/sendHSLToMES")
    public Json sendHSLToMES(String id,String param){
        Json json=new Json();
        try {
            service.sendHSLToMES(id,param);
            json.setSuccess(true);
            json.setMsg("反馈MES成功!");
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * 用户组织机构批量分配
     * @author Leejean
     * @create 2014-8-19下午07:22:22
     * @param uids 用户ids
     * @param oids 角色ids
     * @return
     * @throws ParseException 
     */
    @ResponseBody
    @RequestMapping("/getJson")
    public String getJson() throws Exception{
        List list= service.getProdJson();
        return  JSON.toJSONString(list);
    }
    
    /**
     * 批量删除自检数据
     * @author  Rengj
     * 
     */
    @ResponseBody
    @RequestMapping("/deleteProd")
    public Json deleteProd(String id,String param,HttpServletRequest request){
        Json json=new Json();
        try {
            String result = service.deleteProd(id,param,request);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    
    /**
     * 批量删除成型成品检测数据
     * @author  Zhouzq
     * 
     */
    @ResponseBody
    @RequestMapping("/deleteCprod")
    public Json deleteCprod(String id,String param,HttpServletRequest request){
        Json json=new Json();
        try {
            String result = service.deleteCprod(id,param,request);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    
    
    /**
     * 批量反馈班长/质检员
     * @author  Rengj
     * 
     */
    @ResponseBody
    @RequestMapping("/feedbackProd")
    public Json feedbackProd(String id,String param){
        Json json=new Json();
        try {
            String result = service.updateFeedback(id, param);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    
    /**
     * 跳转录入含水含末界面
     *
     * Rengj
     */
    @RequestMapping("/goToQmOnlineCheckAppendJsp")
    public String goToAddFixUserJsp(String id,String param,HttpSession session){
            if(!"".equals(id)){
               session.setAttribute("parameterIds", id);
            }
            if("xj".equals(param))
                return  "/pms/quality/onlineCheck/qmOnlineCheckXjAppend";
            else
                return "/pms/quality/onlineCheck/qmOnlineCheckAppend";
    }
    /**
     * 跳转甘油施加量维护界面
     *
     * Rengj
     */
    @RequestMapping("/qmCxOnlineCheckGYEdit")
    public String qmCxOnlineCheckGYEdit(String id,String code,String gy1,String gy2,HttpSession session){
            session.setAttribute("id", id);
            session.setAttribute("qmocid", code);
            session.setAttribute("gy1", gy1);
            session.setAttribute("gy2", gy2);
            return  "/pms/quality/onlineCheck/qmCxOnlineCheckGYEdit";
    }
    
    /**
     * 保存含水含末率
     * @author  Rengj
     * 
     */
    @ResponseBody
    @RequestMapping("/insertQmFinished")
    public Json insertQmFinished(QMFinishedAddTo bean){
        Json json=new Json();
        try {
            String result = service.insertQmFinished(bean);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * 保存甘油施加量
     * @author  bsw
     * 
     */
    @ResponseBody
    @RequestMapping("/saveCxOnlineCHKGY")
    public Json saveCxOnlineCHKGY(QmCxOnlineCHKGY bean){
        Json json=new Json();
        try {
            String result = service.saveCxOnlineCHKGY(bean);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * 跳转录入压实端信息录入界面
     *
     * Rengj
     */
    @RequestMapping("/goToYsdAddJsp")
    public String goToYsdAddJsp(String param){
        if("hsl".equals(param)){
            return "/pms/quality/onlineCheck/qmOnlineCheckHslAdd";
        }else
           return "/pms/quality/onlineCheck/qmOnlineCheckYsdAdd";
    }
    
 
    /**
     * 保存含水率/压实端数据
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/saveYsd")
    public Json insertQmYsd(QMOnlineCheckHsYsdBean bean){
        Json json=new Json();
        try {
            service.saveOnHsYsd(bean, "");
            json.setSuccess(true);
            json.setMsg("保存成功");
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    
    /**
     * 查询含水含末率
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/getYsdList")
    public DataGrid getHslYsdList(QMOnlineCheckHsYsdBean  bean,PageParams pageParams){
        try {
            DataGrid grid = service.queryYsdList(bean,pageParams);
            return grid;
        } catch (Exception e) {
            log.error(message, e);
        }
        return null;
    }
    /**
     * 查询含水含末率
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/getHslList")
    public DataGrid getHslList(QMOnlineCheckHsYsdBean bean,PageParams pageParams){
        try {
            DataGrid grid = service.queryHslList(bean, pageParams);
            return grid;
        } catch (Exception e) {
            log.error(message, e);
        }
        return null;
    }
    /**
     * 压实端反馈mes
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/sendYsdMsg")
    public Json sendYsdMsg(String id,String param){
        Json json=new Json();
        try {
            String result = service.sendYsdMsg(id);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * 删除压实端数据
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/deleteYsd")
    public Json deleteYsd(String id,String param,HttpServletRequest request){
        Json json=new Json();
        try {
            String result = service.deleteYsdMsg(id,param,request);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * 压实端数据反馈班长/回退质检员
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/sendMonitorOrInspector")
    public Json sendMonitorOrInspector(String id,String param){
        Json json=new Json();
        try {
            String result = service.sendMonitorOrInspector(id, param);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    /**
     * 跳转超标支数录入界面
     *
     * Rengj
     */
    @RequestMapping("/goToOverproofAddJsp")
    public String goToOverproofAddJsp(String ids,String param, HttpSession session){
        session.setAttribute("ids", ids);
        session.setAttribute("parameterIds", ids);
        if("edit".equals(param)){
            session.setAttribute("finshed",service.queryFisaList(ids));
            return "/pms/quality/onlineCheck/qmOnlineCheckEdit";
        }else
            return "/pms/quality/onlineCheck/qmOnlineCheckOverproof";
    }
    
    @RequestMapping("/goToAddJsp")
    public String goToAddJsp(String ids,String param, HttpSession session){
        //session.setAttribute("ids", ids);
       
            return "/pms/quality/onlineCheck/goToAddJsp";
    }
    @RequestMapping("/goToAddJsp2")
    public String goToAddJsp2(String ids,String param, HttpSession session){
        //session.setAttribute("ids", ids);
       
            return "/pms/quality/onlineCheck/goToAddJsp2";
    }
    @RequestMapping("/goToAddJsp3")
    public String goToAddJsp3(String ids,String param, HttpSession session){
        //session.setAttribute("ids", ids);
       
            return "/pms/quality/onlineCheck/goToAddJsp3";
    }
 
    @RequestMapping("/goToAddJsp4")
    public String goToAddJsp4(String ids,String param, HttpSession session){
        //session.setAttribute("ids", ids);
 
        return "/pms/quality/onlineCheck/goToAddJsp4";
    }
 
    @ResponseBody
    @RequestMapping("/getorder")
    public String getorder(WorkOrderBean bean,HttpSession session){
    //    bean.setId(String.valueOf(session.getAttribute("ids")));
        String result = service.getorder(bean);
        return result;
    }
    @ResponseBody
    @RequestMapping("/getorderRoller")
    public String getorderRoller(WorkOrderBean bean,HttpSession session){
    //    bean.setId(String.valueOf(session.getAttribute("ids")));
        String result = service.getorderRoller(bean);
        return result;
    }
    @ResponseBody
    @RequestMapping("/addorder")
    public Json addorder(QMOnlineCheckBean bean){
        Json json=new Json();
        try {
            if (bean.getInspectionType()==3) {
                service.addorder(bean);
            }else if(bean.getInspectionType()==2){
                service.addorder1(bean);
            }else {
                service.addorder2(bean);
            }
            json.setMsg("新增成功!");
            json.setSuccess(true);
        } catch (Exception e) {
            log.error(message, e);
            json.setMsg("新增失败!");
            json.setSuccess(false);
        }
        return json;
    }
    
    /**
     * 保存超标支数
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/saveOverproof")
    public Json saveOverproof(QMOnlineCheckBean bean,HttpSession session){
        bean.setId(String.valueOf(session.getAttribute("ids")));
        Json json=new Json();
        try {
            String result = service.saveOverProof(bean);
            session.removeAttribute("ids");
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    /**
     * 跳转更改缺陷检测时间界面
     *
     * Rengj
     */
    @RequestMapping("/goToEditCheckTime")
    public String goToEditCheckTime(String ids,HttpServletRequest request){
        request.getSession().setAttribute("onlineIds", ids);
        return "/pms/quality/self/checkTimeEdit";
    }
    
    /**
     * 保存修改检测时间
     * @author Rengj
     * @return
     */
    @ResponseBody
    @RequestMapping("/addCheckTime")
    public Json addCheckTime(String stim,String etim,HttpServletRequest request){
         String result ="";
        Json json = new Json();
        try {
            String ids= String.valueOf(request.getSession().getAttribute("onlineIds"));
            result = service.updateCheckTimes(stim, ids);
            json.setSuccess(true);
            json.setMsg(result);
            request.getSession().removeAttribute("onlineIds");
        } catch (Exception e) {
            log.error("修改运行时间", e);
            json.setMsg(result);
        }
        return json;
    }
    
    
    /**
     * 含水数据追加到机台
     * @author  Rengj  
     * 
     */
    @ResponseBody
    @RequestMapping("/additionalProd")
    public Json additionalProd(String id,String param){
        Json json=new Json();
        try {
            String result = service.additionalProd(id, param);
            json.setSuccess(true);
            json.setMsg(result);
        } catch (Exception e) {
            json.setMsg(message);
        }
        return json;
    }
    
    @ResponseBody
    @RequestMapping("/sendRequest")
    public Json sendRequest(String sts,String date,String shift){
        Json json=new Json();
        try {
            service.sendRequest(sts,date,shift);
            json.setSuccess(true);
            json.setMsg("请求成功!!!");
        } catch (Exception e) {
            json.setMsg("请求失败!!!");
        }
        return json;
    }
    
}