| | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static void newAndUpddateCampaign(String Id,String Status){ |
| | | public static String newAndUpddateCampaign(String Id,String Status){ |
| | | try{ |
| | | Campaign res = new Campaign(); |
| | | res.Id = Id; |
| | | res.Status=Status; |
| | | update res; |
| | | return 'success'; |
| | | } |
| | | catch(Exception e){ |
| | | System.debug('lexSubmitCampaign,method:newAndUpddateCampaign error: '+e.getMessage()); |
| | | return e.getMessage(); |
| | | |
| | | } |
| | | |
| | |
| | | System.debug('lexSubmitCampaign,method:addCampaignEvent error: '+e.getMessage()); |
| | | return e.getMessage(); |
| | | } |
| | | } |
| | | |
| | | //会议变更申请列表按钮 |
| | | @AuraEnabled |
| | | public static Campaign initMeetingDelayApply(String recordId){ |
| | | Campaign res = new Campaign(); |
| | | try { |
| | | res = [SELECT Id,PlanBackData__c,Meeting_Cooperate__c,Meeting_Cooperate2__c, |
| | | Meeting_Cooperate3__c,Meeting_Cooperate4__c,Meeting_Type__c,HostName__c, |
| | | cooperatorCompany__c,StartDate,EndDate,IF_Approved__c,Status,CampaignStatus__c,IF_Submit__c, |
| | | Meeting_Approved_No__c |
| | | FROM Campaign |
| | | WHERE Id = :recordId]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:initMeetingDelayApply error: '+e.getMessage()); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<meeting_delay_apply__c> findQualified1(String CampaignId){ |
| | | List<meeting_delay_apply__c> res = new List<meeting_delay_apply__c>(); |
| | | try { |
| | | res = [SELECT Id FROM meeting_delay_apply__c |
| | | WHERE Status__c = '审批中' And Campaign__c =:CampaignId ]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage()); |
| | | return res; |
| | | } |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Consum_Apply__c> findQualified2(String CampaignId){ |
| | | List<Consum_Apply__c> res = new List<Consum_Apply__c>(); |
| | | try { |
| | | res = [SELECT Id FROM Consum_Apply__c |
| | | WHERE Status__c Not in ('草案中','取消') And Campaign__c =:CampaignId ]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage()); |
| | | return res; |
| | | } |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Rental_Apply__c> findQualified3(String CampaignId){ |
| | | List<Rental_Apply__c> res = new List<Rental_Apply__c>(); |
| | | try { |
| | | res = [SELECT Id FROM Rental_Apply__c |
| | | WHERE Status__c Not in ('草案中','取消') And Campaign__c =:CampaignId ]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage()); |
| | | return res; |
| | | } |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static String getRecordIdByName(String Name){ |
| | | try { |
| | | List<RecordType> res = [Select Id, Name From RecordType Where Name LIKE :Name limit 1]; |
| | | String needId = res[0].Id; |
| | | return needId; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug('lexSubmitCampaign,method:getRecordIdByName error: '+e.getMessage()); |
| | | return ''; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |