wangliang 4 rokov pred
rodič
commit
15ebf8ed8d

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

@@ -155,7 +155,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                     JSONArray jsonArrayOrdinary = JSONArray.parseArray(examPrintPlan.getOrdinaryContent());
                     for (int i = 0; i < jsonArrayOrdinary.size(); i++) {
                         JSONObject jsonObjectOrdinary = jsonArrayOrdinary.getJSONObject(i);
-                        Long attachmentId = (Long) jsonObjectOrdinary.get("attachmentId");
+                        Long attachmentId = Long.parseLong((String) jsonObjectOrdinary.get("attachmentId"));
                         BasicAttachment basicAttachment = basicAttachmentService.getById(attachmentId);
                         createPdfUtil.createCheckIn(basicAttachment, ordinaryPdfList, (Integer) jsonObjectOrdinary.get("backupCount"));
                     }
@@ -230,7 +230,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                                 for (int i = 0; i < jsonArrayVariable.size(); i++) {
                                     JSONObject jsonObjectVariable = jsonArrayVariable.getJSONObject(i);
                                     String type = (String) jsonObjectVariable.get("type");
-                                    Long attachmentId = (Long) jsonObjectVariable.get("attachmentId");
+                                    Long attachmentId = Long.parseLong((String) jsonObjectVariable.get("attachmentId"));
                                     BasicAttachment basicAttachment = basicAttachmentService.getById(attachmentId);
                                     ftlList.add(commonService.getFile(basicAttachment.getPath(), false));
                                     if (Objects.nonNull(type) && Objects.equals(type.toUpperCase(), "SIGN")) {//签到表