From 4a36b0d7013ae078094c786370542975e7fd422e Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 30 三月 2026 09:58:23 +0800
Subject: [PATCH] fix(StockService): 调整MES调用顺序为先WMS写入再调用MES
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
index d5f16e0..fa76cd6 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
@@ -163,14 +163,15 @@
Creater = "system",
Details = details
};
+ result = StockInfoService.Repository.AddData(entity, x => x.Details);
+ if (!result) return content.Error("缁勭洏澶辫触");
+
var mesResult = _mesService.BindContainer(bindRequest);
if (mesResult == null || !mesResult.IsSuccess)
{
return content.Error($"缁勭洏鎴愬姛锛屼絾MES缁戝畾澶辫触: {mesResult?.ErrorMessage ?? "鏈煡閿欒"}");
}
-
- result = StockInfoService.Repository.AddData(entity, x => x.Details);
- return result ? content.OK("缁勭洏鎴愬姛") : content.Error("缁勭洏澶辫触");
+ return content.OK("缁勭洏鎴愬姛");
});
}
catch (Exception ex)
--
Gitblit v1.9.3