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
41
42
43
44
45
46
47
48
49
50
51
52
53
public with sharing class LexCampaignCreateController {
    public LexCampaignCreateController() {
        
    }
    //返回会议裁决主题
    @AuraEnabled
    static public Application_for_Conference_Adjudication__c displayDecisionTheme(String aid){
        try {
            Application_for_Conference_Adjudication__c afca = [select Id, CampaignTheme__c from Application_for_Conference_Adjudication__c
                                                                where id = :aid];
            return afca;
        } catch (System.Exception e) {
            return null;
        }
    }
    @AuraEnabled
    static public String getRecordTypeName(String recordTypeId){
        List<RecordType> recordTypeS = [select Id, Name, DeveloperName from RecordType where IsActive = true and id = :recordTypeId];
        if(recordTypeS.size()>0){
            return recordTypeS.get(0).DeveloperName;
        }
        return '';
    }
    @AuraEnabled
    static public Application_for_Conference_Adjudication__c getAFCAC(String id){
        List<Application_for_Conference_Adjudication__c> MeetingApprovedList = 
            [select Id, Name, StartDate__c, EndDate__c, Implementation_Purpose1__c, OfficeCategory__c, MeetingType__c, WorkshopPlace__c,
                HostName__c, CooperatorCompany__c, ConveningParticipantsNum__c, ExpectedOlympusAttendance__c,ExpectedHcpAttendance__c,
                SponsorshipCategory__c, IsPaidToSponsor__c, ActivityTypeName__c, Type_of_adjudication_meeting__c 
                from Application_for_Conference_Adjudication__c where Id = :id];
        if(MeetingApprovedList.size()>0){
            return MeetingApprovedList.get(0);
        }
        return null;
    }
 
    @AuraEnabled
    static public Boolean getLim(){
        String id = Userinfo.getUserId();
        User u=[SELECT id,Dept__c,ProfileId FROM User WHERE id = :id];
        Profile profile = [select Id from Profile where Name = '系统管理员' limit 1];
        User bu=[SELECT id FROM User WHERE Name='Batch' limit 1];
        if(u.ProfileId!=profile.id&&u.id!=bu.id&&u.Dept__c.contains('医疗华北营业本部')){
            return true;
        }
        return false;
    }
    @AuraEnabled
    static public boolean getU(){
        return NFMUtil.isSandbox();
    }
 
}