| | |
| | | } |
| | | //取消提交操作更新相应数据 |
| | | @AuraEnabled |
| | | public static void cancel(String recordId) { |
| | | public static String cancel(String recordId) { |
| | | try { |
| | | Monthly_Report__c report = [SELECT Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Monthly_Report__c WHERE Id = :recordId LIMIT 1]; |
| | | report.Status__c = LightingButtonConstant.STATUS_DRAFT; |
| | |
| | | report.Submit_check_flag__c = false; |
| | | report.Submit_time__c = null; |
| | | update report; |
| | | return null; |
| | | } catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } finally { |
| | | |
| | | String eMessage = e.getMessage(); |
| | | Integer left = eMessage.indexOf(',') + 1; |
| | | Integer right = eMessage.length(); |
| | | return eMessage.substring(left,right); |
| | | } |
| | | |
| | | } |
| | | |
| | | |