public with sharing class lexRentalApply_FromRepCtl {
|
public lexRentalApply_FromRepCtl() {
|
|
}
|
@AuraEnabled
|
public static List<Rental_Apply__c> rentalApp(String recordId){
|
try {
|
List<Rental_Apply__c> rep = [select Id from Rental_Apply__c where Repair__c =: recordId and Status__c <> '取消' and Status__c <> '删除'];
|
return rep;
|
} catch (Exception e) {
|
throw new AuraHandledException(e.getMessage());
|
}
|
}
|
@AuraEnabled
|
public static InitData init(String recordId){
|
InitData res = new initData();
|
try {
|
Repair__c rep = [select Id,Status1__c,Repair_Final_Inspection_Date__c,Repair_Shipped_Date__c from Repair__c where Id =: recordId];
|
res.stauts1 = rep.Status1__c;
|
res.inspectionDate = rep.Repair_Final_Inspection_Date__c;
|
res.shippedDate = rep.Repair_Shipped_Date__c;
|
return res;
|
} catch (Exception e) {
|
throw new AuraHandledException(e.getMessage());
|
}
|
}
|
public class InitData{
|
@AuraEnabled
|
public String stauts1;
|
@AuraEnabled
|
public Date inspectionDate;
|
@AuraEnabled
|
public Date shippedDate;
|
@AuraEnabled
|
public Boolean assetModelNo;
|
@AuraEnabled
|
public Boolean qisRepairId;
|
@AuraEnabled
|
public String qisRepairName;
|
// Agency_Opportunity__c
|
@AuraEnabled
|
public String repairSource;
|
@AuraEnabled
|
public String maintenanceContract;
|
@AuraEnabled
|
public String purpose2;
|
}
|
}
|