From 1440114cfae626c192ef59775e9d7829db634c1c Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 07 七月 2025 20:20:20 +0800
Subject: [PATCH] 上传

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs |   42 ++++++++++++++++++++++--------------------
 1 files changed, 22 insertions(+), 20 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
index 0fb7cf1..8f54ef4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs"
@@ -172,17 +172,18 @@
                 newTask.TaskId = taskId;
                 Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
                 //涓婁紶ERP
-                //WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
+                WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
                 _proInStatisticsService.SaveStatic(bagInfoModel);
-                //if (!responseContent.Status)
-                //{
-                //    mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
-                //    mesProInOrder.Remark = responseContent.Message;
-                //}
-                //else
-                //{
+                if (!responseContent.Status)
+                {
+                    //mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
+                    //mesProInOrder.Remark = responseContent.Message;
+                    throw new Exception(responseContent.Message);
+                }
+                else
+                {
                     mesProInOrder.UpErpStatus = WhetherEnum.True.ObjToInt();
-                //}
+                }
                 Db.InsertNav(mesProInOrder).Include(x => x.Details).ExecuteCommand();
                 _unitOfWorkManage.CommitTran();
                 //鎺ㄩ�佷换鍔�
@@ -281,18 +282,19 @@
             };
             
             _unitOfWorkManage.BeginTran();
-            Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
-            ////涓婁紶ERP
-            //WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
-            //if (!responseContent.Status)
-            //{
-            //    mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
-            //    mesProInOrder.Remark = responseContent.Message;
-            //}
-            //else
-            //{
+            //涓婁紶ERP
+            WebResponseContent responseContent = _inboundOrderService.FeedbackProIn(mesProInOrder);
+            if (!responseContent.Status)
+            {
+                //mesProInOrder.UpErpStatus = WhetherEnum.False.ObjToInt();
+                //mesProInOrder.Remark = responseContent.Message;
+                return WebResponseContent.Instance.Error($"{responseContent.Message}");
+            }
+            else
+            {
                 mesProInOrder.UpErpStatus = WhetherEnum.True.ObjToInt();
-            //}
+            }
+            Db.InsertNav(proStockInfo).Include(x => x.proStockInfoDetails).ExecuteCommand();
             Db.InsertNav(mesProInOrder).Include(x => x.Details).ExecuteCommand();
             _unitOfWorkManage.CommitTran();
             return WebResponseContent.Instance.OK("鎺ユ敹鎴愬姛");

--
Gitblit v1.9.3