using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Json; using Win_in.Sfs.Basedata.Application.Contracts; namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; /// /// 器具控制器 /// [ApiController] [Route($"{PdaHostConst.ROOT_ROUTE}Equipment")] public class EquipmentController : AbpController { private readonly IEquipmentAppService _dictApp; private readonly IEquipmentLocAppService _locApp; /// /// /// /// public EquipmentController(IEquipmentAppService dictApp, IEquipmentLocAppService locApp, IOptions options) { _locApp = locApp; _dictApp = dictApp; var str = options.Value.DefaultDateTimeFormat; Console.WriteLine(str); } /// /// 按代码获取字典 /// /// 字典代码 /// [HttpGet("by-code")] public virtual async Task GetByCodeAsync(string code) { var dtos = await _dictApp.GetByCodeAsync(code).ConfigureAwait(false); return dtos; } [HttpGet("getLocs")] public virtual async Task> GetLocsAsync() { var dtos = await _locApp.GetLocsAsync().ConfigureAwait(false); return dtos; } }