Explorar o código

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

大数据与最优化研究所 hai 1 ano
pai
achega
da68848196
Modificáronse 29 ficheiros con 1064 adicións e 125 borrados
  1. 3 2
      src/main/java/com/xjrsoft/module/assessment/controller/AssessmentPlanAnswerController.java
  2. 6 0
      src/main/java/com/xjrsoft/module/assessment/controller/AssessmentTemplatePlanController.java
  3. 2 0
      src/main/java/com/xjrsoft/module/assessment/mapper/AssessmentPlanAnswerResultMapper.java
  4. 2 1
      src/main/java/com/xjrsoft/module/assessment/service/IAssessmentTemplatePlanService.java
  5. 163 87
      src/main/java/com/xjrsoft/module/assessment/service/impl/AssessmentTemplatePlanServiceImpl.java
  6. 27 0
      src/main/java/com/xjrsoft/module/assessment/vo/AssessmentQuestionOptionResultVo.java
  7. 45 0
      src/main/java/com/xjrsoft/module/assessment/vo/AssessmentQuestionResultDetailVo.java
  8. 39 0
      src/main/java/com/xjrsoft/module/assessment/vo/AssessmentTemplatePlanResultVo.java
  9. 39 0
      src/main/java/com/xjrsoft/module/assessment/vo/OneQuestionVo.java
  10. 39 0
      src/main/java/com/xjrsoft/module/assessment/vo/TwoQuestionVo.java
  11. 12 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentInfoDetailVo.java
  12. 64 4
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentInfoPageVo.java
  13. 99 0
      src/main/java/com/xjrsoft/module/system/controller/XjrMenuDeptRelationController.java
  14. 38 0
      src/main/java/com/xjrsoft/module/system/dto/AddXjrMenuDeptRelationDto.java
  15. 32 0
      src/main/java/com/xjrsoft/module/system/dto/UpdateXjrMenuDeptRelationDto.java
  16. 26 0
      src/main/java/com/xjrsoft/module/system/dto/XjrMenuDeptRelationPageDto.java
  17. 88 0
      src/main/java/com/xjrsoft/module/system/entity/XjrMenuDeptRelation.java
  18. 25 0
      src/main/java/com/xjrsoft/module/system/mapper/XjrMenuDeptRelationMapper.java
  19. 24 0
      src/main/java/com/xjrsoft/module/system/service/IXjrMenuDeptRelationService.java
  20. 45 0
      src/main/java/com/xjrsoft/module/system/service/impl/XjrMenuDeptRelationServiceImpl.java
  21. 75 0
      src/main/java/com/xjrsoft/module/system/vo/XjrMenuDeptRelationPageVo.java
  22. 39 0
      src/main/java/com/xjrsoft/module/system/vo/XjrMenuDeptRelationVo.java
  23. 5 1
      src/main/java/com/xjrsoft/module/workflow/mapper/WorkflowRecordMapper.java
  24. 6 5
      src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java
  25. 4 0
      src/main/java/com/xjrsoft/module/workflow/vo/MyProcessPageVo.java
  26. 7 0
      src/main/resources/mapper/assessment/AssessmentPlanAnswerResultMapper.xml
  27. 18 0
      src/main/resources/mapper/asset/XjrMenuDeptRelationMapper.xml
  28. 67 25
      src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml
  29. 25 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

+ 3 - 2
src/main/java/com/xjrsoft/module/assessment/controller/AssessmentPlanAnswerController.java

@@ -18,6 +18,7 @@ import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerStudentVo;
 import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerTeacherPageVo;
 import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanPageVo;
 import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanQuestionVo;
