xiatian 9 months ago
parent
commit
ec8cfb15f9

+ 1 - 1
src/main/java/cn/com/qmth/scancentral/controller/admin/SubjectController.java

@@ -30,7 +30,7 @@ import io.swagger.annotations.ApiOperation;
 
 @RestController
 @Api(tags = "科目接口")
-@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/subject")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/admin/subject")
 @Aac(strict = false, auth = true)
 public class SubjectController extends BaseController {
 

+ 3 - 0
src/main/java/cn/com/qmth/scancentral/service/impl/StudentServiceImpl.java

@@ -2222,6 +2222,9 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
             throw new ParameterException("studentId不能为空");
         }
         StudentAnswerVo ret = this.baseMapper.getStudentVo(studentId);
+        if (ret == null) {
+            throw new ParameterException("未找到考生信息");
+        }
         ret.setPapers(new ArrayList<>());
         List<StudentPaperVo> paperList = paperService.listByBatchIdAndStudentId(batchId, studentId);
 

+ 2 - 1
src/main/resources/mapper/StudentMapper.xml

@@ -536,10 +536,11 @@
         WHERE id = #{id}
     </update>
     <select id="scanProgress" resultType="cn.com.qmth.scancentral.vo.subject.SubjectScanProgressVo">
-        select t.subject_code,t.subject_name,
+        select t.subject_code,s.name subject_name,
         sum(case when t.status='UNEXIST' then 1 else 0 end) unexistCount,
         count(1) studentCount
         from sc_student t
+        inner join sc_subject s on t.exam_id=s.exam_id and t.subject_code=s.code
         where t.exam_id=#{examId}
         <if test="subjectCode != null and subjectCode !=''">
             and t.subject_code=#{subjectCode}