From 9b197b7fac92278fb591ea8f4942c7d5687cb5ce Mon Sep 17 00:00:00 2001
From: 李金换 <lijinhuan@prec-tech.com>
Date: 星期一, 28 三月 2022 18:01:22 +0800
Subject: [PATCH] LJPH-C8FB4P【委托】配合PBI设备覆盖率的数据准备0328
---
force-app/main/default/classes/TenderDeleteLwcController.cls | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/force-app/main/default/classes/TenderDeleteLwcController.cls b/force-app/main/default/classes/TenderDeleteLwcController.cls
index f54b859..02acd5a 100644
--- a/force-app/main/default/classes/TenderDeleteLwcController.cls
+++ b/force-app/main/default/classes/TenderDeleteLwcController.cls
@@ -34,25 +34,27 @@
// 鍒犻櫎椤圭洰鍏宠仈浣嗕笉涓庝繚鐣欓」鐩叧鑱旂殑璇环鍏宠仈淇℃伅
List<Tender_Opportunity_Link__c> linksList = [select id, Opportunity__c, Tender_information__c
from Tender_Opportunity_Link__c
- where Tender_information__c = :TenInfo.Id and Opportunity__c
- not in : BlinkOppId];
+ where Tender_information__c = :TenInfo.Id ];
+ // and Opportunity__c not in : BlinkOppId];
// 鎶婂垹闄ゆ嫑鎶曟爣 鍏宠仈鐨勮浠� 璧嬬粰 淇濈暀鎷涙姇鏍囦笂
List<Tender_Opportunity_Link__c> addlinksList = new List<Tender_Opportunity_Link__c>();
// 鍒犻櫎鎷涙姇鏍囧叧鑱旂殑璇环
// 澧炲姞涓�涓垽鏂� 鐪嬬湅鏄惁杩樹細鍐欑┖杩涘幓
if (linksList != null && linksList.size() > 0) {
for (Tender_Opportunity_Link__c link : linksList) {
- Tender_Opportunity_Link__c linkinfo = new Tender_Opportunity_Link__c();
- linkinfo.Tender_information__c = BTen.Id;
- linkinfo.Opportunity__c = link.Opportunity__c;
- linkinfo.Tender_Opportunity_Uniq__c = BTen.Id + '' + link.Opportunity__c;
- linkinfo.IsRelated__c = true;
- // if (BlinksList.contains(linkinfo)) {
- addlinksList.add(linkinfo);
- // }
+ if(!BlinkOppId.contains(link.Opportunity__c)){
+ Tender_Opportunity_Link__c linkinfo = new Tender_Opportunity_Link__c();
+ linkinfo.Tender_information__c = BTen.Id;
+ linkinfo.Opportunity__c = link.Opportunity__c;
+ linkinfo.Tender_Opportunity_Uniq__c = BTen.Id + '' + link.Opportunity__c;
+ linkinfo.IsRelated__c = true;
+ // if (BlinksList.contains(linkinfo)) {
+ addlinksList.add(linkinfo);
+ // }
+ }
}
// 鍒犻櫎椤圭洰鍒犳帀鍏宠仈璇环
- // delete linksList;
+ delete linksList;
// 淇濈暀椤圭洰鏂板鍏宠仈璇环
if (addlinksList.size() > 0) {
insert addlinksList;
--
Gitblit v1.9.1