liwentao
2023-07-19 cf3dbaac9ef8ee0be7b741935461cd0fdd6ff495
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
public with sharing class lexCopyProductController {
    public lexCopyProductController() {
        
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new InitData();
        try {
            List<Product_Set__c> rl=[select Name,Product_Set_CD__c,Applicable_Department__c,Product_category__c,Valid_Date__c,Invalid_Date__c,Quote_Select_Info__c,Description__c from Product_Set__c where id = :recordId];
            res.name=rl[0].Name;
            res.ProductSetCDC=rl[0].Product_Set_CD__c;
            res.ApplicableDepartmentC=rl[0].Applicable_Department__c;
            res.ProductCategoryC=rl[0].Product_category__c;
            res.ValidDateC=rl[0].Valid_Date__c;
            res.InvalidDateC=rl[0].Invalid_Date__c;
            res.QuoteSelectInfoC=rl[0].Quote_Select_Info__c;
            res.DescriptionC=rl[0].Description__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    class InitData{
        @AuraEnabled public String name;
        @AuraEnabled public String ProductSetCDC;
        @AuraEnabled public String ApplicableDepartmentC;
        @AuraEnabled public String ProductCategoryC;
        @AuraEnabled public Date ValidDateC;
        @AuraEnabled public Date InvalidDateC;
        @AuraEnabled public String QuoteSelectInfoC;
        @AuraEnabled public String DescriptionC;
    }
}