public without sharing class NewLeadFromContact2 {
    @AuraEnabled
    public static InitData NewLeadFromContact2(String recordId) {
        InitData res = new initData();
        try{
            Contact report= [SELECT Id,Name,AccountId,AWS_Data_Id__c FROM Contact WHERE Id = :recordId LIMIT 1]; //2023/08/02 zhj  加上AWS_Data_Id__c字段
            res.Id = report.Id;
            res.Name = report.Name;
            res.AccountId = report.AccountId;
            res.AWSDataId = report.AWS_Data_Id__c;//2023/08/02 zhj 
            Account acc =  [SELECT Id,Name,Department_Class__c  FROM Account WHERE id =: report.AccountId]; 
            res.accountIds = acc.Id;
            res.accountName = acc.Name;
            res.accountDepartmentClass = acc.Department_Class__c;
            res.NewDailyReport = Schema.SObjectType.Lead.getRecordTypeInfosByDeveloperName().get('NewDaily_Report').getRecordTypeId();
            System.debug(LoggingLevel.INFO, '*** xu: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** xu: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public String Name;
        @AuraEnabled
        public String AccountId;
        @AuraEnabled
        public String accountIds;
        @AuraEnabled
        public String accountName;
        @AuraEnabled
        public String accountDepartmentClass;
        @AuraEnabled
        public String NewDailyReport;
        @AuraEnabled
        public String AWSDataId;//2023/08/02 zhj
    }
}