From 7bce65917dccff3a8d869009ea3ad5b11adde7a9 Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Sat, 18 Jan 2025 11:37:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=8A=E6=AC=A1=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=90=8E=E7=9A=84=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ShelfTypeModel.cs => OrderTypeModel.cs} | 2 +- .../BatchBindMatDetailController.cs | 26 +++++++++---------- WCS.WebApi/Controllers/HomeController.cs | 8 +++--- 货架标准上位机/Tool/GetBaseData.cs | 6 ++--- .../ViewModels/MatDetailCurrentInfoViewModel.cs | 14 +++++----- .../ViewModels/OutInventoryAddDucumentViewModel.cs | 10 +++---- .../ViewModels/ShelfInfoAddOrUpdateViewModel.cs | 8 +++--- .../ViewModels/ShelfInfoViewModel.cs | 14 +++++----- 8 files changed, 44 insertions(+), 44 deletions(-) rename WCS.Model/ApiModel/BatchBindMatDetail/{ShelfTypeModel.cs => OrderTypeModel.cs} (85%) diff --git a/WCS.Model/ApiModel/BatchBindMatDetail/ShelfTypeModel.cs b/WCS.Model/ApiModel/BatchBindMatDetail/OrderTypeModel.cs similarity index 85% rename from WCS.Model/ApiModel/BatchBindMatDetail/ShelfTypeModel.cs rename to WCS.Model/ApiModel/BatchBindMatDetail/OrderTypeModel.cs index d9478d6..66d2371 100644 --- a/WCS.Model/ApiModel/BatchBindMatDetail/ShelfTypeModel.cs +++ b/WCS.Model/ApiModel/BatchBindMatDetail/OrderTypeModel.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace WCS.Model.ApiModel.Home +namespace WCS.Model.ApiModel { public class OrderTypeModel { diff --git a/WCS.WebApi/Controllers/BatchBindMatDetailController.cs b/WCS.WebApi/Controllers/BatchBindMatDetailController.cs index 61f0fdb..a277b0a 100644 --- a/WCS.WebApi/Controllers/BatchBindMatDetailController.cs +++ b/WCS.WebApi/Controllers/BatchBindMatDetailController.cs @@ -26,34 +26,34 @@ namespace WCS.WebApi.Controllers _warningService = warningService; } - [Route("getShelfTypes")] - [HttpPost(Name = "getShelfTypes")] - public async Task getShelfTypes(RequestBase request) + [Route("getOrderTypes")] + [HttpPost(Name = "getOrderTypes")] + public async Task getOrderTypes(RequestBase request) { try { //直接获取当前所有货架类型并返回 - var shelfTypes = DbHelp.db.Queryable() - .Select(t => new ShelfTypeModel() + var OrderTypes = DbHelp.db.Queryable() + .Select(t => new OrderTypeModel() { Id = t.Id, - ShelfTypeName = t.ShelfTypeName + OrderTypeName = t.OrderTypeName }) .ToList(); - return new PageQueryResponse() + return new PageQueryResponse() { Code = 200, Message = "success", - Data = new PageQueryResponseData + Data = new PageQueryResponseData { - Lists = shelfTypes, - Count = shelfTypes.Count + Lists = OrderTypes, + Count = OrderTypes.Count } }; } catch (Exception ex) { - return new PageQueryResponse() + return new PageQueryResponse() { Code = 300, Message = $"查询失败:{ex.Message}", @@ -62,8 +62,8 @@ namespace WCS.WebApi.Controllers } - [Route("getShelfInfoByLocationCode")] - [HttpPost(Name = "getShelfInfoByLocationCode")] + [Route("getShelfInfoByLocationCode1")] + [HttpPost(Name = "getShelfInfoByLocationCode1")] public async Task getShelfInfoByLocationCode(GetShelfInfoByLocationCodeRequest request) { //判断参数 diff --git a/WCS.WebApi/Controllers/HomeController.cs b/WCS.WebApi/Controllers/HomeController.cs index 142952a..6ee3911 100644 --- a/WCS.WebApi/Controllers/HomeController.cs +++ b/WCS.WebApi/Controllers/HomeController.cs @@ -245,17 +245,17 @@ namespace WCS.WebApi.Controllers { //直接获取当前所有货架类型并返回 var shelfTypes = DbHelp.db.Queryable() - .Select(t => new OrderTypeModel() + .Select(t => new ShelfTypeInfo() { Id = t.Id, ShelfTypeName = t.ShelfTypeName }) .ToList(); - return new PageQueryResponse() + return new PageQueryResponse() { Code = 200, Message = "success", - Data = new PageQueryResponseData + Data = new PageQueryResponseData { Lists = shelfTypes, Count = shelfTypes.Count @@ -264,7 +264,7 @@ namespace WCS.WebApi.Controllers } catch (Exception ex) { - return new PageQueryResponse() + return new PageQueryResponse() { Code = 300, Message = $"查询失败:{ex.Message}", diff --git a/货架标准上位机/Tool/GetBaseData.cs b/货架标准上位机/Tool/GetBaseData.cs index 3b362bb..13d94e5 100644 --- a/货架标准上位机/Tool/GetBaseData.cs +++ b/货架标准上位机/Tool/GetBaseData.cs @@ -13,7 +13,7 @@ namespace 智慧物流软件系统.Tool { public static class GetBaseData { - public static List GetShelfType() + public static List GetShelfType() { var body = new RequestBase() { @@ -21,12 +21,12 @@ namespace 智慧物流软件系统.Tool DeviceType = LocalFile.Config.DeviceType, }; - var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); + var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0) { return Result.Data.Lists; } - else { return new List(); } + else { return new List(); } } public static List GetLocationAreaInfos() diff --git a/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs b/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs index b7213ab..23a2473 100644 --- a/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs +++ b/货架标准上位机/ViewModels/MatDetailCurrentInfoViewModel.cs @@ -123,8 +123,8 @@ namespace 智慧物流软件系统.ViewModel } } - private List shelfTypeItems; - public List ShelfTypeItems + private List shelfTypeItems; + public List ShelfTypeItems { get { return shelfTypeItems; } set @@ -133,8 +133,8 @@ namespace 智慧物流软件系统.ViewModel } } - private OrderTypeModel? selectedShelfTypeItem; - public OrderTypeModel? SelectedShelfTypeItem + private ShelfTypeModel? selectedShelfTypeItem; + public ShelfTypeModel? SelectedShelfTypeItem { get { return selectedShelfTypeItem; } set @@ -147,8 +147,8 @@ namespace 智慧物流软件系统.ViewModel //调用接口更新! Task.Run(() => { - ShelfTypeItems = new List(); - ShelfTypeItems.Add(new OrderTypeModel { Id = null, ShelfTypeName = "全部" }); + ShelfTypeItems = new List(); + ShelfTypeItems.Add(new ShelfTypeModel { Id = null, ShelfTypeName = "全部" }); var body = new RequestBase() { @@ -156,7 +156,7 @@ namespace 智慧物流软件系统.ViewModel DeviceType = LocalFile.Config.DeviceType, }; - var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); + var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0) { ShelfTypeItems.AddRange(Result.Data.Lists); diff --git a/货架标准上位机/ViewModels/OutInventoryAddDucumentViewModel.cs b/货架标准上位机/ViewModels/OutInventoryAddDucumentViewModel.cs index 0b9eb17..dcf71cc 100644 --- a/货架标准上位机/ViewModels/OutInventoryAddDucumentViewModel.cs +++ b/货架标准上位机/ViewModels/OutInventoryAddDucumentViewModel.cs @@ -38,8 +38,8 @@ namespace 智慧物流软件系统.ViewModels } } - private List shelfTypeItems; - public List ShelfTypeItems + private List shelfTypeItems; + public List ShelfTypeItems { get { return shelfTypeItems; } set @@ -58,7 +58,7 @@ namespace 智慧物流软件系统.ViewModels DeviceType = LocalFile.Config.DeviceType, }; - var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); + var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0) { ShelfTypeItems = Result.Data.Lists; @@ -67,8 +67,8 @@ namespace 智慧物流软件系统.ViewModels }); } - private OrderTypeModel selectedShelfTypeItem; - public OrderTypeModel SelectedShelfTypeItem + private ShelfTypeModel selectedShelfTypeItem; + public ShelfTypeModel SelectedShelfTypeItem { get { return selectedShelfTypeItem; } set diff --git a/货架标准上位机/ViewModels/ShelfInfoAddOrUpdateViewModel.cs b/货架标准上位机/ViewModels/ShelfInfoAddOrUpdateViewModel.cs index f3ee6a2..dcfb5a4 100644 --- a/货架标准上位机/ViewModels/ShelfInfoAddOrUpdateViewModel.cs +++ b/货架标准上位机/ViewModels/ShelfInfoAddOrUpdateViewModel.cs @@ -54,8 +54,8 @@ namespace 智慧物流软件系统.ViewModel }; } - private List shelfTypeItems; - public List ShelfTypeItems + private List shelfTypeItems; + public List ShelfTypeItems { get { return shelfTypeItems; } set @@ -64,8 +64,8 @@ namespace 智慧物流软件系统.ViewModel } } - private OrderTypeModel selectedShelfTypeItem; - public OrderTypeModel SelectedShelfTypeItem + private ShelfTypeModel selectedShelfTypeItem; + public ShelfTypeModel SelectedShelfTypeItem { get { return selectedShelfTypeItem; } set diff --git a/货架标准上位机/ViewModels/ShelfInfoViewModel.cs b/货架标准上位机/ViewModels/ShelfInfoViewModel.cs index 37ab20e..91cdae0 100644 --- a/货架标准上位机/ViewModels/ShelfInfoViewModel.cs +++ b/货架标准上位机/ViewModels/ShelfInfoViewModel.cs @@ -64,8 +64,8 @@ namespace 智慧物流软件系统.ViewModel } } - private List shelfTypeItems; - public List ShelfTypeItems + private List shelfTypeItems; + public List ShelfTypeItems { get { return shelfTypeItems; } set @@ -74,8 +74,8 @@ namespace 智慧物流软件系统.ViewModel } } - private OrderTypeModel? selectedShelfTypeItem; - public OrderTypeModel? SelectedShelfTypeItem + private ShelfTypeModel? selectedShelfTypeItem; + public ShelfTypeModel? SelectedShelfTypeItem { get { return selectedShelfTypeItem; } set @@ -89,8 +89,8 @@ namespace 智慧物流软件系统.ViewModel //调用接口更新! Task.Run(() => { - ShelfTypeItems = new List(); - ShelfTypeItems.Add(new OrderTypeModel { Id = null, ShelfTypeName = "全部" }); + ShelfTypeItems = new List(); + ShelfTypeItems.Add(new ShelfTypeModel { Id = null, ShelfTypeName = "全部" }); var body = new RequestBase() { @@ -98,7 +98,7 @@ namespace 智慧物流软件系统.ViewModel DeviceType = LocalFile.Config.DeviceType, }; - var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); + var Result = ApiHelp.GetDataFromHttp>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST"); if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0) { ShelfTypeItems.AddRange(Result.Data.Lists);