From 8fb9e05c83e8f0275fece444d493e874a912221d Mon Sep 17 00:00:00 2001 From: anthonyywj2 <353682448@qq.com> Date: Wed, 27 Jul 2022 14:30:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E4=BF=A1=E6=81=AF=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=8Cbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sync/BasicDownloadController.java | 10 ++++-- .../admin/res/sync/SpsSyncDataResponse.java | 35 ++++++++++--------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java index 2df858d..3e5f7c4 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java @@ -1,6 +1,7 @@ package com.glxp.sale.admin.controller.sync; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.glxp.sale.admin.constant.BasicProcessStatus; @@ -87,9 +88,12 @@ public class BasicDownloadController { } else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_UDIS) {//国家库信息 BasicExportStatusEntity basicExportStatusEntity = basicExportService.findById(basicExportStatusRequest.getId()); String data = (String) redisUtil.get(basicExportStatusRequest.getId() + ""); - SpSyncUdiResponse spSyncUdiResponse = JSONObject.parseObject(data, new TypeReference() { - }); - spSyncUdiResponse.setTaskId(basicExportStatusEntity.getTaskId()); + SpSyncUdiResponse spSyncUdiResponse = null; + if (StrUtil.isNotEmpty(data)) { + spSyncUdiResponse = JSONObject.parseObject(data, new TypeReference() { + }); + spSyncUdiResponse.setTaskId(basicExportStatusEntity.getTaskId()); + } basicExportService.finished(basicExportStatusRequest.getId()); return ResultVOUtils.success(spSyncUdiResponse); } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/res/sync/SpsSyncDataResponse.java b/api-admin/src/main/java/com/glxp/sale/admin/res/sync/SpsSyncDataResponse.java index 43b713e..b63dacd 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/res/sync/SpsSyncDataResponse.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/res/sync/SpsSyncDataResponse.java @@ -34,51 +34,54 @@ public class SpsSyncDataResponse { @Override public String toString() { StringBuffer remark = new StringBuffer(); + if (CollUtil.isNotEmpty(invWarehouseEntities)) { remark.append("仓库信息:").append(invWarehouseEntities.size()).append(" 条\n"); } - if (CollUtil.isNotEmpty(invSubWarehouseEntities)) { remark.append("分库信息:").append(invSubWarehouseEntities.size()).append(" 条\n"); } - if (CollUtil.isNotEmpty(warehouseBussinessTypeEntities)) { remark.append("仓库用户信息:").append(warehouseBussinessTypeEntities.size()).append(" 条\n"); } if (CollUtil.isNotEmpty(warehouseBussinessTypeEntities)) { remark.append("仓库单据类型:").append(warehouseBussinessTypeEntities.size()).append(" 条\n"); } + + + if (CollUtil.isNotEmpty(udiRelevanceEntities)) { + remark.append("耗材字典:").append(udiRelevanceEntities.size()).append(" 条\n"); + } if (CollUtil.isNotEmpty(udiInfoEntities)) { remark.append("产品信息:").append(udiInfoEntities.size()).append(" 条\n"); } if (CollUtil.isNotEmpty(basicUnitMaintainEntities)) { remark.append("往来单位:").append(basicUnitMaintainEntities.size()).append(" 条\n"); } + if (CollUtil.isNotEmpty(companyProductRelevanceEntities)) { + remark.append("供应商关联产品信息:").append(companyProductRelevanceEntities.size()).append(" 条\n"); + } + + if (CollUtil.isNotEmpty(thrInvWarehouseEntities)) { remark.append("第三方仓库信息:").append(thrInvWarehouseEntities.size()).append(" 条\n"); } if (CollUtil.isNotEmpty(thrSubInvWarehouseEntities)) { remark.append("第三方仓库分库信息:").append(thrSubInvWarehouseEntities.size()).append(" 条\n"); } - - if (CollUtil.isNotEmpty(thrCorpEntities)) { - remark.append("第三方往来单位:").append(thrCorpEntities.size()).append(" 条\n"); - } if (CollUtil.isNotEmpty(thrProductsEntities)) { remark.append("第三方产品信息:").append(thrProductsEntities.size()).append(" 条\n"); } - if (CollUtil.isNotEmpty(thrOrderEntities)) { - remark.append("第三方单据:").append(thrOrderEntities.size()).append(" 条\n"); - } - if (CollUtil.isNotEmpty(thrOrderDetailEntities)) { - remark.append("第三方单据详情:").append(thrOrderDetailEntities.size()).append(" 条\n"); - } - if (CollUtil.isNotEmpty(companyProductRelevanceEntities)) { - remark.append("公司产品信息:").append(companyProductRelevanceEntities.size()).append(" 条\n"); + if (CollUtil.isNotEmpty(thrCorpEntities)) { + remark.append("第三方往来单位:").append(thrCorpEntities.size()).append(" 条\n"); } - if (CollUtil.isNotEmpty(udiRelevanceEntities)) { - remark.append("耗材字典:").append(udiRelevanceEntities.size()).append(" 条\n"); + if (CollUtil.isNotEmpty(thrOrderEntities)) { + remark.append("第三方业务单据:").append(thrOrderEntities.size()).append(" 条\n"); } +// if (CollUtil.isNotEmpty(thrOrderDetailEntities)) { +// remark.append("第三方单据详情:").append(thrOrderDetailEntities.size()).append(" 条\n"); +// } + if (CollUtil.isNotEmpty(authAdminList)) { remark.append("用户信息:").append(authAdminList.size()).append(" 条\n"); }