From e5316b19ae5f33d29d6e9410e894caed30eebf29 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 18 二月 2025 09:11:51 +0800
Subject: [PATCH] PP仓输送线,堆垛机交互
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs | 129 ++++++++++++++++++++++++++++++++++++------
1 files changed, 109 insertions(+), 20 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs"
index 48ed393..9abaca5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs"
@@ -12,33 +12,39 @@
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_External.ERPService;
+using WIDESEA_External.Model;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
+using WIDESEA_InboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
using static WIDESEA_DTO.ErpResponseContent;
namespace WIDESEA_WMSServer.Controllers.ERP
{
+ /// <summary>
+ /// ERP鎺ュ彛
+ /// </summary>
[Route("api/Erp")]
[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 IBasicService _basicService;
+ private readonly IOutboundService _outboundService;
+ private readonly IInboundService _inboundService;
+ private readonly IInvokeERPService _invokeERPService;
+ private readonly IReturnOrderService _returnOrderService;
- public ErpController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService)
+ public ErpController(IBasicService basicService, IOutboundService outboundService, IInboundService inboundService,
+ IInvokeERPService invokeERPService, IReturnOrderService returnOrderService)
{
- _purchaseOrderRepository = purchaseOrderRepository;
- _purchaseOrderService = purchaseOrderService;
- _supplierInfoService = supplierInfoService;
- _materielInfoService = materielInfoService;
- _outboundOrderService = outboundOrderService;
+ _basicService = basicService;
+ _outboundService = outboundService;
+ _inboundService = inboundService;
+ _invokeERPService = invokeERPService;
+ _returnOrderService = returnOrderService;
}
/// <summary>
@@ -46,10 +52,23 @@
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
- [HttpPost, Route("ReceivePurchaseOrderSingle"), AllowAnonymous, MethodParamsValidate]
- public ErpResponseContent ReceivePurchaseOrder([FromBody] Root model)
+ [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);
+ }
+
+ /// <summary>
+ /// 鎺ユ敹ERP浠撳簱鍛樺伐鍜岃川妫�鍛樺伐鏁版嵁
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ [HttpPost, Route("ReceiveUser"), AllowAnonymous, MethodParamsValidate]
+ public ErpResponseContent ReceiveUser([FromBody] Root<UserInfoDTO> model)
+ {
+ WebResponseContent content = _basicService.UserInfoService.ReceiveUser(model.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
@@ -60,9 +79,9 @@
/// <param name="model"></param>
/// <returns></returns>
[HttpPost, Route("ReceiveSupplier"), AllowAnonymous, MethodParamsValidate]
- public ErpResponseContent ReceiveSupplier([FromBody] Supplier model)
+ 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);
}
@@ -73,9 +92,22 @@
/// <param name="model"></param>
/// <returns></returns>
[HttpPost, Route("ReceiveMaterial"), AllowAnonymous, MethodParamsValidate]
- public ErpResponseContent ReceiveMaterial([FromBody] MaterielInfo model)
+ 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);
+ }
+
+ /// <summary>
+ /// 鎺ユ敹ERP瀹㈡埛淇℃伅
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ [HttpPost, Route("ReceiveCustomer"), AllowAnonymous, MethodParamsValidate]
+ public ErpResponseContent ReceiveCustomer([FromBody] Root<CustomerInfoDTO> model)
+ {
+ WebResponseContent content = _basicService.CustomerInfoService.ReceiveCustomer(model.Content);
if (content.Status) return Instance.OK();
else return Instance.Error(content.Message);
}
@@ -86,11 +118,68 @@
/// <param name="erpOutOrder"></param>
/// <returns></returns>
[HttpPost, Route("ReceiveOutOrder"), AllowAnonymous, MethodParamsValidate]
- public ErpResponseContent ReceiveOutOrder([FromBody] ErpOutOrder erpOutOrder)
+ 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);
}
+
+ /// <summary>
+ /// 鎺ユ敹ERP閫�鏂欏崟淇℃伅
+ /// </summary>
+ [HttpPost, Route("ReturnOrder"), AllowAnonymous, MethodParamsValidate]
+ public ErpResponseContent ReturnOrder([FromBody] Root<ErpReturnOrderDTO> model)
+ {
+ WebResponseContent content = _returnOrderService.ReturnOrder(model.Content);
+ if (content.Status) return Instance.OK();
+ else return Instance.Error(content.Message);
+ }
+ /// <summary>
+ /// 鍏朵粬鍏ュ簱鍗曟帴鏀�(璋冩嫈鍏ヤ粨,瀹緵鍥炴敹,鐗╂枡閿�鍞��璐�)
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, Route("ReceiveWarehousingOrder"), AllowAnonymous, MethodParamsValidate]
+ public ErpResponseContent ReceiveWarehousingOrder([FromBody] Root<ErpInOrderDTO> model)
+ {
+ WebResponseContent content = _inboundService.InbounOrderService.ReceiveWarehousingOrder(model.Content);
+ if (content.Status) return Instance.OK();
+ else return Instance.Error(content.Message);
+ }
+ /// <summary>
+ /// 鎺ㄩ�丒RP鍑哄簱
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, Route("InvokeOutStandardsApi"), AllowAnonymous]
+ public string InvokeOutStandardsApi([FromBody] ERPIssueModel issueModel)
+ {
+ return _invokeERPService.InvokeOutStandardsApi(issueModel);
+ }
+ /// <summary>
+ /// 鎺ㄩ�丒RP鏀惰揣
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, Route("InvokeMatReceiveApi"), AllowAnonymous]
+ public string InvokeMatReceiveApi([FromBody]ERPReceiveModel receiveModel)
+ {
+ return _invokeERPService.InvokeMatReceiveApi(receiveModel);
+ }
+ /// <summary>
+ /// 鎺ㄩ�丒RP鍏ュ簱
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, Route("InvokeInboundOrderApi"), AllowAnonymous]
+ public string InvokeInboundOrderApi([FromBody]ERPInboundModel inboundModel)
+ {
+ return _invokeERPService.InvokeInboundOrderApi(inboundModel);
+ }
+ /// <summary>
+ /// 鎺ㄩ�丒RP閫�鏂欎笂鎶�
+ /// </summary>
+ [HttpPost, Route("InvokeReturnApi"), AllowAnonymous]
+ public string InvokeReturnApi([FromBody] ERPReturnModel returnModel)
+ {
+ return _invokeERPService.InvokeReturnApi(returnModel);
+ }
}
}
--
Gitblit v1.9.3