From d90b1e3f55280c7b3f37366558fa3dabe3e616c5 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Sat, 6 Apr 2024 21:25:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E4=B8=8B=E6=9E=B6?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistributionDeliveryListController.java | 17 +++++++++++------ .../jobhandler/SyncWarehouseDataToNew.java | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java index 8f8bf24a6..56587ca4a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java @@ -17,6 +17,7 @@ package com.logpm.distribution.controller; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; @@ -487,14 +488,18 @@ public class DistributionDeliveryListController extends BladeController { List packageCodes = (List) r.getData(); log.info("#############signforPC:"+time+" 处理下架的包件 packageCodes={}",packageCodes); String orderPackageCodes = null; - for (String packageCode : packageCodes) { - if(StringUtils.isBlank(orderPackageCodes)){ - orderPackageCodes = packageCode; - }else{ - orderPackageCodes = orderPackageCodes + "," + packageCode; + + if(ObjectUtils.isNotNull(packageCodes)){ + for (String packageCode : packageCodes) { + if(StringUtils.isBlank(orderPackageCodes)){ + orderPackageCodes = packageCode; + }else{ + orderPackageCodes = orderPackageCodes + "," + packageCode; + } } + warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId()); } - warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes,myCurrentWarehouse.getId()); + }catch (Exception e){ log.error("#############signforPC:"+time+" 下架失败",e); } diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/SyncWarehouseDataToNew.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/SyncWarehouseDataToNew.java index d903072c8..71614f706 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/SyncWarehouseDataToNew.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/SyncWarehouseDataToNew.java @@ -255,7 +255,7 @@ public class SyncWarehouseDataToNew { newEntity.setLinkman(oldWarehouse.getContactName());//仓库联系人 newEntity.setContactNumber(oldWarehouse.getPhone());//联系人电话 newEntity.setBusinessLine("");//事业线 - newEntity.setFunctionType(typeMapping.get(oldWarehouse.getIsBase()));//仓库类型 + newEntity.setFunctionType(String.valueOf(typeMapping.get(oldWarehouse.getIsBase())));//仓库类型 newEntity.setRemarks(oldWarehouse.getRemark());//备注 newEntity.setWarehouseAddress(oldWarehouse.getAddress());//仓库地址 newEntity.setLongitude(StringUtil.isBlank(oldWarehouse.getLng())?null:new BigDecimal(oldWarehouse.getLng()));//经度