From ac6e93db8db501d702ddaa38290a8fcbdfe49a99 Mon Sep 17 00:00:00 2001 From: "506583276@qq.com" <506583276@qq.com> Date: Mon, 18 Sep 2023 15:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=BE=85=E5=AE=8C=E7=BB=93,?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=9B=A2=E9=98=9F=E6=B7=BB=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E8=BD=AC=E8=BF=90,=E4=BB=93=E5=BA=93=E7=AB=AF?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=B0=81=E7=AE=B1=20=E9=92=89=E9=92=89?= =?UTF-8?q?=E6=8F=90=E9=86=92=E4=B8=9A=E5=8A=A1=E5=9B=A2=E9=98=9F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=90=8C=E6=AD=A5=E9=87=87=E8=B4=AD=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APIServices/QiKu/SealBoxService.cs | 9 +- BBWY.Client/APIServices/ShopService.cs | 9 +- BBWY.Client/App.xaml.cs | 5 +- BBWY.Client/BBWYAppSettings.json | 8 +- .../SealBox/GetWareWaitTransportResponse.cs | 2 + .../APIModel/Response/Shop/ShopResponse.cs | 12 + BBWY.Client/Models/Shop/Shop.cs | 12 + BBWY.Client/ViewModels/MainViewModel.cs | 3 +- .../ViewModels/PackTask/TaskListViewModel.cs | 176 ++++++++- .../PackTask/WareHouseListViewModel.cs | 2 +- .../Setting/ShopSettingViewModel.cs | 27 +- BBWY.Client/Views/PackTask/TaskList.xaml | 23 +- BBWY.Client/Views/PackTask/WareHouseList.xaml | 4 +- BBWY.Client/Views/Setting/ShopSetting.xaml | 32 ++ .../TeamWaitTransportControl.xaml | 348 ++++++++++++++++++ .../TeamWaitTransportControl.xaml.cs | 26 ++ .../TeamWaitTransportListControl.xaml | 94 +++++ .../TeamWaitTransportListControl.xaml.cs | 26 ++ BBWY.Server.Business/Vender/VenderBusiness.cs | 12 +- BBWY.Server.Model/Db/Mds/Shops.cs | 14 + .../Dto/Request/Vender/ShopSettingRequest.cs | 12 + .../Dto/Response/Vender/ShopResponse.cs | 13 +- 22 files changed, 821 insertions(+), 48 deletions(-) create mode 100644 BBWY.Client/Views/WaitTransport/TeamWaitTransportControl.xaml create mode 100644 BBWY.Client/Views/WaitTransport/TeamWaitTransportControl.xaml.cs create mode 100644 BBWY.Client/Views/WaitTransport/TeamWaitTransportListControl.xaml create mode 100644 BBWY.Client/Views/WaitTransport/TeamWaitTransportListControl.xaml.cs diff --git a/BBWY.Client/APIServices/QiKu/SealBoxService.cs b/BBWY.Client/APIServices/QiKu/SealBoxService.cs index ded38c51..85a8993b 100644 --- a/BBWY.Client/APIServices/QiKu/SealBoxService.cs +++ b/BBWY.Client/APIServices/QiKu/SealBoxService.cs @@ -246,14 +246,15 @@ namespace BBWY.Client.APIServices - public ApiResponse GetWareWaitTransportList(WareType WareType, int? PageSize, int? PageIndex) + public ApiResponse GetWareWaitTransportList(WareType WareType, int? PageSize, int? PageIndex,string shopId=null) { return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetWareWaitTransportList", new { WareType, PageSize, - PageIndex + PageIndex, + shopId } , null, HttpMethod.Post); @@ -266,9 +267,9 @@ namespace BBWY.Client.APIServices } - public ApiResponse GetWareTransportCounts() + public ApiResponse GetWareTransportCounts(string shopId) { - return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetWareTransportCounts", + return SendRequest(globalContext.QKApiHost, $"api/SealBox/GetWareTransportCounts?shopId={shopId}", null, null, HttpMethod.Post); } diff --git a/BBWY.Client/APIServices/ShopService.cs b/BBWY.Client/APIServices/ShopService.cs index 0d630ce7..b9eac181 100644 --- a/BBWY.Client/APIServices/ShopService.cs +++ b/BBWY.Client/APIServices/ShopService.cs @@ -21,7 +21,10 @@ namespace BBWY.Client.APIServices int skuSafeTurnoverDays, string siNanDingDingWebHook, string siNanDingDingKey, - int siNanPolicyLevel) + int siNanPolicyLevel, + string qiKuDingDingWebHook, + string qiKuDingDingKey + ) { return SendRequest(globalContext.BBYWApiHost, "api/vender/SaveShopSetting", new { @@ -39,7 +42,9 @@ namespace BBWY.Client.APIServices skuSafeTurnoverDays, siNanDingDingWebHook, siNanDingDingKey, - siNanPolicyLevel + siNanPolicyLevel, + qiKuDingDingWebHook, + qiKuDingDingKey }, null, HttpMethod.Post); } diff --git a/BBWY.Client/App.xaml.cs b/BBWY.Client/App.xaml.cs index dd7d10be..7e47ace0 100644 --- a/BBWY.Client/App.xaml.cs +++ b/BBWY.Client/App.xaml.cs @@ -50,7 +50,7 @@ namespace BBWY.Client #if DEBUG //仓库组测试 - //userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjM1OTMyMDAyMjcwMDU2NDQ4IiwidGVhbUlkIjoiMTU0MDg4NTU3MDYyNzA0NzQyNCIsInNvblRlYW1JZHMiOiIxNTQwODg1NTcwNjI3MDQ3NDI0IiwiZXhwIjoxNzEwNDk2NTQ1fQ.Sx2vGJcYGf98x99slQLU3vt7yWdjspptSpbUCcZgWek"; + //userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjM1OTMyMDAyMjcwMDU2NDQ4IiwidGVhbUlkIjoiMTU0MDg4NTU3MDYyNzA0NzQyNCIsInNvblRlYW1JZHMiOiIxNTQwODg1NTcwNjI3MDQ3NDI0IiwiZXhwIjoxNzEwNDk2NTQ1fQ.Sx2vGJcYGf98x99slQLU3vt7yWdjspptSpbUCcZgWek"; //齐越梧桐 userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjY1ODk1OTgzMzc4MDc1NjQ4IiwidGVhbUlkIjoiMTUxNjcxNTM3MjQ0NTcwMDA5NiIsInNvblRlYW1JZHMiOiIxNTQwODg1NTcwNjI3MDQ3NDI0LDE1MTY3MTUzNzI0NDU3MDAwOTYiLCJleHAiOjE3MjQyOTE2MDZ9.NG6wDqHJ5ozmEDcAt2duJ50IcGarygrQ2bmiP4TGNRE"; @@ -61,6 +61,9 @@ namespace BBWY.Client //飞鱼 userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjI3NDg2MDI0Mjk0NzMxNzc2IiwidGVhbUlkIjoiMTUxNjk3NDI1MDU0MjUwMTg4OCIsInNvblRlYW1JZHMiOiIxNTE2OTc0MjUwNTQyNTAxODg4IiwiZXhwIjoxNzI0NTY1ODU5fQ._ezJmsvaStab8nDPB7qeoc2aakWfhHbeqq_X_RQsc4s"; + //小叶 + // userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNDM5OTA3NDY1MDMzNDIwODAwIiwidGVhbUlkIjoiMTQzNjI4ODUwMDIzNTI0MzUyMCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE3MjYyMTkyMDZ9.AYGBxDtX7PD8O6NOzUhRurOEJynSzoRzZpuK7RUKCKg"; + //齐越陈默 // userToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjI0OTUxNjgzNTc2NTAwMjI0IiwidGVhbUlkIjoiMTYyMDM0MjAxNDcwNjk3ODgxNiIsInNvblRlYW1JZHMiOiIxNjIwMzQyMDE0NzA2OTc4ODE2LDE2MjAzNDQxNDA4NTAwMDgwNjQsMTQxMDk1NTYwNDYxMjA5MTkwNCIsImV4cCI6MTcyNDkxNDM5M30.tIgo70tzRxZyUQkX1Jsh9I4ySciX0VC9HMMOoTnwVtM"; diff --git a/BBWY.Client/BBWYAppSettings.json b/BBWY.Client/BBWYAppSettings.json index 9622efaf..c18acab8 100644 --- a/BBWY.Client/BBWYAppSettings.json +++ b/BBWY.Client/BBWYAppSettings.json @@ -1,9 +1,9 @@ { - //"BBWYApiHost": "http://localhost:5000", - "BBWYApiHost": "http://bbwytest.qiyue666.com", + "BBWYApiHost": "http://localhost:5000", + // "BBWYApiHost": "http://bbwytest.qiyue666.com", "MDSApiHost": "http://mdsapi.qiyue666.com", "JOSApiHost": "", "1688ApiHost": "", - //"QKApiHost": "http://localhost:8080" - "QKApiHost": "http://qiku.qiyue666.com" + "QKApiHost": "http://localhost:8080" + // "QKApiHost": "http://qiku.qiyue666.com" } \ No newline at end of file diff --git a/BBWY.Client/Models/APIModel/Response/SealBox/GetWareWaitTransportResponse.cs b/BBWY.Client/Models/APIModel/Response/SealBox/GetWareWaitTransportResponse.cs index 14c466cb..60adea39 100644 --- a/BBWY.Client/Models/APIModel/Response/SealBox/GetWareWaitTransportResponse.cs +++ b/BBWY.Client/Models/APIModel/Response/SealBox/GetWareWaitTransportResponse.cs @@ -17,6 +17,8 @@ namespace BBWY.Client.Models.APIModel } public class WareWaitTransport : NotifyObject { + private bool isHideSkuList = true;//默认隐藏 + public bool IsHideSkuList { get => isHideSkuList; set { Set(ref isHideSkuList, value); } } private string transportOverTimeMarkMsg; public string TransportOverTimeMarkMsg { get => transportOverTimeMarkMsg; set { Set(ref transportOverTimeMarkMsg, value); } } diff --git a/BBWY.Client/Models/APIModel/Response/Shop/ShopResponse.cs b/BBWY.Client/Models/APIModel/Response/Shop/ShopResponse.cs index 86cca9d9..73b2d8c3 100644 --- a/BBWY.Client/Models/APIModel/Response/Shop/ShopResponse.cs +++ b/BBWY.Client/Models/APIModel/Response/Shop/ShopResponse.cs @@ -56,6 +56,18 @@ namespace BBWY.Client.Models /// 司南钉钉密钥 /// public string SiNanDingDingKey { get; set; } + + + + /// + /// 齐库钉钉WebHook地址 + /// + public string QiKuDingDingWebHook { get; set; } + + /// + /// 齐库钉钉密钥 + /// + public string QiKuDingDingKey { get; set; } } public class DepartmentResponse diff --git a/BBWY.Client/Models/Shop/Shop.cs b/BBWY.Client/Models/Shop/Shop.cs index b35a35df..af8b2029 100644 --- a/BBWY.Client/Models/Shop/Shop.cs +++ b/BBWY.Client/Models/Shop/Shop.cs @@ -83,6 +83,18 @@ namespace BBWY.Client.Models /// public string SiNanDingDingKey { get; set; } + + + /// + /// 齐库钉钉WebHook地址 + /// + public string QiKuDingDingWebHook { get; set; } + + /// + /// 齐库钉钉密钥 + /// + public string QiKuDingDingKey { get; set; } + public override string ToString() { return ShopName; diff --git a/BBWY.Client/ViewModels/MainViewModel.cs b/BBWY.Client/ViewModels/MainViewModel.cs index aeeb77a6..c5e20b2d 100644 --- a/BBWY.Client/ViewModels/MainViewModel.cs +++ b/BBWY.Client/ViewModels/MainViewModel.cs @@ -267,7 +267,6 @@ namespace BBWY.Client.ViewModels })); } - App.Current.Dispatcher.Invoke(() => { MenuList.Add(new MenuModel() @@ -375,6 +374,8 @@ namespace BBWY.Client.ViewModels shop.AppKey2 = s2.AppKey2; shop.AppSecret2 = s2.AppSecret2; shop.AppToken2 = s2.AppToken2; + shop.QiKuDingDingWebHook = s2.QiKuDingDingWebHook; + shop.QiKuDingDingKey = s2.QiKuDingDingKey; } } } diff --git a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs index 2e3ad807..05111bb7 100644 --- a/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/TaskListViewModel.cs @@ -44,6 +44,16 @@ namespace BBWY.Client.ViewModels.PackTask #region 属性绑定 + private string waitTransportJDWareCount; + public string WaitTransportJDWareCount { get => waitTransportJDWareCount; set { Set(ref waitTransportJDWareCount, value); } } + private string waitTransportCloudWareCount; + public string WaitTransportCloudWareCount { get => waitTransportCloudWareCount; set { Set(ref waitTransportCloudWareCount, value); } } + + private string waitTransportJuShuiTanCount; + public string WaitTransportJuShuiTanCount { get => waitTransportJuShuiTanCount; set { Set(ref waitTransportJuShuiTanCount, value); } } + + private string waitTransportStoreWareCount; + public string WaitTransportStoreWareCount { get => waitTransportStoreWareCount; set { Set(ref waitTransportStoreWareCount, value); } } private ObservableCollection waitCompletedList; /// @@ -102,6 +112,14 @@ namespace BBWY.Client.ViewModels.PackTask /// public ObservableCollection FallWareConfiguredList { get => fallWareConfiguredList; set { Set(ref fallWareConfiguredList, value); } } + + private ObservableCollection waitTransportList; + /// + /// 待转运列表 + /// + public ObservableCollection WaitTransportList { get => waitTransportList; set { Set(ref waitTransportList, value); } } + + public List WareWaitTransports { get; set; } ///// ///// 查询时间段 ///// @@ -212,19 +230,28 @@ namespace BBWY.Client.ViewModels.PackTask /// public string WaitFallWareCount { get => waitFallWareCount; set { Set(ref waitFallWareCount, value); } } - private string waitOutbound; + //private string waitOutbound; + ///// + ///// 待出库任务数 + ///// + //public string WaitOutbound { get => waitOutbound; set { Set(ref waitOutbound, value); } } + + private string waitTransportCount; /// - /// 待出库任务数 + /// 待转运 /// - public string WaitOutbound { get => waitOutbound; set { Set(ref waitOutbound, value); } } + public string WaitTransportCount { get => waitTransportCount; set { Set(ref waitTransportCount, value); } } - private string waitCompleted; - /// - /// 待完成任务数 - /// - public string WaitCompleted { get => waitCompleted; set { Set(ref waitCompleted, value); } } + //private string waitCompleted; + ///// + ///// 待完成任务数 + ///// + //public string WaitCompleted { get => waitCompleted; set { Set(ref waitCompleted, value); } } + + private WareType selectWareType; + public WareType SelectWareType { get => selectWareType; set { Set(ref selectWareType, value); } } private SealBoxService sealBoxService; @@ -260,6 +287,7 @@ namespace BBWY.Client.ViewModels.PackTask Task.Factory.StartNew(() => SearchTaskList()); }); + CreateTaskCommand = new RelayCommand(CreateTask); SearchTaskCommand = new RelayCommand(() => { @@ -280,6 +308,8 @@ namespace BBWY.Client.ViewModels.PackTask //EndTime = DateTime.Now.Date; IsLoading = false; //加载数据 + + SelectWareType = WareType.云仓; SetTaskState(null); this.sealBoxService = sealBoxService; @@ -295,6 +325,16 @@ namespace BBWY.Client.ViewModels.PackTask this.productService = productService; UpdateTaskStateCommand = new RelayCommand(UpdateTaskState); + + SetWareTypeCommand = new RelayCommand(s => + { + + SelectWareType = s; + SearchTaskList(); + }); + + + } private void UpdateTaskState(object obj) { @@ -411,6 +451,11 @@ namespace BBWY.Client.ViewModels.PackTask case Models.TaskState.商家自取: break; case Models.TaskState.待转运: + if (obj is WareWaitTransport) + { + var data = obj as WareWaitTransport; + data.IsHideSkuList = !data.IsHideSkuList; + } break; case Models.TaskState.已超时: break; @@ -558,13 +603,16 @@ namespace BBWY.Client.ViewModels.PackTask NoArrivedCount = packTaskResult.Data.NoArrivedCount.ToString(); SomeArrivedCount = packTaskResult.Data.SomeArrivedCount.ToString(); //WorryCount = packTaskResult.Data.WorryCount.ToString(); - WaitOutbound = packTaskResult.Data.WaitOutbound?.ToString(); + //WaitOutbound = packTaskResult.Data.WaitOutbound?.ToString(); WaitPackCount = packTaskResult.Data.WaitPackCount?.ToString(); WaitSealBoxCount = packTaskResult.Data.WaitSealBox?.ToString(); WaitFallWareCount = packTaskResult.Data.WaitFallWareCount?.ToString(); - WaitCompleted = packTaskResult.Data.WaitCompleted?.ToString(); + //WaitCompleted = packTaskResult.Data.WaitCompleted?.ToString(); WaitScheduleCount = packTaskResult.Data.WaitScheduleCount?.ToString(); - })); + + + WaitTransportCount =packTaskResult.Data.WaitTransportCount?.ToString(); + })); } } @@ -579,6 +627,12 @@ namespace BBWY.Client.ViewModels.PackTask #region 事件绑定 + + + /// + /// 设置仓库类型 + /// + public ICommand SetWareTypeCommand { get; set; } /// /// 修改任务状态 /// @@ -657,7 +711,7 @@ namespace BBWY.Client.ViewModels.PackTask } private List waitSealBoxTaskStates = new List { - Models.TaskState.待落仓, Models.TaskState.待封箱, Models.TaskState.待出库, Models.TaskState.商家自取 + Models.TaskState.待落仓, Models.TaskState.待封箱, Models.TaskState.待出库, Models.TaskState.商家自取, Models.TaskState.待转运 };//配置封箱的任务状态范围 @@ -672,6 +726,7 @@ namespace BBWY.Client.ViewModels.PackTask private Thread sealboxOverTimeThread = null; private Thread fallwareOverTimeThread = null; private Thread scheduleOverTimeThread = null; + private Thread waitTransportOverTimeThread = null; /// /// 搜索任务列表 /// @@ -1240,14 +1295,102 @@ namespace BBWY.Client.ViewModels.PackTask }); } - } + if (TaskState == Models.TaskState.待转运) + { + PageSize = 20; + + WaitTransportList = new ObservableCollection(); + var datas = sealBoxService.GetWareWaitTransportList(SelectWareType, PageSize, PageIndex,globalContext.User.Shop.ShopId.ToString()); + if (datas != null && datas.Data != null && datas.Success) + { + var dataModel = datas.Data; + OrderCount = dataModel.TotalCount; + WareWaitTransports = dataModel.WareWaitTransports; + foreach (var item in dataModel.WareWaitTransports) + { + + App.Current.Dispatcher.Invoke(new Action(() => + { + WaitTransportList.Add(item); + })); + + } + + var sealboxTasks = WaitTransportList.Where(p => p.TransportOverTime != null).ToList(); + if (sealboxTasks.Count() > 0 && TaskState == Models.TaskState.待转运) + { + + waitTransportOverTimeThread = new Thread(() => + { + IsStartThread = true; + while (IsStartThread) + { + App.Current.Dispatcher.BeginInvoke(new Action(() => + { + foreach (var item in sealboxTasks) + { + var datetime = item.TransportOverTime.Value.Subtract(DateTime.Now); + if (datetime.TotalMilliseconds > 0) + { + item.IsWaitTransportOverTime = false; + item.WaitTransportRemainTime = OverTimeHelper.GetTimeString(datetime); + } + else + { + item.IsWaitTransportOverTime = true; + item.WaitTransportRemainTime = OverTimeHelper.GetTimeString(datetime); + } + + } + })); + Thread.Sleep(1000); + } + + }); + //任务倒计时数据 + waitTransportOverTimeThread.IsBackground = true; + waitTransportOverTimeThread.Start(); + + + } + } + else + { + if (datas != null) System.Windows.MessageBox.Show(datas.Msg); + } + + + Task.Factory.StartNew(() => + { + IsLoadWaitTransportCount(); + }); + IsLoading = false; + } + + } } GlobalContext globalContext; + private void IsLoadWaitTransportCount() + { + var res = sealBoxService.GetWareTransportCounts(globalContext.User.Shop.ShopId.ToString()); + if (res != null && res.Success && res.Data != null) + { + App.Current.Dispatcher.Invoke(new Action(() => + { + WaitTransportCloudWareCount = res.Data.WaitTransportCloudWareCount; + WaitTransportJuShuiTanCount = res.Data.WaitTransportJuShuiTanCount; + WaitTransportStoreWareCount = res.Data.WaitTransportStoreWareCount; + WaitTransportJDWareCount = res.Data.WaitTransportJDWareCount; + })); + } + + } + private void IsLoadFallWareCount() { var res = sealBoxService.GetFallWareConfigureCounts(globalContext.User.Shop.ShopId.ToString()); @@ -1318,12 +1461,5 @@ namespace BBWY.Client.ViewModels.PackTask } - - - - - - - } } diff --git a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs index 00f1f9fe..e2f575ea 100644 --- a/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs +++ b/BBWY.Client/ViewModels/PackTask/WareHouseListViewModel.cs @@ -2050,7 +2050,7 @@ namespace BBWY.Client.ViewModels.PackTask private void IsLoadWaitTransportCount() { - var res = sealBoxService.GetWareTransportCounts(); + var res = sealBoxService.GetWareTransportCounts(null); if (res != null && res.Success && res.Data != null) { App.Current.Dispatcher.Invoke(new Action(() => diff --git a/BBWY.Client/ViewModels/Setting/ShopSettingViewModel.cs b/BBWY.Client/ViewModels/Setting/ShopSettingViewModel.cs index 9c8c108e..e159fffc 100644 --- a/BBWY.Client/ViewModels/Setting/ShopSettingViewModel.cs +++ b/BBWY.Client/ViewModels/Setting/ShopSettingViewModel.cs @@ -27,6 +27,11 @@ namespace BBWY.Client.ViewModels private string siNanDingDingWebHook; private string siNanDingDingKey; + + private string qiKuDingDingWebHook; + private string qiKuDingDingKey; + + private SiNanPolicyLevel selectedSiNanPolicyLevel; private Platform purchasePlatform; @@ -49,6 +54,12 @@ namespace BBWY.Client.ViewModels public string DingDingWebHook { get => dingDingWebHook; set { Set(ref dingDingWebHook, value); } } public string DingDingKey { get => dingDingKey; set { Set(ref dingDingKey, value); } } + + + public string QiKuDingDingWebHook { get => qiKuDingDingWebHook; set { Set(ref qiKuDingDingWebHook, value); } } + public string QiKuDingDingKey { get => qiKuDingDingKey; set { Set(ref qiKuDingDingKey, value); } } + + public KVModel SelectedSkuSafeTurnoverDay { get => selectedSkuSafeTurnoverDay; set { Set(ref selectedSkuSafeTurnoverDay, value); } } public string SiNanDingDingWebHook { get => siNanDingDingWebHook; set { Set(ref siNanDingDingWebHook, value); } } @@ -77,6 +88,12 @@ namespace BBWY.Client.ViewModels SetPanelIndexCommand = new RelayCommand(i => { PanelIndex = i; + + + if (i==3)//获取齐库钉钉配置 + { + + } }); SafeDayList = new List() { @@ -127,6 +144,8 @@ namespace BBWY.Client.ViewModels SiNanDingDingKey = globalContext.User.Shop.SiNanDingDingKey; SiNanDingDingWebHook = globalContext.User.Shop.SiNanDingDingWebHook; + QiKuDingDingWebHook=globalContext.User.Shop.QiKuDingDingWebHook; + QiKuDingDingKey = globalContext.User.Shop.QiKuDingDingKey; PurchasePlatform = Platform.阿里巴巴; } @@ -180,7 +199,10 @@ namespace BBWY.Client.ViewModels int.Parse(SelectedSkuSafeTurnoverDay.Value), SiNanDingDingWebHook, SiNanDingDingKey, - (int)SelectedSiNanPolicyLevel)).ContinueWith(r => + (int)SelectedSiNanPolicyLevel, + QiKuDingDingWebHook, + QiKuDingDingKey + )).ContinueWith(r => { IsLoading = false; var response = r.Result; @@ -199,6 +221,9 @@ namespace BBWY.Client.ViewModels globalContext.User.Shop.SiNanDingDingKey = this.SiNanDingDingKey; globalContext.User.Shop.SiNanDingDingWebHook = this.SiNanDingDingWebHook; + + globalContext.User.Shop.QiKuDingDingWebHook = this.QiKuDingDingWebHook; + globalContext.User.Shop.QiKuDingDingKey = this.QiKuDingDingKey; globalContext.User.Shop.SiNanPolicyLevel = (int)this.SelectedSiNanPolicyLevel; }); } diff --git a/BBWY.Client/Views/PackTask/TaskList.xaml b/BBWY.Client/Views/PackTask/TaskList.xaml index 071f0b85..54ee6125 100644 --- a/BBWY.Client/Views/PackTask/TaskList.xaml +++ b/BBWY.Client/Views/PackTask/TaskList.xaml @@ -8,6 +8,7 @@ xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" xmlns:cmodel="clr-namespace:BBWY.Client.Models" xmlns:sealbox="clr-namespace:BBWY.Client.Views.SealBox" + xmlns:tran="clr-namespace:BBWY.Client.Views.WaitTransport" xmlns:b="http://schemas.microsoft.com/xaml/behaviors" xmlns:sys="clr-namespace:System;assembly=mscorlib" DataContext="{Binding TaskList,Source={StaticResource Locator}}" @@ -65,8 +66,8 @@ - - + + @@ -107,10 +108,12 @@ - - + - + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BBWY.Client/Views/WaitTransport/TeamWaitTransportListControl.xaml.cs b/BBWY.Client/Views/WaitTransport/TeamWaitTransportListControl.xaml.cs new file mode 100644 index 00000000..51e01d89 --- /dev/null +++ b/BBWY.Client/Views/WaitTransport/TeamWaitTransportListControl.xaml.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace BBWY.Client.Views.WaitTransport +{ + /// + /// TeamWaitTransportListControl.xaml 的交互逻辑 + /// + public partial class TeamWaitTransportListControl : UserControl + { + public TeamWaitTransportListControl() + { + InitializeComponent(); + } + } +} diff --git a/BBWY.Server.Business/Vender/VenderBusiness.cs b/BBWY.Server.Business/Vender/VenderBusiness.cs index 4aa6960d..96c93963 100644 --- a/BBWY.Server.Business/Vender/VenderBusiness.cs +++ b/BBWY.Server.Business/Vender/VenderBusiness.cs @@ -154,6 +154,8 @@ namespace BBWY.Server.Business .Set(s => s.SiNanDingDingKey, shopSettingRequest.SiNanDingDingKey) .Set(s => s.SiNanDingDingWebHook, shopSettingRequest.SiNanDingDingWebHook) .Set(s => s.SiNanPolicyLevel, shopSettingRequest.SiNanPolicyLevel) + .Set(s => s.QiKuDingDingKey, shopSettingRequest.QiKuDingDingKey) + .Set(s => s.QiKuDingDingWebHook, shopSettingRequest.QiKuDingDingWebHook) .ExecuteAffrows(); }); } @@ -185,6 +187,8 @@ namespace BBWY.Server.Business .Set(s => s.SiNanDingDingKey, shopSettingRequest.SiNanDingDingKey) .Set(s => s.SiNanDingDingWebHook, shopSettingRequest.SiNanDingDingWebHook) .Set(s => s.SiNanPolicyLevel, shopSettingRequest.SiNanPolicyLevel) + .Set(s => s.QiKuDingDingKey, shopSettingRequest.QiKuDingDingKey) + .Set(s => s.QiKuDingDingWebHook, shopSettingRequest.QiKuDingDingWebHook) .ExecuteAffrows(); }); } @@ -221,7 +225,9 @@ namespace BBWY.Server.Business s.SiNanDingDingWebHook, s.SiNanPolicyLevel, s.PJZSDingDingWebHook, - s.PJZSDingDingKey + s.PJZSDingDingKey, + s.QiKuDingDingKey, + s.QiKuDingDingWebHook }).GroupBy(x => x.DepartmentId); if (relationGroups.Count() == 0) return null; @@ -256,7 +262,9 @@ namespace BBWY.Server.Business SiNanDingDingWebHook = x.SiNanDingDingWebHook, SiNanPolicyLevel = x.SiNanPolicyLevel, PJZSDingDingKey = x.PJZSDingDingKey, - PJZSDingDingWebHook = x.PJZSDingDingWebHook + PJZSDingDingWebHook = x.PJZSDingDingWebHook, + QiKuDingDingKey=x.QiKuDingDingKey, + QiKuDingDingWebHook=x.QiKuDingDingWebHook }).ToList() }; departmentList.Add(department); diff --git a/BBWY.Server.Model/Db/Mds/Shops.cs b/BBWY.Server.Model/Db/Mds/Shops.cs index 57d133c9..50bc611a 100644 --- a/BBWY.Server.Model/Db/Mds/Shops.cs +++ b/BBWY.Server.Model/Db/Mds/Shops.cs @@ -170,6 +170,20 @@ namespace BBWY.Server.Model.Db.Mds /// [Column(StringLength = 100)] public string PJZSDingDingKey { get; set; } + + + + /// + /// 齐库钉钉WebHook地址 + /// + [Column(StringLength = 255)] + public string QiKuDingDingWebHook { get; set; } + + /// + /// 齐库钉钉密钥 + /// + [Column(StringLength = 100)] + public string QiKuDingDingKey { get; set; } } } diff --git a/BBWY.Server.Model/Dto/Request/Vender/ShopSettingRequest.cs b/BBWY.Server.Model/Dto/Request/Vender/ShopSettingRequest.cs index 058ae3fd..bec6d9bd 100644 --- a/BBWY.Server.Model/Dto/Request/Vender/ShopSettingRequest.cs +++ b/BBWY.Server.Model/Dto/Request/Vender/ShopSettingRequest.cs @@ -51,5 +51,17 @@ namespace BBWY.Server.Model.Dto /// 司南钉钉密钥 /// public string SiNanDingDingKey { get; set; } + + + /// + /// 齐库钉钉WebHook地址 + /// + public string QiKuDingDingWebHook { get; set; } + + /// + /// 齐库钉钉密钥 + /// + public string QiKuDingDingKey { get; set; } + } } diff --git a/BBWY.Server.Model/Dto/Response/Vender/ShopResponse.cs b/BBWY.Server.Model/Dto/Response/Vender/ShopResponse.cs index 7f654191..14d0a2ee 100644 --- a/BBWY.Server.Model/Dto/Response/Vender/ShopResponse.cs +++ b/BBWY.Server.Model/Dto/Response/Vender/ShopResponse.cs @@ -1,4 +1,5 @@ -using System; +using FreeSql.DataAnnotations; +using System; using System.Collections.Generic; using System.Text; @@ -81,6 +82,16 @@ namespace BBWY.Server.Model.Dto /// PJZS钉钉密钥 /// public string PJZSDingDingKey { get; set; } + + + /// + /// 齐库钉钉WebHook地址 + /// + public string QiKuDingDingWebHook { get; set; } + /// + /// 齐库钉钉密钥 + /// + public string QiKuDingDingKey { get; set; } } public class PurchaseAccountResponse