|
@@ -30,7 +30,6 @@ import com.qmth.teachcloud.common.service.BasicCourseService;
|
|
|
import com.qmth.teachcloud.common.util.*;
|
|
|
import com.qmth.teachcloud.mark.bean.archivescore.MarkStudentScoreVo;
|
|
|
import com.qmth.teachcloud.mark.dto.mark.ScoreItem;
|
|
|
-import com.qmth.teachcloud.mark.entity.MarkPaper;
|
|
|
import com.qmth.teachcloud.mark.service.MarkStudentService;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
|
@@ -80,6 +79,16 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
@Resource
|
|
|
BasicCourseService basicCourseService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 导入期末成绩excel
|
|
|
+ *
|
|
|
+ * @param file
|
|
|
+ * @param examId
|
|
|
+ * @param courseId
|
|
|
+ * @param paperNumber
|
|
|
+ * @param cultureProgramId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public Map<String, String> finalScoreExcelImport(MultipartFile file, Long examId, Long courseId, String paperNumber, Long cultureProgramId) {
|
|
@@ -291,6 +300,16 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
return this.baseMapper.examStudentOverview(cultureProgramId, courseId);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 同步期末成绩
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param courseId
|
|
|
+ * @param paperNumber
|
|
|
+ * @param cultureProgramId
|
|
|
+ * @return
|
|
|
+ * @throws IOException
|
|
|
+ */
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public Map<String, String> finalScoreSync(Long examId, Long courseId, String paperNumber, Long cultureProgramId) throws IOException {
|
|
@@ -363,6 +382,14 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
return messageMap;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据考试id/课程编码/试卷编码删除数据
|
|
|
+ *
|
|
|
+ * @param cultureProgramId
|
|
|
+ * @param courseId
|
|
|
+ * @param paperNumber
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public Boolean remove(Long cultureProgramId, Long courseId, String paperNumber) {
|
|
@@ -374,6 +401,14 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
return tcFinalScoreService.remove(queryWrapper);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据考试id/课程编码/试卷编码查询数据库数据
|
|
|
+ *
|
|
|
+ * @param cultureProgramId
|
|
|
+ * @param courseId
|
|
|
+ * @param paperNumber
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
public List<TCFinalScore> queryFinalScore(Long cultureProgramId, Long courseId, String paperNumber) {
|
|
|
QueryWrapper<TCFinalScore> queryWrapper = new QueryWrapper<>();
|
|
@@ -384,6 +419,13 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
return tcFinalScoreService.list(queryWrapper);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取期末考试同步锁
|
|
|
+ *
|
|
|
+ * @param cultureProgramId
|
|
|
+ * @param courseId
|
|
|
+ * @param paperNumber
|
|
|
+ */
|
|
|
@Override
|
|
|
public void getFinalScoreSyncLock(Long cultureProgramId, Long courseId, String paperNumber) {
|
|
|
String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_PREFIX + SystemConstant.SYNC + cultureProgramId + "_" + courseId + "_" + paperNumber;
|
|
@@ -393,6 +435,13 @@ public class TCFinalScoreServiceImpl extends ServiceImpl<TCFinalScoreMapper, TCF
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取期末考试导入锁
|
|
|
+ *
|
|
|
+ * @param cultureProgramId
|
|
|
+ * @param courseId
|
|
|
+ * @param paperNumber
|
|
|
+ */
|
|
|
@Override
|
|
|
public void getFinalScoreImportLock(Long cultureProgramId, Long courseId, String paperNumber) {
|
|
|
String lockKey = SystemConstant.REDIS_FINAL_SCORE_DATA_PREFIX + SystemConstant.IMPORT + cultureProgramId + "_" + courseId + "_" + paperNumber;
|