瀏覽代碼

3.2.5 增加题卡类型

xiaofei 2 年之前
父節點
當前提交
f7f57888f5
共有 17 個文件被更改,包括 107 次插入40 次删除
  1. 19 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExaminationExportDto.java
  2. 10 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/SyncExamTaskDto.java
  3. 11 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ExaminationResult.java
  4. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/enums/SyncCardTypeEnum.java
  5. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamDetailCourseMapper.java
  6. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamDetailCourseService.java
  7. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamPrintPlanService.java
  8. 2 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskDetailService.java
  9. 7 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailCourseServiceImpl.java
  10. 26 5
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java
  11. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPrintPlanServiceImpl.java
  12. 6 0
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskDetailServiceImpl.java
  13. 9 9
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePrintPdfUtil.java
  14. 2 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfFillUtils.java
  15. 7 1
      distributed-print-business/src/main/resources/mapper/ExamDetailCourseMapper.xml
  16. 2 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/BasicTemplateController.java
  17. 1 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanSyncController.java

+ 19 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExaminationExportDto.java

@@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty;
 public class ExaminationExportDto {
     @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "序号")
-    @ExcelProperty(name = "序号", width = 30, index = 1)
+    @ExcelProperty(name = "序号", width = 7, index = 1)
     private Long index;
 
     @ApiModelProperty(value = "学期名称")
