xiaofei 1 рік тому
батько
коміт
af5cb72bbc

+ 11 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/BasicExamStudentParam.java

@@ -90,6 +90,9 @@ public class BasicExamStudentParam {
     @ApiModelProperty("扩展字段")
     private String extendFields;
 
+    @ApiModelProperty("卷型")
+    private String paperType;
+
     public Long getId() {
         return id;
     }
@@ -241,4 +244,12 @@ public class BasicExamStudentParam {
     public void setExtendFields(String extendFields) {
         this.extendFields = extendFields;
     }
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
 }

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

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.distributed.print.business.bean.BasicExamStudentQuery;
 import com.qmth.distributed.print.business.bean.params.BasicExamStudentParam;
 import com.qmth.distributed.print.business.bean.result.BasicExamStudentResult;
+import com.qmth.distributed.print.business.entity.ExamStudent;
 import com.qmth.teachcloud.common.entity.BasicExam;
 import com.qmth.teachcloud.common.entity.BasicExamStudent;
 import com.qmth.teachcloud.common.entity.SysUser;
@@ -100,4 +101,6 @@ public interface BasicExamStudentService extends IService<BasicExamStudent> {
     boolean updateStatus(Long id, BasicExamStudentStatusEnum status);
 
     void updateTeacherIdById(List<BasicExamStudent> basicExamStudentList);
+
+    void updatePaperNumberAndPaperTypeById(List<ExamStudent> examStudentList);
 }

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

@@ -12,6 +12,7 @@ import com.qmth.distributed.print.business.bean.params.BasicExamStudentParam;
 import com.qmth.distributed.print.business.bean.params.TeachCourseSelectParam;
 import com.qmth.distributed.print.business.bean.result.BasicExamStudentResult;
 import com.qmth.distributed.print.business.entity.BasicExamRule;
+import com.qmth.distributed.print.business.entity.ExamStudent;
 import com.qmth.distributed.print.business.enums.RequiredFieldsEnum;
 import com.qmth.distributed.print.business.mapper.BasicExamStudentMapper;
 import com.qmth.distributed.print.business.service.*;
@@ -412,4 +413,14 @@ public class BasicExamStudentServiceImpl extends ServiceImpl<BasicExamStudentMap
                     .eq(BasicExamStudent::getId, basicExamStudent.getId()));
         }
     }
+
+    @Override
+    public void updatePaperNumberAndPaperTypeById(List<ExamStudent> examStudentList) {
+        for (ExamStudent examStudent : examStudentList) {
+            this.update(new UpdateWrapper<BasicExamStudent>().lambda()
+                    .set(BasicExamStudent::getPaperNumber, examStudent.getPaperNumber())
+                    .set(BasicExamStudent::getPaperType, examStudent.getPaperType())
+                    .eq(BasicExamStudent::getId, examStudent.getBasicStudentId()));
+        }
+    }
 }

+ 5 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/PdfTaskLogicServiceImpl.java

@@ -78,6 +78,8 @@ public class PdfTaskLogicServiceImpl implements PdfTaskLogicService {
     @Resource
     ExamTaskAssignPaperTypeService examTaskAssignPaperTypeService;
     @Resource
+    private BasicExamStudentService basicExamStudentService;
+    @Resource
     private FileUploadService fileUploadService;
 
     @Override
@@ -219,6 +221,9 @@ public class PdfTaskLogicServiceImpl implements PdfTaskLogicService {
             examDetailCourseService.updateById(examDetailCourse);
 
             examStudentService.updateBatchById(examStudentList);
+
+            // 更新考生管理表中试卷编号和卷型
+            basicExamStudentService.updatePaperNumberAndPaperTypeById(examStudentList);
         }
     }
 

+ 2 - 0
distributed-print/install/mysql/upgrade/3.4.0.sql

@@ -158,6 +158,8 @@ INSERT INTO `sys_privilege` (`id`, `name`, `url`, `type`, `parent_id`, `sequence
 
 UPDATE `sys_privilege` SET `related` = '490,543,955,959,1139' WHERE (`id` = '488');
 
+ALTER TABLE `basic_exam_student` ADD COLUMN `paper_type` VARCHAR(10) NULL COMMENT '卷型' AFTER `paper_number`;
+
 -- drop table if exists exam_detail_course_paper_type;
 -- drop table if exists basic_template_org;
 -- drop table if exists cloud_user_push_status;

+ 11 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/entity/BasicExamStudent.java

@@ -59,6 +59,9 @@ public class BasicExamStudent extends BaseEntity {
     @ApiModelProperty(value = "试卷编号")
     @TableField(updateStrategy = FieldStrategy.IGNORED)
     private String paperNumber;
+    @ApiModelProperty(value = "卷型")
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
+    private String paperType;
 
     @ApiModelProperty(value = "姓名")
     private String studentName;
@@ -174,6 +177,14 @@ public class BasicExamStudent extends BaseEntity {
         this.paperNumber = paperNumber;
     }
 
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+
     public String getStudentName() {
         return studentName;
     }