tt
twysparks
2023-03-29 dbe48bc54d5cddc379cbe4a40a79ede8dd85b013
tt
6个文件已添加
1个文件已修改
255 ■■■■■ 已修改文件
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonPreparationReportController.cls 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonPreparationReportController.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonRepairController.cls 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonRepairController.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sfdx-project.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
New file
@@ -0,0 +1,85 @@
public with sharing class otherButtonMaintenanceContractCtl {
    public otherButtonMaintenanceContractCtl() {
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Maintenance_Contract__c report =  [SELECT 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];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.MCApprovalStatusC = report.MC_approval_status__c;
            res.MaintenanceContractNoC = report.Maintenance_Contract_No__c;
            res.uploadToSapTimeC = report.upload_to_sap_time__c;
            res.oldIsRecognitionModelC = report.old_Is_RecognitionModel__c;
            res.uploadToRMTimeC = report.upload_to_RM_time__c;
            res.IsRecognitionModelTrueC = report.Is_Recognition_Model_True__c;
            res.Id = report.Id;
            res.URFContractFC = report.URF_Contract_F__c;
            res.RecordTypeDeveloperNameC = report.RecordType_DeveloperName__c;
            res.EstimateTargetC = report.Estimate_Target__c;
            res.ContractprintCompletedC = report.Contract_print_completed__c;
            res.notRenewC = report.notRenew__c;
            res.Name = report.Name;
            res.ContractQuotationOrNotC = report.Contract_quotation_or_not__c;
            res.PaymentPlanSumFirstC = report.Payment_Plan_Sum_First__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static List<Lost_Report__c> selectRecords(String recordId){
        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 ];
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static void processResults(String recordId){
        Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest();
        psr.setobjectid(recordId);
        Approval.ProcessResult submitResult = Approval.process(psr);
    }
    public class InitData{
       @AuraEnabled
       public String MCApprovalStatusC;
       @AuraEnabled
       public String MaintenanceContractNoC;
       @AuraEnabled
       public Datetime uploadToSapTimeC;
       @AuraEnabled
       public Boolean oldIsRecognitionModelC;
       @AuraEnabled
       public Datetime uploadToRMTimeC;
       @AuraEnabled
       public Boolean IsRecognitionModelTrueC;
       @AuraEnabled
       public String Id;
       @AuraEnabled
       public String URFContractFC;
       @AuraEnabled
       public String RecordTypeDeveloperNameC;
       @AuraEnabled
       public String EstimateTargetC;
       @AuraEnabled
       public Datetime ContractprintCompletedC;
       @AuraEnabled
       public Boolean notRenewC;
       @AuraEnabled
       public String Name;
       @AuraEnabled
       public String ContractQuotationOrNotC;
       @AuraEnabled
       public Double PaymentPlanSumFirstC;
    }
}
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/otherButtonPreparationReportController.cls
New file
@@ -0,0 +1,30 @@
public with sharing class otherButtonPreparationReportController {
    public otherButtonPreparationReportController() {
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Maintenance_Contract__c report =  [SELECT Id,RecordType_DeveloperName__c,Estimate_Target__c FROM Maintenance_Contract__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Id = report.Id;
            res.RecordTypeDeveloperNameC = report.RecordType_DeveloperName__c;
            res.EstimateTargetC = report.Estimate_Target__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    public class InitData{
       @AuraEnabled
       public String Id;
       @AuraEnabled
       public String RecordTypeDeveloperNameC;
       @AuraEnabled
       public String EstimateTargetC;
    }
}
force-app/main/default/classes/otherButtonPreparationReportController.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/otherButtonRepairController.cls
New file
@@ -0,0 +1,123 @@
public with sharing class otherButtonRepairController {
    public otherButtonRepairController() {
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new initData();
        try{
            Repair__c report =  [SELECT OCSMAdministrativeReportStatus__c,Incharge_Staff_Email__c,Name,HP_Name__c,Delivered_Product__c,
            Repair_Product_Serial_No__c,Service_Repair_No__c,Repair_Firstestimated_Date__c,
            Repair_Estimated_Date__c,RC_information__c,Id,OCSMAdministrativeReportNumber__c,
            OCSMAdministrativeReportDate__c,Aware_date__c,PAE_Determine__c,ETQ_UPLOAD_STATUS__c,
            AE_DetermineResult__c,PAE_DetermineAC__c,Repair_Inspection_Date__c,Contain_UseRSA__c FROM Repair__c WHERE Id =: recordId LIMIT 1];
            System.debug(LoggingLevel.INFO, '*** opp: ' + report);
            res.Id = report.Id;
            res.OCSMAdministrativeReportNumberC = report.OCSMAdministrativeReportNumber__c;
            res.OCSMAdministrativeReportDateC = report.OCSMAdministrativeReportDate__c;
            res.AwareDateC = report.Aware_date__c;
            res.PAEDetermineC = report.PAE_Determine__c;
            res.ETQUPLOADSTATUSC = report.ETQ_UPLOAD_STATUS__c;
            res.AEDetermineResultC = report.AE_DetermineResult__c;
            res.PAEDetermineACC = report.PAE_DetermineAC__c;
            res.RepairInspectionDateC = report.Repair_Inspection_Date__c;
            res.ContainUseRSAC = report.Contain_UseRSA__c;
            res.InchargeStaffEmailC = report.Incharge_Staff_Email__c;
            res.Name = report.Name;
            res.HPNameC = report.HP_Name__c;
            res.DeliveredProductC = report.Delivered_Product__c;
            res.RepairProductSerialNoC = report.Repair_Product_Serial_No__c;
            res.ServiceRepairNoC = report.Service_Repair_No__c;
            res.RepairFirstestimatedDateC = report.Repair_Firstestimated_Date__c;
            res.RepairEstimatedDateC = report.Repair_Estimated_Date__c;
            res.RCInformationC = report.RC_information__c;
            res.OCSMAdministrativeReportStatusC = report.OCSMAdministrativeReportStatus__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static List<Repair__c> selectRecords(String recordId){
        List<Repair__c> res = new List<Repair__c>();
        try{
            res = [SELECT Id,AsyncData__c,Complaint_Number__c,ETQ_UPLOAD_STATUS__c FROM Repair__c WHERE id =: recordId ];
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    @AuraEnabled
    public static void updateRepair(String recordId){
        try {
            Repair__c repair = new Repair__c();
            repair.Id = recordid;
            repair.OCSMAdministrativeReportStatus__c = '无需报告';
            update repair;
        } catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
    }
    @AuraEnabled
    public static List<PAE_DecisionRecord__c> selectPAEDecisionRecord(String recordId,String recordTypeId){
        List<PAE_DecisionRecord__c> res = new List<PAE_DecisionRecord__c>();
        try{
            res = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_Repair__c =: recordId And RecordType.DeveloperName =: recordTypeId Order by LastModifiedDate desc];
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String OCSMAdministrativeReportNumberC;
        @AuraEnabled
        public Datetime OCSMAdministrativeReportDateC;
        @AuraEnabled
        public Datetime AwareDateC;
        @AuraEnabled
        public String PAEDetermineC;
        @AuraEnabled
        public String ETQUPLOADSTATUSC;
        @AuraEnabled
        public String AEDetermineResultC;
        @AuraEnabled
        public String PAEDetermineACC;
        @AuraEnabled
        public Datetime RepairInspectionDateC;
        @AuraEnabled
        public boolean ContainUseRSAC;
         @AuraEnabled
        public String InchargeStaffEmailC;
         @AuraEnabled
        public String Name;
         @AuraEnabled
        public String HPNameC;
         @AuraEnabled
        public String DeliveredProductC;
         @AuraEnabled
        public String RepairProductSerialNoC;
         @AuraEnabled
        public String ServiceRepairNoC;
         @AuraEnabled
        public Datetime RepairFirstestimatedDateC;
         @AuraEnabled
        public Datetime RepairEstimatedDateC;
         @AuraEnabled
        public String RCInformationC;
        @AuraEnabled
        public String OCSMAdministrativeReportStatusC;
     }
}
force-app/main/default/classes/otherButtonRepairController.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>56.0</apiVersion>
    <status>Active</status>
</ApexClass>
sfdx-project.json
@@ -7,6 +7,6 @@
  ],
  "name": "Olympuslightning",
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sfdcLoginUrl": "https://test.salesforce.com",
  "sourceApiVersion": "56.0"
}