You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.5 KiB
C#
90 lines
2.5 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.System.Dtos;
|
|
using DS.WMS.Core.System.Entity;
|
|
using DS.WMS.Core.System.Interface;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.WebApi.Controllers;
|
|
/// <summary>
|
|
/// 字典模块
|
|
/// </summary>
|
|
public class SysDictController : ApiController
|
|
{
|
|
private readonly ISysDictTypeService _invokeService;
|
|
private readonly ISysDictDataService _dictDataService;
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public SysDictController(ISysDictTypeService invokeService,ISysDictDataService dictDataService)
|
|
{
|
|
_invokeService = invokeService;
|
|
_dictDataService = dictDataService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 字典列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetSysDictTypeList")]
|
|
public DataResult<List<SysDictType>> GetSysDictTypeList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加字典类型
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditDictType")]
|
|
public DataResult AddDictType([FromBody] DictTypeInput model)
|
|
{
|
|
var res = _invokeService.EditDictType(model);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 字典列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetSysDictDataList")]
|
|
public DataResult<List<SysDictData>> GetSysDictDataList([FromBody] PageRequest request)
|
|
{
|
|
var res = _dictDataService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑字典明细
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditDictData")]
|
|
public DataResult EditDictData([FromBody] DictDataInput model)
|
|
{
|
|
var res = _dictDataService.EditDictData(model);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取字典下拉明细
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetDictTypeDropDown")]
|
|
public DataResult GetDictTypeDropDown([FromBody] DropDownDictTypeInput model)
|
|
{
|
|
var res = _dictDataService.GetDictTypeDropDown(model);
|
|
return res;
|
|
}
|
|
} |