From 1932ffe2d7fcff17f5aa1b0e6c023f3c920badef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com> Date: Thu, 24 Sep 2026 13:47:30 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20=E8=A1=A5=E5=85=85=E9=87=91=E8=9D=B6?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=90=8C=E6=AD=A5=E5=85=B3=E9=94=AE=E9=93=BE?= =?UTF-8?q?=E8=B7=AF=E6=97=A5=E5=BF=97=EF=BC=88A902/A801-2=20=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E3=80=81=E5=8D=95=E9=99=84=E4=BB=B6=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E3=80=81=E5=86=85=E7=A0=81=E5=8F=8D=E6=9F=A5=E5=9B=9E=E5=A1=AB?= =?UTF-8?q?=E4=B8=8E=E6=8E=A8=E9=80=81=E5=AE=8C=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FormalSettlementServiceImpl.java | 3 +++ .../service/impl/InvoiceApplicationServiceImpl.java | 3 +++ .../transport/support/KingdeeAttachmentSyncSupport.java | 3 +++ .../thirdparty/bfi/service/impl/BfiServiceImpl.java | 7 +++++++ 4 files changed, 16 insertions(+) diff --git a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java index 5d3a4b09..e609da59 100644 --- a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java +++ b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/FormalSettlementServiceImpl.java @@ -532,6 +532,7 @@ public class FormalSettlementServiceImpl extends BaseServiceImpl existingByKey = existingByKey(bizType, bizId); String entityNumber = KingdeeAttachmentConstant.entityNumber(bizType); + log.info("金蝶附件同步开始:业务单据[{}:{}],星瀚内码={},entityNumber={},待同步附件 {} 个,历史已成功 {} 个", + bizType, bizId, billPkId, entityNumber, items.size(), successKeys.size()); int success = 0; int skipCount = 0; List failReasons = new ArrayList<>(); @@ -161,6 +163,7 @@ public class KingdeeAttachmentSyncSupport { String fileName = Func.isBlank(item.name()) ? "attachment" : item.name(); BfiAttachmentUploadVO uploadVO = bfiService.uploadAttachment(entityNumber, billPkId, KingdeeAttachmentConstant.CONTROL_KEY, fileName, content); + log.info("金蝶附件上传成功:业务单据[{}:{}],附件[{}],kingdeePath={}", bizType, bizId, item.name(), uploadVO.getPath()); pendingRecords.add(buildRecord(bizType, bizId, item, KingdeeAttachmentConstant.SYNC_STATUS_SUCCESS, null, uploadVO.getPath(), existingByKey.get(item.key()))); success++; diff --git a/blade-third-party-api/blade-bfi-api/src/main/java/org/springblade/thirdparty/bfi/service/impl/BfiServiceImpl.java b/blade-third-party-api/blade-bfi-api/src/main/java/org/springblade/thirdparty/bfi/service/impl/BfiServiceImpl.java index f5c831d4..b0e1bad8 100644 --- a/blade-third-party-api/blade-bfi-api/src/main/java/org/springblade/thirdparty/bfi/service/impl/BfiServiceImpl.java +++ b/blade-third-party-api/blade-bfi-api/src/main/java/org/springblade/thirdparty/bfi/service/impl/BfiServiceImpl.java @@ -536,12 +536,15 @@ public class BfiServiceImpl implements IBfiService { BfiInvoiceDownloadDTO param = new BfiInvoiceDownloadDTO(); param.setPath(path); String accessToken = getAccessToken(); + long start = System.currentTimeMillis(); + log.info("调用BFI接口 进项发票下载开始 path:{}", path); try { Response response = client.invoiceDownload(accessToken, param); if (response == null || response.status() != 200) { log.error("调用BFI接口 进项发票下载异常响应状态:{}", response == null ? "无响应" : response.status()); throw new BfiException("调用BFI接口进项发票下载异常,响应状态:" + (response == null ? "无响应" : response.status())); } + log.info("调用BFI接口 进项发票下载结束 耗时:{}ms", System.currentTimeMillis() - start); return response; } catch (BfiException e) { throw e; @@ -566,12 +569,16 @@ public class BfiServiceImpl implements IBfiService { args.set("billPkId", billPkId); args.set("controlKey", StringUtil.isBlank(controlKey) ? "attachmentpanel" : controlKey); InMemoryMultipartFile file = new InMemoryMultipartFile("file", fileName, MediaType.APPLICATION_OCTET_STREAM_VALUE, fileContent); + long start = System.currentTimeMillis(); + log.info("调用BFI接口 附件上传开始 entityNumber:{},billPkId:{},文件:{},大小:{}字节", + entityNumber, billPkId, fileName, fileContent.length); BfiResultVO result = commonCall("附件上传", () -> client.uploadAttachment(accessToken, file, args.toString())); BfiAttachmentUploadVO uploadVO = result.getData(); if (uploadVO == null || StringUtil.isBlank(uploadVO.getPath())) { log.error("调用BFI接口 附件上传返回数据为空:{}", JSONUtil.toJsonStr(result)); throw new BfiException("调用BFI接口附件上传异常,返回数据为空"); } + log.info("调用BFI接口 附件上传结束 耗时:{}ms,kingdeePath:{}", System.currentTimeMillis() - start, uploadVO.getPath()); return uploadVO; }