From dafbbe64f8a13828d121c25a69a2ac00053731b2 Mon Sep 17 00:00:00 2001 From: x_z Date: Tue, 31 May 2022 17:40:55 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/admin/thread/HeartService.java | 54 +++++++++++++++---- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/thread/HeartService.java b/api-admin/src/main/java/com/glxp/api/admin/thread/HeartService.java index 97ccf17d..495eda17 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/thread/HeartService.java +++ b/api-admin/src/main/java/com/glxp/api/admin/thread/HeartService.java @@ -77,9 +77,16 @@ public class HeartService { basicExportStatusEntity1.setStatus(1); basicExportStatusEntity1.setEndTime(new Date()); basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity); - } else { - basicExportStatusEntity1.setRemark(baseResponse1.getMessage()); } + //拼接日志 + String logs = ""; + if (CollUtil.isNotEmpty(spsSyncOrderResponse.getOrderEntities())) + logs = logs + "单据:" + spsSyncOrderResponse.getOrderEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(spsSyncOrderResponse.getOrderDetailEntityList())) + logs = logs + "单据详情:" + spsSyncOrderResponse.getOrderDetailEntityList().size() + "条\n"; + if (CollUtil.isNotEmpty(spsSyncOrderResponse.getWarehouseEntityList())) + logs = logs + "条码信息:" + spsSyncOrderResponse.getWarehouseEntityList().size() + "条\n"; + basicExportStatusEntity1.setRemark(logs); basicExportStatusEntity1.setUpdateTime(new Date()); basicExportService.updateExportStatus(basicExportStatusEntity1); return ResultVOUtils.success(); @@ -115,10 +122,16 @@ public class HeartService { basicExportStatusEntity2.setStatus(1); basicExportStatusEntity2.setEndTime(new Date()); basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity); - } else { - basicExportStatusEntity2.setRemark(baseResponse2.getMessage()); } - + //拼接日志 + String logs = ""; + if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessTypeEntities())) + logs = logs + "扫码单据类型:" + spsSyncBusResponse.getBussinessTypeEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessLocalTypeEntities())) + logs = logs + "业务单据类型:" + spsSyncBusResponse.getBussinessLocalTypeEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessOriginTypeEntities())) + logs = logs + "第三方单据类型:" + spsSyncBusResponse.getBussinessOriginTypeEntities().size() + "条\n"; + basicExportStatusEntity2.setRemark(logs); basicExportStatusEntity2.setUpdateTime(new Date()); basicExportService.updateExportStatus(basicExportStatusEntity2); return ResultVOUtils.success(); @@ -164,9 +177,29 @@ public class HeartService { basicExportStatusEntity3.setStatus(1); basicExportStatusEntity3.setEndTime(new Date()); basicExportTimeService.insertExportStatus(basicExportStatusTimeEntity); - } else { - basicExportStatusEntity3.setRemark(baseResponse.getMessage()); } + String logs = ""; + if (CollUtil.isNotEmpty(syncDataResponse.getUdiRelevanceEntities())) + logs = logs + "耗材字典:" + syncDataResponse.getUdiRelevanceEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getUdiInfoEntities())) + logs = logs + "耗材字典:" + syncDataResponse.getUdiInfoEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getBasicUnitMaintainEntities())) + logs = logs + "往来单位:" + syncDataResponse.getBasicUnitMaintainEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getCompanyProductRelevanceEntities())) + logs = logs + "供应商关联产品信息:" + syncDataResponse.getCompanyProductRelevanceEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getInvWarehouseEntities())) + logs = logs + "仓库字典:" + syncDataResponse.getInvWarehouseEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getThrInvWarehouseEntities())) + logs = logs + "第三方仓库字典:" + syncDataResponse.getThrInvWarehouseEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getThrOrderEntities())) + logs = logs + "第三方业务单据:" + syncDataResponse.getThrOrderEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getThrOrderDetailEntities())) + logs = logs + "第三方业务单据详情:" + syncDataResponse.getThrOrderDetailEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getThrOrderEntities())) + logs = logs + "第三方产品信息:" + syncDataResponse.getThrProductsEntities().size() + "条\n"; + if (CollUtil.isNotEmpty(syncDataResponse.getThrCorpEntities())) + logs = logs + "第三方往来单位:" + syncDataResponse.getThrCorpEntities().size() + "条\n"; + basicExportStatusEntity3.setRemark(logs); basicExportStatusEntity3.setUpdateTime(new Date()); basicExportService.updateExportStatus(basicExportStatusEntity3); return ResultVOUtils.success(); @@ -189,11 +222,14 @@ public class HeartService { } else { for (BasicExportStatusEntity basicExportStatusEntity : basicExportStatusEntities) { - basicExportStatusEntity.setRemark(baseResponse.getMessage()); + String logs = ""; + if (CollUtil.isNotEmpty(spsSyncScheduleResponse.getBasicExportStatusEntities())) { + logs = logs + "被下载基础信息任务:" + spsSyncScheduleResponse.getBasicExportStatusEntities().size() + "条\n"; + } + basicExportStatusEntity.setRemark(logs); basicExportStatusEntity.setUpdateTime(new Date()); basicExportService.updateExportStatus(basicExportStatusEntity); } - }