| | |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using static WIDESEA_DTO.ErpResponseContent; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.ERP |
| | | { |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceivePurchaseOrderSingle"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent ReceivePurchaseOrder([FromBody] Root model) |
| | | public ErpResponseContent ReceivePurchaseOrder([FromBody] Root model) |
| | | { |
| | | return _purchaseOrderService.ReceivePurchaseOrder(model.Content); |
| | | WebResponseContent content = _purchaseOrderService.ReceivePurchaseOrder(model.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveSupplier"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent ReceiveSupplier([FromBody] Supplier model) |
| | | public ErpResponseContent ReceiveSupplier([FromBody] Supplier model) |
| | | { |
| | | return _supplierInfoService.ReceiveSupplier(model.Content); |
| | | WebResponseContent content = _supplierInfoService.ReceiveSupplier(model.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveMaterial"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent ReceiveMaterial([FromBody] MaterielInfo model) |
| | | public ErpResponseContent ReceiveMaterial([FromBody] MaterielInfo model) |
| | | { |
| | | return _materielInfoService.ReceiveMaterial(model.Content); |
| | | WebResponseContent content = _materielInfoService.ReceiveMaterial(model.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="erpOutOrder"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveOutOrder"), AllowAnonymous, MethodParamsValidate] |
| | | public WebResponseContent ReceiveOutOrder([FromBody] ErpOutOrder erpOutOrder) |
| | | public ErpResponseContent ReceiveOutOrder([FromBody] ErpOutOrder erpOutOrder) |
| | | { |
| | | return _outboundOrderService.ReceiveOutOrder(erpOutOrder.Content); |
| | | WebResponseContent content = _outboundOrderService.ReceiveOutOrder(erpOutOrder.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | } |
| | | } |