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 CodeGoodsController : ApiController { private readonly ICodeGoodsService _invokeService; /// /// 构造函数 /// /// public CodeGoodsController(ICodeGoodsService invokeService) { _invokeService = invokeService; } /// /// 列表 /// /// /// [HttpPost] [Route("GetCodeGoodsList")] public DataResult> GetCodeGoodsList([FromBody] PageRequest request) { var res = _invokeService.GetClientListByPage(request); return res; } /// /// 编辑 /// /// /// [HttpPost] [Route("EditCodeGoods")] public DataResult EditCodeGoods([FromBody] CodeGoodsReq model) { var res = _invokeService.EditClientCodeGoods(model); return res; } /// /// 详情 /// /// /// [HttpGet] [Route("GetCodeGoodsInfo")] public DataResult GetCodeGoodsInfo([FromQuery] string id) { var res = _invokeService.GetClientCodeGoodsInfo(id); return res; } /// /// 获取商品列表-基础库 /// /// /// [HttpPost] [Route("GetBasicsCodeGoodsList")] public DataResult> GetBasicsCodeGoodsList([FromBody] PageRequest request) { var res = _invokeService.GetCodeGoodsList(request); return res; } /// /// 导入商品类型-基础库 /// /// /// [HttpPost] [Route("ImportCodeGoods")] public DataResult ImportCodeGoods([FromBody] IdModel req) { var res = _invokeService.ImportCodeGoods(req); return res; } /// /// 获取当前租户已有的商品 /// /// [HttpGet] [Route("GetExistCodeGoodsList")] public DataResult> GetExistCodeGoodsList() { var res = _invokeService.GetExistCodeGoodsList(); return res; } }