| | |
| | | //授权申请的提交按钮 |
| | | @AuraEnabled |
| | | public static String submit(String recordId) { |
| | | String messageText = ''; |
| | | try { |
| | | Request_tedner_doc__c rac = [SELECT Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1]; |
| | | rac.Status__c = LightingButtonConstant.STATUS_Application_Submitted; |
| | |
| | | rac.Submit_check_flag__c = true; |
| | | rac.Submit_time__c = Datetime.now(); |
| | | update rac; |
| | | return '1'; |
| | | messageText = '1'; |
| | | return messageText; |
| | | } catch (Exception ex) { |
| | | System.debug(LoggingLevel.INFO, '*** xu: ' + ex); |
| | | return ex.getMessage(); |
| | | } finally { |
| | | |
| | | messageText = ex.getMessage(); |
| | | return messageText; |
| | | } |
| | | } |
| | | |
| | | //授权申请的取消提交按钮 |
| | | @AuraEnabled |
| | | public static String submitCancel(String recordId) { |
| | | String messageText = ''; |
| | | try { |
| | | Request_tedner_doc__c report = [SELECT Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1]; |
| | | report.Status__c = LightingButtonConstant.STATUS_Application_CancelSubmit; |
| | |
| | | report.Submit_check_flag__c = false; |
| | | report.Submit_time__c = null; |
| | | update report; |
| | | return '1'; |
| | | messageText = '1'; |
| | | return messageText; |
| | | } catch (Exception ex) { |
| | | System.debug(LoggingLevel.INFO, '*** cancelXu: ' + ex); |
| | | return ex.getMessage(); |
| | | } finally { |
| | | |
| | | messageText = ex.getMessage(); |
| | | return messageText; |
| | | } |
| | | } |
| | | |
| | | //获取当前登录人的 id |
| | | @AuraEnabled |
| | | public static UserResult UserInfo_Owner() { |
| | | public static UserResult userInfo_Owner() { |
| | | UserResult result = new UserResult(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | try { |