|
@@ -26,10 +26,19 @@ public class AILetterReportParser extends AbstractAIReportParser<LetterReportDat
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
protected void handleAiResult(String result) throws ReportParseException {
|
|
|
try {
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(result);
|
|
|
this.allInfoMap.putAll(flattenMap(jsonObject, ListUtil.list(false)));
|
|
|
+ if (this.allInfoMap.containsKey("交易确认明细")) {
|
|
|
+ Object temp = this.allInfoMap.remove("交易确认明细");
|
|
|
+ if (temp instanceof Map<?, ?> map) {
|
|
|
+ this.allInfoMap.putAll((Map<String, Object>) map);
|
|
|
+ } else if (temp instanceof List<?> list && !list.isEmpty()) {
|
|
|
+ this.allInfoMap.putAll((Map<String, Object>) list.get(0));
|
|
|
+ }
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
throw new ReportParseException(ReportParseStatus.PARSE_HANDLE_FAIL);
|
|
|
}
|