Selaa lähdekoodia

修复客户端联调错误

yin 3 kuukautta sitten
vanhempi
commit
a6293b2181

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/BasicExamStudentService.java

@@ -101,5 +101,5 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
 
     String listByTeacherByExamIdAndPaperNumber(Long examId, String paperNumber);
 
-    BasicExamStudent findByExamIdAndCoursePaperIdAndStudentCode(Long examId, String coursePaperId, String studentCode);
+    BasicExamStudent findByExamIdAndCourseIdAndStudentCode(Long examId, Long courseId, String studentCode);
 }

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

@@ -793,10 +793,10 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
     }
 
     @Override
-    public BasicExamStudent findByExamIdAndCoursePaperIdAndStudentCode(Long examId, String coursePaperId, String studentCode) {
+    public BasicExamStudent findByExamIdAndCourseIdAndStudentCode(Long examId, Long courseId, String studentCode) {
         QueryWrapper<BasicExamStudent> queryWrapper = new QueryWrapper<>();
         queryWrapper.lambda().eq(BasicExamStudent::getExamId, examId)
-                .eq(BasicExamStudent::getCoursePaperId, coursePaperId)
+                .eq(BasicExamStudent::getCourseId, courseId)
                 .eq(BasicExamStudent::getStudentCode,studentCode);
         return this.getOne(queryWrapper);
     }

+ 3 - 3
distributed-print/src/main/java/com/qmth/distributed/print/api/mark/ScanStudentController.java

@@ -134,11 +134,11 @@ public class ScanStudentController extends BaseController {
         if(markStudent != null ){
             throw new ParameterException("考生已存在");
         }
-        BasicExamStudent basicExamStudent = basicExamStudentService.findByExamIdAndCoursePaperIdAndStudentCode(examId,coursePaperId,studentCode);
+        MarkPaper markPaper = markPaperService.getByExamIdAndCoursePaperId(examId, coursePaperId);
+        BasicExamStudent basicExamStudent = basicExamStudentService.findByExamIdAndCourseIdAndStudentCode(examId,markPaper.getCourseId(),studentCode);
         if(basicExamStudent != null ){
             throw new ParameterException("基础考生已存在");
         }
-        MarkPaper markPaper = markPaperService.getByExamIdAndCoursePaperId(examId, coursePaperId);
         BasicExam basicExam = basicExamService.getById(examId);
         basicExamStudent = new BasicExamStudent();
         basicExamStudent.setId(SystemConstant.getDbUuid());
@@ -148,7 +148,7 @@ public class ScanStudentController extends BaseController {
         basicExamStudent.setCourseId(markPaper.getCourseId());
         basicExamStudent.setCourseCode(markPaper.getCourseCode());
         basicExamStudent.setCourseName(markPaper.getCourseName());
-        basicExamStudent.setCoursePaperId(coursePaperId);
+//        basicExamStudent.setCoursePaperId(coursePaperId);
         basicExamStudent.setPaperNumber(markPaper.getPaperNumber());
         basicExamStudent.setPaperType(paperType);
         basicExamStudent.setStudentCode(studentCode);

+ 3 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/ScanAnswerCardServiceImpl.java

@@ -390,8 +390,10 @@ public class ScanAnswerCardServiceImpl extends ServiceImpl<ScanAnswerCardMapper,
         card.setRemark(old.getRemark());
         card.setDpi(old.getDpi());
         card.setSource(CardSource.WEB);
+        card.setSerialNumber(old.getSerialNumber());
+        card.setCardId(old.getCardId());
         card.setNumber(findMaxCardNumberByExamId(examId) + 1);
-        card.setNeedAdapte(false);
+        card.setNeedAdapte(true);
         card.setMd5(old.getMd5());
         card.setUri(old.getUri());
         card.setRemark(remark);