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
// with lwc lexNoReportApplication
    //author  kkbes
public  class LexNoReportApplicationController {
    @AuraEnabled
    public static OPDPlan__c initGetOpdData(String recordId){
        OPDPlan__c res = new OPDPlan__c();
        try {
            OPDPlan__c report = [select Id,Name,Status__c from OPDPlan__c where Id = :recordId];
            res=report;
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
 
    @AuraEnabled
    public static String  getProfileIdByName(String Name){
        Profile profile = null;
        try {
            profile = [select Id from Profile where Name =:name];
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: 没有此Name对应的Id' + e);
            return null;
        }
        return profile.Id;
 
    }
}