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
41
42
public with sharing class LexEventCancelController {
    public LexEventCancelController() {
        
    }
    @AuraEnabled
    public static Event init(String recordId){
        
        try{
            Event res=[SELECT Id,EventC_ID__c,Task_ID__c,StartDateTime,EventStatus__c from Event where id= :recordId];
            if(res.Task_ID__c==null)res.Task_ID__c='';
            if(res.EventStatus__c==null)res.EventStatus__c='';
            if(res.EventC_ID__c==null)res.EventC_ID__c='';
            return res;
        }catch(Exception e){
            System.debug(LoggingLevel.INFO,'LexEventCancelController Error : ' + e);
        }
        return null;
    }
    @AuraEnabled
    public static Task__c getTaskC(String recordId) {
        if(String.isBlank(recordId))return null;
       try{
            Task__c res=[SELECT id,taskStatus__c,taskDifferent__c FROM Task__c where id = :recordId];
            return res;
        }catch(Exception e){
            System.debug(LoggingLevel.INFO,'Rental_Apply__c Cancel Error : ' + e);
        }
        return null;
    }
        @AuraEnabled
    public static List<Task__c> getTaskC1(String recordId) {
       try{
            List<Task__c> res=[select id from task__c where id = :recordId and taskStatus__c = '03 完成' ];
            return res;
        }catch(Exception e){
            System.debug(LoggingLevel.INFO,'Rental_Apply__c Cancel Error : ' + e);
        }
        return null;
    }
    
 
}