From eae3e7ef625bc54350d61e9c3390d71f1fe1e008 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@prec-tech.com>
Date: 星期四, 25 五月 2023 14:13:16 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/classes/buttonQISReportCtl.cls |   84 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 83 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/buttonQISReportCtl.cls b/force-app/main/default/classes/buttonQISReportCtl.cls
index 973266e..56d8075 100644
--- a/force-app/main/default/classes/buttonQISReportCtl.cls
+++ b/force-app/main/default/classes/buttonQISReportCtl.cls
@@ -7,7 +7,24 @@
     public static InitData init(String recordId){
         InitData res = new initData();
         try{
-            QIS_Report__c report =  [SELECT is_CNBuy__c,isPAE_Profile__c,isAE_Profile__c,Name,QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1];
+            QIS_Report__c report =  [SELECT Source_OnCall__r.Id,nonyushohin__r.Id,Hospital_Department__r.Id,Hospital__r.Id,source_for_repair__c,Trable_occur_daY_collect__c,nonyushohin__c,Hospital_Department__c,Department_Class__c,Department_Class__r.Id,Source_OnCall__c,HP_ID__c,Special_follow__c,next_action__c,Hospital__c,is_CNBuy__c,isPAE_Profile__c,isAE_Profile__c,Name,QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1];
+            res.Hospital = report.Hospital__c;
+            res.HospitalId = report.Hospital__r.Id;
+            res.nextAction = report.next_action__c;
+            res.SpecialFollow = report.Special_follow__c;
+            res.HPID = report.HP_ID__c;
+            res.SourceOnCallId = report.Source_OnCall__r.Id;
+            res.SourceOnCall = report.Source_OnCall__c;
+            res.DepartmentClassId = report.Department_Class__r.Id;
+            res.DepartmentClass = report.Department_Class__c;
+            res.HospitalDepartment = report.Hospital_Department__c;
+            res.HospitalDepartmentId = report.Hospital_Department__r.Id;
+            res.nonyushohin = report.nonyushohin__c;
+            res.nonyushohinId = report.nonyushohin__r.Id;
+            res.TrableOccurDaYCollect = report.Trable_occur_daY_collect__c;
+            res.sourceForRepair = report.source_for_repair__c;
+        
+            
             res.PAEDetermineC = report.PAE_Determine__c;
             res.PAEDetermineACC = report.PAE_DetermineAC__c;
             res.OCMJudgementC = report.OCM_judgement__c;
@@ -171,8 +188,73 @@
             return res;
         }
 
+         // 鏌ユ壘绠�妗�
+     @AuraEnabled
+     public static List<Profile> initSelectProfile(String profileId){
+         List<Profile> res = new List<Profile>();
+         try{
+             res = [SELECT Id,name FROM Profile WHERE Id=: profileId ];
+         }catch(Exception e){
+             System.debug(LoggingLevel.INFO, '*** e: ' + e);
+         }
+         return res;
+     }
+
+      @AuraEnabled
+    public static List<Account> selecctAccountByAccountId(String HospitalDepartmentId){
+        try {
+          List<Account> accounts = [SELECT ParentId,Parent.RecordTypeId, Parent.RecordType_DeveloperName__c ,Parent.Parent.FSE_GI_Main_Leader__c, Parent.Parent.FSE_GI_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__c,Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE ID=: HospitalDepartmentId];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+      // 鏌ユ壘UserName
+    @AuraEnabled
+    public static List<User> initUserName(String userId){
+        List<User> res = new List<User>();
+        try{
+            res = [SELECT Id,name,RepairSalesPoint_Province_China__c FROM User WHERE Id=: userId ];
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
+
      public class InitData{
         @AuraEnabled
+        public String SourceOnCallId;
+        @AuraEnabled
+        public String nonyushohinId;
+        @AuraEnabled
+        public String Hospital;
+        @AuraEnabled
+        public String HospitalId;
+        @AuraEnabled
+        public String nextAction;
+        @AuraEnabled
+        public Boolean SpecialFollow;
+        @AuraEnabled
+        public String HPID;
+        @AuraEnabled
+        public String SourceOnCall;
+        @AuraEnabled
+        public String DepartmentClassId;
+        @AuraEnabled
+        public String DepartmentClass;
+        @AuraEnabled
+        public String HospitalDepartment;
+        @AuraEnabled
+        public String nonyushohin;
+        @AuraEnabled
+        public Date TrableOccurDaYCollect;
+        @AuraEnabled
+        public String sourceForRepair;
+        @AuraEnabled
+        public String HospitalDepartmentId;
+
+        @AuraEnabled
         public String isAEProfileC;
          @AuraEnabled
         public String isCNBuyC;

--
Gitblit v1.9.1