+import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanResultVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
@@ -140,8 +141,8 @@ public class AssessmentPlanAnswerController {
     @GetMapping(value="question-result")
     @ApiOperation(value = "每道题的答题情况")
     @SaCheckPermission("assessmenttemplateplan:question-result")
-    public RT<AssessmentTemplatePlanQuestionVo> questionResult(@RequestParam Long id){
-        AssessmentTemplatePlanQuestionVo resultList = planService.getQuestionResult(id);
+    public RT<AssessmentTemplatePlanResultVo> questionResult(@RequestParam Long id){
+        AssessmentTemplatePlanResultVo resultList = planService.getQuestionResult(id);
         return RT.ok(resultList);
     }
 

+ 6 - 0
src/main/java/com/xjrsoft/module/assessment/controller/AssessmentTemplatePlanController.java

@@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -117,6 +118,11 @@ public class AssessmentTemplatePlanController {
         if(templatePlan == null){
             throw new MyException("未能找到场所信息");
         }
+        if(dto.getStatus() == 1){
+            templatePlan.setStartTime(new Date());
+        }else if(dto.getStatus() == 2){
+            templatePlan.setEndTime(new Date());
+        }
         templatePlan.setStatus(dto.getStatus());
         planService.updateById(templatePlan);
         return RT.ok(true);

+ 2 - 0
src/main/java/com/xjrsoft/module/assessment/mapper/AssessmentPlanAnswerResultMapper.java

@@ -25,4 +25,6 @@ public interface AssessmentPlanAnswerResultMapper extends MPJBaseMapper<Assessme
     List<AssessmentPlanAnswerClassResultVo> getClassResult(Long id);
 
     List<AssessmentPlanAnswerDetailVo> getQuestionResult(Long id);
+
+    List<AssessmentPlanAnswerDetailVo> getScaleQuestionResult(Long id);
 }

+ 2 - 1
src/main/java/com/xjrsoft/module/assessment/service/IAssessmentTemplatePlanService.java

@@ -17,6 +17,7 @@ import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerStudentVo;
 import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerTeacherPageVo;
 import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanPageVo;
 import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanQuestionVo;
+import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanResultVo;
 
 import java.util.List;
 
@@ -84,7 +85,7 @@ public interface IAssessmentTemplatePlanService extends MPJBaseService<Assessmen
 
     List<AssessmentPlanAnswerClassResultVo> getClassResult(Long id);
 
-    AssessmentTemplatePlanQuestionVo getQuestionResult(Long id);
+    AssessmentTemplatePlanResultVo getQuestionResult(Long id);
 
 
     Boolean sendMsg(AssessmentTemplatePlanSureDto dto);

+ 163 - 87
src/main/java/com/xjrsoft/module/assessment/service/impl/AssessmentTemplatePlanServiceImpl.java

@@ -43,10 +43,16 @@ import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerDetailVo;
 import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerStudentPageVo;
 import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerStudentVo;
 import com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerTeacherPageVo;
+import com.xjrsoft.module.assessment.vo.AssessmentQuestionOptionResultVo;
 import com.xjrsoft.module.assessment.vo.AssessmentQuestionResultVo;
 import com.xjrsoft.module.assessment.vo.AssessmentQuestionVo;
 import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanPageVo;
 import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanQuestionVo;
+import com.xjrsoft.module.assessment.vo.AssessmentTemplatePlanResultVo;
+import com.xjrsoft.module.assessment.vo.OneQuestionVo;
+import com.xjrsoft.module.assessment.vo.TwoQuestionVo;
+import com.xjrsoft.module.base.entity.BaseClass;
+import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.organization.dto.WeChatSendMessageDto;
 import com.xjrsoft.module.organization.service.IWeChatService;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
@@ -56,6 +62,8 @@ import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -72,7 +80,8 @@ import java.util.Random;
 */
 @Service
 @AllArgsConstructor
-public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<AssessmentTemplatePlanMapper, AssessmentTemplatePlan> implements IAssessmentTemplatePlanService {
+public
+class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<AssessmentTemplatePlanMapper, AssessmentTemplatePlan> implements IAssessmentTemplatePlanService {
     private final AssessmentTemplatePlanMapper templatePlanMapper;
 
     private final AssessmentPlanQuestionMapper planQuestionMapper;
@@ -84,6 +93,7 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
     private final XjrUserMapper xjrUserMapper;
     private final IWeChatService weChatService;
     private final CommonPropertiesConfig commonPropertiesConfig;
+    private final BaseClassMapper baseClassMapper;
 
 
     @Override
@@ -111,7 +121,31 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
             planQuestion.setAssessmentTemplatePlanId(assessmentTemplatePlan.getId());
             planQuestionMapper.insert(planQuestion);
         }
+        List<BaseClass> classList = baseClassMapper.selectList(
+            new QueryWrapper<BaseClass>().lambda()
+            .eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode())
+            .eq(BaseClass::getIsGraduate, 1)
+        );
+        List<Long> classIds = new ArrayList<>();
+        if("all".equals(dto.getType())){
+            for (BaseClass baseClass : classList) {
+                classIds.add(baseClass.getId());
+            }
+        }else if("random".equals(dto.getType())){
+            List<Integer> randomList = new ArrayList<>();
+            Random random = new Random();
+            while(randomList.size() < dto.getRandomNumber()){
+                int nextInt = random.nextInt(classList.size());
+                if(!randomList.contains(nextInt) && nextInt >= 0){
+                    randomList.add(nextInt);
 
+                }
+            }
+            for (Integer i : randomList) {
+                classIds.add(classList.get(i).getId());
+            }
+        }
+        dto.setClassIds(classIds);
         //存入班级,并根据选人方式存入答题学生
         for (Long classId : dto.getClassIds()) {
             AssessmentPlanAnswerClass answerClass = new AssessmentPlanAnswerClass();
@@ -123,29 +157,7 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
             query.leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, XjrUser::getId)
             .eq(BaseStudentSchoolRoll::getClassId, classId);
             List<XjrUser> studentList = xjrUserMapper.selectJoinList(XjrUser.class, query);
-            List<XjrUser> needStudentList = new ArrayList<>();
-            if("all".equals(dto.getType())){
-                needStudentList.addAll(studentList);
-            }else if("random".equals(dto.getType())){
-                int maxCount = studentList.size();//班级最大人数
-                if(dto.getRandomNumber() > maxCount){
-                    needStudentList.addAll(studentList);
-                }else{
-                    List<Integer> randomList = new ArrayList<>();
-                    Random random = new Random();
-                    while(randomList.size() < dto.getRandomNumber()){
-                        int nextInt = random.nextInt(studentList.size());
-                        if(!randomList.contains(nextInt) && nextInt >= 0){
-                            randomList.add(nextInt);
-
-                        }
-                    }
-                    for (Integer i : randomList) {
-                        needStudentList.add(studentList.get(i));
-                    }
-                }
-            }
-            for (XjrUser xjrUser : needStudentList) {
+            for (XjrUser xjrUser : studentList) {
                 AssessmentPlanAnswerStudent answer = new AssessmentPlanAnswerStudent();
                 answer.setAssessmentTemplatePlanId(assessmentTemplatePlan.getId());
                 answer.setStudentUserId(xjrUser.getId());
@@ -187,6 +199,30 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
         //删除班级和学生
         answerClassMapper.deleteByPlanId(assessmentTemplatePlan.getId(), StpUtil.getLoginIdAsLong());
         studentMapper.deleteByPlanId(assessmentTemplatePlan.getId(), StpUtil.getLoginIdAsLong());
+        List<BaseClass> classList = baseClassMapper.selectList(
+            new QueryWrapper<BaseClass>().lambda()
+            .eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode())
+            .eq(BaseClass::getIsGraduate, 1)
+        );
+        List<Long> classIds = new ArrayList<>();
+        if("all".equals(dto.getType())){
+            for (BaseClass baseClass : classList) {
+                classIds.add(baseClass.getId());
+            }
+        }else if("random".equals(dto.getType())){
+            List<Integer> randomList = new ArrayList<>();
+            Random random = new Random();
+            while(randomList.size() < dto.getRandomNumber()){
+                int nextInt = random.nextInt(classList.size());
+                if(!randomList.contains(nextInt) && nextInt >= 0){
+                    randomList.add(nextInt);
+                }
+            }
+            for (Integer i : randomList) {
+                classIds.add(classList.get(i).getId());
+            }
+        }
+        dto.setClassIds(classIds);
         //存入班级,并根据选人方式存入答题学生
         for (Long classId : dto.getClassIds()) {
             AssessmentPlanAnswerClass answerClass = new AssessmentPlanAnswerClass();
@@ -198,29 +234,7 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
             query.leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, XjrUser::getId)
                     .eq(BaseStudentSchoolRoll::getClassId, classId);
             List<XjrUser> studentList = xjrUserMapper.selectJoinList(XjrUser.class, query);
-            List<XjrUser> needStudentList = new ArrayList<>();
-            if("all".equals(dto.getType())){
-                needStudentList.addAll(studentList);
-            }else if("random".equals(dto.getType())){
-                int maxCount = studentList.size();//班级最大人数
-                if(dto.getRandomNumber() > maxCount){
-                    needStudentList.addAll(studentList);
-                }else{
-                    List<Integer> randomList = new ArrayList<>();
-                    Random random = new Random();
-                    while(randomList.size() < dto.getRandomNumber()){
-                        int nextInt = random.nextInt(studentList.size());
-                        if(!randomList.contains(nextInt) && nextInt >= 0){
-                            randomList.add(nextInt);
-
-                        }
-                    }
-                    for (Integer i : randomList) {
-                        needStudentList.add(studentList.get(i));
-                    }
-                }
-            }
-            for (XjrUser xjrUser : needStudentList) {
+            for (XjrUser xjrUser : studentList) {
                 AssessmentPlanAnswerStudent answer = new AssessmentPlanAnswerStudent();
                 answer.setAssessmentTemplatePlanId(assessmentTemplatePlan.getId());
                 answer.setStudentUserId(xjrUser.getId());
@@ -335,17 +349,42 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
     public Boolean saveAnswer(AssessmentPlanSubmitDto dto) {
         long studentUserId = StpUtil.getLoginIdAsLong();
         Date date = new Date();
+
+        List<Long> questionIds = new ArrayList<>();
+        for (AssessmentPlanAnswerSubmitDto answerSubmitDto : dto.getAnswerList()) {
+            questionIds.add(answerSubmitDto.getQuestionId());
+        }
+        Map<Long, String> questionTypeMaps = new HashMap<>();
+        planQuestionMapper.selectList(
+            new QueryWrapper<AssessmentPlanQuestion>().lambda()
+            .in(AssessmentPlanQuestion::getId, questionIds)
+        ).forEach(question ->{
+            questionTypeMaps.put(question.getId(), question.getType());
+        });
+
         // 学生提交
         studentMapper.submitAnswer(dto.getAssessmentTemplatePlanId(), studentUserId);
         for (AssessmentPlanAnswerSubmitDto answerSubmitDto : dto.getAnswerList()) {
-            AssessmentPlanAnswerResult answerStudent = new AssessmentPlanAnswerResult();
-            answerStudent.setAssessmentTemplatePlanId(dto.getAssessmentTemplatePlanId());
-            answerStudent.setStudentUserId(studentUserId);
-            answerStudent.setCreateDate(date);
-            answerStudent.setQuestionId(answerSubmitDto.getQuestionId());
-            answerStudent.setAnswerId(answerSubmitDto.getAnswerId());
-            resultMapper.insert(answerStudent);
-
+            if("multi_question".equals(questionTypeMaps.get(answerSubmitDto.getQuestionId()))){
+                String[] split = answerSubmitDto.getAnswerId().split(",");
+                for (String answerId : split) {
+                    AssessmentPlanAnswerResult answerStudent = new AssessmentPlanAnswerResult();
+                    answerStudent.setAssessmentTemplatePlanId(dto.getAssessmentTemplatePlanId());
+                    answerStudent.setStudentUserId(studentUserId);
+                    answerStudent.setCreateDate(date);
+                    answerStudent.setQuestionId(answerSubmitDto.getQuestionId());
+                    answerStudent.setAnswerId(answerId);
+                    resultMapper.insert(answerStudent);
+                }
+            }else{
+                AssessmentPlanAnswerResult answerStudent = new AssessmentPlanAnswerResult();
+                answerStudent.setAssessmentTemplatePlanId(dto.getAssessmentTemplatePlanId());
+                answerStudent.setStudentUserId(studentUserId);
+                answerStudent.setCreateDate(date);
+                answerStudent.setQuestionId(answerSubmitDto.getQuestionId());
+                answerStudent.setAnswerId(answerSubmitDto.getAnswerId());
+                resultMapper.insert(answerStudent);
+            }
         }
 
         return true;
@@ -376,65 +415,102 @@ public class AssessmentTemplatePlanServiceImpl extends MPJBaseServiceImpl<Assess
     }
 
     @Override
-    public AssessmentTemplatePlanQuestionVo getQuestionResult(Long id) {
+    public AssessmentTemplatePlanResultVo getQuestionResult(Long id) {
         AssessmentTemplatePlan templatePlan = templatePlanMapper.selectById(id);
-        AssessmentTemplatePlanQuestionVo vo = BeanUtil.toBean(templatePlan, AssessmentTemplatePlanQuestionVo.class);
+        AssessmentTemplatePlanResultVo vo = BeanUtil.toBean(templatePlan, AssessmentTemplatePlanResultVo.class);
         vo.setStudentCount(studentMapper.getStudentCount(id));
         List<AssessmentPlanQuestion> questionList = planQuestionMapper.selectList(
             new QueryWrapper<AssessmentPlanQuestion>().lambda()
             .eq(AssessmentPlanQuestion::getDeleteMark, DeleteMark.NODELETE.getCode())
             .eq(AssessmentPlanQuestion::getAssessmentTemplatePlanId, id)
         );
-        List<AssessmentPlanAnswerDetailVo> questionResult = resultMapper.getQuestionResult(id);
-        Map<String, Integer> answerCountMap = new HashMap<>();
-        for (AssessmentPlanAnswerDetailVo countVo : questionResult) {
-            answerCountMap.put(countVo.getQuestionId().toString() + countVo.getAnswerId(), countVo.getChooseCount());
-        }
+
         //循环大题
-        List<AssessmentQuestionVo> oneList = new ArrayList<>();
+        List<OneQuestionVo> oneList = new ArrayList<>();
         for (AssessmentPlanQuestion assessmentQuestion : questionList) {
             if(assessmentQuestion.getCategory() == 1){
-                oneList.add(BeanUtil.toBean(assessmentQuestion, AssessmentQuestionVo.class));
+                oneList.add(BeanUtil.toBean(assessmentQuestion, OneQuestionVo.class));
             }
         }
-
         //循环小题
-        for (AssessmentQuestionVo oneQuestion : oneList) {
-            List<AssessmentQuestionVo> twoList = new ArrayList<>();
+        for (OneQuestionVo oneQuestion : oneList) {
+            List<TwoQuestionVo> twoList = new ArrayList<>();
             for (AssessmentPlanQuestion assessmentQuestion : questionList) {
                 if(assessmentQuestion.getCategory() == 2 && assessmentQuestion.getParentId().equals(oneQuestion.getId())){
-                    AssessmentQuestionVo questionVo = BeanUtil.toBean(assessmentQuestion, AssessmentQuestionVo.class);
+                    TwoQuestionVo questionVo = BeanUtil.toBean(assessmentQuestion, TwoQuestionVo.class);
                     twoList.add(questionVo);
                 }
             }
             oneQuestion.setChildren(twoList);
         }
+        List<AssessmentPlanAnswerDetailVo> questionResult = resultMapper.getQuestionResult(id);
+        Map<String, Integer> answerCountMap = new HashMap<>();
+        for (AssessmentPlanAnswerDetailVo countVo : questionResult) {
+            answerCountMap.put(countVo.getQuestionId().toString() + countVo.getAnswerId(), countVo.getChooseCount());
+        }
+
+        //量表
+        List<AssessmentPlanAnswerDetailVo> scaleQuestionResult = resultMapper.getScaleQuestionResult(id);
 
         //循环选项
-        for (AssessmentQuestionVo oneQuestion : oneList) {
-            for (AssessmentQuestionVo twoQuestion : oneQuestion.getChildren()) {
-                List<AssessmentQuestionVo> optionList = new ArrayList<>();
-                for (AssessmentPlanQuestion assessmentQuestion : questionList) {
-                    if(assessmentQuestion.getCategory() == 3 && assessmentQuestion.getParentId().equals(twoQuestion.getId())){
-                        AssessmentQuestionVo questionVo = BeanUtil.toBean(assessmentQuestion, AssessmentQuestionVo.class);
-                        questionVo.setChooseCount(answerCountMap.get(assessmentQuestion.getParentId().toString() + assessmentQuestion.getId().toString()));
-                        optionList.add(questionVo);
+        for (OneQuestionVo oneQuestion : oneList) {
+            for (TwoQuestionVo twoQuestion : oneQuestion.getChildren()) {
+                List<AssessmentQuestionOptionResultVo> optionList = new ArrayList<>();
+                if("radio_question".equals(twoQuestion.getType()) || "multi_question".equals(twoQuestion.getType())){
+                    for (AssessmentPlanQuestion assessmentQuestion : questionList) {
+                        if(assessmentQuestion.getCategory() == 3 && assessmentQuestion.getParentId().equals(twoQuestion.getId())){
+                            AssessmentQuestionOptionResultVo questionVo = BeanUtil.toBean(assessmentQuestion, AssessmentQuestionOptionResultVo.class);
+                            Integer count = answerCountMap.get(assessmentQuestion.getParentId().toString() + assessmentQuestion.getId().toString());
+                            questionVo.setCount(count == null?0:count);
+
+                            BigDecimal bigDecimal = BigDecimal.valueOf(questionVo.getCount())
+                                    .divide(BigDecimal.valueOf(vo.getStudentCount()))
+                                    .multiply(BigDecimal.valueOf(100))
+                                    .setScale(2, RoundingMode.HALF_UP);
+                            questionVo.setPercentage(bigDecimal.floatValue());
+                            optionList.add(questionVo);
+                        }
                     }
-                    if(assessmentQuestion.getCategory() == 2 && "judge_question".equals(assessmentQuestion.getType())){
-                        optionList.add(new AssessmentQuestionVo(){{
-                            setId(1L);
-                            setChooseCount(answerCountMap.get(assessmentQuestion.getId().toString() + "1"));
-                        }});
-                        optionList.add(new AssessmentQuestionVo(){{
-                            setId(2L);
-                            setChooseCount(answerCountMap.get(assessmentQuestion.getId().toString() + "2"));
-                        }});
+                }
+                if("judge_question".equals(twoQuestion.getType())){
+                    optionList.add(new AssessmentQuestionOptionResultVo(){{
+                        setName("是");
+                        Integer count = answerCountMap.get(twoQuestion.getId().toString() + "1");
+                        BigDecimal bigDecimal = BigDecimal.valueOf(count == null?0:count)
+                                .divide(BigDecimal.valueOf(vo.getStudentCount()))
+                                .multiply(BigDecimal.valueOf(100))
+                                .setScale(2, RoundingMode.HALF_UP);
+                        setPercentage(bigDecimal.floatValue());
+                        setCount(count == null?0:count);
+                    }});
+                    optionList.add(new AssessmentQuestionOptionResultVo(){{
+                        setName("否");
+                        Integer count = answerCountMap.get(twoQuestion.getId().toString() + "2");
+                        BigDecimal bigDecimal = BigDecimal.valueOf(count == null?0:count)
+                                .divide(BigDecimal.valueOf(vo.getStudentCount()))
+                                .multiply(BigDecimal.valueOf(100))
+                                .setScale(2, RoundingMode.HALF_UP);
+                        setPercentage(bigDecimal.floatValue());
+                        setCount(count == null?0:count);
+                    }});
+                }else if("scale_question".equals(twoQuestion.getType())) {
+                    for (AssessmentPlanAnswerDetailVo detailVo : scaleQuestionResult) {
+                        if(detailVo.getQuestionId().equals(twoQuestion.getId())){
+                            optionList.add(new AssessmentQuestionOptionResultVo(){{
+                                setName(detailVo.getAnswerId());
+                                Integer count = detailVo.getChooseCount();
+                                BigDecimal bigDecimal = BigDecimal.valueOf(count == null?0:count)
+                                        .divide(BigDecimal.valueOf(vo.getStudentCount())).multiply(BigDecimal.valueOf(100))
+                                        .setScale(2, RoundingMode.HALF_UP);
+                                setPercentage(bigDecimal.floatValue());
+                                setCount(count == null?0:count);
+                            }});
+                        }
                     }
                 }
-                twoQuestion.setOptions(optionList);
+                twoQuestion.setResultList(optionList);
             }
         }
-
         vo.setChildren(oneList);
         return vo;
     }

+ 27 - 0
src/main/java/com/xjrsoft/module/assessment/vo/AssessmentQuestionOptionResultVo.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.assessment.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+* @title: 考核题目答案出参
+* @Author dzx
+* @Date: 2024-03-29
+* @Version 1.0
+*/
+@Data
+public class AssessmentQuestionOptionResultVo implements Serializable {
+
+    @ApiModelProperty("选项名称")
+    private String name;
+
+    @ApiModelProperty("选择数量")
+    private Integer count = 0;
+
+    @ApiModelProperty("占比")
+    private Float percentage;
+
+}

+ 45 - 0
src/main/java/com/xjrsoft/module/assessment/vo/AssessmentQuestionResultDetailVo.java

@@ -0,0 +1,45 @@
+package com.xjrsoft.module.assessment.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+* @title: 考核题目答案出参
+* @Author dzx
+* @Date: 2024-03-29
+* @Version 1.0
+*/
+@Data
+public class AssessmentQuestionResultDetailVo implements Serializable {
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("题目题干")
+    private String name;
+
+    @ApiModelProperty("分数")
+    private Long score;
+
+    @ApiModelProperty("题目类型")
+    private String type;
+
+    @ApiModelProperty("类别(1:大题 2:小题 3:选项)")
+    private Integer category;
+
+    @ApiModelProperty("父级id")
+    private Long parentId;
+
+    @ApiModelProperty("小题是否必填(1:是 0:否)")
+    private Short required;
+
+    @ApiModelProperty("数量")
+    private Integer count;
+
+    @ApiModelProperty("子集")
+    private List<AssessmentQuestionOptionResultVo> resultList;
+
+}

+ 39 - 0
src/main/java/com/xjrsoft/module/assessment/vo/AssessmentTemplatePlanResultVo.java

@@ -0,0 +1,39 @@
+package com.xjrsoft.module.assessment.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+* @title: 考核模板表单出参
+* @Author dzx
+* @Date: 2024-03-29
+* @Version 1.0
+*/
+@Data
+public class AssessmentTemplatePlanResultVo {
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("名称")
+    private String name;
+
+    @ApiModelProperty("分数")
+    private Long score;
+
+    @ApiModelProperty("开始时间")
+    private Date startTime;
+
+    @ApiModelProperty("结束时间")
+    private Date endTime;
+
+    @ApiModelProperty("题目内容")
+    private List<OneQuestionVo> children;
+
+    @ApiModelProperty("学生人数")
+    private Integer studentCount;
+
+}

+ 39 - 0
src/main/java/com/xjrsoft/module/assessment/vo/OneQuestionVo.java

@@ -0,0 +1,39 @@
+package com.xjrsoft.module.assessment.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+* @title: 一级题目
+* @Author dzx
+* @Date: 2024年4月9日
+* @Version 1.0
+*/
+@Data
+public class OneQuestionVo implements Serializable {
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("题目题干")
+    private String name;
+
+    @ApiModelProperty("分数")
+    private Long score;
+
+    @ApiModelProperty("题目类型")
+    private String type;
+
+    @ApiModelProperty("小题是否必填(1:是 0:否)")
+    private Short required;
+
+    @ApiModelProperty("数量")
+    private Integer count;
+
+    @ApiModelProperty("二级题目")
+    private List<TwoQuestionVo> children;
+
+}

+ 39 - 0
src/main/java/com/xjrsoft/module/assessment/vo/TwoQuestionVo.java

@@ -0,0 +1,39 @@
+package com.xjrsoft.module.assessment.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+* @title: 二级题目
+* @Author dzx
+* @Date: 2024年4月9日
+* @Version 1.0
+*/
+@Data
+public class TwoQuestionVo implements Serializable {
+
+    @ApiModelProperty("")
+    private Long id;
+
+    @ApiModelProperty("题目题干")
+    private String name;
+
+    @ApiModelProperty("分数")
+    private Long score;
+
+    @ApiModelProperty("题目类型")
+    private String type;
+
+    @ApiModelProperty("小题是否必填(1:是 0:否)")
+    private Short required;
+
+    @ApiModelProperty("数量")
+    private Integer count;
+
+    @ApiModelProperty("选项")
+    private List<AssessmentQuestionOptionResultVo> resultList;
+
+}

+ 12 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentInfoDetailVo.java

@@ -108,4 +108,16 @@ public class BaseStudentInfoDetailVo {
      */
     @ApiModelProperty("性别中文")
     private String genderCn;
+
+    @ApiModelProperty("军训费")
+    private String jxf;
+
+    @ApiModelProperty("教材费")
+    private String jcf;
+
+    @ApiModelProperty("宿舍费")
+    private String ssf;
+
+    @ApiModelProperty("学生类别")
+    private String studentForm;
 }

+ 64 - 4
src/main/java/com/xjrsoft/module/student/vo/BaseStudentInfoPageVo.java

@@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.write.style.ContentStyle;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.Date;
+
 /**
 * @title: 移动端学生修改信息列表
 * @Author dzx
@@ -50,14 +52,72 @@ public class BaseStudentInfoPageVo {
     private String className;
 
     /**
-     * 性别
+     * 学习形式
      */
-    @ApiModelProperty("性别")
-    private String genderCn;
-
+    @ApiModelProperty("学习形式")
+    private String rollModality;
+    /**
+     * 学习形式
+     */
+    @ApiModelProperty("学习形式")
+    private String rollModalityCode;
+    /**
+     * 学籍状态(xjr_dictionary_item[archives_status])
+     */
+    @ApiModelProperty("学籍状态(xjr_dictionary_item[archives_status])")
+    private String archivesStatus;
+    /**
+     * 学籍状态(xjr_dictionary_item[archives_status])
+     */
+    @ApiModelProperty("学籍状态(xjr_dictionary_item[archives_status])")
+    private String archivesStatusCode;
     /**
      * 就读方式(xjr_dictionary_item[stduy_status])
      */
     @ApiModelProperty("就读方式(xjr_dictionary_item[stduy_status])")
     private String stduyStatus;
+
+    /**
+     * 就读方式(xjr_dictionary_item[stduy_status])
+     */
+    @ApiModelProperty("就读方式(xjr_dictionary_item[stduy_status])")
+    private String stduyStatusCode;
+
+    @ApiModelProperty("床位信息")
+    private String bedInfo;
+
+    @ApiModelProperty("头像")
+    private String avatar;
+
+    @ApiModelProperty("出生日期")
+    private Date birthDate;
+
+    @ApiModelProperty("民族")
+    private String nation;
+
+    private String majorSetName;
+
+    /**
+     * 性别
+     */
+    @ApiModelProperty("性别")
+    private String gender;
+
+    /**
+     * 性别中文
+     */
+    @ApiModelProperty("性别中文")
+    private String genderCn;
+
+    @ApiModelProperty("军训费")
+    private String jxf;
+
+    @ApiModelProperty("教材费")
+    private String jcf;
+
+    @ApiModelProperty("宿舍费")
+    private String ssf;
+
+    @ApiModelProperty("学生类别")
+    private String studentForm;
 }

+ 99 - 0
src/main/java/com/xjrsoft/module/system/controller/XjrMenuDeptRelationController.java

@@ -0,0 +1,99 @@
+package com.xjrsoft.module.system.controller;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xjrsoft.common.constant.GlobalConstant;
+import com.baomidou.mybatisplus.core.toolkit.StringPool;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.evaluate.vo.EvaluateTemplatePageVo;
+import com.xjrsoft.module.system.dto.AddXjrMenuDeptRelationDto;
+import com.xjrsoft.module.system.dto.UpdateXjrMenuDeptRelationDto;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+import com.xjrsoft.module.system.dto.XjrMenuDeptRelationPageDto;
+import com.xjrsoft.module.system.entity.XjrMenuDeptRelation;
+import com.xjrsoft.module.system.service.IXjrMenuDeptRelationService;
+import com.xjrsoft.module.system.vo.XjrMenuDeptRelationPageVo;
+
+import com.xjrsoft.module.system.vo.XjrMenuDeptRelationVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+/**
+* @title: 菜单部门关联表
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/system" + "/xjrMenuDeptRelation")
+@Api(value = "/system"  + "/xjrMenuDeptRelation",tags = "菜单部门关联表代码")
+@AllArgsConstructor
+public class XjrMenuDeptRelationController {
+
+
+    private final IXjrMenuDeptRelationService xjrMenuDeptRelationService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="菜单部门关联表列表(分页)")
+    @SaCheckPermission("xjrmenudeptrelation:detail")
+    public RT<PageOutput<XjrMenuDeptRelationPageVo>> page(@Valid XjrMenuDeptRelationPageDto dto){
+        Page<XjrMenuDeptRelationPageVo> page = xjrMenuDeptRelationService.getPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
+        PageOutput<XjrMenuDeptRelationPageVo> pageOutput = ConventPage.getPageOutput(page, XjrMenuDeptRelationPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询菜单部门关联表信息")
+    @SaCheckPermission("xjrmenudeptrelation:detail")
+    public RT<XjrMenuDeptRelationVo> info(@RequestParam Long id){
+        XjrMenuDeptRelation xjrMenuDeptRelation = xjrMenuDeptRelationService.getById(id);
+        if (xjrMenuDeptRelation == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(xjrMenuDeptRelation, XjrMenuDeptRelationVo.class));
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增菜单部门关联表")
+    @SaCheckPermission("xjrmenudeptrelation:add")
+    public RT<Boolean> add(@Valid @RequestBody AddXjrMenuDeptRelationDto dto){
+        XjrMenuDeptRelation xjrMenuDeptRelation = BeanUtil.toBean(dto, XjrMenuDeptRelation.class);
+        boolean isSuccess = xjrMenuDeptRelationService.save(xjrMenuDeptRelation);
+    return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改菜单部门关联表")
+    @SaCheckPermission("xjrmenudeptrelation:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateXjrMenuDeptRelationDto dto){
+
+        XjrMenuDeptRelation xjrMenuDeptRelation = BeanUtil.toBean(dto, XjrMenuDeptRelation.class);
+        return RT.ok(xjrMenuDeptRelationService.updateById(xjrMenuDeptRelation));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除菜单部门关联表")
+    @SaCheckPermission("xjrmenudeptrelation:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(xjrMenuDeptRelationService.removeBatchByIds(ids));
+
+    }
+
+}

+ 38 - 0
src/main/java/com/xjrsoft/module/system/dto/AddXjrMenuDeptRelationDto.java

@@ -0,0 +1,38 @@
+package com.xjrsoft.module.system.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 菜单部门关联表
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Data
+public class AddXjrMenuDeptRelationDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 菜单id
+    */
+    @ApiModelProperty("菜单id")
+    private Long menuId;
+    /**
+    * 部门id
+    */
+    @ApiModelProperty("部门id")
+    private Long deptId;
+
+}

+ 32 - 0
src/main/java/com/xjrsoft/module/system/dto/UpdateXjrMenuDeptRelationDto.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.system.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 菜单部门关联表
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Data
+public class UpdateXjrMenuDeptRelationDto extends AddXjrMenuDeptRelationDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+}

+ 26 - 0
src/main/java/com/xjrsoft/module/system/dto/XjrMenuDeptRelationPageDto.java

@@ -0,0 +1,26 @@
+package com.xjrsoft.module.system.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+/**
+* @title: 菜单部门关联表分页查询入参
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class XjrMenuDeptRelationPageDto extends PageInput {
+    @ApiModelProperty("模版名称")
+    public String depts;
+}

+ 88 - 0
src/main/java/com/xjrsoft/module/system/entity/XjrMenuDeptRelation.java

@@ -0,0 +1,88 @@
+package com.xjrsoft.module.system.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+/**
+* @title: 菜单部门关联表
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Data
+@TableName("xjr_menu_dept_relation")
+@ApiModel(value = "xjr_menu_dept_relation", description = "菜单部门关联表")
+public class XjrMenuDeptRelation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 菜单id
+    */
+    @ApiModelProperty("菜单id")
+    private Long menuId;
+    /**
+    * 部门id
+    */
+    @ApiModelProperty("部门id")
+    private Long deptId;
+
+
+}

+ 25 - 0
src/main/java/com/xjrsoft/module/system/mapper/XjrMenuDeptRelationMapper.java

@@ -0,0 +1,25 @@
+package com.xjrsoft.module.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.evaluate.dto.EvaluateTemplatePageDto;
+import com.xjrsoft.module.evaluate.vo.EvaluateTemplatePageVo;
+import com.xjrsoft.module.system.dto.XjrMenuDeptRelationPageDto;
+import com.xjrsoft.module.system.entity.XjrMenuDeptRelation;
+import com.xjrsoft.module.system.vo.XjrMenuDeptRelationPageVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+* @title: 菜单部门关联表
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Mapper
+public interface XjrMenuDeptRelationMapper extends MPJBaseMapper<XjrMenuDeptRelation> {
+    Page<XjrMenuDeptRelationPageVo> getPage(Page<XjrMenuDeptRelationPageDto> page,  @Param("list")List<String> list);
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/system/service/IXjrMenuDeptRelationService.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.system.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.evaluate.dto.EvaluateTemplatePageDto;
+import com.xjrsoft.module.evaluate.vo.EvaluateTemplatePageVo;
+import com.xjrsoft.module.system.dto.AddXjrMenuDeptRelationDto;
+import com.xjrsoft.module.system.dto.XjrMenuDeptRelationPageDto;
+import com.xjrsoft.module.system.entity.XjrMenuDeptRelation;
+import com.xjrsoft.module.system.vo.XjrMenuDeptRelationPageVo;
+import lombok.Data;
+import java.util.List;
+
+/**
+* @title: 菜单部门关联表
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+
+public interface IXjrMenuDeptRelationService extends MPJBaseService<XjrMenuDeptRelation> {
+    Page<XjrMenuDeptRelationPageVo> getPage(Page<XjrMenuDeptRelationPageDto> page, XjrMenuDeptRelationPageDto dto);
+}

+ 45 - 0
src/main/java/com/xjrsoft/module/system/service/impl/XjrMenuDeptRelationServiceImpl.java

@@ -0,0 +1,45 @@
+package com.xjrsoft.module.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.evaluate.mapper.EvaluateTemplateMapper;
+import com.xjrsoft.module.evaluate.vo.EvaluateTemplatePageVo;
+import com.xjrsoft.module.system.dto.AddXjrMenuDeptRelationDto;
+import com.xjrsoft.module.system.dto.XjrMenuDeptRelationPageDto;
+import com.xjrsoft.module.system.entity.XjrMenuDeptRelation;
+import com.xjrsoft.module.system.mapper.XjrMenuDeptRelationMapper;
+import com.xjrsoft.module.system.service.IXjrMenuDeptRelationService;
+import com.xjrsoft.module.system.vo.XjrMenuDeptRelationPageVo;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+
+/**
+* @title: 菜单部门关联表
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class XjrMenuDeptRelationServiceImpl extends MPJBaseServiceImpl<XjrMenuDeptRelationMapper, XjrMenuDeptRelation> implements IXjrMenuDeptRelationService {
+    private final XjrMenuDeptRelationMapper xjrMenuDeptRelationMapper;
+
+    @Override
+    public Page<XjrMenuDeptRelationPageVo> getPage(Page<XjrMenuDeptRelationPageDto> page, XjrMenuDeptRelationPageDto dto) {
+        List<String> deptIds = new ArrayList<>();
+        if (dto.getDepts() != null && !dto.getDepts().isEmpty()) {
+            deptIds = Arrays.asList(dto.getDepts().split(","));
+        }
+
+        return xjrMenuDeptRelationMapper.getPage(page, deptIds);
+    }
+}

+ 75 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrMenuDeptRelationPageVo.java

@@ -0,0 +1,75 @@
+package com.xjrsoft.module.system.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import com.xjrsoft.common.annotation.Trans;
+import com.xjrsoft.common.enums.TransType;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+* @title: 菜单部门关联表分页列表出参
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Data
+public class XjrMenuDeptRelationPageVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private String id;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long createUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Date createDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long modifyUserId;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Date modifyDate;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Integer deleteMark;
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Integer enabledMark;
+    /**
+    * 菜单id
+    */
+    @ApiModelProperty("菜单id")
+    private Long menuId;
+    /**
+    * 部门id
+    */
+    @ApiModelProperty("部门id")
+    private Long deptId;
+
+    @ApiModelProperty("菜单中文")
+    private String menuName;
+
+    @ApiModelProperty("部门中文")
+    private String deptName;
+
+}

+ 39 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrMenuDeptRelationVo.java

@@ -0,0 +1,39 @@
+package com.xjrsoft.module.system.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+/**
+* @title: 菜单部门关联表表单出参
+* @Author brealinxx
+* @Date: 2024-04-09
+* @Version 1.0
+*/
+@Data
+public class XjrMenuDeptRelationVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 菜单id
+    */
+    @ApiModelProperty("菜单id")
+    private Long menuId;
+    /**
+    * 部门id
+    */
+    @ApiModelProperty("部门id")
+    private Long deptId;
+
+
+
+}

+ 5 - 1
src/main/java/com/xjrsoft/module/workflow/mapper/WorkflowRecordMapper.java

@@ -3,6 +3,9 @@ package com.xjrsoft.module.workflow.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.xjrsoft.module.workflow.entity.WorkflowRecord;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
 
 /**
  * <p>
@@ -14,5 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
  */
 @Mapper
 public interface WorkflowRecordMapper extends BaseMapper<WorkflowRecord> {
-
+    @Select("select count(*) from xjr_workflow_record where node_id = #{taskId}")
+    Integer getTaskCount(String taskId);
 }

+ 6 - 5
src/main/java/com/xjrsoft/module/workflow/service/impl/WorkflowExecuteServiceImpl.java

@@ -3361,6 +3361,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                             .like(WorkflowExtra::getProcessName, dto.getKeyword()))
                     .orderByDesc(WorkflowExtra::getStartTime));
 
+
             for (HistoricProcessInstance historicProcessInstance : historicProcessInstances) {
 
                 //找到当前流程的 任务开始时间 最大值  为当前审批节点
@@ -3381,7 +3382,11 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
                             vo.setCreateTime(e.getStartTime());
                             vo.setProcessId(e.getProcessId());
                             vo.setProcessName(e.getProcessName());
-
+                            vo.setIsApproval(0);
+                            Integer taskCount = workflowRecordMapper.getTaskCount(e.getTaskId());
+                            if(taskCount > 1){
+                                vo.setIsApproval(1);
+                            }
                             //如果是已经完成的任务 默认是100进度
                             if (ObjectUtil.isNotNull(historicProcessInstance.getEndTime())) {
                                 vo.setCurrentProgress(100);
@@ -3392,10 +3397,6 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
 
                             result.add(vo);
                         });
-
-
-                MyProcessPageVo vo = new MyProcessPageVo();
-
             }
         }
 

+ 4 - 0
src/main/java/com/xjrsoft/module/workflow/vo/MyProcessPageVo.java

@@ -1,5 +1,6 @@
 package com.xjrsoft.module.workflow.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDateTime;
@@ -68,4 +69,7 @@ public class MyProcessPageVo {
      * 时间
      */
     private LocalDateTime createTime;
+
+    @ApiModelProperty("是否已审批(0:否 1:是)")
+    private Integer isApproval;
 }

+ 7 - 0
src/main/resources/mapper/assessment/AssessmentPlanAnswerResultMapper.xml

@@ -29,4 +29,11 @@
         SELECT question_id,answer_id,COUNT(*) AS choose_count FROM assessment_plan_answer_result WHERE delete_mark = 0 AND assessment_template_plan_id = #{id}
         GROUP BY question_id,answer_id
     </select>
+    <select id="getScaleQuestionResult" resultType="com.xjrsoft.module.assessment.vo.AssessmentPlanAnswerDetailVo">
+        SELECT t1.question_id,t1.answer_id,COUNT(t1.id) AS choose_count FROM assessment_plan_answer_result t1
+        INNER JOIN assessment_plan_question t2 ON t1.question_id = t2.id
+        WHERE t1.delete_mark = 0 AND t1.assessment_template_plan_id = #{id}
+        AND t2.type = 'scale_question'
+        GROUP BY t1.question_id,t1.answer_id
+    </select>
 </mapper>

+ 18 - 0
src/main/resources/mapper/asset/XjrMenuDeptRelationMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xjrsoft.module.system.mapper.XjrMenuDeptRelationMapper">
+    <select id="getPage" resultType="com.xjrsoft.module.system.vo.XjrMenuDeptRelationPageVo">
+        SELECT *, t1.name as menuName, t2.name as deptName FROM xjr_menu_dept_relation t
+        LEFT JOIN xjr_menu t1 ON t1.id = t.menu_id
+        LEFT JOIN xjr_department t2 on t2.id = t.dept_id
+        WHERE t.delete_mark = 0
+        <if test="list != null and list.size() > 0">
+            AND dept_id IN
+            <foreach item="deptId" index="index" collection="list" open="(" separator="," close=")">
+                #{deptId}
+            </foreach>
+        </if>
+    </select>
+</mapper>

+ 67 - 25
src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml

@@ -4,48 +4,79 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.student.mapper.BaseStudentSchoolRollMapper">
     <select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.BaseStudentInfoPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentInfoPageVo">
-        SELECT t2.id,
+        SELECT
+            t2.id,
             t2.name AS student_name,
             t1.student_id,
             t2.mobile AS phone,
-            t5.mobile AS teacher_phone,t5.name as teacher_name,
+            t5.mobile AS teacher_phone,
+            t5.name AS teacher_name,
             t4.name AS class_name,
-            t6.mobile AS guardian_phone,
-            t7.name as gender_cn,
-            t8.name as stduyStatus
+            (SELECT mobile
+            FROM base_student_family_member
+            WHERE delete_mark = 0
+            AND user_id = t2.id
+            AND is_guardian = 1) AS guardian_phone,
+            t7.name AS gender_cn,
+            t8.name AS stduyStatus,
+            t2.gender,
+            t10.sex AS genderCn,
+            t2.birth_date,
+            t2.avatar,
+            t6.name AS nation,
+            t3.archives_status AS archivesStatusCode,
+            t3.stduy_status AS stduyStatusCode,
+            t3.roll_modality AS rollModalityCode,
+            t12.name AS archives_status,
+            t8.name AS stduy_status,
+            t13.name AS roll_modality,
+            t11.name AS student_form,
+            MAX(CASE WHEN t10.feeitemcode LIKE '999010604%' THEN t10.jfzt ELSE NULL END) AS jxf,
+            MAX(CASE WHEN t10.feeitemcode = 103042766003001 AND t10.beltcode LIKE '%2024%' THEN t10.jfzt ELSE NULL END) AS ssf,
+            MAX(CASE WHEN t10.feeitemcode LIKE '999010603%' THEN t10.jfzt ELSE NULL END) AS jcf
         FROM base_student t1
-            INNER JOIN xjr_user t2 ON t1.user_id = t2.id
-            INNER JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
-            LEFT JOIN base_class t4 ON t3.class_id = t4.id
-            LEFT JOIN xjr_user t5 ON t4.teacher_id = t5.id
-            LEFT JOIN base_student_family_member t6 ON t6.user_id = t2.id AND t6.delete_mark = 0 AND t6.is_guardian = 1
-            Left JOIN xjr_dictionary_detail t7 ON t7.code = t2.gender
-            Left JOIN xjr_dictionary_detail t8 ON t8.code = t3.stduy_status
+        INNER JOIN xjr_user t2 ON t1.user_id = t2.id
+        INNER JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
+        LEFT JOIN base_class t4 ON t3.class_id = t4.id
+        LEFT JOIN xjr_user t5 ON t4.teacher_id = t5.id
+        LEFT JOIN xjr_dictionary_detail t6 ON t6.code = t1.nation
+        LEFT JOIN xjr_dictionary_detail t7 ON t7.code = t2.gender
+        LEFT JOIN xjr_dictionary_detail t8 ON t8.code = t3.stduy_status
+        LEFT JOIN xjr_dictionary_detail t11 ON t11.code = t3.student_type
+        LEFT JOIN xjr_dictionary_detail t12 ON t12.code = t3.archives_status
+        LEFT JOIN xjr_dictionary_detail t13 ON t13.code = t3.roll_modality
+        LEFT JOIN pb_v_xssfdetail t9 ON t9.personalid = t1.student_id
+        LEFT JOIN pb_v_xsxxsfytb t10 ON t10.Studentcode = t9.personalid
         WHERE t2.delete_mark = 0
-            AND t1.delete_mark = 0
-            AND t3.archives_status = 'FB2901'
+        AND t1.delete_mark = 0
+        AND t3.archives_status = 'FB2901'
         <if test="dto.gradeId != null">
-            and t4.grade_id = #{dto.gradeId}
+            AND t4.grade_id = #{dto.gradeId}
         </if>
         <if test="dto.majorSetId != null">
-            and t3.major_set_id = #{dto.majorSetId}
+            AND t3.major_set_id = #{dto.majorSetId }
         </if>
         <if test="dto.classId != null">
-            and t4.id = #{dto.classId}
+            AND t4.id = #{dto.classId}
         </if>
         <if test="dto.teacherId != null">
-            and t4.teacher_id = #{dto.teacherId}
+            AND t4.teacher_id = #{dto.teacherId}
         </if>
         <if test="dto.keyWord != null and dto.keyWord != ''">
-            and (t4.name like concat('%', #{dto.keyWord}, '%')
-            or t2.name like concat('%', #{dto.keyWord}, '%')
-            or t5.name like concat('%', #{dto.keyWord}, '%')
-            or t1.student_id like concat('%', #{dto.keyWord}, '%')
-            or t2.mobile like concat('%', #{dto.keyWord}, '%')
-            or t6.mobile LIKE concat('%', #{dto.keyWord}, '%')
+            AND (t4.name LIKE concat('%', #{dto.keyWord}, '%')
+            OR t2.name LIKE concat('%', #{dto.keyWord}, '%')
+            OR t5.name LIKE concat('%', #{dto.keyWord}, '%')
+            OR t1.student_id LIKE concat('%', #{dto.keyWord}, '%')
+            OR t2.mobile LIKE concat('%', #{dto.keyWord}, '%')
+            OR t6.mobile LIKE concat('%', #{dto.keyWord}, '%')
             )
         </if>
+        GROUP BY t2.id, t2.name, t1.student_id, t2.mobile, t5.mobile, t5.name, t4.name,
+        (SELECT mobile FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t2.id AND is_guardian = 1),
+        t7.name, t8.name, t2.gender, t10.sex, t2.birth_date, t2.avatar, t6.name,
+        t12.name, t13.name, t11.name,t3.stduy_status,t3.archives_status,t3.roll_modality
     </select>
+
     <select id="getInfoById" resultType="com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo">
         SELECT t2.id,
                t2.name                                                                                                       AS student_name,
@@ -71,7 +102,11 @@
                t10.name                                                                                                      AS major_set_name,
                t3.archives_status                                                                                            as archivesStatusCode,
                t3.stduy_status                                                                                               as stduyStatusCode,
-               t3.roll_modality                                                                                              as rollModalityCode
+               t3.roll_modality                                                                                              as rollModalityCode,
+                t12.name AS student_form,
+               MAX(CASE WHEN t14.feeitemcode LIKE '999010604%' THEN t14.jfzt ELSE NULL END) AS jxf,
+               MAX(CASE WHEN t14.feeitemcode = 103042766003001 AND t14.beltcode LIKE '%2024%' THEN t14.jfzt ELSE NULL END) AS ssf,
+               MAX(CASE WHEN t14.feeitemcode LIKE '999010603%' THEN t14.jfzt ELSE NULL END) AS jcf
         FROM base_student t1
                  INNER JOIN xjr_user t2 ON t1.user_id = t2.id
                  INNER JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
@@ -83,7 +118,14 @@
                  LEFT JOIN xjr_dictionary_detail t9 ON t9.code = t3.roll_modality AND t9.item_id = 1762024751192084482
                  LEFT JOIN base_major_set t10 ON t3.major_set_id = t10.id
                  LEFT JOIN xjr_dictionary_detail t11 ON t11.code = t2.gender
+                 LEFT JOIN xjr_dictionary_detail t12 ON t12.code = t3.student_type
+                 LEFT JOIN pb_v_xssfdetail t13 ON t13.personalid = t1.student_id
+                 LEFT JOIN pb_v_xsxxsfytb t14 ON t14.Studentcode = t13.personalid
         WHERE t2.id = #{id}
+        GROUP BY t2.id, t2.name, t2.mobile, t2.gender, t11.name, t1.student_id, t5.name, t5.mobile, t4.name,
+                 (SELECT mobile FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t2.id AND is_guardian = 1),
+                 t8.name, t7.name, t9.name, t2.birth_date, t2.avatar, t6.name, t10.name, t3.archives_status, t3.stduy_status,
+                 t3.roll_modality, t3.archives_status, t3.stduy_status, t3.roll_modality, t12.name
     </select>
     <update id="updateInfoByUserId" parameterType="com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto">
         UPDATE base_student_school_roll SET delete_mark = delete_mark

+ 25 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -2749,4 +2749,29 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+
+    @Test
+    public void gcXjrMenuDeptRelation() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("xjr_menu_dept_relation");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("brealinxx");//作者名称
+        params.setPackageName("system");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
 }