From 8e39e511f1a272ee05b53ff68a985464a8c7ccf9 Mon Sep 17 00:00:00 2001
From: 涂煌豪 <tuhuanghao@prec-tech.com>
Date: 星期二, 22 三月 2022 17:53:45 +0800
Subject: [PATCH] 先款后修-修理上增加先款标识
---
force-app/main/default/classes/RepairTrigger.cls | 13 ++-----------
force-app/main/default/triggers/Repair.trigger | 4 ++--
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/force-app/main/default/classes/RepairTrigger.cls b/force-app/main/default/classes/RepairTrigger.cls
index 14a9d14..252f4db 100644
--- a/force-app/main/default/classes/RepairTrigger.cls
+++ b/force-app/main/default/classes/RepairTrigger.cls
@@ -696,15 +696,13 @@
return repair;
}
//add wangweipeng 2021/12/09 end
- //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220318 start
+ //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220322 start
public static void AdvancePaymentFlagUpsert(List<Repair__c> newList, Map<Id, Repair__c> newMap, List<Repair__c> oldList, Map<Id, Repair__c> oldMap) {
List<String> RepairQuotationIdList = new List<String>();
List<Repair__c> NoRepairQuotationList = new List<Repair__c>();
List<Repair_Quotation__c> RepairQuotationList = new List<Repair_Quotation__c>();
List<String> DealerIdList = new List<String>();
List<Account> DealerList = new List<Account>();
- List<Repair__c> updateRepairList = new List<Repair__c>();
- System.debug('newList1:' + newList);
for(Repair__c rep : newList){
if(rep.Repair_Quotation_Id__c != null){
RepairQuotationIdList.add(rep.Repair_Quotation_Id__c);
@@ -712,8 +710,6 @@
NoRepairQuotationList.add(rep);
}
}
- System.debug('RepairQuotationIdList1:' + RepairQuotationIdList);
- System.debug('NoRepairQuotationList1:' + NoRepairQuotationList);
//鍚屾湡涓殑淇悊淇悊鎶ヤ环鏈夊�兼椂锛岀湅鎶ヤ环涓婄殑鍏堟鏍囪瘑杩涜璧嬪��
if(RepairQuotationIdList.size() > 0){
RepairQuotationList = [select Id, Is_RecognitionModel__c from Repair_Quotation__c where Id IN :RepairQuotationIdList];
@@ -722,7 +718,6 @@
for(Repair__c rep : newList){
if(rq.Id == rep.Repair_Quotation_Id__c){
rep.Advance_Payment_Flag__c = rq.Is_RecognitionModel__c;
- // updateRepairList.add(rep);
}
}
}
@@ -739,15 +734,11 @@
for(Repair__c rep : newList){
if(rep.Dealer__c == dealer.Id){
rep.Advance_Payment_Flag__c = dealer.FirstParagraphEnd__c;
- // updateRepairList.add(rep);
}
}
}
- // if(updateRepairList.size() > 0){
- // update updateRepairList;
- // }
}
- //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220318 end
+ //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220322 end
public static void CheckUpdate(List<Repair__c> oldList, Map<Id, Repair__c> newMap) {
System.debug('===========> start');
diff --git a/force-app/main/default/triggers/Repair.trigger b/force-app/main/default/triggers/Repair.trigger
index 4f47e47..1daa2f0 100644
--- a/force-app/main/default/triggers/Repair.trigger
+++ b/force-app/main/default/triggers/Repair.trigger
@@ -26,9 +26,9 @@
// 銇撱亾銈堛倞銆佷慨鐞嗐伄銈点兗銉撱偣銈炽兂銉堛儵銈儓闋呯洰銈掕嚜鍕曠殑銇洿鏂般仚銈嬨儹銈搞儍銈�
// ----------------------------------------------------------------------
if (Trigger.isBefore && (Trigger.isInsert || Trigger.isUpdate)) {
- //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220318 start
+ //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220322 start
RepairTrigger.AdvancePaymentFlagUpsert(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
- //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220318 end
+ //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220322 end
// 绱嶅叆姗熷櫒ID銈掍竴鎰忋伀鏍肩磵銇欍倠 Set銇с仚銆�
Set<ID> assetIds = new Set<Id>();
--
Gitblit v1.9.1