| | |
| | | if(exList.size() <= 0){ |
| | | exViewList.add(new ExMpdDetailsInfo()); |
| | | } |
| | | exList.add(new ExMpdDetailsInfo()); |
| | | ExMpdDetailsInfo exd = new ExMpdDetailsInfo(); |
| | | exd.mpdrdd.ProductsID__c = id; |
| | | exList.add(exd); |
| | | muCountMap.put(id,exList.size()); |
| | | muCountViewMap.put(id,exViewList.size()); |
| | | exmpdDetailsRecordsMap.put(id,exList); |
| | |
| | | Ins.add(upMpd); |
| | | } |
| | | List<Maintenance_Product_Data_Details__c> exIntList = new List<Maintenance_Product_Data_Details__c>(); |
| | | List<Maintenance_Product_Data_Details__c> exDetailList = new List<Maintenance_Product_Data_Details__c>(); |
| | | if(RecordTypeName.equals('GuranteeMain')){ |
| | | List<Maintenance_Product_Data__c> mpd_Name = new List<Maintenance_Product_Data__c>(); |
| | | mpd_Name = [SELECT id,Name FROM Maintenance_Product_Data__c WHERE id =:id]; |
| | | List<String> idList = new List<String>(); |
| | | for (MpdDetailsInfo ass : mpdDetailsRecords){ |
| | | if(ass.mpded.Id != null && ass.mpded.Id != ''){ |
| | | idList.add(ass.mpded.Id); |
| | | } |
| | | } |
| | | 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']; |
| | | exDetailList = [SELECT id,Name FROM Maintenance_Product_Data_Details__c where Maintenance_Product_Data__c =:id and RecordTypeId = '012C50000000jefIAA']; |
| | | Integer str = 0; |
| | | for(List<ExMpdDetailsInfo> li: exmpdDetailsRecordsMap.values()){ |
| | | for(ExMpdDetailsInfo ex: li){ |
| | |
| | | } |
| | | // chenjingwu 3+2多年保修 20240417 end |
| | | } |
| | | System.debug('chenjingwu=>' + exIntList); |
| | | if(isWarning){ |
| | | return null; |
| | | }else{ |
| | |
| | | ref.setRedirect(true); |
| | | return ref; |
| | | } |
| | | public String ProId {get;set;} |
| | | public Integer index{get;set;} |
| | | public PageReference addEx(){ |
| | | ExMpdDetailsInfo ex = new ExMpdDetailsInfo(); |
| | | ex.mpdrdd.ProductsID__c = ProId; |
| | | exmpdDetailsRecordsMap.get(ProId).add(ex); |
| | | muCountMap.get(ProId); |
| | | return null; |
| | | } |
| | | public PageReference deleteEx(){ |
| | | exmpdDetailsRecordsMap.get(ProId).remove(index); |
| | | muCountMap.get(ProId); |
| | | return null; |
| | | } |
| | | |
| | | //搜索时的sql |
| | | public String makeSoql(String Family,String Category2,String Category3,String Category4,String Category5,String CateName,String ProductCode_Ext,String GuranteeType){ |