using DS.Module.Core; using DS.Module.Core.Data; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Code.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.MainApi.Controllers; /// /// 业务来源信息服务 /// public class CodeSourceController : ApiController { private readonly ICodeSourceService _invokeService; /// /// 构造函数 /// /// public CodeSourceController(ICodeSourceService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetCodeSourceList")] public DataResult> GetCodeSourceList([FromBody] PageRequest request) { var res = _invokeService.GetClientListByPage(request); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditCodeSource")] public DataResult EditCodeSource([FromBody] CodeSourceReq model) { var res = _invokeService.EditClientCodeSource(model); return res; } /// /// 详情 /// /// /// [HttpGet] [Route("GetCodeSourceInfo")] public DataResult GetCodeSourceInfo([FromQuery] string id) { var res = _invokeService.GetClientCodeSourceInfo(id); return res; } /// /// 获取业务来源信息列表-基础库 /// /// /// [HttpPost] [Route("GetBasicsCodeSourceList")] public DataResult> GetBasicsCodeSourceList([FromBody] PageRequest request) { var res = _invokeService.GetCodeSourceList(request); return res; } /// /// 导入业务来源信息类型-基础库 /// /// /// [HttpPost] [Route("ImportCodeSource")] public DataResult ImportCodeSource([FromBody] IdModel req) { var res = _invokeService.ImportCodeSource(req); return res; } /// /// 获取当前租户已有的业务来源信息 /// /// [HttpGet] [Route("GetExistCodeSourceList")] public DataResult> GetExistCodeSourceList() { var res = _invokeService.GetExistCodeSourceList(); return res; } /// /// 批量删除 /// /// 主表Ids /// [HttpPost] [Route("BatchDelCodeSource")] public DataResult BatchDelCodeSource([FromBody] IdModel req) { var res = _invokeService.BatchDelCodeSource(req); return res; } }