lxw
2023-05-25 f3c27fb78447449a950ba73c5e72ceda64ad8a12
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
package com.whyc.dto;
 
public class TestDaoFactory {
    public static String getDeviceType(int type)
    {
        String dev_type = "未知";
        switch(type)                       //测试仪表类型
        {
             case 0xFB : dev_type = "FBO4815-CT"; break;
             case 0xDC : dev_type = "IDCE4815-CT";break;
             case 0x2F : dev_type = "FBO2205-CT"; break;
             case 0x2E : dev_type = "IDCE2205-CT";break;
             case 0x26 : dev_type = "FBO2206-CT"; break;
             case 0x25 : dev_type = "IDCE2206-CT";break;
             case 0x3F : dev_type = "FBO4830-CT"; break;
             case 0x3E : dev_type = "IDCE4830-CT";break;
             case 0x6F : dev_type = "FBO6003-CT"; break;
             case 0x6E : dev_type = "IDCE6003-CT";break;
             case 0x66 : dev_type = "FBO6006-CT"; break;
             case 0x67 : dev_type = "IDCE6006-CT";break;
             case 0x60 : dev_type = "FBO60010-CT";break;
             case 0x61 : dev_type = "IDCE60010-CT";break;
             case 0x0F : dev_type = "FBO1101-CT"; break;
             case 0x0E : dev_type = "IDCE1101-CT";break;
             case 0x1F : dev_type = "FBO1110-CT"; break;
             case 0x1E : dev_type = "IDCE1110-CT";break;
             case 0xF2 : dev_type = "FBI-4548CT";break;
             case 0xF3 : dev_type = "FBI-3048CT";break;
             case 0xF1 : dev_type = "FBI-3015CT";break;
             case 0xF4 : dev_type = "FBI-10480CT";break;
             case 0xF5 : dev_type = "FBI-05480CT";break;
             case 0xF6 : dev_type = "FBI-15480CT";break;
             case 0xF7 : dev_type = "FBI-20480CT";break;
             case 0xE1 : dev_type = "FBI-05240CT";break;
             case 0xE2 : dev_type = "FBI-10240CT";break;
             case 0xE3 : dev_type = "FBI-15240CT";break;
             case 0xE4 : dev_type = "FBI-20240CT";break;
             case 0x22 : dev_type = "FBO2210-CT"; break;
             case 0x21 : dev_type = "IDCE2210-CT";break;
             case 0x15 : dev_type = "FBO2415-CT"; break;
             case 0x16 : dev_type = "IDCE2415-CT";break;
             case 0x12 : dev_type = "FBO1230-CT";break;
             case 0x11 : dev_type = "IDCE1230-CT";break;
             case 0x84 : dev_type = "FBO840-CT";break;
             case 0x85 : dev_type = "IDCE840-CT";break;
             case 0x13 : dev_type = "IDC_DEV";break;
             case 0x45 : dev_type = "Ser_DEV";break;
        }
        
        return dev_type;
    }
    public static String getTaskType(int type)
    {
        String task_type = "";
        switch(type)                       //测试仪表类型
        {
             case 0 : task_type = "80%容量实验放电作业"; break;
             case 1 : task_type = "40%容量实验放电作业";break;
             case 2 : task_type = "日常巡检维护作业"; break;
             case 3 : task_type = "拉闸放电动环核对作业";break;
        }    
        return task_type;
    }
    public static String getChangeType(int type)
    {
        String change_type = "";
        switch(type)                       //测试仪表类型
        {
             case 0 : change_type = "变更执行时间"; break;
             case 1 : change_type = "变更执行人";break;
             case 2 : change_type = "变更时间与执行人"; break;
        }    
        return change_type;
    }
    public static String getApprove_res(int type)
    {
        String approve_res = "";
        switch(type)                       //测试仪表类型
        {
             case 0 : approve_res = "未审批"; break;
             case 1 : approve_res = "拒绝";break;
             case 2 : approve_res = "已批准"; break;
        }    
        return approve_res;
    }
    
    //获取放电/充电时测试仪表类型
    public static String getTest_starttypeHex(int start_type,int test_type){
        String test_starttypeHex="监测放电";
        if(start_type < 5) 
        { 
             if(BattTestData.BATTSTATE_CHARGE == test_type) { //停电放电
                test_starttypeHex = "在线充电"; 
             } else if(BattTestData.BATTDATA_MONITOR == test_type) { 
                test_starttypeHex = "在线监测"; 
             } 
            if(BattTestData.TEST_LOADER_FBI_IDCE == start_type) //假负载
            { 
                test_starttypeHex = "FBI/IDCE放电"; 
                if(BattTestData.BATTSTATE_CHARGE == test_type) 
                { 
                  test_starttypeHex = "FBI/FBO充电"; 
                } 
            }
            if(BattTestData.TEST_LOADER_FBS9100S == start_type){
                test_starttypeHex = "核容放电";
                if(BattTestData.BATTSTATE_CHARGE == test_type) 
                { 
                    test_starttypeHex = "核容充电";
                } 
            }
        } else { 
            test_starttypeHex = TestDaoFactory.getDeviceType(start_type); 
            if(BattTestData.BATTSTATE_DISCHARGE == test_type) 
            { 
                test_starttypeHex += "放电"; 
            } else { 
                test_starttypeHex += "充电"; 
            } 
        }
        return test_starttypeHex;
    }
 
    //获取电导/内阻时测试仪表类型
    public static String getRes_starttypeHex(int dev_type){
        String dev_typeHex="拉闸放电";        
        if(dev_type < 5)//start_type表示batttestdata_inf中的test_starttype这个属性
        { 
            dev_typeHex = "FBI/IDCE放电"; 
        } else { 
            dev_typeHex = TestDaoFactory.getDeviceType(dev_type); 
            dev_typeHex += "放电"; 
        }
        return dev_typeHex; 
    }
}