From dbe48bc54d5cddc379cbe4a40a79ede8dd85b013 Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期三, 29 三月 2023 15:48:05 +0800
Subject: [PATCH] tt
---
force-app/main/default/classes/otherButtonPreparationReportController.cls | 30 ++++++
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls-meta.xml | 5 +
force-app/main/default/classes/otherButtonPreparationReportController.cls-meta.xml | 5 +
sfdx-project.json | 2
force-app/main/default/classes/otherButtonRepairController.cls | 123 ++++++++++++++++++++++++
force-app/main/default/classes/otherButtonRepairController.cls-meta.xml | 5 +
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls | 85 +++++++++++++++++
7 files changed, 254 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
new file mode 100644
index 0000000..2538a48
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
@@ -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;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls-meta.xml b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls-meta.xml
new file mode 100644
index 0000000..fbbad0a
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls-meta.xml
@@ -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>
diff --git a/force-app/main/default/classes/otherButtonPreparationReportController.cls b/force-app/main/default/classes/otherButtonPreparationReportController.cls
new file mode 100644
index 0000000..2234e79
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonPreparationReportController.cls
@@ -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;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/otherButtonPreparationReportController.cls-meta.xml b/force-app/main/default/classes/otherButtonPreparationReportController.cls-meta.xml
new file mode 100644
index 0000000..fbbad0a
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonPreparationReportController.cls-meta.xml
@@ -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>
diff --git a/force-app/main/default/classes/otherButtonRepairController.cls b/force-app/main/default/classes/otherButtonRepairController.cls
new file mode 100644
index 0000000..76a3a39
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonRepairController.cls
@@ -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;
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/otherButtonRepairController.cls-meta.xml b/force-app/main/default/classes/otherButtonRepairController.cls-meta.xml
new file mode 100644
index 0000000..fbbad0a
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonRepairController.cls-meta.xml
@@ -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>
diff --git a/sfdx-project.json b/sfdx-project.json
index ce080c1..0cf9ccc 100644
--- a/sfdx-project.json
+++ b/sfdx-project.json
@@ -7,6 +7,6 @@
],
"name": "Olympuslightning",
"namespace": "",
- "sfdcLoginUrl": "https://login.salesforce.com",
+ "sfdcLoginUrl": "https://test.salesforce.com",
"sourceApiVersion": "56.0"
}
--
Gitblit v1.9.1