liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public with sharing class lexQuotationProductNotUseController {
    public lexQuotationProductNotUseController() {
        
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new InitData();
        try {
            List<Opportunity> r1= [SELECT Department_Class__c from Opportunity where id=:recordId];
            List<Report> r2=[SELECT Id from Report where name='保有设备一览(询价) 按钮'];
            res.Id=r1.get(0).Department_Class__c;
            res.reportId=r2.get(0).Id;
        } catch (Exception e) {
            return res;
        }
        return res;
    }
    public class InitData{
        @AuraEnabled public String Id;
        @AuraEnabled public String reportId;
    }
}