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/RepairTrigger.cls |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/force-app/main/default/classes/RepairTrigger.cls b/force-app/main/default/classes/RepairTrigger.cls
index 4d36d5f..252f4db 100644
--- a/force-app/main/default/classes/RepairTrigger.cls
+++ b/force-app/main/default/classes/RepairTrigger.cls
@@ -696,17 +696,14 @@
         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){
-            Repair__c oldRep = oldMap.get(rep.Id);
             if(rep.Repair_Quotation_Id__c != null){
                 RepairQuotationIdList.add(rep.Repair_Quotation_Id__c);
             }else{
@@ -721,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);
                 }
             }
         }
@@ -738,21 +734,11 @@
             for(Repair__c rep : newList){
                 if(rep.Dealer__c == dealer.Id){
                     rep.Advance_Payment_Flag__c = dealer.FirstParagraphEnd__c;
-                    updateRepairList.add(rep);
                 }
             }
         }
-        Savepoint sp = Database.setSavepoint();
-        try {
-            if(updateRepairList.size() > 0){
-                update updateRepairList;
-            }
-        } catch (System.Exception e) {
-            Database.rollback(sp);
-            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, e.getMessage()));
-        }
     }
-    //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220318 end
+    //鍏堟鍚庝慨-淇悊澧炲姞鍏堟鏍囪瘑 thh 20220322 end
 
     public static void CheckUpdate(List<Repair__c> oldList, Map<Id, Repair__c> newMap) {
         System.debug('===========> start');

--
Gitblit v1.9.1