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; /// /// 字典模块 /// public class SysDictController : ApiController { private readonly ISysDictTypeService _invokeService; private readonly ISysDictDataService _dictDataService; /// /// 构造函数 /// /// public SysDictController(ISysDictTypeService invokeService,ISysDictDataService dictDataService) { _invokeService = invokeService; _dictDataService = dictDataService; } /// /// 字典列表 /// /// /// [HttpPost] [Route("GetSysDictTypeList")] public DataResult> GetSysDictTypeList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 添加字典类型 /// /// /// [HttpPost] [Route("EditDictType")] public DataResult AddDictType([FromBody] DictTypeInput model) { var res = _invokeService.EditDictType(model); return res; } /// /// 字典列表 /// /// /// [HttpPost] [Route("GetSysDictDataList")] public DataResult> GetSysDictDataList([FromBody] PageRequest request) { var res = _dictDataService.GetListByPage(request); return res; } /// /// 编辑字典明细 /// /// /// [HttpPost] [Route("EditDictData")] public DataResult EditDictData([FromBody] DictDataInput model) { var res = _dictDataService.EditDictData(model); return res; } /// /// 获取字典下拉明细 /// /// /// [HttpPost] [Route("GetDictTypeDropDown")] public DataResult GetDictTypeDropDown([FromBody] DropDownDictTypeInput model) { var res = _dictDataService.GetDictTypeDropDown(model); return res; } }