From a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 03 十一月 2025 08:23:05 +0800
Subject: [PATCH] ERP接口代码更新,WCS代码优化,出入库分配优化
---
项目代码/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs | 71 ++++++++++++++++++++++++++++++++++-
1 files changed, 69 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs"
index 1437228..422137e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_External/ERPService/InvokeERPService.cs"
@@ -6,6 +6,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.APIEnum;
+using WIDESEA_Common.CommonEnum;
using WIDESEA_Core.Helper;
using WIDESEA_External.Model;
using WIDESEA_IBasicRepository;
@@ -28,16 +29,82 @@
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
-
+ /// <summary>
+ /// 璋冪敤BST涓婃姤RFID鎺ュ彛
+ /// </summary>
public string BSTPurchaseUp(BSTPurchaseUpModel bSTPurchaseUpModel)
{
Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x=>x.ApiCode==APIEnum.BSTPurchaseUp.ToString());
-
+ if (apiInfo.Enable == WhetherEnum.False.ObjToInt())
+ {
+ BSTResponse<object> bSTResponse = new BSTResponse<object>() { Code=200,Msg="鎺ュ彛绂佺敤"};
+ return bSTResponse.Serialize();
+ }
string request = JsonConvert.SerializeObject(bSTPurchaseUpModel, settings);
string response = HttpHelper.Post(apiInfo.ApiAddress, request);
return response;
}
+ /// <summary>
+ /// 璋冪敤ERP鍘熺焊搴撳瓨鎺ュ彛
+ /// </summary>
+ public string BSTStockAsync(string barCode)
+ {
+
+ Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.BSTStockAsync.ToString() && x.Enable == WhetherEnum.True.ObjToInt());
+
+ string response = HttpHelper.Post(apiInfo.ApiAddress + "?barcode=" + barCode);
+
+ return response;
+ }
+ /// <summary>
+ /// ERP涓婁紶閲囪喘淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ public string ERPPurchaseUp(ERPPurchaseUpModel eRPPurchaseUpModel)
+ {
+ Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPPurchaseUpModel.ToString() && x.Enable == WhetherEnum.True.ObjToInt());
+
+ string response = HttpHelper.Post(apiInfo.ApiAddress, eRPPurchaseUpModel.Serialize().ToUpper());
+
+ return response;
+ }
+ /// <summary>
+ /// ERP鎴愬搧閿�鍞嚭搴撲笂浼犱俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ public string ERPProOutUp(ERPProOutUpModel eRPProOutUpModel)
+ {
+ Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPProOutUp.ToString() && x.Enable == WhetherEnum.True.ObjToInt());
+
+ string response = HttpHelper.Post(apiInfo.ApiAddress, eRPProOutUpModel.Serialize().ToUpper());
+
+ return response;
+ }
+ /// <summary>
+ /// ERP涓婁紶鎴愬搧鍏ュ簱淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ public string ERPProInUp(ERPProInUpModel eRPProInUpModel)
+ {
+ Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPProInUp.ToString() && x.Enable == WhetherEnum.True.ObjToInt());
+
+ string response = HttpHelper.Post(apiInfo.ApiAddress, eRPProInUpModel.Serialize().ToUpper());
+
+ return response;
+ }
+ /// <summary>
+ /// ERP涓婁紶鍗婃垚鍝佸叆搴撲俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ public string ERPSemiProInUp(ERPProInUpModel eRPProInUpModel)
+ {
+ Dt_ApiInfo apiInfo = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.ERPSemiProInUp.ToString() && x.Enable == WhetherEnum.True.ObjToInt());
+
+ string response = HttpHelper.Post(apiInfo.ApiAddress, eRPProInUpModel.Serialize().ToUpper());
+
+ return response;
+ }
}
}
--
Gitblit v1.9.3