枚举接口

This commit is contained in:
tongfei
2023-11-10 17:06:47 +08:00
parent c9a6b21644
commit 67acdc0b8a
2 changed files with 18 additions and 18 deletions

View File

@@ -53,39 +53,39 @@ namespace WMS.Web.Api.Controllers
EnumStatusResponse response = new EnumStatusResponse();
foreach (OutStockType enumv in Enum.GetValues(typeof(OutStockType)))
{
response.OutStockType.Add(enumv.ToString(), enumv.GetRemark());
response.OutStockType.Add((int)enumv, enumv.GetRemark());
}
foreach (MoveBoxType enumv in Enum.GetValues(typeof(MoveBoxType)))
{
response.MoveBoxType.Add(enumv.ToString(), enumv.GetRemark());
response.MoveBoxType.Add((int)enumv, enumv.GetRemark());
}
foreach (TakeStockType enumv in Enum.GetValues(typeof(TakeStockType)))
{
response.TakeStockType.Add(enumv.ToString(), enumv.GetRemark());
response.TakeStockType.Add((int)enumv, enumv.GetRemark());
}
foreach (InstockType enumv in Enum.GetValues(typeof(InstockType)))
{
response.InstockType.Add(enumv.ToString(), enumv.GetRemark());
response.InstockType.Add((int)enumv, enumv.GetRemark());
}
foreach (InstockStatus enumv in Enum.GetValues(typeof(InstockStatus)))
{
response.InstockStatus.Add(enumv.ToString(), enumv.GetRemark());
response.InstockStatus.Add((int)enumv, enumv.GetRemark());
}
foreach (BackRecordType enumv in Enum.GetValues(typeof(BackRecordType)))
{
response.BackRecordType.Add(enumv.ToString(), enumv.GetRemark());
response.BackRecordType.Add((int)enumv, enumv.GetRemark());
}
foreach (InventoryInOutType enumv in Enum.GetValues(typeof(InventoryInOutType)))
{
response.InventoryInOutType.Add(enumv.ToString(), enumv.GetRemark());
response.InventoryInOutType.Add((int)enumv, enumv.GetRemark());
}
foreach (OrderType enumv in Enum.GetValues(typeof(OrderType)))
{
response.OrderType.Add(enumv.ToString(), enumv.GetRemark());
response.OrderType.Add((int)enumv, enumv.GetRemark());
}
foreach (ShelfMethod enumv in Enum.GetValues(typeof(ShelfMethod)))
{
response.ShelfMethod.Add(enumv.ToString(), enumv.GetRemark());
response.ShelfMethod.Add((int)enumv, enumv.GetRemark());
}
//2

View File

@@ -13,39 +13,39 @@ namespace WMS.Web.Core.Dto
/// <summary>
/// 出库单类型
/// </summary>
public Dictionary<string, string> OutStockType { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> OutStockType { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 移库单类型
/// </summary>
public Dictionary<string, string> MoveBoxType { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> MoveBoxType { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 盘点结果类型
/// </summary>
public Dictionary<string, string> TakeStockType { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> TakeStockType { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 入库单类型
/// </summary>
public Dictionary<string, string> InstockType { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> InstockType { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 入库状态
/// </summary>
public Dictionary<string, string> InstockStatus { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> InstockStatus { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 类型1为入库回退下架2为出库回退上架
/// </summary>
public Dictionary<string, string> BackRecordType { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> BackRecordType { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 类型1为入库2为出库
/// </summary>
public Dictionary<string, string> InventoryInOutType { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> InventoryInOutType { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 单据类型
/// </summary>
public Dictionary<string, string> OrderType { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> OrderType { get; set; } = new Dictionary<int, string>();
/// <summary>
/// 非采购上架方式
/// </summary>
public Dictionary<string, string> ShelfMethod { get; set; } = new Dictionary<string, string>();
public Dictionary<int, string> ShelfMethod { get; set; } = new Dictionary<int, string>();