From 5e71453113b8fe8ede71120dd972cde9a737f43f Mon Sep 17 00:00:00 2001 From: FCL Date: Wed, 31 Dec 2025 10:12:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8A=A5=E5=91=8A=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/ReportDocumentFileController.java | 4 +++- .../reportdoc/service/ReportDocumentDataServiceImpl.java | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java index 46736f4..2af9795 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/controller/admin/ReportDocumentFileController.java @@ -110,7 +110,9 @@ public class ReportDocumentFileController extends AbstractFileUploadController i version = mainDO.getDocumentVersion(); } ReportDocumentFileDO entity = reportDocumentFileService.getByMainIdAndVersion(mainId, version); - + if(entity == null){ + return CommonResult.success(null); + } Long fileId = entity.getFileId(); CommonResult fileRet = fileApi.getFile(fileId); FileRespDTO file = fileRet.getData(); diff --git a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentDataServiceImpl.java b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentDataServiceImpl.java index 1db1f8d..e03b720 100644 --- a/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentDataServiceImpl.java +++ b/zt-module-qms/zt-module-qms-server/src/main/java/com/zt/plat/module/qms/business/reportdoc/service/ReportDocumentDataServiceImpl.java @@ -411,7 +411,10 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService String colKey = parseNumToString(colIndex, 2); t.put(colPrefix + colKey, fieldName); //查询当前字段的检出限 - JSONObject fieldObj = firstData.getJSONObject(field); + JSONObject fieldObj = null; + if(firstData != null && !ObjectUtils.isEmpty(field)){ + fieldObj = firstData.getJSONObject(field); + } String rangeVal = ""; if (fieldObj != null) { rangeVal = fieldObj.getString(rangeKey); @@ -516,7 +519,9 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService if (FIELD_FIXED.equals(fieldType)) //这里只处理动态列。固定列在 addDataToRowList 处理 continue; String field = fieldDO.getField(); - JSONObject fieldObj = s.getJSONObject(field); + JSONObject fieldObj = new JSONObject(); + if(s != null) + fieldObj = s.getJSONObject(field); String fieldValue = ""; if (fieldObj != null) fieldValue = fieldObj.getString("fieldValue");