From 71b93327e8f3fb3bffffc7c033c1f782e7b6ab32 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 22 五月 2023 17:37:16 +0800
Subject: [PATCH] test

---
 force-app/main/default/classes/otherButtonRepairController.cls |  112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 111 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/otherButtonRepairController.cls b/force-app/main/default/classes/otherButtonRepairController.cls
index 986cab3..4ac753a 100644
--- a/force-app/main/default/classes/otherButtonRepairController.cls
+++ b/force-app/main/default/classes/otherButtonRepairController.cls
@@ -119,7 +119,6 @@
             res.profileId = UserInfo.getProfileId();
             res.userEmail = UserInfo.getUserEmail();
 
-
             System.debug(LoggingLevel.INFO, '*** res: ' + res);
         }catch(Exception e){
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -408,6 +407,117 @@
         }
     }
 
+    //鏌ヨAccount鐨勮褰�
+    @AuraEnabled
+    public static List<Account> selecctAccount(){
+        try {
+          List<Account> accounts = [SELECT Hospital_ID__c,Department_Class_ID_18__c,Id,Hospital__c,Department_Class__c,Name FROM Account];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+     //鏌ヨAccount淇悊鐢婚潰鈥滀慨鐞嗗搧杩旈�佸湴鈥濋棶棰樿皟鏌�-鍚庣画 
+    @AuraEnabled
+    public static List<Account> selecctAccountById(String id){
+        try {
+          List<Account> accounts = [SELECT ParentId,Parent.RecordTypeId ,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=:id];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+     //鏌ヨAccount淇悊鐢婚潰鈥滀慨鐞嗗搧杩旈�佸湴鈥濋棶棰樿皟鏌�-鍚庣画 
+    @AuraEnabled
+    public static List<Account> selecctAccountBySegmentId(String segmentId){
+        try {
+          List<Account> accounts = [SELECT id,ParentId,Parent.RecordTypeId, Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE Id=:segmentId];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+      //鏌ヨProduct2
+    @AuraEnabled
+    public static List<Product2> selecctProduct2ById(String Id){
+        try {
+          List<Product2> accounts = [SELECT id,Name,Can_Repair__c from Product2 where ID=:Id];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+     //鏌ヨQIS_Report__c
+    @AuraEnabled
+    public static List<QIS_Report__c> selecctQISReportByFomatToday(String AssetId,Date fomatToday){
+        try {
+          List<QIS_Report__c> accounts = [SELECT id,Name,QIS_Submit_day__c from QIS_Report__c where nonyushohin__c=:AssetId and QIS_Submit_day__c != null and QIS_Submit_day__c >=:fomatToday];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+     //鏌ヨRepair__c
+    @AuraEnabled
+    public static List<Repair__c> selecctRepairByFomatToday(String AssetId, Date fomatToday){
+        try {
+          List<Repair__c> accounts = [SELECT Name from Repair__c where Delivered_Product__c =:AssetId and Status2__c!='00.鍒犻櫎' and Status2__c!='00.鍙栨秷' and FSE_ApplyForRepair_Day__c >=: fomatToday order by FSE_ApplyForRepair_Day__c desc limit 1];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+    //鏌ヨlexCreateRepairFromDepartment User
+     @AuraEnabled
+     public static List<User> selecctUser(){
+         try {
+           List<User> user = [SELECT Id,RepairSalesPoint_Province_China__c,Employee_No__c FROM User];
+           return user;
+       } catch (Exception e) {
+             throw new AuraHandledException(e.getMessage());
+          }
+      }
+
+      //鏌ヨlexCreateRepairFromDepartment QIS_Report__c
+     @AuraEnabled
+     public static List<QIS_Report__c> selecctQISReport(){
+         try {
+           List<QIS_Report__c> user = [SELECT Hospital__c,Id,OCM_judgement__c,next_action__c,Special_follow__c,HP_ID__c,Source_OnCall__c,Name,Department_Class_Id__c,Department_Class__c,Hospital_Department__c,nonyushohin__c,Trable_occur_daY_collect__c,source_for_repair__c FROM QIS_Report__c];
+           return user;
+       } catch (Exception e) {
+             throw new AuraHandledException(e.getMessage());
+          }
+      }
+
+      //鏌ヨOnCall鐨勮褰�
+    @AuraEnabled
+    public static List<On_Call__c> selecctOnCallC(){
+        try {
+          List<On_Call__c> accounts = [SELECT Id,Name,segment__c,HP__c,HospitalId__c,Salesdepartment_HP_ID__c,Salesdepartment_HP__c,Oncall_Equipment__c,Trable_occur_daY_collect_c__c FROM On_Call__c];
+          return accounts;
+      } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+         }
+     }
+
+     // 鏌ユ壘淇濇湁璁惧
+     @AuraEnabled
+     public static List<Asset> selectAsset(){
+         List<Asset> res = new List<Asset>();
+         try{
+             res = [SELECT Id,NoPartRiskDate_F__c,Product_ID__c,AccountId,HP_Id__c,Hospital__c,Department_Class__c,Name FROM Asset];
+         }catch(Exception e){
+             System.debug(LoggingLevel.INFO, '*** e: ' + e);
+         }
+         return res;
+     }
+
     public class InitData{
         @AuraEnabled
         public String detailedAddress;

--
Gitblit v1.9.1