From 82bab865cd68bf4d18d7e0e63342b5cbe76a6aa3 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 19 四月 2024 13:56:33 +0800
Subject: [PATCH] 123

---
 force-app/main/default/classes/lexNewQuoteEntryController.cls |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/force-app/main/default/classes/lexNewQuoteEntryController.cls b/force-app/main/default/classes/lexNewQuoteEntryController.cls
index d6854aa..7c36ae0 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 + '骞�',mu.AgeLimit__c + ''));
       }
       optionMap.put(id,optionTempleteList);
     }
@@ -2987,17 +2985,24 @@
                 this.exPrice = mu.MultiOneYearWarrantyPrice__c;
               }
             }
+          }else{
+              this.Learning_Community = 0 + '';
+              this.exPrice = 0;
           }
-          if(period > 0){
-            List<OptionTemplete> optionTempleteList = new List<OptionTemplete>();
+          List<OptionTemplete> optionTempleteList = new List<OptionTemplete>();
             optionTempleteList.add(new OptionTemplete('0骞�','0'));
+          if(period > 0){
             for(MultiYearWarranty__c mu: this.multiYearWarrantyList){
-              optionTempleteList.add(new OptionTemplete((mu.AgeLimit__c + 1) + '骞�',(mu.AgeLimit__c + 1) + ''));
+              optionTempleteList.add(new OptionTemplete(mu.AgeLimit__c + '骞�',mu.AgeLimit__c + ''));
             }
             // for(Integer j = 0;j < period;j++){
             //   optionTempleteList.add(new OptionTemplete((j + 1) + '骞�',(j + 1) + ''));
             // }
-            this.Learning_CommunityOptions = optionTempleteList;
+          }
+          this.Learning_CommunityOptions = optionTempleteList;
+          if(qli.ExtendedWarrantyPeriod__c == null && 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