Kaynağa Gözat

课程目标达成度修改

wangliang 1 yıl önce
ebeveyn
işleme
c46f808b7b

+ 4 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCPaperStructService.java

@@ -29,6 +29,7 @@ public interface TCPaperStructService extends IService<TCPaperStruct> {
 
     /**
      * 导入期末成绩-试卷结构excel
+     *
      * @param file
      * @param cultureProgramId
      * @param courseId
@@ -40,6 +41,7 @@ public interface TCPaperStructService extends IService<TCPaperStruct> {
 
     /**
      * 同步试卷结构
+     *
      * @param examId
      * @param courseId
      * @param paperNumber
@@ -54,6 +56,7 @@ public interface TCPaperStructService extends IService<TCPaperStruct> {
 
     /**
      * 获取试卷结构导入锁
+     *
      * @param cultureProgramId
      * @param courseId
      * @param paperNumber
@@ -62,6 +65,7 @@ public interface TCPaperStructService extends IService<TCPaperStruct> {
 
     /**
      * 获取试卷结构导入锁
+     *
      * @param cultureProgramId
      * @param courseId
      * @param paperNumber

+ 6 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TCUsualScoreService.java

@@ -21,15 +21,17 @@ public interface TCUsualScoreService extends IService<TCUsualScore> {
 
     /**
      * 平时成绩导入
-     * @param file excel
+     *
+     * @param file             excel
      * @param cultureProgramId 培养方案id
-     * @param courseId 课程id
+     * @param courseId         课程id
      * @return 结果
      */
-    public Map<String, String> usualScoreExcelImport(MultipartFile file, Long cultureProgramId,Long courseId) throws IOException;
+    public Map<String, String> usualScoreExcelImport(MultipartFile file, Long cultureProgramId, Long courseId) throws IOException;
 
     /**
      * 平时成绩列表(分页)
+     *
      * @param iPage
      * @param cultureProgramId
      * @param courseId
@@ -40,6 +42,7 @@ public interface TCUsualScoreService extends IService<TCUsualScore> {
 
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
+     *
      * @param cultureProgramId
      * @param courseId
      * @param paperNumber

+ 7 - 6
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TRBasicInfoService.java

@@ -27,9 +27,10 @@ public interface TRBasicInfoService extends IService<TRBasicInfo> {
 
     /**
      * 根据考试id/课程编码/试卷编码查询数据库数据
+     *
      * @param cultureProgramId cultureProgramId
-     * @param courseId courseId
-     * @param paperNumber paperNumber
+     * @param courseId         courseId
+     * @param paperNumber      paperNumber
      * @return
      */
     public TRBasicInfo queryBasicInfo(Long cultureProgramId, Long courseId, String paperNumber);
@@ -52,7 +53,7 @@ public interface TRBasicInfoService extends IService<TRBasicInfo> {
      * @return
      */
     public Map<String, Object> getReportCalculateParams(TRBasicInfo trBasicInfo, List<PaperStructDimensionResult> paperStructDimensionResultList,
-            ObeCourseWeightResult obeCourseWeightResult);
+                                                        ObeCourseWeightResult obeCourseWeightResult);
 
     /**
      * 计算课程考核成绩评价结果
@@ -146,9 +147,9 @@ public interface TRBasicInfoService extends IService<TRBasicInfo> {
      * 清除报告数据
      *
      * @param cultureProgramId cultureProgramId
-     * @param courseId            courseId
-     * @param paperNumber         paperNumber
-     * @param clearDimension      clearDimension
+     * @param courseId         courseId
+     * @param paperNumber      paperNumber
+     * @param clearDimension   clearDimension
      */
     public void clearReportData(Long cultureProgramId, Long courseId, String paperNumber, boolean clearDimension);
 }

+ 3 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/TRExamStudentService.java

@@ -1,7 +1,6 @@
 package com.qmth.distributed.print.business.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.distributed.print.business.bean.dto.report.ReportExamStudentDto;
 import com.qmth.distributed.print.business.bean.dto.report.StudentRequirementInfoDto;
@@ -9,8 +8,6 @@ import com.qmth.distributed.print.business.bean.result.report.studentRequirement
 import com.qmth.distributed.print.business.entity.TRBasicInfo;
 import com.qmth.distributed.print.business.entity.TRExamStudent;
 
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
 import java.util.List;
 import java.util.Map;
 
@@ -43,9 +40,10 @@ public interface TRExamStudentService extends IService<TRExamStudent> {
 
     /**
      * 根据考试id/课程编码/试卷编码删除数据
+     *
      * @param cultureProgramId cultureProgramId
-     * @param courseId courseId
-     * @param paperNumber paperNumber
+     * @param courseId         courseId
+     * @param paperNumber      paperNumber
      * @return 结果
      */
     public Boolean remove(Long cultureProgramId, Long courseId, String paperNumber);

+ 9 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCPaperStructServiceImpl.java

@@ -32,7 +32,6 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
-import java.io.IOException;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -148,11 +147,11 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                 }
                 if (!CollectionUtils.isEmpty(paperStructDtoNewList)) {
                     successData.add("共导入").add(paperStructDtoNewList.size() + "").add("条数据");
-                    TCPaperStruct tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId,markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
+                    TCPaperStruct tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDtoNewList), totalScore, 60d, sysUser.getId());
                     TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
                     if (Objects.nonNull(tcPaperStructDb) && !tcPaperStructDb.equals(tcPaperStruct)) {
-                        tcFinalScoreService.remove(cultureProgramId,courseId,paperNumber);
-                        trBasicInfoService.clearReportData(cultureProgramId, courseId,paperNumber, true);
+                        tcFinalScoreService.remove(cultureProgramId, courseId, paperNumber);
+                        trBasicInfoService.clearReportData(cultureProgramId, courseId, paperNumber, true);
                     }
                     tcPaperStructService.remove(cultureProgramId, courseId, paperNumber);
                     tcPaperStructService.save(tcPaperStruct);
