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.
64 lines
1.5 KiB
64 lines
1.5 KiB
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;
|
|
|
|
/// <summary>
|
|
/// 器具控制器
|
|
/// </summary>
|
|
[ApiController]
|
|
[Route($"{PdaHostConst.ROOT_ROUTE}Equipment")]
|
|
public class EquipmentController : AbpController
|
|
{
|
|
private readonly IEquipmentAppService _dictApp;
|
|
private readonly IEquipmentLocAppService _locApp;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="dictApp"></param>
|
|
public EquipmentController(IEquipmentAppService dictApp,
|
|
|
|
|
|
IEquipmentLocAppService locApp,
|
|
|
|
IOptions<AbpJsonOptions> options)
|
|
{
|
|
_locApp = locApp;
|
|
_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<EquipmentDTO> GetByCodeAsync(string code)
|
|
{
|
|
var dtos = await _dictApp.GetByCodeAsync(code).ConfigureAwait(false);
|
|
|
|
return dtos;
|
|
}
|
|
[HttpGet("getLocs")]
|
|
|
|
|
|
public virtual async Task<List<string>> GetLocsAsync()
|
|
{
|
|
var dtos = await _locApp.GetLocsAsync().ConfigureAwait(false);
|
|
|
|
return dtos;
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|