From 80b91b46594e6a9501a6dcc410d928a4ea5b9bce Mon Sep 17 00:00:00 2001
From: zz <1842059105@qq.com>
Date: 星期四, 11 五月 2023 18:13:38 +0800
Subject: [PATCH] 招标项目 关联已有询价 修改

---
 force-app/main/default/classes/TenderingButtonController.cls |   50 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/force-app/main/default/classes/TenderingButtonController.cls b/force-app/main/default/classes/TenderingButtonController.cls
index 47b080d..fb66353 100644
--- a/force-app/main/default/classes/TenderingButtonController.cls
+++ b/force-app/main/default/classes/TenderingButtonController.cls
@@ -8,9 +8,21 @@
             res.Id = report.Id;
             res.status = report.status__c;
             res.name = report.Name;
-            res.opportunityNum = String.valueOf(report.OpportunityNum__c);
+            // res.opportunityNum = String.valueOf(report.OpportunityNum__c);
+            res.opportunityNum = Integer.valueOf(report.OpportunityNum__c);
             res.isRelateProject = report.IsRelateProject__c;
             res.profileId = UserInfo.getProfileId();
+            res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+            res.TwoS1_Sales_Hospital = getProfileIdByName(LightingButtonConstant.TwoS1_Sales_Hospital);
+            res.TwoS1_Sales_Hospital_Non_Singleton = getProfileIdByName(LightingButtonConstant.TwoS1_Sales_Hospital_Non_Singleton );
+            res.TwoS2_Sales_Product = getProfileIdByName(LightingButtonConstant.TwoS2_Sales_Product);
+            res.TwoS4_Sales_Manager = getProfileIdByName(LightingButtonConstant.TwoS4_Sales_Manager);
+            res.TwoS4_Sales_Manager_Non_Singleton  = getProfileIdByName(LightingButtonConstant.TwoS4_Sales_Manager_Non_Singleton);
+            res.TwoS4_Sales_Manager_Majordomo  = getProfileIdByName(LightingButtonConstant.TwoS4_Sales_Manager_Majordomo);
+            res.TwoS6_Trade_Assistant = getProfileIdByName(LightingButtonConstant.TwoS6_Trade_Assistant);
+            res.TwoS6_Sales_Headquarters = getProfileIdByName(LightingButtonConstant.TwoS6_Sales_Headquarters);
+            res.TwoS7_Sales_Headquarters = getProfileIdByName(LightingButtonConstant.TwoS7_Sales_Headquarters);
+            res.TwoM4_Marketplace_Manager = getProfileIdByName(LightingButtonConstant.TwoM4_Marketplace_Manager);
             res.Environment_Url = System.Label.Environment_Url;
             System.debug(LoggingLevel.INFO, '*** xu: ' + res);
         }catch(Exception e){
@@ -19,6 +31,16 @@
         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;
+    }
     // var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
     // var sqlResult = sforce.connection.query(sql);
     @AuraEnabled
@@ -43,12 +65,36 @@
         @AuraEnabled
         public String name;
         @AuraEnabled
-        public String opportunityNum;
+        public Integer opportunityNum;
         @AuraEnabled
         public String isRelateProject;
         @AuraEnabled
         public String profileId;
         @AuraEnabled
+        public String systemProfileId;
+        @AuraEnabled
+        public String TwoS1_Sales_Hospital;
+        @AuraEnabled
+        public String TwoS1_Sales_Hospital_Non_Singleton;
+        @AuraEnabled
+        public String TwoS2_Sales_Product;
+        @AuraEnabled
+        public String TwoS4_Sales_Manager;
+        @AuraEnabled
+        public String TwoS4_Sales_Manager_Non_Singleton;
+        @AuraEnabled
+        public String TwoS4_Sales_Manager_Majordomo;
+        @AuraEnabled
+        public String TwoS6_Trade_Assistant;
+        @AuraEnabled
+        public String TwoS6_Sales_Headquarters;
+        @AuraEnabled
+        public String TwoS7_Sales_Headquarters;
+        @AuraEnabled
+        public String TwoM4_Marketplace_Manager;
+        @AuraEnabled
+        public String SalesMarketplaceId;
+        @AuraEnabled
         public String Environment_Url;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1