fix:报告数据组装

This commit is contained in:
FCL
2025-12-26 10:24:26 +08:00
parent 58f9c9a350
commit 778b5f751d

View File

@@ -121,14 +121,15 @@ public class ReportDocumentDataServiceImpl implements ReportDocumentDataService
JSONObject dataJson = JSONObject.parseObject(documentContent); JSONObject dataJson = JSONObject.parseObject(documentContent);
if(dataJson == null) if(dataJson == null)
continue; continue;
String usage = dataJson.getString("usage"); if(!dataJson.containsKey(field))
if(!"report".equals( usage) && ! "ingredient_report".equals(usage))
continue; continue;
if(dataJson.containsKey(field)){ if(!hasFields.contains( fieldName)){
if(!hasFields.contains( fieldName)){ JSONObject valueJson = dataJson.getJSONObject(field);
fieldList.add(fieldDO); String usage = valueJson.getString("usage");
hasFields.add(fieldName); if(!"report".equals( usage) && ! "ingredient_report".equals(usage))
} continue;
fieldList.add(fieldDO);
hasFields.add(fieldName);
} }
} }
} }