From 5666fb0622eb6cc6ecee0603d89efe7057ff86a8 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Tue, 4 Jul 2023 17:04:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2web?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Client/GlobalContext.cs | 2 +- BBWY.Client/Views/Web/Web.xaml.cs | 13 +++++++++++-- BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 6 ++++++ .../PlatformSDK/PlatformSDKBusiness.cs | 5 +++++ BBWY.Server.Business/QiKu/QiKuBusiness.cs | 2 +- .../Dto/Request/JD/JDQueryWareHouseRequest.cs | 15 +++++++++++++++ .../QK/GetJDSupplierNameAndStoreNameResponse.cs | 2 ++ 7 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 BBWY.Server.Model/Dto/Request/JD/JDQueryWareHouseRequest.cs diff --git a/BBWY.Client/GlobalContext.cs b/BBWY.Client/GlobalContext.cs index 8c9ecfa7..49e466fd 100644 --- a/BBWY.Client/GlobalContext.cs +++ b/BBWY.Client/GlobalContext.cs @@ -13,7 +13,7 @@ namespace BBWY.Client { ShopServiceGroupList = new List(); ShopServiceGroupLowerList = new List(); - ClientVersion = "10141"; + ClientVersion = "10142"; } private User user; diff --git a/BBWY.Client/Views/Web/Web.xaml.cs b/BBWY.Client/Views/Web/Web.xaml.cs index 714d4f4f..0316a0fb 100644 --- a/BBWY.Client/Views/Web/Web.xaml.cs +++ b/BBWY.Client/Views/Web/Web.xaml.cs @@ -14,14 +14,23 @@ namespace BBWY.Client.Views.Web #if DEBUG private string url = "http://192.168.1.4:8881/"; + private string registerName = "webTestContext"; #else private string url= "http://bbwyweb.qiyue666.com"; + private string registerName = "webContext"; #endif public Web() { InitializeComponent(); this.Loaded += Web_Loaded; + this.Unloaded += Web_Unloaded; + } + + private void Web_Unloaded(object sender, System.Windows.RoutedEventArgs e) + { + if (w2m.wb2 != null) + grid.Children.Remove(w2m.wb2); } private void Web_Loaded(object sender, System.Windows.RoutedEventArgs e) @@ -41,11 +50,11 @@ namespace BBWY.Client.Views.Web w2m.CoreWebView2InitializationCompleted = (e) => { isNavigated = true; - w2m.wb2.CoreWebView2.AddHostObjectToScript("webContext", this.globalContext); + w2m.wb2.CoreWebView2.AddHostObjectToScript(registerName, this.globalContext); // w2m.wb2.CoreWebView2.Navigate($"https://neworder.shop.jd.com/order/orderDetail?orderId={orderId}"); w2m.wb2.CoreWebView2.Navigate(url); }; - if(w2m.IsInitializationCompleted && !isNavigated) + if (w2m.IsInitializationCompleted && !isNavigated) { w2m.wb2.CoreWebView2.Navigate(url); isNavigated = true; diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 9ca94398..567d7ed6 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -672,6 +672,12 @@ namespace BBWY.Server.Business return (JArray)res.Json["jingdong_store_findPartitionWhByIdAndStatus_responce"]["find_Partition_Warehouse_Result"]["result"]; } + public override JArray JDQueryWareHouse(JDQueryWareHouseRequest request) + { + + return base.JDQueryWareHouse(request); + } + public override JArray GetStockNumBySku(SearchProductSkuRequest request) { var jdClient = GetJdClient(request.AppKey, request.AppSecret); diff --git a/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs b/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs index 9c10ee3e..5a39bfd8 100644 --- a/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs @@ -153,6 +153,11 @@ namespace BBWY.Server.Business throw new NotImplementedException(); } + public virtual JArray JDQueryWareHouse(JDQueryWareHouseRequest request) + { + throw new NotImplementedException(); + } + public virtual JArray GetStockNumBySku(SearchProductSkuRequest request) { throw new NotImplementedException(); diff --git a/BBWY.Server.Business/QiKu/QiKuBusiness.cs b/BBWY.Server.Business/QiKu/QiKuBusiness.cs index ec192965..c887a35e 100644 --- a/BBWY.Server.Business/QiKu/QiKuBusiness.cs +++ b/BBWY.Server.Business/QiKu/QiKuBusiness.cs @@ -51,7 +51,7 @@ namespace BBWY.Server.Business.QiKu var supplierName = supplierJToken["jingdong_eclp_master_querySupplier_responce"]["querysupplier_result"].Children().FirstOrDefault().Value("supplierName"); #endregion - #region 查询仓库信息 + #region 查询仓库列表 var storeList = venderBusiness.GetStoreHouseList(request); var store = storeList.FirstOrDefault(s => s.Id == whNo); #endregion diff --git a/BBWY.Server.Model/Dto/Request/JD/JDQueryWareHouseRequest.cs b/BBWY.Server.Model/Dto/Request/JD/JDQueryWareHouseRequest.cs new file mode 100644 index 00000000..d0cf91e6 --- /dev/null +++ b/BBWY.Server.Model/Dto/Request/JD/JDQueryWareHouseRequest.cs @@ -0,0 +1,15 @@ +namespace BBWY.Server.Model.Dto +{ + public class JDQueryWareHouseRequest : PlatformRequest + { + /// + /// 开放平台事业部编号 + /// + public string deptNo { get; set; } + + /// + /// 仓库编号, 逗号间隔 + /// + public string wareHouseNos { get; set; } + } +} diff --git a/BBWY.Server.Model/Dto/Response/QK/GetJDSupplierNameAndStoreNameResponse.cs b/BBWY.Server.Model/Dto/Response/QK/GetJDSupplierNameAndStoreNameResponse.cs index afc3d5bd..f658b80f 100644 --- a/BBWY.Server.Model/Dto/Response/QK/GetJDSupplierNameAndStoreNameResponse.cs +++ b/BBWY.Server.Model/Dto/Response/QK/GetJDSupplierNameAndStoreNameResponse.cs @@ -7,5 +7,7 @@ public string StoreId { get; set; } public string StoreName { get; set; } + + public string City { get; set; } } }