| | |
| | | for (Integer i=0;i<column_Old.size();i++) { |
| | | mpdsoql += ',' + column_Old[i]; |
| | | } |
| | | mpdsoql += ' from Maintenance_Product_Data_Details__c where Maintenance_Product_Data__c = \''+id+'\''; |
| | | mpdsoql += ' from Maintenance_Product_Data_Details__c where RecordTypeId != \'012C50000000jefIAA\' and Maintenance_Product_Data__c = \''+id+'\''; |
| | | // 選択済みの明细を取得 |
| | | mpdDetailsSelected = Database.query(mpdsoql); |
| | | for (Maintenance_Product_Data_Details__c mpdd1 : mpdDetailsSelected) { |
| | |
| | | exmpdDetailsRecordsMap.put(id,exList); |
| | | } |
| | | } |
| | | System.debug('chenjingwu=>' + idList); |
| | | System.debug('chenjingwu=>' + muCountMap); |
| | | System.debug('chenjingwu=>' + exmpdDetailsRecordsMap); |
| | | System.debug('chenjingwu=>' + mpdDetailsRecords); |
| | | // chenjingwu 3+2多年保修 20240417 end |
| | | } |
| | | } |
| | |
| | | //更新 |
| | | mpd_Name = [SELECT id,Name FROM Maintenance_Product_Data__c WHERE id =:id]; |
| | | } |
| | | List<Maintenance_Product_Data_Details__c> mpdd_Name = [SELECT id,Name FROM Maintenance_Product_Data_Details__c where Maintenance_Product_Data__c =:id order by Name desc Limit 1 ]; |
| | | 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 '%ex%' order by Name desc Limit 1 ]; |
| | | if(mpdd_Name.size()>0){ |
| | | String[] nameI= mpdd_Name[0].Name.split('-'); |
| | | i = Integer.valueOf(nameI[1])+1; |
| | |
| | | insmpdd.MultiYearWarranty__c = mu.Id; |
| | | insmpdd.MultiOneYearWarrantyPrice__c = mu.MultiOneYearWarrantyPrice__c; |
| | | insmpdd.AmountWithheld__c = mu.AmountWithheld__c; |
| | | insmpdd.ProductsID__c = mu.ProductName__c; |
| | | |
| | | |
| | | insmpdd.AgeLimit_Old__c = mu.AgeLimit__c; |
| | |
| | | InsAfterDel.MultiYearWarranty__c = ex.mpdrdd.MultiYearWarranty__c; |
| | | InsAfterDel.MultiOneYearWarrantyPrice__c = ex.mpdrdd.MultiOneYearWarrantyPrice__c; |
| | | InsAfterDel.AmountWithheld__c = ex.mpdrdd.AmountWithheld__c; |
| | | |
| | | InsAfterDel.ProductsID__c = ex.mpdrdd.ProductsID__c; |
| | | |
| | | InsAfterDel.AgeLimit_Old__c = ex.Prod.AgeLimit__c; |
| | | InsAfterDel.MultiOneYearWarrantyPrice_Old__c = ex.Prod.MultiOneYearWarrantyPrice__c; |