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
public without sharing class TransferApplyController {
 
    @AuraEnabled
    public static list<TransferApplySummary__c> transferApplyPDF(string transferApplyId) {
        
        try {
            // var sql = "select Id from TransferApplySummary__c where TransferApply__c = 
            //'{!TransferApply__c.Id}' and ApprovalDetails__c > 0 and TAS_Status__c != '取消'";
            list<TransferApplySummary__c> reports = [
                select id from TransferApplySummary__c 
                where TransferApply__c = :transferApplyId
                and ApprovalDetails__c > 0
                and TAS_Status__c != '取消'];
            return reports;
        }catch ( Exception e) {
            System.debug(LoggingLevel.ERROR,'TransferApplySummary__c TransferApplyPDF Error : ' + e);
        }
        return null;
        
    }
 
    @AuraEnabled
    public static Boolean applyPermission()
    {
        Schema.DescribeSobjectResult schemaMap = Schema.describeSObjects(new String[]{'TransferApply__c'})[0];
        return schemaMap.isCreateable();
    }
 
}