|
@@ -186,7 +186,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);
|
|
|
- if (Objects.nonNull(jsonObjectOrdinary.get("attachmentId"))) {
|
|
|
+ if (Objects.nonNull(jsonObjectOrdinary.get("attachmentId")) && !Objects.equals("", jsonObjectOrdinary.get("attachmentId"))) {
|
|
|
Long attachmentId = Long.parseLong((String) jsonObjectOrdinary.get("attachmentId"));
|
|
|
BasicAttachment basicAttachment = basicAttachmentService.getById(attachmentId);
|
|
|
createPdfUtil.createCheckIn(examDetail, basicAttachment, ordinaryPdfList, (Integer) jsonObjectOrdinary.get("backupCount"));
|
|
@@ -268,7 +268,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");
|
|
|
- if (Objects.nonNull(jsonObjectVariable.get("attachmentId"))) {
|
|
|
+ if (Objects.nonNull(jsonObjectVariable.get("attachmentId")) && !Objects.equals("", jsonObjectVariable.get("attachmentId"))) {
|
|
|
Long attachmentId = Long.parseLong((String) jsonObjectVariable.get("attachmentId"));
|
|
|
BasicAttachment basicAttachment = basicAttachmentService.getById(attachmentId);
|
|
|
ftlList.add(commonService.getFile(basicAttachment.getPath(), false));
|