| | |
| | | // chenjingwu 3+2多年保修 20240417 end |
| | | // chenjingwu 3+2多年保修 20240417 start |
| | | 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]; |
| | | Integer i = 0; |
| | | Integer str = 0; |
| | | for(MultiYearWarranty__c mu: muList){ |
| | | Maintenance_Product_Data_Details__c insmpdd = new Maintenance_Product_Data_Details__c(); |
| | | insmpdd.Maintenance_Product_Data__c = mpd_Name[0].id; |
| | | insmpdd.Name = mpd_Name[0].Name + '-ex'+ i; |
| | | insmpdd.Name = mpd_Name[0].Name + '-ex'+ str; |
| | | insmpdd.AgeLimit__c = mu.AgeLimit__c; |
| | | insmpdd.MultiYearWarranty__c = mu.Id; |
| | | insmpdd.MultiOneYearWarrantyPrice__c = mu.MultiOneYearWarrantyPrice__c; |
| | |
| | | insmpdd.AmountWithheld_Old__c = mu.AmountWithheld__c; |
| | | insmpdd.RecordTypeId = '012C50000000jefIAA'; |
| | | exIntList.add(insmpdd); |
| | | i++; |
| | | str++; |
| | | } |
| | | } else{ |
| | | Integer i = 0; |
| | | Integer str = 0; |
| | | for(List<ExMpdDetailsInfo> li: exmpdDetailsRecordsMap.values()){ |
| | | for(ExMpdDetailsInfo ex: li){ |
| | | Maintenance_Product_Data_Details__c InsAfterDel = new Maintenance_Product_Data_Details__c(); |
| | | InsAfterDel.Maintenance_Product_Data__c = mpd_Name[0].id; |
| | | InsAfterDel.Name = mpd_Name[0].Name + '-ex'+ i; |
| | | InsAfterDel.Name = mpd_Name[0].Name + '-ex'+ str; |
| | | InsAfterDel.AgeLimit__c = ex.mpdrdd.AgeLimit__c; |
| | | InsAfterDel.MultiYearWarranty__c = ex.mpdrdd.MultiYearWarranty__c; |
| | | InsAfterDel.MultiOneYearWarrantyPrice__c = ex.mpdrdd.MultiOneYearWarrantyPrice__c; |
| | |
| | | InsAfterDel.AmountWithheld_Old__c = ex.Prod.AmountWithheld__c; |
| | | InsAfterDel.RecordTypeId = '012C50000000jefIAA'; |
| | | exIntList.add(InsAfterDel); |
| | | i++; |
| | | str++; |
| | | } |
| | | } |
| | | } |