Browse Source

成绩管理1对多

wangliang 8 months ago
parent
commit
256ce39036

+ 1 - 5
distributed-print/src/main/java/com/qmth/distributed/print/api/obe/TRBasicInfoController.java

@@ -117,9 +117,6 @@ public class TRBasicInfoController {
     @Resource
     RedisUtil redisUtil;
 
-    @Resource
-    BasicRoleDataPermissionService basicRoleDataPermissionService;
-
     @ApiOperation(value = "报告管理列表")
     @RequestMapping(value = "/report/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "分页查询", response = ObeScoreResult.class)})
@@ -163,7 +160,7 @@ public class TRBasicInfoController {
                             && tcPaperStruct.getDimensionSign().longValue()
                             != obeCourseWeightResult.getDimensionSign().longValue());
         } else {
-            List<TRBasicInfo> trBasicInfoFilterList = trBasicInfoList.stream().filter(s -> Objects.nonNull(s.getTeachClassName()) && (Objects.equals(s.getTeachClassName(), "ALL") || Objects.equals(s.getTeachClassName().trim(), ""))).collect(Collectors.toList());
+            List<TRBasicInfo> trBasicInfoFilterList = trBasicInfoList.stream().filter(s -> Objects.nonNull(s.getTeachClassName()) && (Objects.equals(s.getTeachClassName(), SystemConstant.ALL) || Objects.equals(s.getTeachClassName().trim(), ""))).collect(Collectors.toList());
             if (!CollectionUtils.isEmpty(trBasicInfoFilterList)) {
                 trBasicInfoList.clear();
                 trBasicInfoList.addAll(trBasicInfoFilterList);
@@ -242,7 +239,6 @@ public class TRBasicInfoController {
         }
         List<TRBasicInfo> trBasicInfoAgainCalculateList = null;
         try {
-            SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
             ObeCourseOutline obeCourseOutline = obeCourseOutlineService.findByCultureProgramIdAndCourseId(cultureProgramId, courseId);
             ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId(), true);
             TCPaperStruct tcPaperStruct = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber, examId);

+ 3 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -158,6 +158,7 @@ public class SystemConstant {
     /**
      * 系统配置
      */
+    public static final String ALL = "ALL";
     public static final String EXAM_TASK = "examTask";
     public static final String START_PARENT = "../";
     public static final String DATE_TIME_FORMAT = "%02d";
@@ -178,8 +179,8 @@ public class SystemConstant {
     public static final String ATTACHMENT_SIZE = "attachment.size";
     public static final String CREATE_PDF_JOB_DB_LIMIT = "create.pdf.job.db.limit";
     //    public static final String AUTO_CREATE_PDF_RESET_MAX_COUNT = "auto.create.pdf.reset.max.count";
-    public static final String THREAD_POOL_CORE_SIZE = "thread.pool.core.size";
-    public static final String CUSTOM_THREAD_POOL_CORE_SIZE = "custom.thread.pool.core.size";
+//    public static final String THREAD_POOL_CORE_SIZE = "thread.pool.core.size";
+//    public static final String CUSTOM_THREAD_POOL_CORE_SIZE = "custom.thread.pool.core.size";
     public static final String SESSION_ACTIVE = "session.active";
     public static final String SMS_NORMAL_CODE = "sms.normal.code";
     public static final String CODE_EXPIRED_TIME = "code.expired.time";

+ 1 - 1
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/ObeCourseRequirementReportServiceImpl.java

@@ -177,7 +177,7 @@ public class ObeCourseRequirementReportServiceImpl extends ServiceImpl<ObeCourse
             for (CourseRequirementMatrixDto c : courseRequirementMatrixDtoList) {
                 if (c.getCourseId().longValue() == basicCourse.getId().longValue()) {
                     List<TRBasicInfo> trBasicInfoList = trBasicInfoService.queryBasicInfo(obeCourseOutline.getCultureProgramId(), obeCourseOutline.getCourseId(), null, examId);
-                    TRBasicInfo trBasicInfo = !CollectionUtils.isEmpty(trBasicInfoList) ? trBasicInfoList.stream().filter(s -> Objects.nonNull(s.getTeachClassName()) && (Objects.equals(s.getTeachClassName(), "ALL") || Objects.equals(s.getTeachClassName().trim(), ""))).collect(Collectors.toList()).get(0) : null;
+                    TRBasicInfo trBasicInfo = !CollectionUtils.isEmpty(trBasicInfoList) ? trBasicInfoList.stream().filter(s -> Objects.nonNull(s.getTeachClassName()) && (Objects.equals(s.getTeachClassName(), SystemConstant.ALL) || Objects.equals(s.getTeachClassName().trim(), ""))).collect(Collectors.toList()).get(0) : null;
                     if (Objects.nonNull(trBasicInfo)) {
                         ReportCourseEvaluationResultDto reportCourseEvaluationResultDto = Objects.nonNull(trBasicInfo.getCourseEvaluationResult()) ? JSONObject.parseObject(trBasicInfo.getCourseEvaluationResult(), ReportCourseEvaluationResultDto.class) : null;
                         BigDecimal courseMatrixDegree = new BigDecimal(0);

+ 4 - 4
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/TCPaperStructServiceImpl.java

@@ -21,7 +21,10 @@ import com.qmth.teachcloud.obe.been.result.report.PaperStructDimensionResult;
 import com.qmth.teachcloud.obe.entity.ObeCourseOutline;
 import com.qmth.teachcloud.obe.entity.TCPaperStruct;
 import com.qmth.teachcloud.obe.mapper.TCPaperStructMapper;
-import com.qmth.teachcloud.obe.service.*;
+import com.qmth.teachcloud.obe.service.ObeCourseOutlineService;
+import com.qmth.teachcloud.obe.service.ObeCourseTargetService;
+import com.qmth.teachcloud.obe.service.TCPaperStructService;
+import com.qmth.teachcloud.obe.service.TRBasicInfoService;
 import io.github.burukeyou.dataframe.iframe.SDFrame;
 import io.github.burukeyou.dataframe.iframe.window.Sorter;
 import org.apache.commons.collections4.CollectionUtils;
@@ -52,9 +55,6 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
     @Resource
     TCPaperStructService tcPaperStructService;
 
-    @Resource
-    TCFinalScoreService tcFinalScoreService;
-
     @Resource
     TRBasicInfoService trBasicInfoService;
 

+ 4 - 4
teachcloud-obe/src/main/java/com/qmth/teachcloud/obe/service/impl/TRBasicInfoServiceImpl.java

@@ -469,7 +469,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
         Set<ScoreParamDto> scoreParamDtoSet = new LinkedHashSet<>();
         String nid = NanoIdUtils.randomNanoId();
         finalScoreResultList.stream().peek(s -> scoreParamDtoSet.add(new ScoreParamDto(s.getTeachClassName(), s.getTeachId()))).collect(Collectors.toSet());
-        scoreParamDtoSet.add(new ScoreParamDto("ALL" + nid, -1L));
+        scoreParamDtoSet.add(new ScoreParamDto(SystemConstant.ALL + nid, -1L));
 
         List<TRBasicInfo> trBasicInfoList = new ArrayList<>();
         for (ScoreParamDto s : scoreParamDtoSet) {
@@ -486,7 +486,7 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
             } else {
                 trBasicInfo.setBasicInfo(tcPaperStruct.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), markPaper.getPaperNumber(), basicSemester.getName(), cultureProgramId, courseId, trBasicInfo.getCourseEnName(), trBasicInfo.getCourseSuggest(), reportCourseBasicInfoDtoBasic);
             }
-            if (Objects.nonNull(nid) && !Objects.equals(s.getTeachClassName(), "ALL" + nid)) {
+            if (Objects.nonNull(nid) && !Objects.equals(s.getTeachClassName(), SystemConstant.ALL + nid)) {
                 trBasicInfo.setTeachClassName(s.getTeachClassName());
             }
             //课程基本情况
@@ -539,8 +539,8 @@ public class TRBasicInfoServiceImpl extends ServiceImpl<TRBasicInfoMapper, TRBas
             trBasicInfo.setParticipantCount(examStudentNewList.size() - 3);
             trBasicInfo.getReportResult().setCommonInfo(new ReportCommonDto(tcPaperStruct.getExamId(), markPaper.getCourseCode(), markPaper.getCourseName(), tcPaperStruct.getPaperNumber()));
             trBasicInfo.getReportResult().updateInfo(s.getTeachClassName(), trBasicInfo.getId());
-            if (Objects.nonNull(nid) && Objects.equals(s.getTeachClassName(), "ALL" + nid)) {
-                trBasicInfo.setTeachClassName("ALL");
+            if (Objects.nonNull(nid) && Objects.equals(s.getTeachClassName(), SystemConstant.ALL + nid)) {
+                trBasicInfo.setTeachClassName(SystemConstant.ALL);
                 trBasicInfo.setCreateId(s.getTeachId());
             } else {
                 trBasicInfo.setTeachClassName(s.getTeachClassName());