52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using WMS.Web.Core;
|
|
using WMS.Web.Core.Dto;
|
|
using WMS.Web.Core.Internal.Results;
|
|
using WMS.Web.Domain.Values;
|
|
|
|
namespace WMS.Web.Api.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 系统配置
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class SysConfigController : ControllerBase
|
|
{
|
|
public SysConfigController()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取系统类型所需要下拉列表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetStatus")]
|
|
public Task<Result<EnumStatusResponse>> GetStatus()
|
|
{
|
|
EnumStatusResponse response = new EnumStatusResponse();
|
|
foreach (OutStockType enumv in Enum.GetValues(typeof(OutStockType)))
|
|
{
|
|
response.OutStockType.Add(enumv.ToString(), enumv.GetRemark());
|
|
}
|
|
foreach (MoveBoxType enumv in Enum.GetValues(typeof(MoveBoxType)))
|
|
{
|
|
response.MoveBoxType.Add(enumv.ToString(), enumv.GetRemark());
|
|
}
|
|
foreach (TakeStockType enumv in Enum.GetValues(typeof(TakeStockType)))
|
|
{
|
|
response.TakeStockType.Add(enumv.ToString(), enumv.GetRemark());
|
|
}
|
|
//2
|
|
//1
|
|
return Task.FromResult(Result<EnumStatusResponse>.ReSuccess(response));
|
|
}
|
|
}
|
|
}
|