From 87861ae5f1ed5456685f97f8a8e7625e47b9576d Mon Sep 17 00:00:00 2001
From: KKbes <1620284052@qq.com>
Date: 星期四, 13 四月 2023 11:12:26 +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 |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/TenderingButtonController.cls b/force-app/main/default/classes/TenderingButtonController.cls
new file mode 100644
index 0000000..5a2d0ea
--- /dev/null
+++ b/force-app/main/default/classes/TenderingButtonController.cls
@@ -0,0 +1,54 @@
+public class TenderingButtonController {
+    @AuraEnabled
+    public static InitData initTenderingController(String recordId) {
+        InitData res = new initData();
+        try{
+            Tender_information__c report = [SELECT 	OpportunityNum__c,OwnerId,Id,status__c,Name,IsRelateProject__c FROM Tender_information__c WHERE Id = :recordId LIMIT 1];
+            res.OwnerId = report.OwnerId;
+            res.Id = report.Id;
+            res.status = report.status__c;
+            res.name = report.Name;
+            res.opportunityNum = String.valueOf(report.OpportunityNum__c);
+            res.isRelateProject = report.IsRelateProject__c;
+            res.profileId = UserInfo.getProfileId();
+            res.Environment_Url = System.Label.Environment_Url;
+            System.debug(LoggingLevel.INFO, '*** xu: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** xu: ' + e);
+        }
+        return res;
+    }
+
+    // 鎷涙爣椤圭洰澶卞崟 TenderOpportunityLink
+    // 璋冪敤璇ユ帴鍙ar sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
+    @AuraEnabled
+    public static List<Tender_Opportunity_Link__c> sqlResult (String id) {
+        try { 
+            List<Tender_Opportunity_Link__c> TenderOpportunityLink = [SELECT id FROM Tender_Opportunity_Link__c WHERE Tender_information__c = :id];
+            System.debug(LoggingLevel.INFO, '*** xu1: ' + TenderOpportunityLink);
+            return TenderOpportunityLink;
+        } catch (exception e) {
+            System.debug(LoggingLevel.INFO, '*** xu1111111: ' + e);
+            throw new AuraHandledException(e.getMessage());
+        }
+    }
+
+    public class InitData{
+        @AuraEnabled
+        public String Id;
+        @AuraEnabled
+        public String OwnerId;
+        @AuraEnabled
+        public String status;
+        @AuraEnabled
+        public String name;
+        @AuraEnabled
+        public String opportunityNum;
+        @AuraEnabled
+        public String isRelateProject;
+        @AuraEnabled
+        public String profileId;
+        @AuraEnabled
+        public String Environment_Url;
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.1