19626
2023-10-31 fd9df05c48c09b4d7f39a3b401882bda226dedea
force-app/main/default/classes/lexSolutionProgrammeController.cls
@@ -36,7 +36,18 @@
            update so;
            return '';
        } catch (Exception e) {
            return e.getDmlMessage(0);
            if (e.getMessage().contains(',')) {
                System.debug(LoggingLevel.INFO, '*** e: ' + e);
                String exc = '' + e.getMessage();
                Integer left = exc.indexOf(':') + 1;
                Integer right = exc.lastIndexOf(':');
                String str = exc.substring(left,right);
                left = str.indexOf(',') +  1;
                String newStr = str.substring(left);
                return newStr;
            }else {
                return e.getMessage();
            }
        }
    }
    //提交审批
@@ -51,7 +62,18 @@
        }
        catch (Exception e) {
            Database.rollback(sp);
            return e.getDmlMessage(0);
            if (e.getMessage().contains(',')) {
                System.debug(LoggingLevel.INFO, '*** e: ' + e);
                String exc = '' + e.getMessage();
                Integer left = exc.indexOf(':') + 1;
                Integer right = exc.lastIndexOf(':');
                String str = exc.substring(left,right);
                left = str.indexOf(',') +  1;
                String newStr = str.substring(left);
                return newStr;
            }else {
                return e.getMessage();
            }
        }
    }
    public class InitData{