| | |
| | | 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); |
| | |
| | | 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]; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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'); |