liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
public with sharing class lexRentalApplyController {
    @AuraEnabled
    public static InitData initForCreateOPDFromRentalApply(String recordId){
        InitData res = new InitData();
        try {
            Rental_Apply__c re = [
                select
                Hospital__c,
                Strategic_dept__c,
                Account__c
                from Rental_Apply__c where Id =: recordId
            ];
            res.hospitalId = re.Hospital__c;
            res.strategicDeptId = re.Strategic_dept__c;
            res.accountId = re.Account__c;
            res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
        } catch (Exception e) {
            System.debug(e.getMessage());
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String hospitalId;
        @AuraEnabled
        public String strategicDeptId;
        @AuraEnabled
        public String accountId;
        @AuraEnabled
        public String recordTypeId;
    }
}