From 26ad084e248b21ced76e6226ab2a32db53f582b9 Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期三, 26 四月 2023 13:37:50 +0800
Subject: [PATCH] tt

---
 force-app/main/default/classes/buttonRepairQuotationCtl.cls |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 54 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/buttonRepairQuotationCtl.cls b/force-app/main/default/classes/buttonRepairQuotationCtl.cls
index 061b409..e7213e6 100644
--- a/force-app/main/default/classes/buttonRepairQuotationCtl.cls
+++ b/force-app/main/default/classes/buttonRepairQuotationCtl.cls
@@ -7,10 +7,13 @@
     public static InitData init(String recordId){
         InitData res = new initData();
         try{
-            Repair_Quotation__c report =  [SELECT Id,CutPriceStatus_Service__c FROM Repair_Quotation__c WHERE Id =: recordId LIMIT 1];
+            Repair_Quotation__c report =  [SELECT Repair__c,Loaner_repair_sys__c,Rental_Apply_Discount_Status__c,Id,CutPriceStatus_Service__c FROM Repair_Quotation__c WHERE Id =: recordId LIMIT 1];
             System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+            res.RepairC = report.Repair__c;
+            res.LoanerRepairSysC = report.Loaner_repair_sys__c;
             res.Id = report.Id;
             res.CutPriceStatusServiceC = report.CutPriceStatus_Service__c;
+            res.RentalApplyDiscountStatusC = report.Rental_Apply_Discount_Status__c;
             res.profileId = UserInfo.getProfileId();
 
             System.debug(LoggingLevel.INFO, '*** res: ' + res);
@@ -51,6 +54,50 @@
         return res;
     }
 
+    // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+    @AuraEnabled
+    public static String updateRepairQuotation03(String recordId){
+        String res ='';
+        try {
+            Repair_Quotation__c repair = new Repair_Quotation__c();
+            repair.Id = recordid;
+            repair.Rental_Apply_Discount_Status__c = '宸叉彁浜�';
+            update repair;
+        } catch (Exception e) {
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+            res = e.getMessage();
+        }
+        return res;
+    }
+
+     // 鏍规嵁ID淇悊鎶ヤ环鎻愪氦
+     @AuraEnabled
+     public static String updateRepairQuotation04(String recordId){
+         String res ='';
+         try {
+             Repair_Quotation__c repair = new Repair_Quotation__c();
+             repair.Id = recordid;
+             repair.Repair_quotation_status__c = '鍑忎环鐢宠濉啓瀹屾瘯';
+             update repair;
+         } catch (Exception e) {
+             System.debug(LoggingLevel.INFO, '*** e: ' + e);
+             res = e.getMessage();
+         }
+         return res;
+     }
+
+    // 鏌ユ壘淇悊
+    @AuraEnabled
+    public static List<Repair__c> selectRepairC(String recordId){
+        List<Repair__c> res = new List<Repair__c>();
+        try{
+            res = [SELECT Id, Return_Without_Repair__c, Return_Without_Repair_IF__c FROM Repair__c WHERE Id=: recordId ];
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
+
     public class InitData{
         @AuraEnabled
         public String Id;
@@ -58,5 +105,11 @@
         public String CutPriceStatusServiceC;
         @AuraEnabled
         public String profileId;
+        @AuraEnabled
+        public String RentalApplyDiscountStatusC;
+        @AuraEnabled
+        public Boolean LoanerRepairSysC;
+        @AuraEnabled
+        public String RepairC;
      }
 }
\ No newline at end of file

--
Gitblit v1.9.1