using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Code.Interface; using DS.WMS.Core.Sys.Dtos; using DS.WMS.Core.Sys.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.MainApi.Controllers; /// /// 表单设置 模块 /// public class FormSetController : ApiController { private readonly IFormSetService _invokeService; /// /// 构造函数 /// /// public FormSetController(IFormSetService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetFormSetList")] public DataResult> GetFormSetList([FromBody] PageRequest request) { var res = _invokeService.GetListByPage(request); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditFormSet")] public DataResult EditFormSet([FromBody] CodeFormSetReq req) { var res = _invokeService.EditFormSet(req); return res; } /// /// 详情 /// /// Id /// [HttpGet] [Route("GetFormSetInfo")] public DataResult GetFormSetInfo([FromQuery] string id) { var res = _invokeService.GetFormSetInfo(id); return res; } /// /// 按模块获取表单设置详情 /// /// 权限模块id /// 表单序号 /// 任务状态 /// [HttpGet] [Route("GetFormSetInfoByModule")] public DataResult GetFormSetInfoByModule([FromQuery] string permissionId, int formNo = 0, string taskStatus = "") { var res = _invokeService.GetFormSetInfoByModule(permissionId, formNo, taskStatus); return res; } /// /// 按模块获取表单设置列表 /// /// 权限模块id /// [HttpGet] [Route("GetFormSetListByModule")] public async Task>> GetFormSetListByModule([FromQuery] string permissionId) { var res = await _invokeService.GetFormSetListByModule(permissionId); return res; } /// /// 批量删除 /// /// req /// [HttpPost] [Route("BatchDelFormSet")] public DataResult BatchDelFormSet([FromBody] IdModel req) { var res = _invokeService.BatchDelFormSet(req); return res; } /// /// 设置表单公共标识 /// /// req /// [HttpPost] [Route("SetPublicFormSet")] public DataResult SetPublicFormSet([FromBody] CodeFormSetPublicStatusReq req) { var res = _invokeService.SetPublicFormSet(req); return res; } /// /// 表单设置复制 /// /// Id /// [HttpGet] [Route("FormSetCopy")] public async Task FormSetCopy([FromQuery] string id) { var res = await _invokeService.FormSetCopy(id); return res; } }