From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523

---
 force-app/main/default/classes/ESignController.cls |   57 ++++++++++++++++++++++++++++-----------------------------
 1 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/force-app/main/default/classes/ESignController.cls b/force-app/main/default/classes/ESignController.cls
index a997487..bdb7e66 100644
--- a/force-app/main/default/classes/ESignController.cls
+++ b/force-app/main/default/classes/ESignController.cls
@@ -3,20 +3,35 @@
     public static InitData ESignController (String recordId){
         InitData res = new initData();
         try{
-            eSignForm__c report = [SELECT Id,Group_purchase_PCL__c,OCM_man_province_cus__c,HPSignUpStatus__c,Sales_Root_Formula__c,HPSignUpDate__c  FROM eSignForm__c WHERE Id = :recordId LIMIT 1];
+            eSignForm__c report = [SELECT Id,Group_purchase_PCL__c,OCM_man_province_cus__c,HPSignUpStatus__c,Sales_Root_Formula__c,HPSignUpDate__c,agencyAutoSignUpStatus__c,agencySignUpDate__c  FROM eSignForm__c WHERE Id = :recordId LIMIT 1];
             res.Id = report.Id;
-            // res.RCManagerId = report.RC_ManagerId__c;
             res.GrouppurchasePCL = report.Group_purchase_PCL__c;
             res.OCMManProvinceCus = report.OCM_man_province_cus__c;
             res.HPSignUpStatus = report.HPSignUpStatus__c;
+            res.agencyAutoSignUpStatus = report.agencyAutoSignUpStatus__c;
             res.SalesRootFormula = report.Sales_Root_Formula__c;
             res.HPSignUpDate = report.HPSignUpDate__c;
+            res.agencySignUpDate = report.agencySignUpDate__c;
             res.profileId = UserInfo.getProfileId();
+            res.userId = UserInfo.getUserId();
+            res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+            res.OBA4_sinFor = getProfileIdByName(LightingButtonConstant.OBA4_sinFor);
             System.debug(LoggingLevel.INFO, '*** res: ' + res);
         }catch(Exception e){
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
         return res;
+    }
+
+    @AuraEnabled
+    public static string getProfileIdByName(String name){
+        Profile profile = null;
+        try {
+            profile = [select Id from Profile where Name =:name];
+        } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+        }
+        return profile.Id;
     }
 
     //妫�绱CSM绠$悊鐪� 涓婄殑钀ヤ笟绠$悊閮ㄦ媴褰�
@@ -38,8 +53,6 @@
     public class InitData{
         @AuraEnabled
         public String Id;
-        // @AuraEnabled
-        // public String RCManagerId;
         @AuraEnabled
         public Boolean GrouppurchasePCL;
         @AuraEnabled
@@ -47,34 +60,20 @@
         @AuraEnabled
         public String HPSignUpStatus;
         @AuraEnabled
+        public String agencyAutoSignUpStatus;
+        @AuraEnabled
         public String SalesRootFormula;
         @AuraEnabled
         public Date HPSignUpDate;
         @AuraEnabled
-        public String profileId;
-    }
-
-        //鑾峰彇褰撳墠鐧诲綍浜虹殑 id
+        public Date agencySignUpDate;
         @AuraEnabled
-        public static UserResult UserInfo_Owner() {
-            UserResult result = new UserResult();
-            ID myUserID = UserInfo.getUserId();
-            try { 
-                User tempUser = [select id from user where id = : myUserID ];
-                result.id = tempUser.id;
-            } catch (exception e) {
-                result.result = e.getMessage();
-            }
-            return result;
-        }
-
-        public class UserResult {
-            @AuraEnabled
-            public string result;
-            public UserResult( ) {
-                result = 'Success';
-            }
-            @AuraEnabled
-            public string id;
-        }
+        public String profileId;
+        @AuraEnabled
+        public String userId;
+        @AuraEnabled
+        public String systemProfileId;
+        @AuraEnabled
+        public String OBA4_sinFor;
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.1