@@ -29,23 +29,23 @@ public class ExaminationExportDto {
     private String printPlanName;
 
     @ApiModelProperty(value = "考试日期")
-    @ExcelProperty(name = "考试日期", width = 30, index = 5)
+    @ExcelProperty(name = "考试日期", width = 13, index = 5)
     private String examDate;
 
     @ApiModelProperty(value = "考试时间")
-    @ExcelProperty(name = "考试时间", width = 30, index = 6)
+    @ExcelProperty(name = "考试时间", width = 16, index = 6)
     private String examTime;
 
     @ApiModelProperty(value = "考点")
-    @ExcelProperty(name = "考点", width = 30, index = 7)
+    @ExcelProperty(name = "考点", width = 25, index = 7)
     private String examPlace;
 
     @ApiModelProperty(value = "考场")
-    @ExcelProperty(name = "考场", width = 30, index = 8)
+    @ExcelProperty(name = "考场", width = 25, index = 8)
     private String examRoom;
 
     @ApiModelProperty(value = "卷袋号")
-    @ExcelProperty(name = "卷袋号", width = 30, index = 9)
+    @ExcelProperty(name = "卷袋号", width = 10, index = 9)
     private String packageCode;
 
     @ApiModelProperty(value = "课程(代码)")
@@ -57,9 +57,13 @@ public class ExaminationExportDto {
     private String paperNumber;
 
     @ApiModelProperty(value = "科次")
-    @ExcelProperty(name = "科次", width = 30, index = 12)
+    @ExcelProperty(name = "科次", width = 10, index = 12)
     private int totalSubjects;
 
+    @ApiModelProperty(value = "题卡类型")
+    @ExcelProperty(name = "题卡类型", width = 17, index = 13)
+    private String cardType;
+
     public Long getIndex() {
         return index;
     }
@@ -155,4 +159,12 @@ public class ExaminationExportDto {
     public void setTotalSubjects(int totalSubjects) {
         this.totalSubjects = totalSubjects;
     }
+
+    public String getCardType() {
+        return cardType;
+    }
+
+    public void setCardType(String cardType) {
+        this.cardType = cardType;
+    }
 }

+ 10 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/SyncExamTaskDto.java

@@ -39,6 +39,8 @@ public class SyncExamTaskDto {
     private String collegeCode;
     private String collegeName;
 
+    private String paperAttachmentIds;
+
     public String getExamTaskId() {
         return examTaskId;
     }
@@ -222,4 +224,12 @@ public class SyncExamTaskDto {
     public void setCollegeName(String collegeName) {
         this.collegeName = collegeName;
     }
+
+    public String getPaperAttachmentIds() {
+        return paperAttachmentIds;
+    }
+
+    public void setPaperAttachmentIds(String paperAttachmentIds) {
+        this.paperAttachmentIds = paperAttachmentIds;
+    }
 }

+ 11 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/ExaminationResult.java

@@ -79,6 +79,9 @@ public class ExaminationResult {
     @ApiModelProperty(value = "考试时间")
     private String examTime;
 
+    @ApiModelProperty(value = "题卡类型")
+    private String cardType;
+
     public Long getId() {
         return id;
     }
@@ -246,4 +249,12 @@ public class ExaminationResult {
     public void setExamTime(String examTime) {
         this.examTime = examTime;
     }
+
+    public String getCardType() {
+        return cardType;
+    }
+
+    public void setCardType(String cardType) {
+        this.cardType = cardType;
+    }
 }

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/enums/SyncCardTypeEnum.java

@@ -10,7 +10,7 @@ import java.util.List;
  */
 public enum SyncCardTypeEnum {
 
-    GENERIC("通用题卡"),
+    GENERIC("通卡"),
     CUSTOM("电子题卡");
 
     SyncCardTypeEnum(String desc) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamDetailCourseMapper.java

@@ -40,5 +40,5 @@ public interface ExamDetailCourseMapper extends BaseMapper<ExamDetailCourse> {
 
     List<ExamDetailCourseDto> listByPrintPlanIdAndExamTaskId(@Param("printPlanIds") List<Long> printPlanIds, @Param("examTaskId") Long examTaskId, @Param("paperType") String paperType);
 
-    IPage<SyncExamTaskDto> listSyncCourseByPrintPlanId(@Param("ipage") Page<SyncExamTaskDto> ipage, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("roomOrgIds") Set<Long> roomOrgIds, @Param("orgIds") Set<Long> orgIds, @Param("cardType") SyncCardTypeEnum cardType, @Param("syncStatus") ExamTaskSyncStatusEnum syncStatus, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
+    IPage<SyncExamTaskDto> listSyncCourseByPrintPlanId(@Param("ipage") Page<SyncExamTaskDto> ipage, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("roomOrgIds") Set<Long> roomOrgIds, @Param("orgIds") Set<Long> orgIds, @Param("cardType") String cardType, @Param("syncStatus") ExamTaskSyncStatusEnum syncStatus, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
 }

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

@@ -37,7 +37,7 @@ public interface ExamDetailCourseService extends IService<ExamDetailCourse> {
 
     List<ExamDetailCourse> listByCourseCodeAndPaperNumber(Long schoolId, Long examId, String courseCode, String paperNumber);
 
-    IPage<SyncExamTaskDto> listSyncCourseByPrintPlanId(Long semesterId, Long examId, Long orgId, SyncCardTypeEnum cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
+    IPage<SyncExamTaskDto> listSyncCourseByPrintPlanId(Long semesterId, Long examId, Long orgId, String cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
 
     List<ExamDetailCourseDto> listByPrintPlanIdAndExamTaskId(List<Long> printPlanIds, Long examTaskId, String paperType);
 }

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

@@ -114,7 +114,7 @@ public interface ExamPrintPlanService extends IService<ExamPrintPlan> {
 
     List<ExamPrintPlan> listBySchoolId(Long schoolId);
 
-    IPage<SyncExamTaskDto> listSyncExamTask(Long semesterId, Long examId, Long orgId, SyncCardTypeEnum cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
+    IPage<SyncExamTaskDto> listSyncExamTask(Long semesterId, Long examId, Long orgId, String cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
 
     void checkSyncMode(SyncDataParam syncDataParam);
 

+ 2 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskDetailService.java

@@ -58,4 +58,6 @@ public interface ExamTaskDetailService extends IService<ExamTaskDetail> {
     ExamTaskDetailPdfDownloadDto findPdfDownload(Long examTaskId);
 
     List<String> listRelateCommonTypes(Long semesterId, Long examId, String relateType, List<Long> idList, String courseCode, String paperNumber, String userName, Long cardRuleId);
+
+    ExamTaskDetail findByExamIdAndCourseCodeAndPaperNumber(Long schoolId, Long examId, String code, String number);
 }

+ 7 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailCourseServiceImpl.java

@@ -26,6 +26,7 @@ import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.service.SysOrgService;
 import com.qmth.teachcloud.common.service.TeachcloudCommonService;
 import com.qmth.teachcloud.common.util.ServletUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -95,7 +96,7 @@ public class ExamDetailCourseServiceImpl extends ServiceImpl<ExamDetailCourseMap
     }
 
     @Override
-    public IPage<SyncExamTaskDto> listSyncCourseByPrintPlanId(Long semesterId, Long examId, Long orgId, SyncCardTypeEnum cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
+    public IPage<SyncExamTaskDto> listSyncCourseByPrintPlanId(Long semesterId, Long examId, Long orgId, String cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         Page<SyncExamTaskDto> ipage = new Page<>(pageNumber, pageSize);
         // 顶级机构
@@ -110,16 +111,13 @@ public class ExamDetailCourseServiceImpl extends ServiceImpl<ExamDetailCourseMap
         for (SyncExamTaskDto examTaskDto : examTaskDtos.getRecords()) {
             String paperType = examTaskDto.getPaperType();
             List<String> paperTypes = Arrays.asList(paperType.split(","));
-            ExamTaskDetail examTaskDetail = examTaskDetailService.getByExamTaskId(Long.valueOf(examTaskDto.getExamTaskId()));
-            List<JSONObject> paperAttachments = JSON.parseArray(examTaskDetail.getPaperAttachmentIds(), JSONObject.class);
-            List<Long> cardIds = paperAttachments.stream().filter(m -> paperTypes.contains(m.getString("name"))).map(m -> m.getLong("cardId")).collect(Collectors.toList());
-            QueryWrapper<ExamCard> queryWrapper = new QueryWrapper<>();
-            queryWrapper.lambda().in(ExamCard::getId, cardIds);
+            List<JSONObject> paperAttachments = JSON.parseArray(examTaskDto.getPaperAttachmentIds(), JSONObject.class).stream().filter(m -> paperTypes.contains(m.getString("name"))).collect(Collectors.toList());
 
-            List<ExamCard> cardList = examCardService.list(queryWrapper);
             Set<String> stringSet = new HashSet<>();
-            for (ExamCard examCard : cardList) {
-                if (examCard.getType().equals(CardTypeEnum.GENERIC) && examCard.getCreateMethod().equals(CardCreateMethodEnum.UPLOAD)) {
+            for (JSONObject jsonObject : paperAttachments) {
+                String cardTypeString = jsonObject.getString("cardType");
+                String createMethod = jsonObject.getString("createMethod");
+                if (cardTypeString.equals(CardTypeEnum.GENERIC.name()) && StringUtils.isNotBlank(createMethod) && createMethod.equals(CardCreateMethodEnum.UPLOAD.name())) {
                     stringSet.add(SyncCardTypeEnum.GENERIC.getDesc());
                 } else {
                     stringSet.add(SyncCardTypeEnum.CUSTOM.getDesc());

+ 26 - 5
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java

@@ -16,10 +16,7 @@ import com.qmth.distributed.print.business.bean.result.ExaminationDetailResult;
 import com.qmth.distributed.print.business.bean.result.ExaminationResult;
 import com.qmth.distributed.print.business.bean.result.SummarizedDataResult;
 import com.qmth.distributed.print.business.entity.*;
-import com.qmth.distributed.print.business.enums.ExamDataSourceEnum;
-import com.qmth.distributed.print.business.enums.ExamDetailStatusEnum;
-import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
-import com.qmth.distributed.print.business.enums.StudentClazzEnum;
+import com.qmth.distributed.print.business.enums.*;
 import com.qmth.distributed.print.business.mapper.ExamDetailMapper;
 import com.qmth.distributed.print.business.service.*;
 import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
@@ -113,6 +110,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
     @Resource
     ExamTaskService examTaskService;
 
+    @Resource
+    ExamTaskDetailService examTaskDetailService;
+
     @Resource
     RedisUtil redisUtil;
 
@@ -236,7 +236,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 //        if (requiredFieldsList.stream().anyMatch(e -> !e.getEnable())) {
 //            throw ExceptionResultEnum.ERROR.exception("该学校考务字段设置存在必选字段禁用的情况");
 //        }
-        requiredFieldsList = requiredFieldsList.stream().filter(m->m.getEnable()).collect(Collectors.toList());
+        requiredFieldsList = requiredFieldsList.stream().filter(m -> m.getEnable()).collect(Collectors.toList());
         for (FieldsDto fieldsDto : requiredFieldsList) {
             fieldsDto.setLevel("primary");
         }
@@ -313,6 +313,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
 
             String courseNameCodeStr = "";
             String paperNumberStr = "";
+            Set<String> cardTypeSet = new HashSet<>();
             for (String examDetailCourseId : arr) {
                 ExamDetailCourse examDetailCourse = examDetailCourseService.getById(examDetailCourseId);
                 String code = examDetailCourse.getCourseCode();
@@ -320,12 +321,31 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
                 String number = examDetailCourse.getPaperNumber();
                 courseNameCodeStr = courseNameCodeStr + name + "(" + code + ")" + SystemConstant.PAUSE_SIGN;
                 paperNumberStr = paperNumberStr + number + SystemConstant.PAUSE_SIGN;
+
+                if (StringUtils.isNotBlank(examDetailCourse.getPaperType())) {
+                    List<String> paperTypes = Arrays.asList(examDetailCourse.getPaperType().split(","));
+                    ExamTaskDetail examTaskDetail = examTaskDetailService.findByExamIdAndCourseCodeAndPaperNumber(schoolId, examinationResult.getExamId(), code, number);
+                    List<JSONObject> paperAttachments = JSON.parseArray(examTaskDetail.getPaperAttachmentIds(), JSONObject.class).stream().filter(m -> paperTypes.contains(m.getString("name"))).collect(Collectors.toList());
+                    for (JSONObject jsonObject : paperAttachments) {
+                        String cardTypeString = jsonObject.getString("cardType");
+                        String createMethod = jsonObject.getString("createMethod");
+                        if (cardTypeString.equals(CardTypeEnum.GENERIC.name()) && StringUtils.isNotBlank(createMethod) && createMethod.equals(CardCreateMethodEnum.UPLOAD.name())) {
+                            cardTypeSet.add(SyncCardTypeEnum.GENERIC.getDesc());
+                        } else {
+                            cardTypeSet.add(SyncCardTypeEnum.CUSTOM.getDesc());
+                        }
+                    }
+                }
             }
             courseNameCodeStr = courseNameCodeStr.substring(0, courseNameCodeStr.length() - SystemConstant.PAUSE_SIGN.length());
             paperNumberStr = paperNumberStr.substring(0, paperNumberStr.length() - SystemConstant.PAUSE_SIGN.length());
             examinationResult.setCourseNameCode(courseNameCodeStr);
             examinationResult.setPaperNumber(paperNumberStr);
 
+            if (cardTypeSet.size() > 0) {
+                examinationResult.setCardType(String.join(SystemConstant.PAUSE_SIGN, cardTypeSet));
+            }
+
             // 处理时间
             Long startTime = examinationResult.getExamStartTime();
             Long endTime = examinationResult.getExamEndTime();
@@ -894,6 +914,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
             examinationExportDto.setCourseNameCode(examinationResult.getCourseNameCode());
             examinationExportDto.setPaperNumber(examinationResult.getPaperNumber());
             examinationExportDto.setTotalSubjects(examinationResult.getTotalSubjects());
+            examinationExportDto.setCardType(examinationResult.getCardType());
             examinationExportDtoList.add(examinationExportDto);
         }
         return examinationExportDtoList;

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

@@ -512,7 +512,7 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
     }
 
     @Override
-    public IPage<SyncExamTaskDto> listSyncExamTask(Long semesterId, Long examId, Long orgId, SyncCardTypeEnum cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
+    public IPage<SyncExamTaskDto> listSyncExamTask(Long semesterId, Long examId, Long orgId, String cardType, ExamTaskSyncStatusEnum syncStatus, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
         return examDetailCourseService.listSyncCourseByPrintPlanId(semesterId, examId, orgId, cardType, syncStatus, courseCode, paperNumber, startTime, endTime, pageNumber, pageSize);
     }
 

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

@@ -543,6 +543,12 @@ public class ExamTaskDetailServiceImpl extends ServiceImpl<ExamTaskDetailMapper,
         return commonPaperTypes;
     }
 
+    @Override
+    public ExamTaskDetail findByExamIdAndCourseCodeAndPaperNumber(Long schoolId, Long examId, String code, String number) {
+        ExamTask examTask = examTaskService.getByCourseCodeAndPaperNumber(schoolId, examId, code, number);
+        return this.getByExamTaskId(examTask.getId());
+    }
+
     /**
      * 卷库校验
      *

+ 9 - 9
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePrintPdfUtil.java

@@ -131,10 +131,10 @@ public class CreatePrintPdfUtil {
         PdfPTable basicTable = PdfFillUtils.createTable(6);
         List<Map<String, String>> basicPlate = pdfFillDto.getBasicPlate();
         for (Map<String, String> stringMap : basicPlate) {
-            basicTable.addCell(PdfFillUtils.createCell(stringMap.get("name") + ":" + stringMap.get("value"), PdfFillUtils.textFont9, null, 0f, Element.ALIGN_LEFT, 0, 1, 3));
+            basicTable.addCell(PdfFillUtils.createCell(stringMap.get("name") + ":" + stringMap.get("value"), PdfFillUtils.textFont11, null, 22f, Element.ALIGN_LEFT, 0, 1, 3));
         }
         if (basicPlate.size() % 2 > 0) {
-            basicTable.addCell(PdfFillUtils.createCell(" ", PdfFillUtils.textFont9, null, 16f, Element.ALIGN_LEFT, 0, 1, 3));
+            basicTable.addCell(PdfFillUtils.createCell(" ", PdfFillUtils.textFont11, null, 22f, Element.ALIGN_LEFT, 0, 1, 3));
         }
         document.add(basicTable);
 
@@ -159,7 +159,7 @@ public class CreatePrintPdfUtil {
                     if ("座位号".equals(value)) {
                         value = "座号";
                     }
-                    studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont9, BaseColor.LIGHT_GRAY, 16f, Element.ALIGN_CENTER, 0, 1, 1));
+                    studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont11, BaseColor.LIGHT_GRAY, 22f, Element.ALIGN_CENTER, 0, 1, 1));
                     j++;
                 }
             }
@@ -173,19 +173,19 @@ public class CreatePrintPdfUtil {
                 Map<String, String> stringMap1 = studentPlate.get(2 * i);
                 for (int j = 0; j < stringMap1.size(); j++) {
                     String value = stringMap1.get(headKeys[j]);
-                    studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, 0, Element.ALIGN_CENTER, 0, 1, 1));
+                    studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
                 }
 
                 if (studentPlateCount % 2 > 0 && 2 * i + 1 == studentPlate.size()) {
                     for (int i1 = 0; i1 < columnCount; i1++) {
-                        studentTable.addCell(PdfFillUtils.createCell("", PdfFillUtils.textFont8, null, 0, Element.ALIGN_CENTER, 0, 1, 1));
+                        studentTable.addCell(PdfFillUtils.createCell("", PdfFillUtils.textFont11, null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
                     }
                     continue;
                 }
                 Map<String, String> stringMap2 = studentPlate.get(2 * i + 1);
                 for (int j = 0; j < stringMap2.size(); j++) {
                     String value = stringMap2.get(headKeys[j + columnCount]);
-                    studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j + columnCount]), null, 0, Element.ALIGN_CENTER, 0, 1, 1));
+                    studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j + columnCount]), null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
                 }
             }
         }
@@ -199,7 +199,7 @@ public class CreatePrintPdfUtil {
                 if ("座位号".equals(value)) {
                     value = "座号";
                 }
-                studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont9, BaseColor.LIGHT_GRAY, 16f, Element.ALIGN_CENTER, 0, 1, 1));
+                studentTable.addCell(PdfFillUtils.createCell(value, PdfFillUtils.textFont11, BaseColor.LIGHT_GRAY, 22f, Element.ALIGN_CENTER, 0, 1, 1));
                 k++;
             }
 
@@ -211,7 +211,7 @@ public class CreatePrintPdfUtil {
                 Map<String, String> stringMap1 = studentPlate.get(i);
                 for (int j = 0; j < stringMap1.size(); j++) {
                     String value = stringMap1.get(headKeys[j]);
-                    studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, 0, Element.ALIGN_CENTER, 0, 1, 1));
+                    studentTable.addCell(PdfFillUtils.createCell(value, chooseFont(value, columnWidth[j]), null, 22f, Element.ALIGN_CENTER, 0, 1, 1));
                 }
             }
         }
@@ -402,7 +402,7 @@ public class CreatePrintPdfUtil {
                 return PdfFillUtils.textFont9;
             }
         }*/
-        return PdfFillUtils.textFont9;
+        return PdfFillUtils.textFont11;
     }
 
     /**

+ 2 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfFillUtils.java

@@ -184,7 +184,8 @@ public class PdfFillUtils {
 
         // 考生信息
         List<Map<String, String>> studentPlate = new ArrayList<>();
-        for (int i = 0; i < 60; i++) {
+        int studentCount = basicTemplate.getDiallel() ? 80 : 40;
+        for (int i = 0; i < studentCount; i++) {
             Map<String, String> studentMap = new HashMap<>();
             for (JSONObject object : studentObjectList) {
                 studentMap.put(object.getString("code"), "xxx");

+ 7 - 1
distributed-print-business/src/main/resources/mapper/ExamDetailCourseMapper.xml

@@ -163,7 +163,8 @@
             ets.third_relate_id thirdRelateId,
             ets.sync_status syncStatus,
             su.real_name syncUserName,
-            bc.teaching_room_id teachingRoomId
+            bc.teaching_room_id teachingRoomId,
+            etd.paper_attachment_ids paperAttachmentIds
         FROM
             exam_task et
                  JOIN
@@ -242,6 +243,8 @@
                 LEFT JOIN
             basic_course bc ON et.school_id = bc.school_id
                 AND et.course_code = bc.code
+                LEFT JOIN
+            exam_task_detail etd ON et.id = etd.exam_task_id
             <where>
                 <if test="orgIds != null">
                     and et.org_id in
@@ -264,6 +267,9 @@
                         #{orgId}
                     </foreach>
                 </if>
+                <if test="cardType != null and cardType != ''">
+                    and locate(#{cardType}, etd.paper_attachment_ids) > 0
+                </if>
             </where>
         ORDER BY et.create_time desc
     </select>

+ 2 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/BasicTemplateController.java

@@ -120,12 +120,12 @@ public class BasicTemplateController {
     }
 
     /**
-     * 读取模板内容
+     * 预览
      *
      * @param id
      * @return
      */
-    @ApiOperation(value = "读取模板内容")
+    @ApiOperation(value = "预览")
     @RequestMapping(value = "/read_content", method = RequestMethod.POST)
     public Result readContent(@RequestParam Long id) {
         return ResultUtil.ok(basicTemplateService.preview(id), null);

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanSyncController.java

@@ -45,7 +45,7 @@ public class ExamPrintPlanSyncController {
     public Result listSyncExamTask(@ApiParam(value = "学期ID") @RequestParam(required = false) Long semesterId,
                                    @ApiParam(value = "考试ID") @RequestParam(required = false) Long examId,
                                    @ApiParam(value = "学院ID") @RequestParam(required = false) Long orgId,
-                                   @ApiParam(value = "题卡类型") @RequestParam(required = false) SyncCardTypeEnum cardType,
+                                   @ApiParam(value = "题卡类型") @RequestParam(required = false) String cardType,
                                    @ApiParam(value = "推送状态") @RequestParam(required = false) ExamTaskSyncStatusEnum syncStatus,
                                    @ApiParam(value = "课程代码") @RequestParam(required = false) String courseCode,
                                    @ApiParam(value = "试卷编号") @RequestParam(required = false) String paperNumber,