From 778b5f751dd50ad07165e8e1a9331ca0d00627d8 Mon Sep 17 00:00:00 2001 From: FCL Date: Fri, 26 Dec 2025 10:24:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8A=A5=E5=91=8A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=84=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ReportDocumentDataServiceImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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 9fd9c28..24246ae 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 @@ -121,14 +121,15 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService JSONObject dataJson = JSONObject.parseObject(documentContent); if(dataJson == null) continue; - String usage = dataJson.getString("usage"); - if(!"report".equals( usage) && ! "ingredient_report".equals(usage)) + if(!dataJson.containsKey(field)) continue; - if(dataJson.containsKey(field)){ - if(!hasFields.contains( fieldName)){ - fieldList.add(fieldDO); - hasFields.add(fieldName); - } + if(!hasFields.contains( fieldName)){ + JSONObject valueJson = dataJson.getJSONObject(field); + String usage = valueJson.getString("usage"); + if(!"report".equals( usage) && ! "ingredient_report".equals(usage)) + continue; + fieldList.add(fieldDO); + hasFields.add(fieldName); } } }