using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using WIDESEA_Core; using WIDESEA_Core.Attributes; using WIDESEA_External.ERPService; using WIDESEA_External.Model; namespace WIDESEA_WMSServer.Controllers.ERP { [Route("api/Erp")] [ApiController] public class ErpController : ControllerBase { private readonly IERPInvokeService _service; public ErpController(IERPInvokeService service) { _service = service; } [HttpPost, Route("ReceivePurchaseOrder"), AllowAnonymous] public WebResponseContent ReceivePurchaseOrder([FromBody] PurchaseOrderModel model) { try { return _service.ReceivePurchaseOrder(model); } catch (Exception ex) { return WebResponseContent.Instance.Error(ex.Message); } } } }