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
33
34
35
36
37
38
39
40
public with sharing class LexSubmitExtensionController {
    @AuraEnabled
    public static InitData init(String recordId) {
        InitData res = new InitData();
 
        try {
            List<Rental_Apply__c> racList = [SELECT Id, ExtensionStatus__c, Root_Rental_Apply__c, demo_purpose2__c, AgreementBorrowingExtensionDate__c, Return_dadeline_final__c from Rental_Apply__c where Id = :recordId];
            if(racList.size()>0){
 
                Rental_Apply__c rac = racList[0];
                res.id = rac.Id;
                res.extensionStatus = rac.ExtensionStatus__c;
                res.rootRentalApply = rac.Root_Rental_Apply__c;
                res.demoPurpose2 = rac.demo_purpose2__c;
                res.agreementBorrowingExtensionDate = rac.AgreementBorrowingExtensionDate__c;
                res.returnDadelineFinal = rac.Return_dadeline_final__c;
            }
            
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '****e:' + e);
        }
        return res;
    }
 
    public class InitData {
        @AuraEnabled
        public String id;
        @AuraEnabled
        public String extensionStatus;
        @AuraEnabled
        public String rootRentalApply;
        @AuraEnabled
        public String demoPurpose2;
        @AuraEnabled
        public Date agreementBorrowingExtensionDate;
        @AuraEnabled
        public Date returnDadelineFinal;
    }
}