@@ -203,7 +202,7 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                 paperStructList.add(p.getMainNumber() + "_" + p.getSubNumber() + "_" + p.getScore());
             }
             successData.add("共同步").add(paperStructDimensionResultList.size() + "").add("条数据");
-            TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId,courseId, paperNumber);
+            TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(cultureProgramId, courseId, paperNumber);
             TCPaperStruct tcPaperStruct = null;
             if (Objects.nonNull(tcPaperStructDb) && Objects.nonNull(tcPaperStructDb.getPaperStructDimension())) {
                 tcPaperStruct = new TCPaperStruct();
@@ -231,10 +230,10 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
                 }
                 tcPaperStruct.updateInfo(sysUser.getId());
             } else {
-                tcPaperStructService.remove(cultureProgramId,courseId, paperNumber);
+                tcPaperStructService.remove(cultureProgramId, courseId, paperNumber);
                 MarkPaper markPaper = printCommonService.getMarkPaper(examId, basicCourseService.getById(courseId).getCode(), paperNumber);
                 ObeCourseWeightResult obeCourseWeightResult = trBasicInfoService.findCourseWeightResultRmi(obeCourseOutline.getId());
-                tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId,markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId(), obeCourseWeightResult.getDimensionSign());
+                tcPaperStruct = new TCPaperStruct(cultureProgramId, courseId, markPaper.getCourseCode(), markPaper.getCourseName(), paperNumber, JacksonUtil.parseJson(paperStructDimensionResultList), sysUser.getId(), obeCourseWeightResult.getDimensionSign());
                 List<MarkQuestion> markQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndPaperType(examId, paperNumber, null);
                 if (CollectionUtils.isEmpty(markQuestionList)) {
                     throw ExceptionResultEnum.ERROR.exception("未找到试卷结构");
@@ -268,9 +267,10 @@ public class TCPaperStructServiceImpl extends ServiceImpl<TCPaperStructMapper, T
 
     /**
      * 根据考试id/科目编辑/试卷编码查询数据
+     *
      * @param cultureProgramId cultureProgramId
-     * @param courseId courseId
-     * @param paperNumber paperNumber
+     * @param courseId         courseId
+     * @param paperNumber      paperNumber
      * @return 结果
      */
     @Override

+ 0 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCUsualScoreServiceImpl.java

@@ -56,9 +56,6 @@ public class TCUsualScoreServiceImpl extends ServiceImpl<TCUsualScoreMapper, TCU
     @Resource
     TRBasicInfoService trBasicInfoService;
 
-    @Resource
-    ObeCourseOutlineService obeCourseOutlineService;
-
     @Resource
     BasicCourseService basicCourseService;
 

+ 0 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRBasicInfoServiceImpl.java

@@ -12,11 +12,9 @@ import com.google.gson.reflect.TypeToken;
 import com.qmth.distributed.print.business.bean.dto.*;
 import com.qmth.distributed.print.business.bean.dto.report.*;
 import com.qmth.distributed.print.business.bean.result.FinalScoreResult;
-import com.qmth.distributed.print.business.bean.result.ObeCourseOutlineResult;
 import com.qmth.distributed.print.business.bean.result.ObeCourseWeightResult;
 import com.qmth.distributed.print.business.bean.result.report.PaperStructDimensionResult;
 import com.qmth.distributed.print.business.bean.result.report.word.CourseReportBean;
-import com.qmth.distributed.print.business.entity.ObeCourseOutline;
 import com.qmth.distributed.print.business.entity.TCPaperStruct;
 import com.qmth.distributed.print.business.entity.TRBasicInfo;
 import com.qmth.distributed.print.business.entity.TRExamStudent;

+ 0 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TRExamStudentServiceImpl.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.qmth.distributed.print.business.bean.dto.report.*;
 import com.qmth.distributed.print.business.bean.result.FinalScoreResult;
 import com.qmth.distributed.print.business.bean.result.report.studentRequirement.*;

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/TCPaperStructController.java

@@ -180,7 +180,7 @@ public class TCPaperStructController {
         TCPaperStruct tcPaperStructDb = tcPaperStructService.queryPaperStruct(paperStructParams.getCultureProgramId(), paperStructParams.getCourseId(), paperStructParams.getPaperNumber());
         if (Objects.isNull(tcPaperStructDb)) {
             MarkPaper markPaper = printCommonService.getMarkPaper(paperStructParams.getExamId(), paperStructParams.getCourseCode(), paperStructParams.getPaperNumber());
-            tcPaperStructDb = new TCPaperStruct(paperStructParams.getCultureProgramId(),paperStructParams.getCourseId(), paperStructParams.getCourseCode(), markPaper.getCourseName(), paperStructParams.getPaperNumber(), JacksonUtil.parseJson(paperStructParams.getPaperStruct()), sysUser.getId(), obeCourseWeightResult.getDimensionSign());
+            tcPaperStructDb = new TCPaperStruct(paperStructParams.getCultureProgramId(), paperStructParams.getCourseId(), paperStructParams.getCourseCode(), markPaper.getCourseName(), paperStructParams.getPaperNumber(), JacksonUtil.parseJson(paperStructParams.getPaperStruct()), sysUser.getId(), obeCourseWeightResult.getDimensionSign());
             tcPaperStructService.save(tcPaperStructDb);
         } else {
             TCPaperStruct tcPaperStructSource = new TCPaperStruct();