app/build.gradle | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/DB/StudentInfoUpdateWork.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/fragment/NetWorkTrainFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/im/MessageProcessor.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/platformMessage/JKMessage8201.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
build.gradle | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/build.gradle
@@ -70,6 +70,7 @@ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofit_version" implementation "com.google.zxing:core:$rootProject.qrcode_version" implementation "com.squareup.picasso:picasso:2.5.2" } repositories { mavenCentral() app/src/main/java/safeluck/drive/evaluation/DB/StudentInfoUpdateWork.java
@@ -36,6 +36,7 @@ int personType = jsonObject.getInt("personType"); String id = jsonObject.getString("ID"); String name = jsonObject.getString("name"); String head_url = jsonObject.getString("head_url"); int sex = 2;//默认是女生 if (id!=null&&id.length()>=18){ sex = Integer.parseInt(id.substring(id.length()-2,id.length()-1)); @@ -54,18 +55,21 @@ //教练 student.setStu_id(ExamPlatformData .COACH_ID); // ExamPlatformData.getInstance().setCoachSign(false); break; case ExamPlatformData .PERSON_TYPE_STU: //学员 student.setStu_id(ExamPlatformData .STU_ID); // ExamPlatformData.getInstance().setStuSign(false); break; default:break; } student.setName(name); student.setSex(sex); student.setID(id); student.setHead_url(head_url); student.setPersonType(personType); MyLog.i("更新签到人员信息:"+student.toString()); WorkRoomDataBase.getWorkRoomDataBase(getApplicationContext()).getstudentDao().insert(student); app/src/main/java/safeluck/drive/evaluation/fragment/NetWorkTrainFragment.java
@@ -33,11 +33,11 @@ import com.anyun.exam.lib.AYSdk; import com.anyun.exam.lib.MyLog; import com.squareup.picasso.Picasso; import org.json.JSONException; import org.json.JSONObject; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Collections; import java.util.Date; @@ -96,7 +96,7 @@ private TextView tv_speed,tv_total_score,tv_name, tv_start_time,tv_coach_name; private double speed=0.0; private ImageView iv_head; private ImageView iv_head,iv_coach_head; private int currTotalScore = 100; private List<ScoreBean> mArrayList = new ArrayList<>(); @@ -461,10 +461,8 @@ mHandler.obtainMessage(ADD_DATA).sendToTarget(); if (examStatus.get(0).getStartExam() != Constant.NONE_BEEN_START_EXAM){ btn_start_exam.setText("结束考试"); iv_head.getDrawable().setLevel(1); }else{ btn_start_exam.setText("开始考试"); iv_head.getDrawable().setLevel(0); } exam_type = examStatus.get(0).getStartExam(); } @@ -481,11 +479,13 @@ MyLog.i(TAG, "onChanged: " + student.toString()); if (!TextUtils.isEmpty(student.getName())&&student.getStu_id()==ExamPlatformData.STU_ID){ tv_name.setText(getNameColor(student.getName())); Picasso.with(_mActivity).load(student.getHead_url()).into(iv_head); ExamPlatformData.getInstance().setId(student.getID()); 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()); tv_coach_name.setText(getNameColor(student.getName())); Picasso.with(_mActivity).load(student.getHead_url()).into(iv_coach_head); } } } @@ -526,8 +526,6 @@ btn_ids.add(R.id.btn_9); btn_ids.add(R.id.btn_10); view.findViewById(R.id.iv_head).setOnClickListener(this); view.findViewById(R.id.iv_coach_head).setOnClickListener(this); ((TextView)view.findViewById(R.id.tv_score_tip)).setText("当前考试得分"); av_curve = view.findViewById(R.id.av3); av_park = view.findViewById(R.id.av2); @@ -540,6 +538,9 @@ iv_head = view.findViewById(R.id.iv_head); iv_head.setOnClickListener(this); iv_coach_head = view.findViewById(R.id.iv_coach_head); iv_coach_head.setOnClickListener(this); tv_speed = view.findViewById(R.id.tv_speed); tv_total_score = view.findViewById(R.id.tv_total_score); @@ -627,6 +628,7 @@ case R.id.iv_head: MyLog.i(TAG,"学员签到"); if (ExamPlatformData.getInstance().IsStuSign()){ ExamPlatformData.getInstance().setStuSign(false); qrcode(1,false); }else{ app/src/main/java/safeluck/drive/evaluation/fragment/TrainFragment.java
@@ -454,9 +454,7 @@ mHandler.obtainMessage(ADD_DATA).sendToTarget(); if (examStatus.get(0).getStartExam() != Constant.NONE_BEEN_START_EXAM){ btn_start_exam.setText("结束训练"); iv_head.getDrawable().setLevel(1); }else{ iv_head.getDrawable().setLevel(0); btn_start_exam.setText("开始训练"); } exam_type = examStatus.get(0).getStartExam(); @@ -514,8 +512,6 @@ btn_ids.add(R.id.btn_10); view.findViewById(R.id.iv_head).setOnClickListener(this); view.findViewById(R.id.iv_coach_head).setOnClickListener(this); av_curve = view.findViewById(R.id.av3); av_park = view.findViewById(R.id.av2); av_podao = view.findViewById(R.id.av1); @@ -526,6 +522,9 @@ tv_start_time = view.findViewById(R.id.tv_start_time); iv_head = view.findViewById(R.id.iv_head); iv_head.setOnClickListener(this); iv_coach_head = view.findViewById(R.id.iv_coach_head); iv_coach_head.setOnClickListener(this); tv_speed = view.findViewById(R.id.tv_speed); tv_total_score = view.findViewById(R.id.tv_total_score); app/src/main/java/safeluck/drive/evaluation/im/MessageProcessor.java
@@ -105,6 +105,11 @@ } }else if (jk2019MessageBase instanceof JKMessage8201){ JKMessage8201 jkMessage8201 = (JKMessage8201) jk2019MessageBase; JKMessage0001 jkMessage0001 = new JKMessage0001(); jkMessage0001.respMessageId = "8201"; jkMessage0001.result = JKMessage0001.SUCCESS; jkMessage0001.respNo = jkMessage8201.messageNo; sendMessage(jkMessage0001); Data data = new Data.Builder().putString(Constant.STU_INFO_PLATFORM,gson.toJson(jkMessage8201)).build(); OneTimeWorkRequest stuInfoUpdateWork = new OneTimeWorkRequest.Builder(StudentInfoUpdateWork.class) .setInputData(data).build(); app/src/main/java/safeluck/drive/evaluation/platformMessage/JKMessage8201.java
@@ -19,6 +19,11 @@ @Order(4) @Int8 public int personType; @Order(5) @Length @Ascii public String head_url; } /** 0 build.gradle
@@ -13,6 +13,7 @@ lifecycleVersion = '2.1.0' retrofit_version = '2.8.1' qrcode_version = '3.3.0' picasso_version = '3.5.0' } dependencies { classpath 'com.android.tools.build:gradle:3.5.3'