|
|
@@ -149,6 +149,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
SubjectStudyRecordQueryBo subjectStudyRecordQueryBo = new SubjectStudyRecordQueryBo();
|
|
|
subjectStudyRecordQueryBo.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
subjectStudyRecordQueryBo.setUserId(bo.getUserId());
|
|
|
+ subjectStudyRecordQueryBo.setGradeId(bo.getGradeId());
|
|
|
List<SubjectStudyRecordVo> subjectStudyRecordVos = iUserStudyRecordService.listSubject(subjectStudyRecordQueryBo);
|
|
|
for (SubjectStudyRecordVo subjectStudyRecordVo : subjectStudyRecordVos) {
|
|
|
secLong = new BigDecimal(secLong.toString()).add(new BigDecimal(subjectStudyRecordVo.getSectionNum().toString())).longValue();
|
|
|
@@ -157,8 +158,32 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
}
|
|
|
//BigDecimal divide = new BigDecimal(studyLong.toString()).divide(new BigDecimal(secLong.toString()),2,BigDecimal.ROUND_HALF_UP);
|
|
|
//classGradeStudentVo.setStudyNum(divide.multiply(new BigDecimal("100")).longValue());
|
|
|
+ //总节数
|
|
|
classPeriodStudentVo.setSecAllNum(secLong);
|
|
|
+ //学习节数
|
|
|
classPeriodStudentVo.setStuAllNum(studyLong);
|
|
|
+
|
|
|
+ //总的审核状态按照策划规则
|
|
|
+ bo.setUserId(classPeriodStudentVo.getUserId());
|
|
|
+ bo.setGoodsId(classPeriodStudentVo.getGoodsId());
|
|
|
+ ClassPeriodUserVo classPeriodUserVos = baseMapper.listPeriod(bo).get(0);
|
|
|
+ classPeriodUserVos.setPending(classPeriodStudentVo.getSecAllNum()-classPeriodUserVos.getPass()-classPeriodUserVos.getCheat());
|
|
|
+ classPeriodUserVos.setExamPending(classPeriodUserVos.getExamNum()-classPeriodUserVos.getExamPass()-classPeriodUserVos.getExamCheat());
|
|
|
+ if (classPeriodStudentVo.getStuAllNum().equals(classPeriodStudentVo.getSecAllNum()) && classPeriodStudentVo.getExamNum().equals(classPeriodStudentVo.getRecordNum())){
|
|
|
+ if (classPeriodUserVos.getPending() != 0 || classPeriodUserVos.getExamPending() != 0){
|
|
|
+ classPeriodStudentVo.setAllStatus(0);
|
|
|
+ }else if (classPeriodUserVos.getCheat() != 0 || classPeriodUserVos.getExamCheat() != 0){
|
|
|
+ classPeriodStudentVo.setAllStatus(1);
|
|
|
+ }else {
|
|
|
+ classPeriodStudentVo.setAllStatus(2);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ classPeriodStudentVo.setAllStatus(-1);
|
|
|
+ }
|
|
|
+ classPeriodStudentVo.setWaitRebuildNum(classPeriodUserVos.getCheat());
|
|
|
+ if (!CollectionUtils.isEmpty(baseMapper.selectStart(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGoodsId(),classPeriodStudentVo.getGradeId()))) {
|
|
|
+ classPeriodStudentVo.setStartTime(baseMapper.selectStart(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGoodsId(),classPeriodStudentVo.getGradeId()).get(0));
|
|
|
+ }
|
|
|
}
|
|
|
return classPeriodStudentVos;
|
|
|
}
|
|
|
@@ -184,10 +209,17 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
classPeriodUserVo.setStuAllNum(studyLong);
|
|
|
classPeriodUserVo.setPending(classPeriodUserVo.getSecAllNum()-classPeriodUserVo.getPass()-classPeriodUserVo.getCheat());
|
|
|
classPeriodUserVo.setExamPending(classPeriodUserVo.getExamNum()-classPeriodUserVo.getExamPass()-classPeriodUserVo.getExamCheat());
|
|
|
- if (classPeriodUserVo.getPending() != 0 || classPeriodUserVo.getExamPending() != 0){
|
|
|
- classPeriodUserVo.setAllStatus(0);
|
|
|
+
|
|
|
+ if (classPeriodUserVo.getStuAllNum().equals(classPeriodUserVo.getSecAllNum()) && classPeriodUserVo.getExamNum().equals(classPeriodUserVo.getRecordNum())){
|
|
|
+ if (classPeriodUserVo.getPending() != 0 || classPeriodUserVo.getExamPending() != 0){
|
|
|
+ classPeriodUserVo.setAllStatus(0);
|
|
|
+ }else if (classPeriodUserVo.getCheat() != 0 || classPeriodUserVo.getExamCheat() != 0){
|
|
|
+ classPeriodUserVo.setAllStatus(1);
|
|
|
+ }else {
|
|
|
+ classPeriodUserVo.setAllStatus(2);
|
|
|
+ }
|
|
|
}else {
|
|
|
- classPeriodUserVo.setAllStatus(1);
|
|
|
+ classPeriodUserVo.setAllStatus(-1);
|
|
|
}
|
|
|
}
|
|
|
return classPeriodUserVos;
|