| | |
| | | //private Integer lastRowSize = 24; |
| | | /** 印刷するページ数です。 */ |
| | | //public Integer maxPageNumber { get; private set; } |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | public List<String> TopProductModel =new List<String>(); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | |
| | | public String RecordTypeName { get; private set; } |
| | | public Integer year { get; private set; } |
| | |
| | | public MceConfigPDFController(ApexPages.StandardController controller) { |
| | | } |
| | | public void init() { |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | TopProductModel.add('CF-LV1I'); |
| | | TopProductModel.add('CF-LV1L'); |
| | | TopProductModel.add('CV-V1'); |
| | | TopProductModel.add('GIF-LV1'); |
| | | TopProductModel.add('OER-AW'); |
| | | TopProductModel.add('OER-A'); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | String targetEstimateId = ApexPages.currentPage().getParameters().get('id'); |
| | | flag = ApexPages.currentPage().getParameters().get('flag'); |
| | | // 見積情報を取得、必ずあるはず |
| | |
| | | // 明細の設定 |
| | | Integer cnt = 0; |
| | | List<Maintenance_Contract_Asset_Estimate__c> MaintenanceCAE = [SELECT Id, Name, Asset__c, Maintenance_Contract_Estimate__r.Department__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | Asset__r.OwnershipMachine_No__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | Product_Manual__r.Asset_Model_No__c, |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | Asset__r.Name, Asset__r.SerialNumber, Asset__r.InstallDate, |
| | | Asset__r.Product2.Name, |
| | | Product_Manual__c, Product_Manual__r.Name, IsNew__c, |
| | |
| | | WHERE Maintenance_Contract_Estimate__c = :this.targetObj.estimate.Id |
| | | ORDER BY Product_Manual__c, Asset__r.SerialNumber, Asset__r.Name, Asset__r.Department_Name__c, Asset__r.InstallDate]; |
| | | system.debug('检查::::::'+MaintenanceCAE); |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 start |
| | | List<Maintenance_Contract_Asset_Estimate__c> topAsset =new List<Maintenance_Contract_Asset_Estimate__c>(); |
| | | List<Maintenance_Contract_Asset_Estimate__c> otherAsset =new List<Maintenance_Contract_Asset_Estimate__c>(); |
| | | |
| | | for(Maintenance_Contract_Asset_Estimate__c tarAsse : MaintenanceCAE){ |
| | | if(TopProductModel.contains(tarAsse.Asset__r.OwnershipMachine_No__c)||TopProductModel.contains(tarAsse.Product_Manual__r.Asset_Model_No__c)){ |
| | | topAsset.add(tarAsse); |
| | | }else{ |
| | | otherAsset.add(tarAsse); |
| | | } |
| | | } |
| | | topAsset.addAll(otherAsset); |
| | | MaintenanceCAE=topAsset; |
| | | //2021-11-30 fy add LJPH-C8W8FV 置顶 end |
| | | for(Maintenance_Contract_Asset_Estimate__c mcae :MaintenanceCAE) { |
| | | //for(Integer a=0;a<50;a++){ |
| | | //tmpTargetObj.addAssetInfo(mcae); |