buli
2023-05-23 07390e2fcb4adf27c928335bf27ae7939c5a80ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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;
    }
}