diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java index a9f62399d..486bf922d 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java @@ -133,7 +133,7 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl getWarehouseList() { List myWatchWarehouse = getMyWatchWarehouse(); - if (myWatchWarehouse.size() > 0) { + if (!myWatchWarehouse.isEmpty()) { return myWatchWarehouse; } List basicdataGoodsShelfVOList = warehouseMapper.getWarehouseList(); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index b45421f0b..dd00ce783 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -262,55 +262,57 @@ public class OpenOrderServiceImpl implements IOpenOrderService { //收货单位-----根据三方商场找到对应的clientId Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrandAndCode(dealerName,StringUtil.isBlank(dealerCode)?"":dealerCode, brand); - BasicdataClientVO basicdataClientEntity = basicdataClientClient.findEntityVoById(clientId); - if (!Objects.isNull(basicdataClientEntity)) { - openOrderVO.setConsigneeClientId(clientId); - openOrderVO.setConsignee(basicdataClientEntity.getClientName()); - openOrderVO.setConsigneeName(basicdataClientEntity.getLinkman()); - openOrderVO.setConsigneeMobile(basicdataClientEntity.getPhone()); - openOrderVO.setConsigneeAddress(basicdataClientEntity.getDetailedly()); + if(!Objects.isNull(clientId)){ + BasicdataClientVO basicdataClientEntity = basicdataClientClient.findEntityVoById(clientId); + if (!Objects.isNull(basicdataClientEntity)) { + openOrderVO.setConsigneeClientId(clientId); + openOrderVO.setConsignee(basicdataClientEntity.getClientName()); + openOrderVO.setConsigneeName(basicdataClientEntity.getLinkman()); + openOrderVO.setConsigneeMobile(basicdataClientEntity.getPhone()); + openOrderVO.setConsigneeAddress(basicdataClientEntity.getDetailedly()); - List destinationArray = new ArrayList<>(); - String badeRegionAreaId = basicdataClientEntity.getBladeRegionAreaId(); - String bladeRegionProvinceId = basicdataClientEntity.getBladeRegionProvinceId(); - String bladeRegionCityId = basicdataClientEntity.getBladeRegionCityId(); - destinationArray.add(bladeRegionProvinceId); - destinationArray.add(bladeRegionCityId); - String name = regionFeign.getName(bladeRegionCityId); - String areaId = bladeRegionCityId; - if (!StringUtil.isBlank(badeRegionAreaId)) { - destinationArray.add(badeRegionAreaId); - name = regionFeign.getName(badeRegionAreaId); - areaId = badeRegionAreaId; - } + List destinationArray = new ArrayList<>(); + String badeRegionAreaId = basicdataClientEntity.getBladeRegionAreaId(); + String bladeRegionProvinceId = basicdataClientEntity.getBladeRegionProvinceId(); + String bladeRegionCityId = basicdataClientEntity.getBladeRegionCityId(); + destinationArray.add(bladeRegionProvinceId); + destinationArray.add(bladeRegionCityId); + String name = regionFeign.getName(bladeRegionCityId); + String areaId = bladeRegionCityId; + if (!StringUtil.isBlank(badeRegionAreaId)) { + destinationArray.add(badeRegionAreaId); + name = regionFeign.getName(badeRegionAreaId); + areaId = badeRegionAreaId; + } - openOrderVO.setDefaultDeliveryWay("2"); - String typeService = "1"; - BasicdataStoreBusinessEntity storeBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(clientId, 3); - if(!Objects.isNull(storeBusinessEntity)){ - typeService = storeBusinessEntity.getMold(); - } - if ("1".equals(typeService)){ openOrderVO.setDefaultDeliveryWay("2"); - }else if("2".equals(typeService)){ - openOrderVO.setDefaultDeliveryWay("3"); - }else if("3".equals(typeService)){ - openOrderVO.setDefaultDeliveryWay("1"); - } + String typeService = "1"; + BasicdataStoreBusinessEntity storeBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(clientId, 3); + if(!Objects.isNull(storeBusinessEntity)){ + typeService = storeBusinessEntity.getMold(); + } + if ("1".equals(typeService)){ + openOrderVO.setDefaultDeliveryWay("2"); + }else if("2".equals(typeService)){ + openOrderVO.setDefaultDeliveryWay("3"); + }else if("3".equals(typeService)){ + openOrderVO.setDefaultDeliveryWay("1"); + } - openOrderVO.setDestination(name); - openOrderVO.setDestinationCode(areaId); - openOrderVO.setDestinationArray(destinationArray); + openOrderVO.setDestination(name); + openOrderVO.setDestinationCode(areaId); + openOrderVO.setDestinationArray(destinationArray); - openOrderVO.setDefaultPayWay(basicdataClientEntity.getDefaultPaymentMethods()); + openOrderVO.setDefaultPayWay(basicdataClientEntity.getDefaultPaymentMethods()); - //查询目的仓数据 - BasicdataStorageServicesEntity basicdataStorageServicesEntity = basicdataStorageServicesClient.findEntityBySendWarehouseIdAndClientId(warehouseId, clientId); - if (!Objects.isNull(basicdataStorageServicesEntity)) { - openOrderVO.setDestinationWarehouseId(basicdataStorageServicesEntity.getServeWarehouseId()); - openOrderVO.setDestinationWarehouseName(basicdataStorageServicesEntity.getServeWarehouseName()); + //查询目的仓数据 + BasicdataStorageServicesEntity basicdataStorageServicesEntity = basicdataStorageServicesClient.findEntityBySendWarehouseIdAndClientId(warehouseId, clientId); + if (!Objects.isNull(basicdataStorageServicesEntity)) { + openOrderVO.setDestinationWarehouseId(basicdataStorageServicesEntity.getServeWarehouseId()); + openOrderVO.setDestinationWarehouseName(basicdataStorageServicesEntity.getServeWarehouseName()); + } } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index 789e2e199..9be5baed2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -480,7 +480,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl