浏览代码

联调改动

caozixuan 2 年之前
父节点
当前提交
4332cd6968

+ 96 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamCardDto.java

@@ -0,0 +1,96 @@
+package com.qmth.distributed.print.business.bean.dto;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.distributed.print.business.enums.CardStatusEnum;
+import com.qmth.distributed.print.business.enums.CardTypeEnum;
+import com.qmth.distributed.print.business.enums.MakeMethodEnum;
+import com.qmth.teachcloud.common.enums.CardCreateMethodEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * @Description: 题卡dto对象
+ * @Author: CaoZixuan
+ * @Date: 2022-09-01
+ */
+public class ExamCardDto implements Serializable {
+    @ApiModelProperty(value = "题卡id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long cardId;
+
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+    @ApiModelProperty(value = "题卡制作方式:SELECT-选择已有题卡,SELF-自助创建,CUST-客户制卡")
+    private MakeMethodEnum makeMethod;
+
+    @ApiModelProperty(value = "STAGE-暂存,SUBMIT-提交")
+    private CardStatusEnum status;
+
+    @ApiModelProperty(value = "题卡类型:GENERIC-通卡,CUSTOM-自定义")
+    private CardTypeEnum type;
+
+    @ApiModelProperty(value = "通卡创建方式(UPLOAD-上传,CUSTOMIZE-自定义)")
+    private CardCreateMethodEnum createMethod;
+
+    @ApiModelProperty(value = "试卷编号")
+    private String paperType;
+
+    public Long getCardId() {
+        return cardId;
+    }
+
+    public void setCardId(Long cardId) {
+        this.cardId = cardId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public MakeMethodEnum getMakeMethod() {
+        return makeMethod;
+    }
+
+    public void setMakeMethod(MakeMethodEnum makeMethod) {
+        this.makeMethod = makeMethod;
+    }
+
+    public CardStatusEnum getStatus() {
+        return status;
+    }
+
+    public void setStatus(CardStatusEnum status) {
+        this.status = status;
+    }
+
+    public CardTypeEnum getType() {
+        return type;
+    }
+
+    public void setType(CardTypeEnum type) {
+        this.type = type;
+    }
+
+    public CardCreateMethodEnum getCreateMethod() {
+        return createMethod;
+    }
+
+    public void setCreateMethod(CardCreateMethodEnum createMethod) {
+        this.createMethod = createMethod;
+    }
+
+    public String getPaperType() {
+        return paperType;
+    }
+
+    public void setPaperType(String paperType) {
+        this.paperType = paperType;
+    }
+}

+ 101 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamPaperInfoDto.java

@@ -0,0 +1,101 @@
+package com.qmth.distributed.print.business.bean.dto;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 考试试卷题卡信息对象
+ * @Author: CaoZixuan
+ * @Date: 2022-09-01
+ */
+public class ExamPaperInfoDto {
+
+    @ApiModelProperty("卷型")
+    private String name;
+
+    @ApiModelProperty("附件id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long attachmentId;
+
+    @ApiModelProperty("试卷文件名称")
+    private String filename;
+
+    @ApiModelProperty("试卷页数")
+    private Integer pages;
+
+    private Boolean canDelete;
+
+    private Boolean isExposed;
+
+    @ApiModelProperty("题卡主键")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long cardId;
+
+    @ApiModelProperty("原卷")
+    private Original original;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Long getAttachmentId() {
+        return attachmentId;
+    }
+
+    public void setAttachmentId(Long attachmentId) {
+        this.attachmentId = attachmentId;
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public void setFilename(String filename) {
+        this.filename = filename;
+    }
+
+    public Integer getPages() {
+        return pages;
+    }
+
+    public void setPages(Integer pages) {
+        this.pages = pages;
+    }
+
+    public Boolean getCanDelete() {
+        return canDelete;
+    }
+
+    public void setCanDelete(Boolean canDelete) {
+        this.canDelete = canDelete;
+    }
+
+    public Boolean getExposed() {
+        return isExposed;
+    }
+
+    public void setExposed(Boolean exposed) {
+        isExposed = exposed;
+    }
+
+    public Long getCardId() {
+        return cardId;
+    }
+
+    public void setCardId(Long cardId) {
+        this.cardId = cardId;
+    }
+
+    public Original getOriginal() {
+        return original;
+    }
+
+    public void setOriginal(Original original) {
+        this.original = original;
+    }
+}

+ 60 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/Original.java

@@ -0,0 +1,60 @@
+package com.qmth.distributed.print.business.bean.dto;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.qmth.teachcloud.common.enums.PageSizeEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 试卷转换前记录
+ * @Author: CaoZixuan
+ * @Date: 2022-09-01
+ */
+public class Original {
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty("原始卷附件id")
+    private Long id;
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    @ApiModelProperty("更新时间")
+    private Long updateTime;
+
+    @ApiModelProperty("页数")
+    private Integer pages;
+
+    @ApiModelProperty("试卷纸张类型")
+    private PageSizeEnum pageSize;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Long updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getPages() {
+        return pages;
+    }
+
+    public void setPages(Integer pages) {
+        this.pages = pages;
+    }
+
+    public PageSizeEnum getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(PageSizeEnum pageSize) {
+        this.pageSize = pageSize;
+    }
+}

+ 0 - 11
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ReviewSampleDto.java

@@ -11,9 +11,6 @@ public class ReviewSampleDto {
     @ApiModelProperty(value = "试卷副本信息")
     private String paperAttachmentIds;
 
-    @ApiModelProperty(value = "题卡副本信息")
-    private Long cardId;
-
     @ApiModelProperty(value = "审核副本信息")
     private String paperConfirmAttachmentIds;
 
@@ -25,14 +22,6 @@ public class ReviewSampleDto {
         this.paperAttachmentIds = paperAttachmentIds;
     }
 
-    public Long getCardId() {
-        return cardId;
-    }
-
-    public void setCardId(Long cardId) {
-        this.cardId = cardId;
-    }
-
     public String getPaperConfirmAttachmentIds() {
         return paperConfirmAttachmentIds;
     }

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

@@ -280,9 +280,12 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
 //        UpdateWrapper<ExamTaskDetail> updateWrapper = new UpdateWrapper<>();
 //        updateWrapper.lambda().set(ExamTaskDetail::getCardId, examCard.getId()).set(ExamTaskDetail::getMakeMethod, examCard.getMakeMethod().name()).eq(ExamTaskDetail::getExamTaskId, examTaskId);
 //        this.update(updateWrapper);
-        QueryWrapper<ExamTaskDetail> examTaskDetailQueryWrapper = new QueryWrapper<>();
-        examTaskDetailQueryWrapper.lambda().eq(ExamTaskDetail::getExamTaskId, Long.parseLong(examTaskId));
-        List<ExamTaskDetail> examTaskDetails = this.list(examTaskDetailQueryWrapper);
+        List<ExamTaskDetail> examTaskDetails = new ArrayList<>();
+        if (SystemConstant.strNotNull(examTaskId)){
+            QueryWrapper<ExamTaskDetail> examTaskDetailQueryWrapper = new QueryWrapper<>();
+            examTaskDetailQueryWrapper.lambda().eq(ExamTaskDetail::getExamTaskId, Long.parseLong(examTaskId));
+            examTaskDetails = this.list(examTaskDetailQueryWrapper);
+        }
         if (!CollectionUtils.isEmpty(examTaskDetails)) {
             for (ExamTaskDetail e : examTaskDetails) {
                 e.setMakeMethod(examCard.getMakeMethod().name());

+ 41 - 43
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -1871,51 +1871,49 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                     throw ExceptionResultEnum.ERROR.exception("缺少考试课程id");
                 }
                 TeachCourse teachCourse = teachCourseService.getOne(new QueryWrapper<TeachCourse>().lambda().eq(TeachCourse::getSchoolId, schoolId).eq(TeachCourse::getBasicCourseId, basicCourseId));
-                if (Objects.isNull(teachCourse)) {
-                    throw ExceptionResultEnum.ERROR.exception("未找到教学课程");
-                }
-
-                // 教学班对象
-                List<TeachStudent> teachStudentDatasource = teachStudentService.list(new QueryWrapper<TeachStudent>().lambda().eq(TeachStudent::getSchoolId, schoolId).eq(TeachStudent::getUserId, userId).eq(TeachStudent::getTeachCourseId, teachCourse.getId()));
-
-                // 教学班id集合
-                List<Long> teachClazzIdList = teachStudentDatasource.stream().map(TeachStudent::getTeachClazzId).distinct().collect(Collectors.toList());
-                for (Long teachClazzId : teachClazzIdList) {
-                    TeachClazz teachClazz = teachClazzService.getById(teachClazzId);
-                    if (Objects.isNull(teachClazz)) {
-                        throw ExceptionResultEnum.ERROR.exception("教学班数据异常");
-                    }
-                    List<TeachStudent> teachStudentList = teachStudentDatasource.stream().filter(e -> e.getTeachClazzId().equals(teachClazzId)).collect(Collectors.toList());
-
-                    // 获取学生信息数据
-                    List<StudentInfo> studentInfoList = teachStudentList.stream().flatMap(e -> {
-                        Long studentId = e.getStudentId();
-                        if (!SystemConstant.longNotNull(studentId)) {
-                            throw ExceptionResultEnum.ERROR.exception("教学学生数据异常");
-                        }
-                        BasicStudentResult basicStudentResult = basicStudentService.findById(studentId);
-                        if (Objects.isNull(basicStudentResult)) {
-                            throw ExceptionResultEnum.ERROR.exception("未找到对应的基础学生数据");
+                if (Objects.nonNull(teachCourse)) {
+                    // 教学班对象
+                    List<TeachStudent> teachStudentDatasource = teachStudentService.list(new QueryWrapper<TeachStudent>().lambda().eq(TeachStudent::getSchoolId, schoolId).eq(TeachStudent::getUserId, userId).eq(TeachStudent::getTeachCourseId, teachCourse.getId()));
+
+                    // 教学班id集合
+                    List<Long> teachClazzIdList = teachStudentDatasource.stream().map(TeachStudent::getTeachClazzId).distinct().collect(Collectors.toList());
+                    for (Long teachClazzId : teachClazzIdList) {
+                        TeachClazz teachClazz = teachClazzService.getById(teachClazzId);
+                        if (Objects.isNull(teachClazz)) {
+                            throw ExceptionResultEnum.ERROR.exception("教学班数据异常");
                         }
-                        StudentInfo studentInfo = new StudentInfo();
-                        studentInfo.setStudentId(studentId);
-                        studentInfo.setStudentCode(basicStudentResult.getStudentCode());
-                        studentInfo.setStudentName(basicStudentResult.getStudentName());
-                        studentInfo.setCollegeName(basicStudentResult.getCollegeName());
-                        studentInfo.setMajorName(basicStudentResult.getMajorName());
-                        studentInfo.setTeachClazzId(teachClazzId);
-                        studentInfo.setTeachClazzName(teachClazz.getTeachClazzName());
-                        studentInfo.setBasicClazzId(basicStudentResult.getClazzId());
-                        studentInfo.setBasicClazzName(basicStudentResult.getClazz());
-                        return Stream.of(studentInfo);
-                    }).collect(Collectors.toList());
+                        List<TeachStudent> teachStudentList = teachStudentDatasource.stream().filter(e -> e.getTeachClazzId().equals(teachClazzId)).collect(Collectors.toList());
 
-                    ExamTaskStudentObjectResult examTaskStudentObjectResult = new ExamTaskStudentObjectResult();
-                    examTaskStudentObjectResult.setClazzId(teachClazzId);
-                    examTaskStudentObjectResult.setClazzName(teachClazz.getTeachClazzName());
-                    examTaskStudentObjectResult.setStudentInfoList(studentInfoList);
-                    examTaskStudentObjectResult.setStudentClazzType(examObjectType.getStudentClazzType());
-                    result.add(examTaskStudentObjectResult);
+                        // 获取学生信息数据
+                        List<StudentInfo> studentInfoList = teachStudentList.stream().flatMap(e -> {
+                            Long studentId = e.getStudentId();
+                            if (!SystemConstant.longNotNull(studentId)) {
+                                throw ExceptionResultEnum.ERROR.exception("教学学生数据异常");
+                            }
+                            BasicStudentResult basicStudentResult = basicStudentService.findById(studentId);
+                            if (Objects.isNull(basicStudentResult)) {
+                                throw ExceptionResultEnum.ERROR.exception("未找到对应的基础学生数据");
+                            }
+                            StudentInfo studentInfo = new StudentInfo();
+                            studentInfo.setStudentId(studentId);
+                            studentInfo.setStudentCode(basicStudentResult.getStudentCode());
+                            studentInfo.setStudentName(basicStudentResult.getStudentName());
+                            studentInfo.setCollegeName(basicStudentResult.getCollegeName());
+                            studentInfo.setMajorName(basicStudentResult.getMajorName());
+                            studentInfo.setTeachClazzId(teachClazzId);
+                            studentInfo.setTeachClazzName(teachClazz.getTeachClazzName());
+                            studentInfo.setBasicClazzId(basicStudentResult.getClazzId());
+                            studentInfo.setBasicClazzName(basicStudentResult.getClazz());
+                            return Stream.of(studentInfo);
+                        }).collect(Collectors.toList());
+
+                        ExamTaskStudentObjectResult examTaskStudentObjectResult = new ExamTaskStudentObjectResult();
+                        examTaskStudentObjectResult.setClazzId(teachClazzId);
+                        examTaskStudentObjectResult.setClazzName(teachClazz.getTeachClazzName());
+                        examTaskStudentObjectResult.setStudentInfoList(studentInfoList);
+                        examTaskStudentObjectResult.setStudentClazzType(examObjectType.getStudentClazzType());
+                        result.add(examTaskStudentObjectResult);
+                    }
                 }
                 break;
             case BASIC_CLAZZ_STUDENT:

+ 64 - 45
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -1008,25 +1008,29 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             }
             String examTaskSign = examTask.getCourseName() + "-" + examTask.getPaperNumber();
             String firstPath = zipLocalRootPath + File.separator + examTaskSign;
-//            List<ExamTaskDetail> examTaskDetailList = examTaskDetailService.list(new QueryWrapper<ExamTaskDetail>().lambda().eq(ExamTaskDetail::getExamTaskId, id));
-//            if (examTaskDetailList.size() != 1) {
-//                throw ExceptionResultEnum.ERROR.exception("获取命题任务详情失败");
-//            }
-//            ExamTaskDetail examTaskDetail = examTaskDetailList.get(0);
             ReviewSampleDto reviewSampleDto = examTaskService.findReviewSampleInfoByExamTaskId(id);
 
 
-            // 处理试卷样品
-            List<Map> paperInfo = JSONObject.parseArray(reviewSampleDto.getPaperAttachmentIds(), Map.class);
-            if (Objects.isNull(paperInfo)) {
+            // 收集处理试卷和题卡
+            List<ExamPaperInfoDto> paperInfoDtoList = JSONObject.parseArray(reviewSampleDto.getPaperAttachmentIds(), ExamPaperInfoDto.class);
+            if (Objects.isNull(paperInfoDtoList)) {
                 throw ExceptionResultEnum.ERROR.exception("试卷信息不存在");
             }
             Set<Long> attPaperIds = new HashSet<>();
-            for (Map paperMap : paperInfo) {
-                if (Objects.nonNull(paperMap.get("attachmentId")) && String.valueOf(paperMap.get("attachmentId")).length() > 0 && !String.valueOf(paperMap.get("attachmentId")).equals("null")) {
-                    Long attachmentId = Long.valueOf(String.valueOf(paperMap.get("attachmentId")));
+            List<ExamCardDto> examCardDtoList = new ArrayList<>();
+            for (ExamPaperInfoDto paperInfo : paperInfoDtoList) {
+                Long attachmentId = paperInfo.getAttachmentId();
+                Long cardId = paperInfo.getCardId();
+                String paperType = paperInfo.getName();
+                if (SystemConstant.longNotNull(attachmentId)){
                     attPaperIds.add(attachmentId);
                 }
+                if (SystemConstant.longNotNull(cardId)){
+                    ExamCardDto examCardDto = new ExamCardDto();
+                    examCardDto.setCardId(cardId);
+                    examCardDto.setPaperType(paperType);
+                    examCardDtoList.add(examCardDto);
+                }
             }
             if (attPaperIds.size() > 0) {
                 List<BasicAttachment> paperAttachmentList = basicAttachmentService.listByIds(attPaperIds);
@@ -1069,44 +1073,59 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             }
 
             // 处理题卡
-            Long cardId = reviewSampleDto.getCardId();
-            ExamCard examCard = examCardService.getById(cardId);
-            if (Objects.isNull(examCard)) {
-                throw ExceptionResultEnum.ERROR.exception("找不到答题卡");
-            }
-            MakeMethodEnum makeMethodEnum = examCard.getMakeMethod();
-            if (MakeMethodEnum.SELECT.equals(makeMethodEnum) && CardCreateMethodEnum.UPLOAD.equals(examCard.getCreateMethod())) {
-                Long attachmentId = examCard.getAttachmentId();
-                if (attachmentId == null || attachmentId == 0) {
-                    throw ExceptionResultEnum.ERROR.exception("找不到模板对应的附件");
-                }
-                BasicAttachment cardAttachment = basicAttachmentService.getById(attachmentId);
-                if (Objects.isNull(cardAttachment)) {
-                    throw ExceptionResultEnum.ERROR.exception("找不到附件");
+            for (ExamCardDto examCardDto : examCardDtoList) {
+
+                Long cardId = examCardDto.getCardId();
+                String paperType = examCardDto.getPaperType();
+                ExamCard examCard = examCardService.getById(cardId);
+                if (Objects.isNull(examCard)) {
+                    throw ExceptionResultEnum.ERROR.exception("找不到答题卡");
                 }
-                JSONObject jsonObject = JSONObject.parseObject(cardAttachment.getPath());
-                String cardPath = firstPath + File.separator + "题卡" + File.separator + cardAttachment.getName() + cardAttachment.getType();
-                UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
+                MakeMethodEnum makeMethodEnum = examCard.getMakeMethod();
+                if (MakeMethodEnum.SELECT.equals(makeMethodEnum) && CardCreateMethodEnum.UPLOAD.equals(examCard.getCreateMethod())) {
+                    Long attachmentId = examCard.getAttachmentId();
+                    if (attachmentId == null || attachmentId == 0) {
+                        throw ExceptionResultEnum.ERROR.exception("找不到模板对应的附件");
+                    }
+                    BasicAttachment cardAttachment = basicAttachmentService.getById(attachmentId);
+                    if (Objects.isNull(cardAttachment)) {
+                        throw ExceptionResultEnum.ERROR.exception("找不到附件");
+                    }
+                    JSONObject jsonObject = JSONObject.parseObject(cardAttachment.getPath());
+                    // 题卡路径
+                    String cardPath = firstPath + File.separator + "题卡" + File.separator + cardAttachment.getName() + cardAttachment.getType();
+                    if (SystemConstant.strNotNull(paperType)){
+                        cardPath = cardPath + "(" + paperType + ")";
+                    }
+                    UploadFileEnum uploadFileEnum = UploadFileEnum.valueOf((String) jsonObject.get(SystemConstant.UPLOAD_TYPE));
 
-                if (oss) {
-                    fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), cardPath, uploadFileEnum.getFssType());
+                    if (oss) {
+                        fileStoreUtil.ossDownload((String) jsonObject.get(SystemConstant.PATH), cardPath, uploadFileEnum.getFssType());
+                    } else {
+                        FileUtil.copyFile(jsonObject.getString(SystemConstant.PATH), cardPath);
+                    }
                 } else {
-                    FileUtil.copyFile(jsonObject.getString(SystemConstant.PATH), cardPath);
-                }
-            } else {
-                List<ExamCardDetail> examCardDetailList = examCardDetailService.list(new QueryWrapper<ExamCardDetail>().lambda().eq(ExamCardDetail::getCardId, cardId));
-                if (examCardDetailList.size() != 1) {
-                    throw ExceptionResultEnum.ERROR.exception("题卡明细信息异常");
-                }
-                ExamCardDetail examCardDetail = examCardDetailService.getByCardId(cardId);
-                String htmlContent = examCardDetail.getHtmlContent();
-                byte[] bytes = htmlContent.getBytes();
-                String cardPath = firstPath + File.separator + "题卡" + File.separator + examCard.getTitle() + SystemConstant.HTML_PREFIX;
-                File localFile = new File(cardPath);
-                if (!localFile.getParentFile().exists()) {
-                    localFile.getParentFile().mkdirs();
+                    List<ExamCardDetail> examCardDetailList = examCardDetailService.list(new QueryWrapper<ExamCardDetail>().lambda().eq(ExamCardDetail::getCardId, cardId));
+                    if (examCardDetailList.size() != 1) {
+                        throw ExceptionResultEnum.ERROR.exception("题卡明细信息异常");
+                    }
+                    ExamCardDetail examCardDetail = examCardDetailService.getByCardId(cardId);
+                    String htmlContent = examCardDetail.getHtmlContent();
+                    byte[] bytes = htmlContent.getBytes();
+
+                    // 题卡路径
+                    String cardPath = firstPath + File.separator + "题卡" + File.separator + examCard.getTitle();
+                    if (SystemConstant.strNotNull(paperType)){
+                        cardPath = cardPath + "(" + paperType + ")";
+                    }
+                    cardPath = cardPath + SystemConstant.HTML_PREFIX;
+
+                    File localFile = new File(cardPath);
+                    if (!localFile.getParentFile().exists()) {
+                        localFile.getParentFile().mkdirs();
+                    }
+                    FileCopyUtils.copy(bytes, localFile);
                 }
-                FileCopyUtils.copy(bytes, localFile);
             }
             count++;
         }

+ 2 - 2
distributed-print-business/src/main/resources/mapper/ExamCardMapper.xml

@@ -102,9 +102,9 @@
             c.paper_type paperType
         FROM
             exam_card a
-                left JOIN
+                LEFT JOIN
             exam_card_detail b ON a.id = b.card_id
-                JOIN
+                LEFT JOIN
             exam_task_detail c ON FIND_IN_SET(a.id, REPLACE(substring_index(substring_index(CONVERT((c.paper_attachment_ids ->>'$[*].cardId')
                                                                                                     USING utf8), ']', 1), '[',-1),'"',''))
         where a.id = #{cardId}

+ 0 - 2
distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml

@@ -718,8 +718,6 @@
         SELECT
             IFNULL(log.paper_attachment_ids,
                    det.paper_attachment_ids) AS paperAttachmentIds,
-            IFNULL(log.card_id, REPLACE(substring_index(substring_index(CONVERT((det.paper_attachment_ids ->>'$[*].cardId')
-                                                                                USING utf8), ']', 1), '[',-1)) AS cardId,
             det.paper_confirm_attachment_ids AS paperConfirmAttachmentIds
         FROM
             exam_task_detail det