zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
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
package com.shlanbao.tzsc.pms.equ.overhaul.tools;
 
import com.opensymphony.xwork2.ActionSupport;
import com.shlanbao.tzsc.base.mapping.EqpRequestRecord;
 
 
public class TestAction extends ActionSupport {
    private static final long serialVersionUID = 9999999999L;
    public static  boolean exec(EqpRequestRecord rb){
        try {
            /**
             * @url   推送到的jsp页面
             * @funcationName   web接收端js方法
             * @message   入参
             * @DwrPush.pushMsgToAnyJSP("/wjcy_tpyl!viewImgs.action", "text2",nu);
             *----------------------------------------------------
             * 推送区分车间 : 1:卷烟机  2:包装机  3:装箱机  4:成型机  5:发射机
             *    卷包   
             *      电器
             *      机械
             *    成型
             *      电器
             *      机械
             *      
             *      业务说明: 维修呼叫推送,分  卷包成型,卷包和成型又区分 电器机械,由于厂里还没有区分卷包和成型,所以只考虑
             *-----------------------------------------------------
             * */
            //判断车间
            if(rb.getType()==1 || rb.getType()==2 || rb.getType()==3){
                //卷包车间
                if(rb.getRequestType().indexOf("电器")!=-1 || rb.getRequestType().indexOf("电气")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageDq.html", "text2",rb);
                }else if(rb.getRequestType().indexOf("机械")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageJx.html", "text1",rb);
                }
            }else{
                //成型车间
                DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageCxDq.html", "text2",rb);
                /*if(rb.getRequestType().indexOf("电器")!=-1 || rb.getRequestType().indexOf("电气")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageCxDq.html", "text2",rb);
                }else if(rb.getRequestType().indexOf("机械")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageCxJx.html", "text1",rb);
                }*/
            }
            return true;
        } catch (Exception e) {
            System.out.println("维修呼叫推送页面未打开!!!!");
            return false;
        }
        
        
    }
    
    public static  boolean execUpdate(EqpRequestRecord rb){
        try {
            
            //判断车间
            if(rb.getType()==1 || rb.getType()==2 || rb.getType()==3){
                //卷包车间
                if(rb.getRequestType().indexOf("电器")!=-1 || rb.getRequestType().indexOf("电气")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageDq.html", "showDatas",null);
                }else if(rb.getRequestType().indexOf("机械")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageJx.html", "showDatas",null);
                }
            }else{
                //成型车间
                if(rb.getRequestType().indexOf("电器")!=-1 || rb.getRequestType().indexOf("电气")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageCxDq.html", "showDatas",null);
                }else if(rb.getRequestType().indexOf("机械")!=-1){
                    DwrPush.pushMsgToAnyJSP("/statics/resources/wct_web/dwr/sendMessageCxJx.html", "showDatas",null);
                }
            }
            return true;
        } catch (Exception e) {
            System.out.println("维修呼叫推送页面未打开!!!!");
            return false;
        }
        
        
    }
 
}