From d77b6353ca9b59a6398df3eae9912f9fd766946d Mon Sep 17 00:00:00 2001
From: zhangzhengmei <zhangzhengmei@prec-tech.com>
Date: 星期六, 05 八月 2023 17:04:22 +0800
Subject: [PATCH] fix: lightning 页面确认

---
 force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
index 3caa6cb..9cb79a3 100644
--- a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
+++ b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
@@ -7,7 +7,7 @@
     public static InitData init(String recordId){
         InitData res = new initData();
         try{
-            Maintenance_Contract__c report =  [SELECT URF_Contract__c,RecordTypeId,Is_RecognitionModel__c,Status__c,MC_approval_status__c,Payment_Plan_Sum_First__c,
+            Maintenance_Contract__c report =  [SELECT  URF_Contract__c,RecordTypeId,Is_RecognitionModel__c,Status__c,MC_approval_status__c,Payment_Plan_Sum_First__c,
             Contract_quotation_or_not__c,Name,notRenew__c,Contract_print_completed__c,Maintenance_Contract_No__c,
             upload_to_sap_time__c,old_Is_RecognitionModel__c,upload_to_RM_time__c,Is_Recognition_Model_True__c,
             Id,URF_Contract_F__c,RecordType_DeveloperName__c,Estimate_Target__c FROM Maintenance_Contract__c WHERE Id =: recordId LIMIT 1];
@@ -31,7 +31,6 @@
             res.Name = report.Name;
             res.ContractQuotationOrNotC = report.Contract_quotation_or_not__c;
             res.PaymentPlanSumFirstC = report.Payment_Plan_Sum_First__c;
-            res.RecordTypeId1 = Schema.SObjectType.Maintenance_Contract__c.getRecordTypeInfosByName().get('鏈嶅姟鍚堝悓').getRecordTypeId();
             System.debug(LoggingLevel.INFO, '*** res: ' + res);
         }catch(Exception e){
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -41,10 +40,10 @@
 
     // 缁翠慨鍚堝悓澶卞崟鎶ュ憡
     @AuraEnabled
-    public static List<Lost_Report__c> selectRecords(String recordId){
+    public static List<Lost_Report__c> selectRecords(String mcId){
         List<Lost_Report__c> res = new List<Lost_Report__c>();
         try{
-            res = [SELECT Id,Status__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Maintenance_Contract__c =: recordId ];
+            res = [SELECT Id,Status__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Maintenance_Contract__c =: mcId ];
         }catch(Exception e){
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
@@ -56,7 +55,7 @@
     public static List<Maintenance_Contract_Estimate__c> selectMaintenanceContractEstimate(String recordId){
         List<Maintenance_Contract_Estimate__c> res = new List<Maintenance_Contract_Estimate__c>();
         try{
-            res = [SELECT RecordTypeId from Maintenance_Contract_Estimate__c ];
+            res = [SELECT Id  from Maintenance_Contract_Estimate__c where Maintenance_Contract__c=:recordId];
         }catch(Exception e){
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }

--
Gitblit v1.9.1