19626
2023-10-31 fd9df05c48c09b4d7f39a3b401882bda226dedea
force-app/main/default/classes/lexSolutionProjectRequirementsController.cls
@@ -41,7 +41,7 @@
            res.hospital = so.Hospital__c;
            res.departmentClass = so.Department_Class__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
@@ -59,7 +59,7 @@
            res.profileId = UserInfo.getProfileId();
            res.m2ProfileId = [select Id from Profile where Name =: lexLightingButtonConstant.M2_PROFILE_NAME].Id;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
@@ -76,14 +76,18 @@
            update so;
            return '';
        } catch (Exception e) {
            if (e.getMessage().contains(':')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',') + 1;
                Integer right = eMessage.lastIndexOf('。') + 1;
                return eMessage.substring(left,right);
            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();   
            }
            }
        }
    }
    @AuraEnabled
@@ -96,13 +100,17 @@
            return '';
        } catch (Exception e) {
            if (e.getMessage().contains(',')) {
                String eMessage = e.getMessage();
                Integer left = eMessage.indexOf(',');
                Integer right = eMessage.length();
                return eMessage.substring(left + 1,right);
                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();   
            }
            }
        }
    }
@@ -118,7 +126,7 @@
            ];
            
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return accList;
    }
@@ -134,7 +142,7 @@
                from Solution_Programme__c where SolutionProjectRequirements__c =: recordId and Scheme_Type__c = '结案' 
            ];
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return so;
    }
@@ -147,11 +155,11 @@
                select id,name from solutionClosingAttachment__c where Solution_Programme__c =: solprogrammeId
            ];
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return so;
    }
    class InitData{
    public class InitData{
        @AuraEnabled
        public String status;
        @AuraEnabled