From 25f056535350a0b80bad50d2cc45311998e5d1cd Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 09 十月 2023 18:28:00 +0800
Subject: [PATCH] 近期修改

---
 force-app/main/default/classes/lexAccountController.cls |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/force-app/main/default/classes/lexAccountController.cls b/force-app/main/default/classes/lexAccountController.cls
index fbf2d82..7ced975 100644
--- a/force-app/main/default/classes/lexAccountController.cls
+++ b/force-app/main/default/classes/lexAccountController.cls
@@ -1,5 +1,20 @@
 public with sharing class lexAccountController {
     @AuraEnabled
+    public static InitData init(String recordId){
+        InitData res = new InitData();
+        try {
+            Account acc = [
+                select
+                Name
+                from Account where Id =: recordId
+            ]; 
+            res.name = acc.Name;
+        } catch (Exception e) {
+            System.debug(e.getMessage());
+        }
+        return res;
+    }
+    @AuraEnabled
     public static InitData initForNewSolutonProButton(String recordId){
         InitData res = new InitData();
         try {
@@ -15,7 +30,7 @@
             res.hospitalId = acc.Hospital__r.Id;
             res.hospitalOCMCategory = acc.Hospital__r.OCM_Category__c;
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(e.getMessage());
         }
         return res;
     }
@@ -25,7 +40,7 @@
         try {
            res.recordTypeId = Schema.SObjectType.Account_Number_of_case__c.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OTHER).getRecordTypeId(); 
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(e.getMessage());
         }
         return res;
     }
@@ -56,7 +71,7 @@
                 res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_URO).getRecordTypeId(); 
             }        
          } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(e.getMessage());
          }
          return res;
         
@@ -69,11 +84,11 @@
         try{
             res.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_CON).getRecordTypeId(); 
         }catch(Exception e){
-            throw new AuraHandledException(e.getMessage());
+            System.debug(e.getMessage());
         }
         return res;
     }
-    class InitData{
+    public class InitData{
         @AuraEnabled
         public String hospitalSalesdepartmentHP;
         @AuraEnabled
@@ -84,5 +99,7 @@
         public String recordTypeId;
         @AuraEnabled
         public String hospitalDepartmentClass;
+        @AuraEnabled
+        public String name;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1