| | |
| | | val TAG:String = "ExamStatusOutWorker" |
| | | private var signalConfiglist: MutableList<SignalConfigRemote> = ArrayList() |
| | | private val gson = Gson() |
| | | lateinit var simulateNightBean:SimulateNightBean |
| | | var simulateNightBean:SimulateNightBean=SimulateNightBean() |
| | | private var singalConfigs :List<SingalConfig> = ArrayList() |
| | | private val tempQs: MutableList<QuestionBean> = java.util.ArrayList() |
| | | override fun doWork(): Result { |
| | | val examType =WorkRoomDataBase.getWorkRoomDataBase(applicationContext).examStatusDao.startExamInt; |
| | | |
| | | simulateNightBean = SimulateNightBean() |
| | | simulateNightBean.setExam(0) |
| | | |
| | | val list = ExamPlatformData.getInstance().simulate_light_tips |
| | | simulateNightBean.setQuestion(list.subList(list.size - 2, list.size - 1)) |
| | | |
| | | |
| | | |
| | | |
| | | tempQs.add(list[list.size-2])//提示下面将进行灯光考试 |
| | | tempQs.add(list[0]) |
| | | val a = Utils.getRandomInts(4, 12) |
| | | for (i in a.indices) { |
| | | tempQs.add(list[a[i]]) |
| | | } |
| | | |
| | | tempQs.add(list[list.size-1])//提示灯光考试结束 |
| | | simulateNightBean.setQuestion(tempQs) |
| | | AYSdk.getInstance().sendCmd(0x8012, gson.toJson(simulateNightBean)) |
| | | |
| | | |
| | | MyLog.i(TAG,"查到的考试type="+examType) |
| | | ExamPlatformData.getInstance().examType = examType |
| | | val data = Data.Builder().putInt(Constant.EXAM_STATUS_TYPE,examType).build() |
| | | if (examType != safeluck.drive.evaluation.Constant.NONE_BEEN_START_EXAM) { |
| | | try { |