|
@@ -916,6 +916,78 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
return classPeriodStudentVos;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<ClassPeriodStudentVo> listUserPeriodRecord(ClassGradeUserQueryBo bo) {
|
|
|
+ //查询班级学员信息
|
|
|
+ List<ClassPeriodStudentVo> classPeriodStudentVos = baseMapper.listUserPeriod(bo);
|
|
|
+ //查找学员学习记录
|
|
|
+ for (ClassPeriodStudentVo classPeriodStudentVo : classPeriodStudentVos) {
|
|
|
+ // Long secLong = 0L;
|
|
|
+ // Long studyLong = 0L;
|
|
|
+
|
|
|
+ /* SubjectStudyRecordQueryBo subjectStudyRecordQueryBo = new SubjectStudyRecordQueryBo();
|
|
|
+ subjectStudyRecordQueryBo.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
+ subjectStudyRecordQueryBo.setUserId(classPeriodStudentVo.getUserId());
|
|
|
+ subjectStudyRecordQueryBo.setGradeId(classPeriodStudentVo.getGradeId());
|
|
|
+ List<SubjectStudyRecordVo> subjectStudyRecordVos = iUserStudyRecordService.listSubject(subjectStudyRecordQueryBo);
|
|
|
+ for (SubjectStudyRecordVo subjectStudyRecordVo : subjectStudyRecordVos) {
|
|
|
+ secLong = new BigDecimal(secLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getSectionNum().toString())).longValue();
|
|
|
+ studyLong = new BigDecimal(studyLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getRecordNum().toString())).longValue();
|
|
|
+
|
|
|
+ }*/
|
|
|
+ //总节数
|
|
|
+ // classPeriodStudentVo.setSecAllNum(secLong);
|
|
|
+ //学习节数
|
|
|
+ // classPeriodStudentVo.setStuAllNum(studyLong);
|
|
|
+
|
|
|
+ //总的审核状态按照策划规则
|
|
|
+ ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|
|
|
+ classGradeUserQueryBo.setGradeId(classPeriodStudentVo.getGradeId());
|
|
|
+ classGradeUserQueryBo.setUserId(classPeriodStudentVo.getUserId());
|
|
|
+ classGradeUserQueryBo.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
+ // List<ClassPeriodUserVo> classPeriodUserVos1 = baseMapper.listPeriod(classGradeUserQueryBo);
|
|
|
+ // ClassPeriodUserVo classPeriodUserVos = classPeriodUserVos1.get(0);
|
|
|
+ // classPeriodUserVos.setPending(classPeriodStudentVo.getSecAllNum()-classPeriodUserVos.getPass()-classPeriodUserVos.getCheat());
|
|
|
+ // classPeriodUserVos.setExamPending(classPeriodUserVos.getExamNum()-classPeriodUserVos.getExamPass()-classPeriodUserVos.getExamCheat());
|
|
|
+ //當前班級學員審核狀態 -1不可审核 0待審 1未通过 2通过
|
|
|
+ Integer gradePeriodStatus = 0; //班级里的审核状态字段,保持一致 0 未通过 1通过 2待审核 -1 不可审核
|
|
|
+
|
|
|
+ classPeriodStudentVo.setAllStatus(changePeriodStatus(classPeriodStudentVo.getPeriodStatus()));
|
|
|
+
|
|
|
+ // classPeriodStudentVo.setWaitRebuildNum(classPeriodUserVos.getCheat()+classPeriodUserVos.getExamCheat());
|
|
|
+ if (!CollectionUtils.isEmpty(baseMapper.selectStart(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGoodsId(),classPeriodStudentVo.getGradeId()))) {
|
|
|
+ //查找开始学习时间
|
|
|
+ classPeriodStudentVo.setStartTime(baseMapper.selectStart(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGoodsId(),classPeriodStudentVo.getGradeId()).get(0));
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Validator.isNotEmpty(bo.getUserPhoto())&&bo.getUserPhoto()==1){
|
|
|
+ //解析身份证和一寸照
|
|
|
+ if(Validator.isNotEmpty(classPeriodStudentVo.getKeyValue())){
|
|
|
+ JSONObject keyJSON = null;
|
|
|
+ try {
|
|
|
+ keyJSON = JSON.parseObject(classPeriodStudentVo.getKeyValue());
|
|
|
+ if(keyJSON.containsKey("recent_photos")){
|
|
|
+ String recent_photos_data = keyJSON.getString("recent_photos");
|
|
|
+ JSONObject recent_photos_jsondata= JSON.parseObject(recent_photos_data);
|
|
|
+ String recent_photos = recent_photos_jsondata.getString("value");
|
|
|
+ classPeriodStudentVo.setOneInchPhotos(recent_photos);
|
|
|
+ }
|
|
|
+ if(keyJSON.containsKey("idcard_face_photo")){
|
|
|
+ String idcard_face_photo_data = keyJSON.getString("idcard_face_photo");
|
|
|
+ JSONObject idcard_face_photo_jsondata= JSON.parseObject(idcard_face_photo_data);
|
|
|
+ String idcard_face_photo = idcard_face_photo_jsondata.getString("value");
|
|
|
+ classPeriodStudentVo.setIdCardImg1(idcard_face_photo);
|
|
|
+ }
|
|
|
+ classPeriodStudentVo.setKeyValue(null);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return classPeriodStudentVos;
|
|
|
+ }
|
|
|
+
|
|
|
private Integer changePeriodStatus(Long gradePeriodStatus){
|
|
|
//當前班級學員審核狀態 -1不可审核 0待審 1未通过 2通过 3审核中
|
|
|
//班级里的审核状态字段,保持一致 0 未通过 1通过 2待审核 -1 不可审核 3审核中
|