From 1f645778ae80a3a8801b8bb4d0fcf8feb244ad43 Mon Sep 17 00:00:00 2001
From: chr <chr@mailcom>
Date: 星期三, 09 十月 2024 11:51:23 +0800
Subject: [PATCH] 完善项目,新增插件启用检测;

---
 PdmSwPlugin.Common/Entity/Pdm/PdmBom.cs |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/PdmSwPlugin.Common/Entity/Pdm/PdmBom.cs b/PdmSwPlugin.Common/Entity/Pdm/PdmBom.cs
index 5348f1b..d8f53e0 100644
--- a/PdmSwPlugin.Common/Entity/Pdm/PdmBom.cs
+++ b/PdmSwPlugin.Common/Entity/Pdm/PdmBom.cs
@@ -271,10 +271,14 @@
                 if (lost) return false;
                 // 涓嶅湪鐗╂枡鏄庣粏琛ㄤ腑涓嶅鏍�
                 if (ExcludeFromBOM) return false;
+                // 妯$粍涓嶅鏍�
+                if (produceWay == "妯$粍") return false;
+                // 寰呭鏍哥殑涓嶅啿绐佹彁浜�
+                if (drawStatus == "submitted" || drawStatus == "resubmitted") return false;
                 if (IsHistoryData)
                 {
-                    // 鍘嗗彶鍥剧焊鍙鏍镐竴鑷存�т笉閫氳繃鐨�
-                    return _drawInfo.checkRuleResult == 2;
+                    // 鍘嗗彶鍥剧焊鍙鏍镐竴鑷存�т笉閫氳繃鐨� 鍜岃椹冲洖鐨�
+                    return _drawInfo.checkRuleResult == 2 || drawStatus == "rejected";
                 }
                 else
                 {
@@ -294,9 +298,16 @@
         {
             if (produceWay == "妯$粍") return null;
             if (ExcludeFromBOM) return null;
-            if (IsHistoryData && localDocChanged)
+            if (IsHistoryData)
             {
-                return $"鍘嗗彶鍥剧焊銆恵partModel}銆戝彉鏇村悗鏈噸鏂板鏍�";
+                if (localDocChanged)
+                {
+                    return $"鍘嗗彶鍥剧焊銆恵partModel}銆戝彉鏇村悗鏈噸鏂板鏍�";
+                }
+                else if (drawStatus == "rejected" || drawStatus == "submitted" || drawStatus == "resubmitted")
+                {
+                    return $"鍘嗗彶鍥剧焊銆恵partModel}銆戞湭閫氳繃瀹℃牳";
+                }
             }
             if (!IsHistoryData)
             {

--
Gitblit v1.9.1