From ab01d75a3fbc8467d81a895cba5d6dde76fbe053 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期二, 16 九月 2025 23:29:30 +0800
Subject: [PATCH] 1111

---
 MES.Service/service/BasicData/MesDepotsManager.cs |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/MES.Service/service/BasicData/MesDepotsManager.cs b/MES.Service/service/BasicData/MesDepotsManager.cs
index 16b4919..d18ed52 100644
--- a/MES.Service/service/BasicData/MesDepotsManager.cs
+++ b/MES.Service/service/BasicData/MesDepotsManager.cs
@@ -1,4 +1,5 @@
-锘縰sing MES.Service.DB;
+锘縰sing Masuit.Tools;
+using MES.Service.DB;
 using MES.Service.Dto.webApi;
 using MES.Service.Modes;
 using SqlSugar;
@@ -128,21 +129,36 @@
             IsFkc = depots.FAllowMinusQty,
             CreateBy = depots.FPrincipal,
             Depottype = depots.FStockProperty,
-            IsNg = depots.FForbidStatus,
             Zuid = depots.FGroup,
             DocumentStatus = depots.FDocumentStatus,
             
-            FSubsidiary = string.IsNullOrEmpty(depots.FUseOrgId)
-                ? "1"
-                :  depots.FUseOrgId,
-            Fumbrella = string.IsNullOrEmpty(depots.FCreateOrgId)
-                ? "1"
-                : depots.FCreateOrgId,
+            IsNg = "A",
+            FSubsidiary = "1",
+            Fumbrella = "1",
+            // IsNg = depots.FForbidStatus,
+            // FSubsidiary = string.IsNullOrEmpty(depots.FUseOrgId)
+            //     ? "1"
+            //     :  depots.FUseOrgId,
+            // Fumbrella = string.IsNullOrEmpty(depots.FCreateOrgId)
+            //     ? "1"
+            //     : depots.FCreateOrgId,
             CreateDate = DateTime.Now,
             LastupdateDate = DateTime.Now,
             Company = "1000",
             Factory = "1000"
         };
+        
+        //IsNg = depots.FForbidStatus,
+        if (depots.FForbidStatus.IsNullOrEmpty())
+        {
+            entity.IsNg = "A";
+        }
+        else
+        {
+            //鎴戞湡鏈涚殑鍊兼槸A=鍚�,B=鏄�
+            //瀹為檯缁欐垜鐨勫�兼槸0鎴�1锛屾垜甯屾湜涓烘垜杞崲浠嶢鍜孊鐨勬柟寮�
+            entity.IsNg = depots.FForbidStatus == "1" ? "B" : "A";
+        }
 
         // 鏌ユ壘鏄惁宸插瓨鍦ㄧ浉鍚屼粨搴撶紪鐮佺殑璁板綍
         var existingDepot = Db.Queryable<MesDepots>()

--
Gitblit v1.9.3