123
chenjingwu
2024-04-23 c105d45d688045fddae6733776d7291482825011
force-app/main/default/classes/MaintenanceProductDataController.cls
@@ -870,7 +870,7 @@
                }
                // chenjingwu 3+2多年保修 20240417 start 
                muCountMap = new Map<String,Integer>();
                muList = [select Id,AgeLimit__c,MultiOneYearWarrantyPrice__c,AmountWithheld__c,ProductName__c from MultiYearWarranty__c where ProductName__c in: idList order By ProductName__c];
                muList = [select Id,AgeLimit__c,MultiOneYearWarrantyPrice__c,AmountWithheld__c,ProductName__r.Name,ProductName__c from MultiYearWarranty__c where ProductName__c in: idList order By ProductName__c];
                  for(AggregateResult  objAgr: [select ProductName__c,COUNT(Id) total from MultiYearWarranty__c where ProductName__c in:idList group by ProductName__c]){
                    muCountMap.put((String)objAgr.get('ProductName__c'), (Integer)objAgr.get('total') + 1);
                  }
@@ -882,7 +882,7 @@
                            mus.add(mu);
                        }
                    }
                    mus.add(new MultiYearWarranty__c(ProductName__c = id));
                    mus.add(new MultiYearWarranty__c(ProductName__r = id,ProductName__c = id));
                    muMap.put(id,mus);
                }
                System.debug('chenjingwu=>' + muCountMap);