浏览代码

Merge remote-tracking branch 'origin/dev' into dev

大数据与最优化研究所 11 月之前
父节点
当前提交
90991a8785

+ 10 - 0
src/main/java/com/xjrsoft/module/assessment/service/impl/AssessmentTemplatePlanServiceImpl.java

@@ -13,6 +13,7 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.enums.ArchivesStatusEnum;
 import com.xjrsoft.common.enums.AssessQuestionTypeEnum;
 import com.xjrsoft.common.enums.DeleteMark;
+import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.common.utils.WeChatUtil;
 import com.xjrsoft.config.CommonPropertiesConfig;
@@ -307,6 +308,15 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
 
     @Override
     public AssessmentTemplatePlanQuestionVo getQuestionsById(Long id) {
+        List<AssessmentPlanAnswerStudent> studentList = studentMapper.selectList(
+                new QueryWrapper<AssessmentPlanAnswerStudent>().lambda()
+                        .eq(AssessmentPlanAnswerStudent::getDeleteMark, DeleteMark.NODELETE.getCode())
+                        .eq(AssessmentPlanAnswerStudent::getAssessmentTemplatePlanId, id)
+                        .eq(AssessmentPlanAnswerStudent::getStudentUserId, StpUtil.getLoginIdAsLong())
+        );
+        if(studentList.isEmpty()){
+            throw new MyException("当前登录账号与消息接收账号不匹配,请重新登录账号!");
+        }
         AssessmentTemplatePlan templatePlan = templatePlanMapper.selectById(id);
         AssessmentTemplatePlanQuestionVo vo = BeanUtil.toBean(templatePlan, AssessmentTemplatePlanQuestionVo.class);
         List<AssessmentPlanQuestion> questionList = planQuestionMapper.selectList(

+ 2 - 10
src/main/java/com/xjrsoft/module/databoard/controller/DataboardController.java

@@ -274,7 +274,7 @@ public class DataboardController {
                 .innerJoin(BaseTeacher.class,BaseTeacher::getUserId,XjrUser::getId)
                 .leftJoin(DictionaryDetail.class,DictionaryDetail::getCode,BaseTeacher::getJobState, ext->ext.selectAs(DictionaryDetail::getName, XjrUserPageVo::getJobState))
                 .leftJoin(DictionaryDetail.class,DictionaryDetail::getCode,XjrUser::getCredentialType,ext->ext.selectAs(DictionaryDetail::getName, XjrUserPageVo::getCredentialType))
-                .leftJoin(DictionaryDetail.class,DictionaryDetail::getCode,BaseTeacher::getEmployWay,ext->ext.selectAs(DictionaryDetail::getName, XjrUserPageVo::getEmployWay))
+                .leftJoin(DictionaryDetail.class,DictionaryDetail::getCode,BaseTeacher::getEmployType,ext->ext.selectAs(DictionaryDetail::getName, XjrUserPageVo::getEmployWay))
 
                 .selectAsClass(BaseTeacher.class, XjrUserPageVo.class);
 
@@ -296,21 +296,13 @@ public class DataboardController {
                 .map(XjrUserPageVo::getId).collect(Collectors.toSet());
         result.setTeacherCount1(teacherSet1.size());
         Set<String> teacherSet2 = teacherList.stream()
-                .filter(x -> (x.getEmployWay() != null && x.getEmployWay().equals("FB1602")))
+                .filter(x -> (x.getEmployWay() != null && x.getEmployWay().equals("FB1605")))
                 .map(XjrUserPageVo::getId).collect(Collectors.toSet());
         result.setTeacherCount2(teacherSet2.size());
-        Set<String> teacherSet3 = teacherList.stream()
-                .filter(x -> (x.getEmployWay() != null && x.getEmployWay().equals("FB1606")))
-                .map(XjrUserPageVo::getId).collect(Collectors.toSet());
-        result.setTeacherCount3(teacherSet3.size());
         Set<String> teacherSet4 = teacherList.stream()
                 .filter(x -> (x.getEmployWay() != null && x.getEmployWay().equals("FB1609")))
                 .map(XjrUserPageVo::getId).collect(Collectors.toSet());
         result.setTeacherCount4(teacherSet4.size());
-        Set<String> teacherSet5 = teacherList.stream()
-                .filter(x -> (x.getEmployWay() != null && x.getEmployWay().equals("FB1608")))
-                .map(XjrUserPageVo::getId).collect(Collectors.toSet());
-        result.setTeacherCount5(teacherSet5.size());
         return RT.ok(result);
     }