| | |
| | | import android.widget.Toast; |
| | | |
| | | import com.anyun.exam.lib.AYSdk; |
| | | import com.anyun.exam.lib.MyLog; |
| | | import com.anyun.basecommonlib.MyLog; |
| | | import com.google.gson.Gson; |
| | | |
| | | import org.json.JSONException; |
| | |
| | | import safeluck.drive.evaluation.Constant; |
| | | import safeluck.drive.evaluation.DB.Student; |
| | | import safeluck.drive.evaluation.DB.WokViewModel; |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatus; |
| | | import safeluck.drive.evaluation.DB.appstatusdb.AppStatusViewModel; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatus; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusInitWorker; |
| | | import safeluck.drive.evaluation.DB.exam_status.ExamStatusViewModel; |
| | | import safeluck.drive.evaluation.DB.failitems.FailedProjViewModel; |
| | | import safeluck.drive.evaluation.DB.failitems.FailedProj_select; |
| | |
| | | import safeluck.drive.evaluation.bean.ScoreBean; |
| | | import safeluck.drive.evaluation.cEventCenter.CEventCenter; |
| | | import safeluck.drive.evaluation.cEventCenter.ICEventListener; |
| | | import safeluck.drive.evaluation.customview.LoadProgressDialog; |
| | | import safeluck.drive.evaluation.customview.MyDialog; |
| | | |
| | | import safeluck.drive.evaluation.customview.QRCodeDialog; |
| | | import safeluck.drive.evaluation.customview.SelectDialog; |
| | | import safeluck.drive.evaluation.im.MessageProcessor; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0201; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0202; |
| | | import safeluck.drive.evaluation.platformMessage.JKMessage0204; |
| | | import safeluck.drive.evaluation.platformMessage.PlatFormConstant; |
| | | import safeluck.drive.evaluation.util.Utils; |
| | | |
| | |
| | | |
| | | private void stopExam() { |
| | | MyLog.i(TAG,"结束训练"); |
| | | |
| | | JKMessage0204 jkMessage0204 = new JKMessage0204(); |
| | | jkMessage0204.timeBCD = new Date(); |
| | | jkMessage0204.score = currTotalScore<0?0:currTotalScore; |
| | | jkMessage0204.stop = JKMessage0204.SUCC_STOP; |
| | | jkMessage0204.exam_id = ExamPlatformData.getInstance().getExam_id(); |
| | | MessageProcessor.getInstance().sendMessage(jkMessage0204); |
| | | //设置模式为NONE 0 |
| | | ExamPlatformData.getInstance().setTrainingMode(ExamPlatformData.MODE_NONE); |
| | | |
| | | //恢复初始数据 |
| | | OneTimeWorkRequest examStatusInitWork = OneTimeWorkRequest.from(ExamStatusInitWorker.class); |
| | | WorkManager.getInstance(_mActivity).enqueue(examStatusInitWork); |
| | | //恢复初始数据exam_status表 |
| | | examStatusViewModel.deleteAll(); |
| | | examStatusViewModel.updateItemExamResult(1, safeluck.drive.evaluation.DB.Constant.EXAM_STATUS_MAP_ID); |
| | | examStatusViewModel.updateStartExam(0); |
| | | examStatusViewModel.updateExamStatus(2, safeluck.drive.evaluation.DB.Constant.EXAM_STATUS_MAP_ID); |
| | | |
| | | item_id = 0; |
| | | currTotalScore = 100; |
| | | failedProjViewModel.deleteAll(); |