| | |
| | | public String sobjecttypeForFrontEnd{set;get;} |
| | | public String sobjectId{set;get;} |
| | | public String layoutSectionsStr {get; set;} |
| | | public String no1Name{get; set;} |
| | | public String no1Id{get; set;} |
| | | public NewAndEditReportController(ApexPages.StandardController controller) { |
| | | sobjectId = [SELECT CustomObjectId,CustomObjectName FROM CustomObjectUserLicenseMetrics where CustomObjectName ='Report' limit 1].CustomObjectId; |
| | | isNewMode = true; |
| | |
| | | sfIdToAWSIdMap.put(String.valueof(ReportData.Person_In_Charge__r.Id).subString(0,15),ReportData.Person_In_Charge__r.AWS_Data_Id__c); |
| | | } |
| | | contactsInfo = JSON.serialize(sfIdToAWSIdMap); |
| | | }else if(ApexPages.currentPage().getParameters().get('CF00N10000008ps6d_lkid') != null){ |
| | | //OPD计划过来的,通过Id查出借出备品申请No1进行展示 |
| | | String opdPlanId = ApexPages.currentPage().getParameters().get('CF00N10000008ps6d_lkid'); |
| | | if(String.isNotEmpty(opdPlanId)&&String.isNotBlank(opdPlanId)){ |
| | | List<OPDPlan__c> opList = [select NewestRentalCode__c from OPDPlan__c where id=:opdPlanId]; |
| | | if(opList!=null&&opList.size()>0){ |
| | | no1Name = opList[0].NewestRentalCode__c; |
| | | List<Rental_Apply__c> racList = [select id from Rental_Apply__c where Name=:opList[0].NewestRentalCode__c]; |
| | | if(racList!=null&&racList.size()>0){ |
| | | no1Id = racList[0].id; |
| | | } |
| | | } |
| | | } |
| | | rtTypeId = ApexPages.currentPage().getParameters().get('RecordType'); |
| | | obj.put('OwnerId',UserInfo.getUserId()); |
| | | }else{ |
| | | //新建 |
| | | rtTypeId = ApexPages.currentPage().getParameters().get('RecordType'); |
| | |
| | | PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo('Report__c'); |
| | | staticResource = JSON.serialize(piIntegration); |
| | | encryptedAPIList = piIntegration.PIFields; |
| | | System.debug('piIntegration.PIFields = ' + encryptedAPIList); |
| | | staticResourceContact = JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')); |
| | | sobjectPrefix = piIntegration.sobjectPrefix; |
| | | layoutSectionsStr = JSON.serialize(layoutSections); |