From 6ee1ba1c0c6b7f1b1035149029ff4b2ec6869fda Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期三, 24 四月 2024 13:28:25 +0800
Subject: [PATCH] 123

---
 force-app/main/default/classes/MaintenanceProductDataController.cls |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/force-app/main/default/classes/MaintenanceProductDataController.cls b/force-app/main/default/classes/MaintenanceProductDataController.cls
index a7550a3..b3e8726 100644
--- a/force-app/main/default/classes/MaintenanceProductDataController.cls
+++ b/force-app/main/default/classes/MaintenanceProductDataController.cls
@@ -540,7 +540,6 @@
                 exmpdDetailsRecordsMap = new Map<String,List<ExMpdDetailsInfo>>(); 
                 muCountMap = new Map<String,Integer>();
                 List<Maintenance_Product_Data_Details__c> exDetailList = [select Id,MultiYearWarranty__c,MultiYearWarranty__r.AgeLimit__c,MultiYearWarranty__r.MultiOneYearWarrantyPrice__c,MultiYearWarranty__r.AmountWithheld__c,AgeLimit__c,AgeLimit_Old__c,MultiOneYearWarrantyPrice__c,MultiOneYearWarrantyPrice_Old__c,AmountWithheld__c,AmountWithheld_Old__c,ProductsID__c,ProductsID__r.Name from Maintenance_Product_Data_Details__c where ProductsID__c in:idList and RecordTypeId = '012C50000000jefIAA'];
-                if(exDetailList.size() > 0){
                     for(String id: idList){
                         List<ExMpdDetailsInfo> exList = new List<ExMpdDetailsInfo>();
                         for(Maintenance_Product_Data_Details__c mpdd: exDetailList){
@@ -552,7 +551,6 @@
                         muCountMap.put(id,exList.size());
                         exmpdDetailsRecordsMap.put(id,exList);
                     }
-                }
                 System.debug('chenjingwu=>' + idList);
                 System.debug('chenjingwu=>' + muCountMap);
                 System.debug('chenjingwu=>' + exmpdDetailsRecordsMap);
@@ -651,8 +649,8 @@
                 //鏇存柊
                 mpd_Name = [SELECT id,Name FROM Maintenance_Product_Data__c WHERE id =:id];
             }
-            String str = '%ex%';
-            List<Maintenance_Product_Data_Details__c> mpdd_Name = [SELECT id,Name FROM Maintenance_Product_Data_Details__c where Maintenance_Product_Data__c =:id and NOT Name like:str order by Name desc Limit 1 ];
+            String str1 = '%ex%';
+            List<Maintenance_Product_Data_Details__c> mpdd_Name = [SELECT id,Name FROM Maintenance_Product_Data_Details__c where Maintenance_Product_Data__c =:id and (NOT Name like:str1) order by Name desc Limit 1 ];
             if(mpdd_Name.size()>0){
                 String[] nameI= mpdd_Name[0].Name.split('-');
                 i = Integer.valueOf(nameI[1])+1;

--
Gitblit v1.9.1