|
|
|
@ -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<String> 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<String> 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()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|