wangxinhui
2025-10-26 733c975cd8647f6d006736f1863bad731e32e6fb
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs
@@ -15,8 +15,8 @@
using WIDESEA_External.Model;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
using static WIDESEA_DTO.ErpResponseContent;
namespace WIDESEA_WMSServer.Controllers.ERP
{
@@ -29,54 +29,129 @@
    {
        private readonly IBasicService _basicService;
        private readonly IInvokeERPService _invokeERPService;
        private readonly IPurchaseOrderService _purchaseOrderService;
        public ErpController(IBasicService basicService,IInvokeERPService invokeERPService)
        public ErpController(IBasicService basicService,IInvokeERPService invokeERPService,IPurchaseOrderService purchaseOrderService)
        {
            _basicService = basicService;
            _invokeERPService = invokeERPService;
            _purchaseOrderService = purchaseOrderService;
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸç‰©æ–™
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveMaterial"), AllowAnonymous]
        [HttpPost, Route("ReceiveMaterial"), AllowAnonymous]
        public WebResponseContent ReceiveMaterial([FromBody] ERPRoot<ERPMaterialDTO>  eRPMaterialDTO)
        public WebResponseContent ReceiveMaterial([FromBody] ERPRoot<ERPMaterialDTO> eRPRoot)
        {
            return _basicService.MaterielInfoService.ReceiveMaterial(eRPMaterialDTO.Content);
            return _basicService.MaterielInfoService.ReceiveMaterial(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸä¾›åº”å•†
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveSupplier"), AllowAnonymous]
        [HttpPost, Route("ReceiveSupplier"), AllowAnonymous]
        public WebResponseContent ReceiveSupplier([FromBody] ERPRoot<ERPSupplierDTO> eRPSupplierDTO)
        public WebResponseContent ReceiveSupplier([FromBody] ERPRoot<ERPSupplierDTO> eRPRoot)
        {
            return _basicService.SupplierInfoService.ReceiveSupplier(eRPSupplierDTO.Content);
            return _basicService.SupplierInfoService.ReceiveSupplier(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸå®¢æˆ·
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveCustomer"), AllowAnonymous]
        [HttpPost, Route("ReceiveCustomer"), AllowAnonymous]
        public WebResponseContent ReceiveCustomer([FromBody] ERPRoot<ERPCustomerDTO> eRPSupplierDTO)
        public WebResponseContent ReceiveCustomer([FromBody] ERPRoot<ERPCustomerDTO> eRPRoot)
        {
            return _basicService.CustomerInfoService.ReceiveCustomer(eRPSupplierDTO.Content);
            return _basicService.CustomerInfoService.ReceiveCustomer(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸå‘˜å·¥
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("ReceiveStaff"), AllowAnonymous]
        [HttpPost, Route("ReceiveStaff"), AllowAnonymous]
        public WebResponseContent ReceiveStaff([FromBody] ERPRoot<ERPUserInfoDTO> eRPCustomerDTO)
        public WebResponseContent ReceiveStaff([FromBody] ERPRoot<ERPUserInfoDTO> eRPRoot)
        {
            return _basicService.UserInfoService.ReceiveStaff(eRPCustomerDTO.Content);
            return _basicService.UserInfoService.ReceiveStaff(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸé‡‡è´­å…¥åº“ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("PurchaseInboundInfo"), AllowAnonymous]
        public WebResponseContent PurchaseInboundInfo([FromBody] ERPRoot<ERPPurchaseOrderDTO> eRPRoot)
        {
            return _purchaseOrderService.ReceivePurchaseOrder(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸé‡‡è´­é€€è´§ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("PurchaseReturn"), AllowAnonymous]
        public WebResponseContent PurchaseReturn([FromBody] ERPRoot<ERPReturnOrderDTO> eRPRoot)
        {
            return _purchaseOrderService.ReceivePurchaseReturn(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ äºŒæœŸé”€å”®å‡ºåº“ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ProDeliveryOrder"), AllowAnonymous]
        public WebResponseContent ProDeliveryOrder([FromBody] ERPRoot<ERPProDeliveryDTO> eRPRoot)
        {
            return _purchaseOrderService.ReceiveProDeliveryOrder(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ éžç”Ÿäº§é¢†æ–™ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ReceiveOut"), AllowAnonymous]
        public WebResponseContent ReceiveOut([FromBody] ERPRoot<ERPPickOutOrderDTO> eRPRoot)
        {
            return _purchaseOrderService.ReceiveOutOrder(eRPRoot.Content);
        }
        /// <summary>
        /// æ·»åŠ é”€å”®é€€è´§ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ProDeliveryBack"), AllowAnonymous]
        public WebResponseContent ProDeliveryBack([FromBody] ERPRoot<ERPProDeliverBackDTO> eRPRoot)
        {
            return _purchaseOrderService.ReceiveProDeliveryBackOrder(eRPRoot.Content);
        }
        /// <summary>
        /// æŽ¨é€é‡‡è´­ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ERPPurchaseUp"), AllowAnonymous]
        public string ERPPurchaseUp([FromBody] ERPPurchaseUpModel eRPPurchaseUpModel)
        {
            return _invokeERPService.ERPPurchaseUp(eRPPurchaseUpModel);
        }
        /// <summary>
        /// æŽ¨é€é‡‡è´­ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ERPProOutUp"), AllowAnonymous]
        public string ERPProOutUp([FromBody] ERPProOutUpModel eRPProOutUpModel)
        {
            return _invokeERPService.ERPProOutUp(eRPProOutUpModel);
        }
    }
}