From 701edfd77c2dbfce5a77bd047c7d93777a3918d5 Mon Sep 17 00:00:00 2001
From: sjz <1240968267@qq.com>
Date: 星期五, 09 五月 2025 17:03:18 +0800
Subject: [PATCH] 修复SRM传条码报错

---
 StandardInterface/MES.Service/service/SRM/MesDeliveryNoteBarcodeManager.cs           |    1 -
 .vs/VSWorkspaceState.json                                                            |    6 ++++++
 StandardInterface/MESApplication/Controllers/WomcaaController.cs                     |    5 ++++-
 StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs |    8 ++++++--
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
new file mode 100644
index 0000000..6b61141
--- /dev/null
+++ b/.vs/VSWorkspaceState.json
@@ -0,0 +1,6 @@
+{
+  "ExpandedNodes": [
+    ""
+  ],
+  "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/StandardInterface/MES.Service/service/SRM/MesDeliveryNoteBarcodeManager.cs b/StandardInterface/MES.Service/service/SRM/MesDeliveryNoteBarcodeManager.cs
index 782124d..5441097 100644
--- a/StandardInterface/MES.Service/service/SRM/MesDeliveryNoteBarcodeManager.cs
+++ b/StandardInterface/MES.Service/service/SRM/MesDeliveryNoteBarcodeManager.cs
@@ -74,7 +74,6 @@
             mesDeliveryBarcode.Id = single.Id;
         }
 
-
         mesDeliveryBarcode.DeliveryNo = barcode.DeliveryNo;
         mesDeliveryBarcode.ProductCode = barcode.ProductCode;
 
diff --git a/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs b/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs
index 271308f..0510f0f 100644
--- a/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs
+++ b/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs
@@ -34,11 +34,15 @@
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            PrintBarcode save = m.Save(barcode);
+            var save = m.Save(barcode);
             resultInfos = save;
 
-            entity.Result = 1;
+            entity.Result = 0;
 
+            if (save) 
+            {
+                entity.Result = 1;
+            }
             entity.DealWith = 1;
             _manager.save(entity);
 
diff --git a/StandardInterface/MESApplication/Controllers/WomcaaController.cs b/StandardInterface/MESApplication/Controllers/WomcaaController.cs
index 6ff858f..68b4c4b 100644
--- a/StandardInterface/MESApplication/Controllers/WomcaaController.cs
+++ b/StandardInterface/MESApplication/Controllers/WomcaaController.cs
@@ -41,7 +41,10 @@
 
             entity.Result = 0;
 
-            if (save) entity.Result = 1;
+            if (save)
+            {
+                entity.Result = 1;
+            }
             entity.DealWith = 1;
             _manager.save(entity);
 

--
Gitblit v1.9.3