From fd9df05c48c09b4d7f39a3b401882bda226dedea Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 31 十月 2023 20:38:18 +0800
Subject: [PATCH] 近期修改

---
 force-app/main/default/classes/ReportController.cls |   31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/force-app/main/default/classes/ReportController.cls b/force-app/main/default/classes/ReportController.cls
index 8535a6b..a8ecc37 100644
--- a/force-app/main/default/classes/ReportController.cls
+++ b/force-app/main/default/classes/ReportController.cls
@@ -17,7 +17,7 @@
             res.recordTypeId1 = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SIS_ENG).getRecordTypeId();
             res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SIS_ET).getRecordTypeId();
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -36,7 +36,7 @@
             res.opdPlan = rent.OPDPlan__c;
             res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_OPD).getRecordTypeId();
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -257,7 +257,7 @@
         try {
            res =  new InitData();
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -276,7 +276,7 @@
             res.datec = re.Date__c;
             res.practitioner1 = re.Practitioner1__c;
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
     }
@@ -305,6 +305,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     //OPDtoSIS鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -329,6 +330,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
 
@@ -356,6 +358,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     //瀹屾瘯鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -381,6 +384,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     //OCSM瑕佹姤鍛婃搷浣滄洿鏂扮浉搴旀暟鎹�
@@ -405,6 +409,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
 
@@ -430,6 +435,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     //DispatchOCSMQARA鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -454,6 +460,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     //OCSM涓嶈鎶ュ憡鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -478,6 +485,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
 
@@ -503,6 +511,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     
@@ -548,6 +557,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
 
@@ -573,6 +583,7 @@
             }else {
                 return e.getMessage();   
             } 
+            // return e.getDmlMessage(0);
         }
     }
 
@@ -601,6 +612,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     //VOC鍥炵瓟鏇存柊鐩稿簲鏁版嵁
@@ -661,6 +673,7 @@
             }else {
                 return e.getMessage();   
             }
+            // return e.getDmlMessage(0);
         }
     }
     //VOC鍒ゅ畾鏇存柊鐩稿簲鏁版嵁
@@ -709,9 +722,7 @@
                 }
                 return null;
         } catch (Exception e) {
-            System.debug(LoggingLevel.INFO, '*** e: ' + e);
-            String exc = e.getMessage();
-            return exc;
+            return e.getMessage();
         }
     }
     //VOC瀹屾瘯鎿嶄綔鏇存柊鐩稿簲鏁版嵁
@@ -723,6 +734,7 @@
             update report;
             return null;
         } catch (Exception e) {
+            // return e.getDmlMessage(0);
             if (e.getMessage().contains(',')) {
                 System.debug(LoggingLevel.INFO, '*** e: ' + e);
                 String exc = '' + e.getMessage();
@@ -743,7 +755,7 @@
         try {
             user = [select Id from User where Name =:name]; 
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return user.Id;
     }
@@ -753,10 +765,11 @@
         try {
             profile = [select Id from Profile where Name =:name];
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return profile.Id;
     }
+    
     public class InitData{
         @AuraEnabled
         public String status;

--
Gitblit v1.9.1