Bläddra i källkod

试卷审批加入印刷室

wangliang 2 år sedan
förälder
incheckning
7916970523

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

@@ -74,6 +74,17 @@ public class ExamPackageDetail {
     @ApiModelProperty(value = "印刷计划状态")
     private PrintPlanStatusEnum examPrintPlanStatus;
 
+    @ApiModelProperty(value = "印刷室")
+    private String printHouseName;
+
+    public String getPrintHouseName() {
+        return printHouseName;
+    }
+
+    public void setPrintHouseName(String printHouseName) {
+        this.printHouseName = printHouseName;
+    }
+
     public Long getExamDetailId() {
         return examDetailId;
     }

+ 12 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/approvalForm/ExamRoomInfo.java

@@ -1,5 +1,6 @@
 package com.qmth.distributed.print.business.bean.dto.approvalForm;
 
+import com.qmth.distributed.print.business.enums.ExamDataSourceEnum;
 import io.swagger.annotations.ApiModelProperty;
 
 /**
@@ -23,6 +24,17 @@ public class ExamRoomInfo {
     @ApiModelProperty(value = "总印份数(人数 + 备用)")
     private String printCount;
 
+    @ApiModelProperty(value = "印刷室")
+    private String printHouseName;
+
+    public String getPrintHouseName() {
+        return printHouseName;
+    }
+
+    public void setPrintHouseName(String printHouseName) {
+        this.printHouseName = printHouseName;
+    }
+
     public String getPackageCode() {
         return packageCode;
     }

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

@@ -37,6 +37,7 @@ import org.apache.poi.xssf.usermodel.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -122,6 +123,7 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
     BasicRoleDataPermissionService basicRoleDataPermissionService;
 
     @Resource
+    @Lazy
     private PrintCommonService printCommonService;
 
     @Transactional(rollbackFor = Exception.class)

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

@@ -1906,8 +1906,6 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
 
         // 3.ApprovalInfo部分
         Boolean review = examTask.getReview();
-        final String remark = "通过";
-        final String link = ",";
         List<ApprovalInfo> approvalInfoList = new ArrayList<>();
         if (review) {
             approvalInfoList = tfFlowLogService.findApprovalInfoByFlowId(flowId);
@@ -2445,6 +2443,12 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                     packageCode = packageCodeList.get(0);
                 }
 
+                List<String> printHourseNameList = examPackageDetailCell.stream().map(ExamPackageDetail::getPrintHouseName).distinct().collect(Collectors.toList());
+                String printHourseName = "";
+                if (printHourseNameList.size() > 0) {
+                    printHourseName = printHourseNameList.get(0);
+                }
+
                 List<BackupMethodEnum> backupMethodEnums = examPackageDetailCell.stream().map(ExamPackageDetail::getBackupMethod).distinct().collect(Collectors.toList());
                 if (backupMethodEnums.size() != 1 && backupMethodEnums.get(0) != BackupMethodEnum.ROOM) {
                     throw ExceptionResultEnum.ERROR.exception("印刷计划试卷备份方式必须按考场");
@@ -2491,6 +2495,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
                 examRoomInfo.setClazzNames(classNames);
                 examRoomInfo.setStudentCount(studentCount);
                 examRoomInfo.setPrintCount(printCount);
+                examRoomInfo.setPrintHouseName(printHourseName);
                 examRoomInfoList.add(examRoomInfo);
             }
         }

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

@@ -103,6 +103,7 @@ public class PrintCommonServiceImpl implements PrintCommonService {
     TBSyncTaskService tbSyncTaskService;
 
     @Resource
+    @Lazy
     ExamDetailService examDetailService;
 
     @Resource

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

@@ -990,6 +990,7 @@
             ed.exam_room AS examRoom,
             ed.package_code AS packageCode,
             ed.status AS examDetailStatus,
+            IFNULL((select t.name from sys_org t where t.id = ed.print_house_id),'-') as printHouseName,
             edc.id AS examDetailCourseId,
             edc.course_code AS courseCode,
             edc.course_name AS courseName,