You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
using System;
|
|
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;
|
|
|
|
/// <summary>
|
|
/// 字典控制器
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route($"{PdaHostConst.ROOT_ROUTE}dict")]
|
|
public class DictController : AbpController
|
|
{
|
|
private readonly IDictAppService _dictApp;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="dictApp"></param>
|
|
public DictController(IDictAppService dictApp,IOptions<AbpJsonOptions> options)
|
|
{
|
|
_dictApp = dictApp;
|
|
var str = options.Value.DefaultDateTimeFormat;
|
|
Console.WriteLine(str);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按代码获取字典
|
|
/// </summary>
|
|
/// <param name="code">字典代码</param>
|
|
/// <returns></returns>
|
|
[HttpGet("by-code")]
|
|
public virtual async Task<DictDTO> GetByCodeAsync(string code)
|
|
{
|
|
var dtos = await _dictApp.GetByCodeAsync(code).ConfigureAwait(false);
|
|
|
|
return dtos;
|
|
}
|
|
}
|
|
|