|
@@ -328,8 +328,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
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 不可审核
|
|
|
+ //當前班級學員審核狀態 -1不可审核 0待審 1未通过 2通过 3审核中
|
|
|
+ Integer gradePeriodStatus = 0; //班级里的审核状态字段,保持一致 0 未通过 1通过 2待审核 -1 不可审核 3审核中
|
|
|
if(Validator.isEmpty(classPeriodStudentVo.getSecAllNum())||classPeriodStudentVo.getSecAllNum()==0){
|
|
|
//空课程
|
|
|
classPeriodStudentVo.setAllStatus(-1);
|
|
@@ -348,7 +348,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
gradePeriodStatus = 0;
|
|
|
}else {
|
|
|
classPeriodStudentVo.setAllStatus(2);
|
|
|
- gradePeriodStatus = 1;
|
|
|
+ gradePeriodStatus = 3;
|
|
|
}
|
|
|
}else {
|
|
|
classPeriodStudentVo.setAllStatus(-1);
|
|
@@ -876,53 +876,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
classPeriodUserVos.setExamPending(classPeriodUserVos.getExamNum()-classPeriodUserVos.getExamPass()-classPeriodUserVos.getExamCheat());
|
|
|
//當前班級學員審核狀態 -1不可审核 0待審 1未通过 2通过
|
|
|
Integer gradePeriodStatus = 0; //班级里的审核状态字段,保持一致 0 未通过 1通过 2待审核 -1 不可审核
|
|
|
- /*if(Validator.isEmpty(classPeriodStudentVo.getSecAllNum())||classPeriodStudentVo.getSecAllNum()==0){
|
|
|
- //空课程
|
|
|
- classPeriodStudentVo.setAllStatus(-1);
|
|
|
- gradePeriodStatus = -1;
|
|
|
- }else{
|
|
|
- if (classPeriodStudentVo.getStuAllNum().equals(classPeriodStudentVo.getSecAllNum()) && classPeriodStudentVo.getExamNum().equals(classPeriodStudentVo.getRecordNum())){
|
|
|
- if (classPeriodUserVos.getPending() != 0 || classPeriodUserVos.getExamPending() != 0){
|
|
|
- classPeriodStudentVo.setAllStatus(0);
|
|
|
- gradePeriodStatus = 2;
|
|
|
- }else if (classPeriodUserVos.getCheat() != 0 || classPeriodUserVos.getExamCheat() != 0){
|
|
|
- classPeriodStudentVo.setAllStatus(1);
|
|
|
- gradePeriodStatus = 0;
|
|
|
- }else {
|
|
|
- classPeriodStudentVo.setAllStatus(2);
|
|
|
- gradePeriodStatus = 1;
|
|
|
- }
|
|
|
- }else {
|
|
|
- classPeriodStudentVo.setAllStatus(-1);
|
|
|
- gradePeriodStatus = -1;
|
|
|
- }
|
|
|
- }*/
|
|
|
+
|
|
|
classPeriodStudentVo.setAllStatus(changePeriodStatus(classPeriodStudentVo.getPeriodStatus()));
|
|
|
|
|
|
- //更新班级学时状态l
|
|
|
- /*if(!gradePeriodStatus.equals(classPeriodStudentVo.getPeriodStatus())){
|
|
|
- LambdaQueryWrapper<ClassGradeUser> classGradeUser = Wrappers.lambdaQuery();
|
|
|
- classGradeUser.eq(ClassGradeUser::getUserId, classPeriodStudentVo.getUserId());
|
|
|
- classGradeUser.eq(ClassGradeUser::getGradeId, classPeriodStudentVo.getGradeId());
|
|
|
- ClassGradeUser classGradeUser1 = new ClassGradeUser();
|
|
|
- classGradeUser1.setPeriodStatus(gradePeriodStatus);
|
|
|
- if(gradePeriodStatus==2){
|
|
|
- classGradeUser1.setPeriodWaitTime(DateUtils.getNowTime());
|
|
|
- }
|
|
|
- classGradeUser1.setUpdateTime(DateUtils.getNowTime());
|
|
|
- iClassGradeUserService.update(classGradeUser1, classGradeUser);
|
|
|
- }*/
|
|
|
- /* 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()+classPeriodUserVos.getExamCheat());
|
|
|
if (!CollectionUtils.isEmpty(baseMapper.selectStart(classPeriodStudentVo.getUserId(),classPeriodStudentVo.getGoodsId(),classPeriodStudentVo.getGradeId()))) {
|
|
|
//查找开始学习时间
|
|
@@ -958,8 +914,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
}
|
|
|
|
|
|
private Integer changePeriodStatus(Long gradePeriodStatus){
|
|
|
- //當前班級學員審核狀態 -1不可审核 0待審 1未通过 2通过
|
|
|
- //班级里的审核状态字段,保持一致 0 未通过 1通过 2待审核 -1 不可审核
|
|
|
+ //當前班級學員審核狀態 -1不可审核 0待審 1未通过 2通过 3审核中
|
|
|
+ //班级里的审核状态字段,保持一致 0 未通过 1通过 2待审核 -1 不可审核 3审核中
|
|
|
if(gradePeriodStatus==0){
|
|
|
return 1;
|
|
|
}
|
|
@@ -972,6 +928,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
else if(gradePeriodStatus==-1){
|
|
|
return -1;
|
|
|
}
|
|
|
+ else if(gradePeriodStatus==3){
|
|
|
+ return 3;
|
|
|
+ }
|
|
|
return -100;
|
|
|
}
|
|
|
|
|
@@ -1224,7 +1183,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
|
|
|
}else {
|
|
|
classPeriodUserVo.setAllStatus(-1);
|
|
|
}
|
|
|
- // classPeriodUserVo.setAllStatus(changePeriodStatus(new Long(classPeriodUserVo.getPeriodStatus())));
|
|
|
+ //使用班级学时状态
|
|
|
+ classPeriodUserVo.setAllStatus(changePeriodStatus(classPeriodUserVo.getPeriodStatus()));
|
|
|
}
|
|
|
return classPeriodUserVos;
|
|
|
}
|