From 1954334b901db3563837a010f833ff4106f0ad5b Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 16 一月 2025 10:30:04 +0800
Subject: [PATCH] 增加根据出库单推送至ERP接口
---
/dev/null | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs | 1 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 31 +++++++++++++++++++++++++++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs | 10 ++++++++++
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2cbd37ae-d297-46cd-8de4-4c2b91cc41c7.vsidx | 0
5 files changed, 42 insertions(+), 0 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2cbd37ae-d297-46cd-8de4-4c2b91cc41c7.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2cbd37ae-d297-46cd-8de4-4c2b91cc41c7.vsidx"
new file mode 100644
index 0000000..d760cb3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2cbd37ae-d297-46cd-8de4-4c2b91cc41c7.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c55dc563-0ab2-4a62-9fbf-42cb95118eea.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c55dc563-0ab2-4a62-9fbf-42cb95118eea.vsidx"
deleted file mode 100644
index 033cd0f..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c55dc563-0ab2-4a62-9fbf-42cb95118eea.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs"
index c2204d8..e98c0b6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs"
@@ -24,5 +24,6 @@
WebResponseContent TestOutUpload(int id,List<Dt_OutStockLockInfo>? outStockLockInfos=null);
string CreateCodeByRule(string ruleCode);
ERPIssueModel GetERPIssueModel(Dt_OutboundOrder outboundOrder, string WarehouseCode);
+ WebResponseContent PushERPOutBound(int outId, string WarehouseCode);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
index e3deb6c..0f3b2f5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
@@ -628,5 +628,36 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+ /// <summary>
+ /// 鏍规嵁鍑哄簱鍗曟帹閫丒RP绯荤粺
+ /// </summary>
+ /// <param name="outId"></param>
+ /// <param name="WarehouseCode"></param>
+ /// <returns></returns>
+ public WebResponseContent PushERPOutBound(int outId, string WarehouseCode)
+ {
+ WebResponseContent content=new WebResponseContent();
+ try
+ {
+ //鑾峰彇鍑哄簱鍗�
+ Dt_OutboundOrder outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.Id == outId).Includes(x => x.Details).First();
+ if (outboundOrder == null)
+ {
+ return content.Error("鍑哄簱鍗曚笉瀛樺湪");
+ }
+ if (outboundOrder.Details.Count!=(outboundOrder.Details.Where(x=>x.OrderDetailStatus==OrderDetailStatusEnum.Over.ObjToInt()).ToList().Count)||outboundOrder.OrderStatus!=OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt())
+ {
+ return content.Error("璇ュ嚭搴撳崟鏈畬鎴�");
+ }
+ ERPIssueModel issueModel = GetERPIssueModel(outboundOrder, WarehouseCode);
+ string response=_invokeERPService.InvokeOutStandardsApi(issueModel);
+ return content.OK(response);
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs"
index eaf062b..2537c18 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs"
@@ -63,5 +63,15 @@
{
return Service.CreateCodeByRule(nameof(RuleCodeEnum.FLCodeRule));
}
+ /// <summary>
+ /// 浣跨敤鍑哄簱鍗曞畬鎴怑RP鍑哄簱鎺ㄩ��
+ /// </summary>
+ /// <param name="outId">鍑哄簱鍗旾D</param>
+ /// <param name="WarehouseCode">浠撳簱浠e彿</param>
+ /// <returns></returns>
+ public WebResponseContent PushERPOutBound(int outId, string WarehouseCode)
+ {
+ return Service.PushERPOutBound(outId, WarehouseCode);
+ }
}
}
--
Gitblit v1.9.3