| | |
| | | tv_sex.setText(getString(R.string.sex)+(student.getSex()==2?"女":"男")); |
| | | tv_start_time.setText(getString(R.string.begin_time)+Utils.formatTimeYYMMDDHHmmSS(student.getBegin_time())); |
| | | |
| | | }else if (!TextUtils.isEmpty(student.getName())&&student.getStu_id()==ExamPlatformData.COACH_ID){ |
| | | ExamPlatformData.getInstance().setCoachID(student.getID()); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public void changKao() { |
| | | |
| | | exam_type = 2; |
| | | ExamPlatformData.getInstance().setTrainingMode(ExamPlatformData.TRAINING_MODE);//设置为训练模式 |
| | | ExamPlatformData.getInstance().setExamType(exam_type); |
| | | examStatusViewModel.updateStartExam(exam_type); |
| | | sendExamJson(1,exam_type); |
| | | ExamPlatformData.getInstance().getTTS().speak("开始训练"); |
| | | jkMessage0202.curr_exam = 0; |
| | | |
| | | jkMessage0202.mode = ExamPlatformData.getInstance().getTrainingMode()==ExamPlatformData.TRAINING_MODE?1:0; |
| | | |
| | | MessageProcessor.getInstance().sendMessage(jkMessage0202); |
| | | sendJK0202(2); |
| | | } |
| | | |
| | | @Override |
| | | public void luKao() { |
| | | exam_type = 3; |
| | | ExamPlatformData.getInstance().setTrainingMode(ExamPlatformData.TRAINING_MODE); |
| | | ExamPlatformData.getInstance().setExamType(exam_type); |
| | | examStatusViewModel.updateStartExam(exam_type); |
| | | sendExamJson(1,exam_type); |
| | | ExamPlatformData.getInstance().getTTS().speak("开始训练"); |
| | | jkMessage0202.curr_exam = 1; |
| | | jkMessage0202.mode = ExamPlatformData.getInstance().getTrainingMode()==ExamPlatformData.TRAINING_MODE?1:0; |
| | | MessageProcessor.getInstance().sendMessage(jkMessage0202); |
| | | sendJK0202(3); |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private void sendJK0202(int type) { |
| | | |
| | | final JKMessage0202 jkMessage0202 = new JKMessage0202(); |
| | | exam_type = type; |
| | | ExamPlatformData.getInstance().setTrainingMode(ExamPlatformData.TRAINING_MODE); |
| | | ExamPlatformData.getInstance().setExamType(exam_type); |
| | | examStatusViewModel.updateStartExam(exam_type); |
| | | sendExamJson(1,exam_type); |
| | | ExamPlatformData.getInstance().getTTS().speak("开始训练"); |
| | | |
| | | Date date = new Date(); |
| | | wokViewModel.updateBeginTime(date.getTime()); |
| | | jkMessage0202.timeBCD = date; |
| | | ExamPlatformData.getInstance().setExam_id(Utils.parseUnsignedInt(String.valueOf(date.getTime()/1000),10)); |
| | | jkMessage0202.stu_id = ExamPlatformData.getInstance().getID(); |
| | | jkMessage0202.coach_id = ExamPlatformData.getInstance().getCoachID(); |
| | | jkMessage0202.exam_id = ExamPlatformData.getInstance().getExam_id(); |
| | | |
| | | jkMessage0202.curr_exam = (type-2);// 跟移动站服务定义的场考是2 ,平台是0 ; 移动站路考是3 ,平台是1 |
| | | jkMessage0202.mode = ExamPlatformData.getInstance().getTrainingMode()==ExamPlatformData.TRAINING_MODE?1:0; |
| | | MessageProcessor.getInstance().sendMessage(jkMessage0202); |
| | | } |
| | | |
| | | private void sendExamJson(int i,int type) { |
| | | try { |
| | | |