19626
2023-04-13 920f16a391a3a25a7e7f4d90b6cb600d6c6dbd91
force-app/main/default/classes/MonthlyReportController.cls
@@ -51,7 +51,7 @@
    }
    //取消提交操作更新相应数据
    @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;
@@ -59,12 +59,13 @@
        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);
       }
    }