using MES.Service.Dto.webApi; using MES.Service.util; using MES.Service.service.Warehouse; using Microsoft.AspNetCore.Mvc; namespace MESApplication.Controllers.Warehouse; /// /// 销售托盘管理控制器 /// [Route("api/[controller]")] [ApiController] public class SalesPalletController : ControllerBase { private readonly SalesPalletManager _manager = new(); /// /// 获取销售托盘分页数据 /// /// 查询请求参数 /// 分页结果 [HttpPost("GetSalesPalletPage")] public ResponseResult GetSalesPalletPage( [FromBody] SalesPalletSearchDto request) { try { var (items, totalCount) = _manager.GetSalesPalletPage(request); return new ResponseResult { status = 0, message = "OK", data = items, TotalCount = totalCount }; } catch (Exception ex) { return ResponseResult.ResponseError(ex); } } /// /// 获取销售托盘明细数据 /// /// 查询请求参数 /// 明细列表 [HttpPost("GetSalesPalletDetail")] public ResponseResult GetSalesPalletDetail( [FromBody] SalesPalletDetailQueryDto request) { try { var result = _manager.GetSalesPalletDetail(request); return new ResponseResult { status = 0, message = "查询成功", data = result }; } catch (Exception ex) { return ResponseResult.ResponseError(ex); } } }