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 CodePackageController : ApiController { private readonly ICodePackageService _invokeService; /// /// 构造函数 /// /// public CodePackageController(ICodePackageService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetCodePackageList")] public DataResult> GetCodePackageList([FromBody] PageRequest request) { var res = _invokeService.GetClientListByPage(request); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditCodePackage")] public DataResult EditCodePackage([FromBody] CodePackageReq model) { var res = _invokeService.EditClientCodePackage(model); return res; } /// /// 详情 /// /// /// [HttpGet] [Route("GetCodePackageInfo")] public DataResult GetCodePackageInfo([FromQuery] string id) { var res = _invokeService.GetClientCodePackageInfo(id); return res; } /// /// 获取包装类型列表-基础库 /// /// /// [HttpPost] [Route("GetBasicsCodePackageList")] public DataResult> GetBasicsCodePackageList([FromBody] PageRequest request) { var res = _invokeService.GetCodePackageList(request); return res; } /// /// 导入包装类型类型-基础库 /// /// /// [HttpPost] [Route("ImportCodePackage")] public DataResult ImportCodePackage([FromBody] IdModel req) { var res = _invokeService.ImportCodePackage(req); return res; } /// /// 获取当前租户已有的包装类型 /// /// [HttpGet] [Route("GetExistCodePackageList")] public DataResult> GetExistCodePackageList() { var res = _invokeService.GetExistCodePackageList(); return res; } /// /// 批量删除 /// /// 主表Ids /// [HttpPost] [Route("BatchDelCodePackage")] public DataResult BatchDelCodePackage([FromBody] IdModel req) { var res = _invokeService.BatchDelCodePackage(req); return res; } }