From 033fb422e2079c240af6824dac436f27f3ee8b05 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期二, 16 四月 2024 11:08:23 +0800
Subject: [PATCH] 123

---
 force-app/main/default/classes/lexNewQuoteEntryController.cls |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/force-app/main/default/classes/lexNewQuoteEntryController.cls b/force-app/main/default/classes/lexNewQuoteEntryController.cls
index d6854aa..ac71481 100644
--- a/force-app/main/default/classes/lexNewQuoteEntryController.cls
+++ b/force-app/main/default/classes/lexNewQuoteEntryController.cls
@@ -269,10 +269,8 @@
     for(String id: idList){
       List<OptionTemplete> optionTempleteList = new List<OptionTemplete>();
       optionTempleteList.add(new OptionTemplete('0骞�','0'));
-      for(List<MultiYearWarranty__c> mus: priceMap.get(id)){
-        for(MultiYearWarranty__c mu: mus){
-          optionTempleteList.add(new OptionTemplete((mu.AgeLimit__c + 1) + '骞�',(mu.AgeLimit__c + 1) + ''));
-        } 
+      for(MultiYearWarranty__c mu: priceMap.get(id)){
+        optionTempleteList.add(new OptionTemplete((mu.AgeLimit__c + 1) + '骞�',(mu.AgeLimit__c + 1) + ''));
       }
       optionMap.put(id,optionTempleteList);
     }
@@ -2987,6 +2985,9 @@
                 this.exPrice = mu.MultiOneYearWarrantyPrice__c;
               }
             }
+          }else{
+              this.Learning_Community = 0 + '';
+              this.exPrice = 0;
           }
           if(period > 0){
             List<OptionTemplete> optionTempleteList = new List<OptionTemplete>();
@@ -2998,6 +2999,11 @@
             //   optionTempleteList.add(new OptionTemplete((j + 1) + '骞�',(j + 1) + ''));
             // }
             this.Learning_CommunityOptions = optionTempleteList;
+            
+          }
+          if(this.Learning_Community == '0' && this.Learning_CommunityOptions.size() > 1){
+            this.Learning_Community = this.multiYearWarrantyList.get(this.multiYearWarrantyList.size() - 1).AgeLimit__c;
+            this.exPrice = this.multiYearWarrantyList.get(this.multiYearWarrantyList.size() - 1).MultiOneYearWarrantyPrice__c;
           }
           
           // this.ExtendedWarrantyPeriod = new WarrantyPeriod(optionTempleteList,'');

--
Gitblit v1.9.1