浏览代码

v2.2.2bug修改-新登记表

xiaof 3 年之前
父节点
当前提交
e845f74dcb

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

@@ -127,6 +127,9 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
     @Resource
     @Resource
     RedisUtil redisUtil;
     RedisUtil redisUtil;
 
 
+    @Autowired
+    BasicSchoolService basicSchoolService;
+
     /**
     /**
      * 保存附件
      * 保存附件
      *
      *
@@ -143,7 +146,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
     @Transactional
     @Transactional
     public BasicAttachment saveAttachmentPdf(ClassifyEnum classifyEnum, ExamDetail examDetail, BasicAttachment basicAttachment, List<PdfDto> pdfList, Integer printCount, Integer sequence) throws IOException, DocumentException {
     public BasicAttachment saveAttachmentPdf(ClassifyEnum classifyEnum, ExamDetail examDetail, BasicAttachment basicAttachment, List<PdfDto> pdfList, Integer printCount, Integer sequence) throws IOException, DocumentException {
         try {
         try {
-            BasicSchool basicSchool = (BasicSchool) ServletUtil.getRequestSchool();
+            BasicSchool basicSchool = basicSchoolService.getById(examDetail.getSchoolId());
             Map<String, String> flowSchoolCodeMap = SystemConstant.getFlowSchoolCodeMap();
             Map<String, String> flowSchoolCodeMap = SystemConstant.getFlowSchoolCodeMap();
 
 
             boolean oss = dictionaryConfig.sysDomain().isOss();
             boolean oss = dictionaryConfig.sysDomain().isOss();

+ 4 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePdfUtil.java

@@ -90,6 +90,9 @@ public class CreatePdfUtil {
     @Autowired
     @Autowired
     BasicClazzService basicClazzService;
     BasicClazzService basicClazzService;
 
 
+    @Autowired
+    BasicSchoolService basicSchoolService;
+
     /**
     /**
      * 创建登记表
      * 创建登记表
      *
      *
@@ -99,7 +102,7 @@ public class CreatePdfUtil {
      * @param printCount
      * @param printCount
      */
      */
     public void createCheckIn(ExamDetail examDetail, BasicAttachment basicAttachment, List<PdfDto> ordinaryPdfList, Integer printCount) throws Exception {
     public void createCheckIn(ExamDetail examDetail, BasicAttachment basicAttachment, List<PdfDto> ordinaryPdfList, Integer printCount) throws Exception {
-        BasicSchool basicSchool = (BasicSchool) ServletUtil.getRequestSchool();
+        BasicSchool basicSchool = basicSchoolService.getById(examDetail.getSchoolId());
         Map<String, String> flowSchoolCodeMap = SystemConstant.getFlowSchoolCodeMap();
         Map<String, String> flowSchoolCodeMap = SystemConstant.getFlowSchoolCodeMap();
         if (Objects.isNull(basicAttachment)) {
         if (Objects.isNull(basicAttachment)) {
             throw ExceptionResultEnum.ATTACHMENT_IS_NULL.exception();
             throw ExceptionResultEnum.ATTACHMENT_IS_NULL.exception();