public with sharing class lexNewOpportunityController {
    public lexNewOpportunityController() {
        
    }
    @AuraEnabled
    public static InitData init(String recordId){
        InitData res = new InitData();
        try {
        	// String i=Schema.SObjectType.Opportunity.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
            List<recordType> r=[SELECT Id from recordType where name='引合'];
            res.recordTypeId=r.get(0).Id;
            List<Account> accl=[SELECT Hospital__c,Department_Class__c,Department_Class_Wd__c from Account where id=:recordId];
        	res.hospitalC=accl.get(0).Hospital__c;
        	res.departmentClassC=accl.get(0).Department_Class__c;
        	res.departmentClassWdC=accl.get(0).Department_Class_Wd__c;
        	String userId=UserInfo.getUserId();
        	List<User> ul=[SELECT Province_Text__c from user where id=:userId];
        	res.provinceTextC=ul.get(0).Province_Text__c;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
        return res;
    }
    class InitData{
        @AuraEnabled public String recordTypeId;
        @AuraEnabled public String recordTypeId2;
        @AuraEnabled public String hospitalC;
        @AuraEnabled public String departmentClassC;
   	 	@AuraEnabled public String departmentClassWdC;
    	@AuraEnabled public String provinceTextC;
    }
}