解决上次提交后的编译报错
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace WCS.Model.ApiModel.Home
|
namespace WCS.Model.ApiModel
|
||||||
{
|
{
|
||||||
public class OrderTypeModel
|
public class OrderTypeModel
|
||||||
{
|
{
|
@ -26,34 +26,34 @@ namespace WCS.WebApi.Controllers
|
|||||||
_warningService = warningService;
|
_warningService = warningService;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("getShelfTypes")]
|
[Route("getOrderTypes")]
|
||||||
[HttpPost(Name = "getShelfTypes")]
|
[HttpPost(Name = "getOrderTypes")]
|
||||||
public async Task<ResponseBase> getShelfTypes(RequestBase request)
|
public async Task<ResponseBase> getOrderTypes(RequestBase request)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//直接获取当前所有货架类型并返回
|
//直接获取当前所有货架类型并返回
|
||||||
var shelfTypes = DbHelp.db.Queryable<ShelfTypeInfo>()
|
var OrderTypes = DbHelp.db.Queryable<OrderTypeInfo>()
|
||||||
.Select(t => new ShelfTypeModel()
|
.Select(t => new OrderTypeModel()
|
||||||
{
|
{
|
||||||
Id = t.Id,
|
Id = t.Id,
|
||||||
ShelfTypeName = t.ShelfTypeName
|
OrderTypeName = t.OrderTypeName
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
return new PageQueryResponse<ShelfTypeModel>()
|
return new PageQueryResponse<OrderTypeModel>()
|
||||||
{
|
{
|
||||||
Code = 200,
|
Code = 200,
|
||||||
Message = "success",
|
Message = "success",
|
||||||
Data = new PageQueryResponseData<ShelfTypeModel>
|
Data = new PageQueryResponseData<OrderTypeModel>
|
||||||
{
|
{
|
||||||
Lists = shelfTypes,
|
Lists = OrderTypes,
|
||||||
Count = shelfTypes.Count
|
Count = OrderTypes.Count
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
return new PageQueryResponse<ShelfTypeModel>()
|
return new PageQueryResponse<OrderTypeModel>()
|
||||||
{
|
{
|
||||||
Code = 300,
|
Code = 300,
|
||||||
Message = $"查询失败:{ex.Message}",
|
Message = $"查询失败:{ex.Message}",
|
||||||
@ -62,8 +62,8 @@ namespace WCS.WebApi.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Route("getShelfInfoByLocationCode")]
|
[Route("getShelfInfoByLocationCode1")]
|
||||||
[HttpPost(Name = "getShelfInfoByLocationCode")]
|
[HttpPost(Name = "getShelfInfoByLocationCode1")]
|
||||||
public async Task<ResponseBase> getShelfInfoByLocationCode(GetShelfInfoByLocationCodeRequest request)
|
public async Task<ResponseBase> getShelfInfoByLocationCode(GetShelfInfoByLocationCodeRequest request)
|
||||||
{
|
{
|
||||||
//判断参数
|
//判断参数
|
||||||
|
@ -245,17 +245,17 @@ namespace WCS.WebApi.Controllers
|
|||||||
{
|
{
|
||||||
//直接获取当前所有货架类型并返回
|
//直接获取当前所有货架类型并返回
|
||||||
var shelfTypes = DbHelp.db.Queryable<ShelfTypeInfo>()
|
var shelfTypes = DbHelp.db.Queryable<ShelfTypeInfo>()
|
||||||
.Select(t => new OrderTypeModel()
|
.Select(t => new ShelfTypeInfo()
|
||||||
{
|
{
|
||||||
Id = t.Id,
|
Id = t.Id,
|
||||||
ShelfTypeName = t.ShelfTypeName
|
ShelfTypeName = t.ShelfTypeName
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
return new PageQueryResponse<OrderTypeModel>()
|
return new PageQueryResponse<ShelfTypeInfo>()
|
||||||
{
|
{
|
||||||
Code = 200,
|
Code = 200,
|
||||||
Message = "success",
|
Message = "success",
|
||||||
Data = new PageQueryResponseData<OrderTypeModel>
|
Data = new PageQueryResponseData<ShelfTypeInfo>
|
||||||
{
|
{
|
||||||
Lists = shelfTypes,
|
Lists = shelfTypes,
|
||||||
Count = shelfTypes.Count
|
Count = shelfTypes.Count
|
||||||
@ -264,7 +264,7 @@ namespace WCS.WebApi.Controllers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
return new PageQueryResponse<OrderTypeModel>()
|
return new PageQueryResponse<ShelfTypeInfo>()
|
||||||
{
|
{
|
||||||
Code = 300,
|
Code = 300,
|
||||||
Message = $"查询失败:{ex.Message}",
|
Message = $"查询失败:{ex.Message}",
|
||||||
|
@ -13,7 +13,7 @@ namespace 智慧物流软件系统.Tool
|
|||||||
{
|
{
|
||||||
public static class GetBaseData
|
public static class GetBaseData
|
||||||
{
|
{
|
||||||
public static List<OrderTypeModel> GetShelfType()
|
public static List<ShelfTypeModel> GetShelfType()
|
||||||
{
|
{
|
||||||
var body = new RequestBase()
|
var body = new RequestBase()
|
||||||
{
|
{
|
||||||
@ -21,12 +21,12 @@ namespace 智慧物流软件系统.Tool
|
|||||||
DeviceType = LocalFile.Config.DeviceType,
|
DeviceType = LocalFile.Config.DeviceType,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||||
{
|
{
|
||||||
return Result.Data.Lists;
|
return Result.Data.Lists;
|
||||||
}
|
}
|
||||||
else { return new List<OrderTypeModel>(); }
|
else { return new List<ShelfTypeModel>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<LocationAreaInfoModel> GetLocationAreaInfos()
|
public static List<LocationAreaInfoModel> GetLocationAreaInfos()
|
||||||
|
@ -123,8 +123,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<OrderTypeModel> shelfTypeItems;
|
private List<ShelfTypeModel> shelfTypeItems;
|
||||||
public List<OrderTypeModel> ShelfTypeItems
|
public List<ShelfTypeModel> ShelfTypeItems
|
||||||
{
|
{
|
||||||
get { return shelfTypeItems; }
|
get { return shelfTypeItems; }
|
||||||
set
|
set
|
||||||
@ -133,8 +133,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrderTypeModel? selectedShelfTypeItem;
|
private ShelfTypeModel? selectedShelfTypeItem;
|
||||||
public OrderTypeModel? SelectedShelfTypeItem
|
public ShelfTypeModel? SelectedShelfTypeItem
|
||||||
{
|
{
|
||||||
get { return selectedShelfTypeItem; }
|
get { return selectedShelfTypeItem; }
|
||||||
set
|
set
|
||||||
@ -147,8 +147,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
//调用接口更新!
|
//调用接口更新!
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
ShelfTypeItems = new List<OrderTypeModel>();
|
ShelfTypeItems = new List<ShelfTypeModel>();
|
||||||
ShelfTypeItems.Add(new OrderTypeModel { Id = null, ShelfTypeName = "全部" });
|
ShelfTypeItems.Add(new ShelfTypeModel { Id = null, ShelfTypeName = "全部" });
|
||||||
|
|
||||||
var body = new RequestBase()
|
var body = new RequestBase()
|
||||||
{
|
{
|
||||||
@ -156,7 +156,7 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
DeviceType = LocalFile.Config.DeviceType,
|
DeviceType = LocalFile.Config.DeviceType,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||||
{
|
{
|
||||||
ShelfTypeItems.AddRange(Result.Data.Lists);
|
ShelfTypeItems.AddRange(Result.Data.Lists);
|
||||||
|
@ -38,8 +38,8 @@ namespace 智慧物流软件系统.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<OrderTypeModel> shelfTypeItems;
|
private List<ShelfTypeModel> shelfTypeItems;
|
||||||
public List<OrderTypeModel> ShelfTypeItems
|
public List<ShelfTypeModel> ShelfTypeItems
|
||||||
{
|
{
|
||||||
get { return shelfTypeItems; }
|
get { return shelfTypeItems; }
|
||||||
set
|
set
|
||||||
@ -58,7 +58,7 @@ namespace 智慧物流软件系统.ViewModels
|
|||||||
DeviceType = LocalFile.Config.DeviceType,
|
DeviceType = LocalFile.Config.DeviceType,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||||
{
|
{
|
||||||
ShelfTypeItems = Result.Data.Lists;
|
ShelfTypeItems = Result.Data.Lists;
|
||||||
@ -67,8 +67,8 @@ namespace 智慧物流软件系统.ViewModels
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrderTypeModel selectedShelfTypeItem;
|
private ShelfTypeModel selectedShelfTypeItem;
|
||||||
public OrderTypeModel SelectedShelfTypeItem
|
public ShelfTypeModel SelectedShelfTypeItem
|
||||||
{
|
{
|
||||||
get { return selectedShelfTypeItem; }
|
get { return selectedShelfTypeItem; }
|
||||||
set
|
set
|
||||||
|
@ -54,8 +54,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<OrderTypeModel> shelfTypeItems;
|
private List<ShelfTypeModel> shelfTypeItems;
|
||||||
public List<OrderTypeModel> ShelfTypeItems
|
public List<ShelfTypeModel> ShelfTypeItems
|
||||||
{
|
{
|
||||||
get { return shelfTypeItems; }
|
get { return shelfTypeItems; }
|
||||||
set
|
set
|
||||||
@ -64,8 +64,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrderTypeModel selectedShelfTypeItem;
|
private ShelfTypeModel selectedShelfTypeItem;
|
||||||
public OrderTypeModel SelectedShelfTypeItem
|
public ShelfTypeModel SelectedShelfTypeItem
|
||||||
{
|
{
|
||||||
get { return selectedShelfTypeItem; }
|
get { return selectedShelfTypeItem; }
|
||||||
set
|
set
|
||||||
|
@ -64,8 +64,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<OrderTypeModel> shelfTypeItems;
|
private List<ShelfTypeModel> shelfTypeItems;
|
||||||
public List<OrderTypeModel> ShelfTypeItems
|
public List<ShelfTypeModel> ShelfTypeItems
|
||||||
{
|
{
|
||||||
get { return shelfTypeItems; }
|
get { return shelfTypeItems; }
|
||||||
set
|
set
|
||||||
@ -74,8 +74,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrderTypeModel? selectedShelfTypeItem;
|
private ShelfTypeModel? selectedShelfTypeItem;
|
||||||
public OrderTypeModel? SelectedShelfTypeItem
|
public ShelfTypeModel? SelectedShelfTypeItem
|
||||||
{
|
{
|
||||||
get { return selectedShelfTypeItem; }
|
get { return selectedShelfTypeItem; }
|
||||||
set
|
set
|
||||||
@ -89,8 +89,8 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
//调用接口更新!
|
//调用接口更新!
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
ShelfTypeItems = new List<OrderTypeModel>();
|
ShelfTypeItems = new List<ShelfTypeModel>();
|
||||||
ShelfTypeItems.Add(new OrderTypeModel { Id = null, ShelfTypeName = "全部" });
|
ShelfTypeItems.Add(new ShelfTypeModel { Id = null, ShelfTypeName = "全部" });
|
||||||
|
|
||||||
var body = new RequestBase()
|
var body = new RequestBase()
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ namespace 智慧物流软件系统.ViewModel
|
|||||||
DeviceType = LocalFile.Config.DeviceType,
|
DeviceType = LocalFile.Config.DeviceType,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<OrderTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
var Result = ApiHelp.GetDataFromHttp<PageQueryResponse<ShelfTypeModel>>(LocalFile.Config.ApiIpHost + "home/getShelfTypes", body, "POST");
|
||||||
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
if (Result != null && Result.Data != null && Result.Data.Lists.Count() > 0)
|
||||||
{
|
{
|
||||||
ShelfTypeItems.AddRange(Result.Data.Lists);
|
ShelfTypeItems.AddRange(Result.Data.Lists);
|
||||||
|
Reference in New Issue
Block a user