From c11c677cb0b89f186a9dc4761e7be2d334d5b41e Mon Sep 17 00:00:00 2001
From: zhou keda <1315948824@qq.com>
Date: Thu, 26 Sep 2024 10:49:45 +0800
Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=AD=BE=E6=94=B6erp?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E7=94=A8=E5=A4=B1=E8=B4=A5=E4=B8=8D?=
=?UTF-8?q?=E5=9B=9E=E6=BB=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../WmsMaterialSignHService.cs | 27 ++++++++++++-------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs
index e211f1ae..7591be10 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsMaterialSignHService.cs
@@ -81,8 +81,9 @@ namespace Tnb.WarehouseMgr
///
///
[HttpPost]
- public async Task MaterialSign(MaterialSignInput input)
+ public async Task MaterialSign(MaterialSignInput input)
{
+ string msg = "成功";
try
{
if (input == null)
@@ -452,7 +453,8 @@ namespace Tnb.WarehouseMgr
BasFactoryConfig callErp = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CALLERP);
if(callErp.value=="1"){
- await _thirdApiRecordService.Send(new List { thirdWebapiRecord }, "自动", _db);
+ ThirdResult thirdResult = await _thirdApiRecordService.Send(new List { thirdWebapiRecord }, "自动", _db);
+ msg = thirdResult.msgResult;
}
break;
@@ -564,10 +566,11 @@ namespace Tnb.WarehouseMgr
if(callErp2.value=="1"){
ThirdResult thirdResult = await _thirdApiRecordService.Send(new List { thirdWebapiRecord }, "自动", _db);
Logger.LogInformation($"【WmsMaterialSignHService ModifyAsync】thirdResult {JsonConvert.SerializeObject(thirdResult)}");
- if (thirdResult.Code!=200)
- {
- throw Oops.Bah(thirdResult.msgResult ?? "erp接口调用失败");
- }
+ // if (thirdResult.Code!=200)
+ // {
+ // throw Oops.Bah(thirdResult.msgResult ?? "erp接口调用失败");
+ // }
+ msg = thirdResult.msgResult;
}
if (wmsMaterialTransfer.type == WmsWareHouseConst.MATERIALTRANSFER_JZGLRK_CODE
@@ -644,10 +647,12 @@ namespace Tnb.WarehouseMgr
if(callErp2.value=="1"){
ThirdResult thirdResult = await _thirdApiRecordService.Send(new List { thirdWebapiRecord2 }, "自动", _db);
- if (thirdResult.Code!=200)
- {
- throw Oops.Bah(thirdResult.msgResult);
- }
+ // if (thirdResult.Code!=200)
+ // {
+ // throw Oops.Bah(thirdResult.msgResult);
+ // }
+
+ msg = thirdResult.msgResult;
}
}
break;
@@ -665,6 +670,8 @@ namespace Tnb.WarehouseMgr
await _db.Ado.RollbackTranAsync();
throw new AppFriendlyException($"【MaterialSign】物料签收失败 {ex.Message}", 500);
}
+
+ return msg;
}
}