From 048f7b0855d05293e80c9bf5dbf0620f064f13f4 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期四, 11 五月 2023 10:51:19 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/classes/TenderingButtonController.cls | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/force-app/main/default/classes/TenderingButtonController.cls b/force-app/main/default/classes/TenderingButtonController.cls
index 26eb6dd..5e01974 100644
--- a/force-app/main/default/classes/TenderingButtonController.cls
+++ b/force-app/main/default/classes/TenderingButtonController.cls
@@ -11,6 +11,10 @@
res.opportunityNum = String.valueOf(report.OpportunityNum__c);
res.isRelateProject = report.IsRelateProject__c;
res.profileId = UserInfo.getProfileId();
+ res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.SalesManagerId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.SalesHospitalId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.Environment_Url = System.Label.Environment_Url;
System.debug(LoggingLevel.INFO, '*** xu: ' + res);
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** xu: ' + e);
@@ -18,8 +22,18 @@
return res;
}
- // 鎷涙爣椤圭洰澶卞崟 TenderOpportunityLink
- // 璋冪敤璇ユ帴鍙ar sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
+ @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
public static List<Tender_Opportunity_Link__c> sqlResult (String id) {
try {
@@ -47,5 +61,13 @@
public String isRelateProject;
@AuraEnabled
public String profileId;
+ @AuraEnabled
+ public String systemProfileId;
+ @AuraEnabled
+ public String SalesManagerId;
+ @AuraEnabled
+ public String SalesHospitalId;
+ @AuraEnabled
+ public String Environment_Url;
}
}
\ No newline at end of file
--
Gitblit v1.9.1