using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core.Attributes; using WIDESEA_Core; using WIDESEA_DTO; using WIDESEA_IBasicService; using WIDESEA_IInboundRepository; using WIDESEA_IInboundService; using WIDESEA_IOutboundService; using WIDESEA_ITaskInfoService; using WIDESEA_TaskInfoService; using WIDESEA_DTO.ERP; using WIDESEA_DTO.MES; namespace WIDESEA_WMSServer.Controllers.MES { [Route("api/Mes")] [ApiController] public class MesController : ControllerBase { private readonly IPurchaseOrderRepository _purchaseOrderRepository; private readonly IPurchaseOrderService _purchaseOrderService; private readonly ISupplierInfoService _supplierInfoService; private readonly IMaterielInfoService _materielInfoService; private readonly IOutboundOrderService _outboundOrderService; private readonly ITaskService _taskService; public MesController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService, ITaskService taskService) { _purchaseOrderRepository = purchaseOrderRepository; _purchaseOrderService = purchaseOrderService; _supplierInfoService = supplierInfoService; _materielInfoService = materielInfoService; _outboundOrderService = outboundOrderService; _taskService = taskService; } /// /// 接收MES测试架出库 /// /// /// [HttpPost, Route("TestToolOut"), AllowAnonymous, MethodParamsValidate] public MesResponseContent TestToolOut([FromBody] Root model) { return _taskService.TestToolOut(model.Content); } /// /// 接收MES测试架退库 /// /// /// [HttpPost, Route("TestToolBack"), AllowAnonymous, MethodParamsValidate] public MesResponseContent TestToolBack([FromBody] Root model) { return _taskService.TestToolBack(model.Content); } /// /// 测试架报废 /// /// /// [HttpPost, Route("TestToolScrap"), AllowAnonymous, MethodParamsValidate] public MesResponseContent TestScrap([FromBody] Root model) { return _taskService.TestScrap(model.Content); } } }