hutongqing
2024-11-26 2c213d4f6543a66845ac5d2bc13eaf06d1033eb6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);
            }
        }
    }
}