buli
2023-06-05 3962c2bb0435484b60a3e408e4738d792e249a53
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
49
public without sharing class LexConsumableAccountInfoController {
    //初始化
    @AuraEnabled
    public static ResponseBodyLWC init(String accId) {
        ResponseBodyLWC res = new ResponseBodyLWC();
        Map<String, object> data = new Map<String, object>();
        res.entity = data;
        Account obj = new Account();
        if (accId != null) {
            List<Account> accList = [
                SELECT
                    Id,
                    Name,
                    Owner.Name,
                    Site,
                    Alias_Name2__c,
                    Grade__c,
                    OCM_Category__c,
                    Is_Active__c,
                    Ban_On_Use_Reason__c,
                    Attribute_Type__c,
                    Speciality_Type__c,
                    State_Master__r.Name,
                    City_Master__r.Name,
                    Town__c,
                    Street__c,
                    Address_Together__c,
                    Phone,
                    PhoneCall__c,
                    Fax,
                    Postal_Code__c,
                    Parent.Name,
                    Address__c
                FROM Account
                WHERE Id = :accId
            ];
            if (accList != null && accList.size() > 0) {
                obj = accList.get(0);
            }
        }else {
            return new ResponseBodyLWC('Error', 500, 'accId为空', '');
        }
        data.put('obj', obj);
        res.status = 'Success';
        res.code = 200;
        res.msg = '';
        return res;
    }
}