KKbes
2023-06-27 0230d0b66c508d98981fc2a3ff8e82f7ceecc3da
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
//author : kkbes   forbutton  NewIntention  经销商询价对象 
public with sharing class LexNewIntentionController {
 
    @AuraEnabled
    public static Agency_Opportunity__c init(String recordId){
        Agency_Opportunity__c  res = new Agency_Opportunity__c();
        try{
            res = [Select Id,Is_Transformed__c,Department_Class_Opp_Name__c,
            Department_Name_Text__c,StageName__c,Close_Forecasted_Date__c,
            Name,Purchase_Reason__c,Fund_Basis__c,Purchase_Type__c,
            Sales_Method__c,Request__c,Request_Detail__c 
                FROM Agency_Opportunity__c
                    WHERE  Id = : recordId];
 
        }
        catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
 
    }
 
 
    @AuraEnabled
    public static List<Account> getAccountByLongName(String Name){
        try{
            List<Account> res = [Select id, name From Account WHERE Name = : Name];
            return res;
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return null;
    }
 
        @AuraEnabled
    public static List<Account> getAccountByShortName(String Name){
        try{
            List<Account> res = [Select id, name From Account WHERE Name = : Name];
            return res;
        }
        catch (Exception e) {
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return null;
    }
}