1
hutongqing
2025-01-08 413f243b73ef073f4ac83889fda2f5bf6d1e727c
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs
@@ -16,6 +16,7 @@
using WIDESEA_IBasicService;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
using WIDESEA_InboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
using static WIDESEA_DTO.ErpResponseContent;
@@ -29,23 +30,15 @@
    [ApiController]
    public class ErpController : ControllerBase
    {
        private readonly IPurchaseOrderRepository _purchaseOrderRepository;
        private readonly IPurchaseOrderService _purchaseOrderService;
        private readonly ISupplierInfoService _supplierInfoService;
        private readonly IMaterielInfoService _materielInfoService;
        private readonly IOutboundOrderService _outboundOrderService;
        private readonly ICustomerInfoService _customerInfoService;
        private readonly IUserInfoService _userInfoService;
        private readonly IBasicService _basicService;
        private readonly IOutboundService _outboundService;
        private readonly IInboundService _inboundService;
        public ErpController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService,ICustomerInfoService customerInfoService, IUserInfoService userInfoService)
        public ErpController(IBasicService basicService, IOutboundService outboundService, IInboundService inboundService)
        {
            _purchaseOrderRepository = purchaseOrderRepository;
            _purchaseOrderService = purchaseOrderService;
            _supplierInfoService = supplierInfoService;
            _materielInfoService = materielInfoService;
            _outboundOrderService = outboundOrderService;
            _customerInfoService = customerInfoService;
            _userInfoService = userInfoService;
            _basicService = basicService;
            _outboundService = outboundService;
            _inboundService = inboundService;
        }
        /// <summary>
@@ -56,7 +49,7 @@
        [HttpPost, Route("ReceivePurchaseOrder"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceivePurchaseOrder([FromBody] Root<PurchaseOrderModel> model)
        {
            WebResponseContent content = _purchaseOrderService.ReceivePurchaseOrder(model.Content);
            WebResponseContent content = _inboundService.PurchaseOrderService.ReceivePurchaseOrder(model.Content);
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }
@@ -69,7 +62,7 @@
        [HttpPost, Route("ReceiveUser"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveUser([FromBody] Root<UserInfoDTO> model)
        {
            WebResponseContent content = _userInfoService.ReceiveUser(model.Content);
            WebResponseContent content = _basicService.UserInfoService.ReceiveUser(model.Content);
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }
@@ -82,7 +75,7 @@
        [HttpPost, Route("ReceiveSupplier"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveSupplier([FromBody] Root<SupplierDTO> model)
        {
            WebResponseContent content = _supplierInfoService.ReceiveSupplier(model.Content);
            WebResponseContent content = _basicService.SupplierInfoService.ReceiveSupplier(model.Content);
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }
@@ -95,7 +88,7 @@
        [HttpPost, Route("ReceiveMaterial"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveMaterial([FromBody] Root<MaterielInfoDTO> model)
        {
            WebResponseContent content = _materielInfoService.ReceiveMaterial(model.Content);
            WebResponseContent content = _basicService.MaterielInfoService.ReceiveMaterial(model.Content);
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }
@@ -108,7 +101,7 @@
        [HttpPost, Route("ReceiveCustomer"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveCustomer([FromBody] Root<CustomerInfoDTO> model)
        {
            WebResponseContent content = _customerInfoService.ReceiveCustomer(model.Content);
            WebResponseContent content = _basicService.CustomerInfoService.ReceiveCustomer(model.Content);
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }
@@ -121,7 +114,7 @@
        [HttpPost, Route("ReceiveOutOrder"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveOutOrder([FromBody] Root<ErpOutOrderDTO> erpOutOrder)
        {
            WebResponseContent content = _outboundOrderService.ReceiveOutOrder(erpOutOrder.Content);
            WebResponseContent content = _outboundService.OutboundOrderService.ReceiveOutOrder(erpOutOrder.Content);
            if (content.Status) return Instance.OK();
            else return Instance.Error(content.Message);
        }