fctom1215
2021-04-27 5a7a49f35b1e306e10fcdde45f7953bbe55b12e9
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
package safeluck.drive.evaluation.bean;
 
import java.util.ArrayList;
import java.util.List;
 
public class SimulateNightBean {
    /**
     * exam : 0
     * question : [{"item":100,"process":[],"solution":[-1],"tts":"下面将进行模拟夜间行驶场景灯光使用的考试,请按语音指令在5秒内做出相应的灯光操作"},{"item":1,"process":[3],"solution":[1],"tts":"请打开前照灯"},{"item":2,"process":[3],"solution":[1],"tts":"夜间在没有路灯,照明不良条件下行驶"},{"item":7,"process":[3],"solution":[1],"tts":"夜间在道路上发生故障,妨碍交通又难以移动"},{"item":10,"process":[3],"solution":[1],"tts":"路边临时停车"},{"item":9,"process":[3],"solution":[1],"tts":"夜间通过没有交通信号灯控制的路口"},{"item":101,"process":[],"solution":[-1],"tts":"模拟夜间考试完成请关闭所有灯光,请起步继续完成考试"}]
     */
 
    private int exam;
    private List<QuestionBean> question;
 
    public int getExam() {
        return exam;
    }
 
    public void setExam(int exam) {
        this.exam = exam;
    }
 
    public List<QuestionBean> getQuestion() {
        return question;
    }
 
    public void setQuestion(List<QuestionBean> question) {
        this.question = question;
    }
 
    public static class QuestionBean {
        /**
         * item : 100
         * process : []
         * solution : [-1]
         * tts : 下面将进行模拟夜间行驶场景灯光使用的考试,请按语音指令在5秒内做出相应的灯光操作
         */
 
        private int item;
        private String tts;
        private List<Integer> process;
        private List<Integer> solution;
        private int wrong_code;
        public QuestionBean(int i, String s) {
                        this.item =i;
            this.tts = s;
            if (i==100){
 
            }else{
                if (process == null){
                    this.process = new ArrayList<>();
                }
 
                if (solution == null){
                    this.solution = new ArrayList<>();
                }
                this.solution.add(-1);
                this.solution.add(-2);
                this.solution.add(-3);
                this.solution.add(-4);
                this.solution.add(-5);
                this.solution.add(-6);
                this.solution.add(-7);
                this.solution.add(-8);
                this.wrong_code = 41710;
            }
 
        }
 
        public int getWrong_code() {
            return wrong_code;
        }
 
        public void setWrong_code(int wrong_code) {
            this.wrong_code = wrong_code;
        }
 
        public void parseSolutionAndProcess(String content){
            solution.clear();
            process.clear();
            if (content.contains("+")){
                String regx = "\\+";
                    String[] strs = content.split(regx);
                for (int i = 0; i < strs.length; i++) {
                    if (strs[i].contains("大灯")){
                        //1近光灯
                        solution.add(1);
                    }else if (strs[i].contains("小灯")){
                        //3示廓灯
                        solution.add(3);
                    }else if (strs[i].contains("警示灯")){
                        //7危险警示灯
                        solution.add(7);
                    }else if (strs[i].contains("雾灯")){
                        //4雾灯
                        solution.add(4);
                    }else if (strs[i].contains("左转向")){
                        //5左转信号
                        solution.add(5);
                    }else if (strs[i].contains("右转向")){
                        //6右转信号
                        solution.add(6);
                    }
                }
 
            }else if (content.contains("变换")){
                process.add(8);
                solution.add(1);
            }else if (content.equalsIgnoreCase("开启远光灯")){
                solution.add(2);
            }else if (content.equalsIgnoreCase("开启近光灯")){
                solution.add(1);
            }else if (content.contains("远、近光灯")){
                process.add(1);
                solution.add(2);
            }else if (content.contains("注意是近光")){
                solution.add(1);
            }else if (content.equalsIgnoreCase("开启危险警示灯")){
                solution.add(7);
            }else if (content.equalsIgnoreCase("先开左转向灯,后变换远近光灯")){
                process.add(5);
                solution.add(8);
            }
        }
        public int getItem() {
            return item;
        }
 
        public void setItem(int item) {
            this.item = item;
        }
 
        public String getTts() {
            return tts;
        }
 
        public void setTts(String tts) {
            this.tts = tts;
        }
 
        public List<Integer> getProcess() {
            return process;
        }
 
        public void setProcess(List<Integer> process) {
            this.process = process;
        }
 
        public List<Integer> getSolution() {
            return solution;
        }
 
        public void setSolution(List<Integer> solution) {
            this.solution = solution;
        }
    }
 
//    /**
//     * exam : 0
//     * question : [{"item":1,"tts":"打开车灯"},{"item":2,"tts":"通过人行道"}]
//     */
//
//    private int exam;
//    private List<QuestionBean> question;
//
//    public int getExam() {
//        return exam;
//    }
//
//    public void setExam(int exam) {
//        this.exam = exam;
//    }
//
//    public List<QuestionBean> getQuestion() {
//        return question;
//    }
//
//    public void setQuestion(List<QuestionBean> question) {
//        this.question = question;
//    }
//
//    public static class QuestionBean {
//        /**
//         * item : 1
//         * tts : 打开车灯
//         */
//
//        private int item;
//        private String tts;
//
//        public QuestionBean(int i, String s) {
//            this.item =i;
//            this.tts = s;
//        }
//
//        public int getItem() {
//            return item;
//        }
//
//        public void setItem(int item) {
//            this.item = item;
//        }
//
//        public String getTts() {
//            return tts;
//        }
//
//        public void setTts(String tts) {
//            this.tts = tts;
//        }
//
//        @Override
//        public String toString() {
//            return "QuestionBean{" +
//                    "item=" + item +
//                    ", tts='" + tts + '\'' +
//                    '}';
//        }
//    }
//
//    @Override
//    public String toString() {
//        return "SimulateNightBean{" +
//                "exam=" + exam +
//                ", question=" + FileUtil.ListToString(question) +
//                '}';
//    }
 
}