//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;
    }
}