public without sharing class SidebarController {
    public String DeveloperName { get; set; }
    public String reportid { get; set; }
    public String userId { get; set; } // DB202312692678 zyh 华南主页变更 add
    public User infoList {get; set;}
    public SidebarController() {
        reportid = '';
        infoList = new User();// infoList = [];
        userId = bbInit(); // DB202312692678 zyh 华南主页变更 add
    }

    public void toURL(){
        // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, DeveloperName));
        if(String.isNotBlank(DeveloperName)){
            reportid = [select Id from Report where DeveloperName=:DeveloperName].Id;
            if(String.isNotBlank(reportid)){
                // PageReference ref = new Pagereference('/'+reportid);
                // ref.setRedirect(true);
                // return ref;
                // ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, reportid));
                // return reportid;
                return;
            }
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '您点击的链接错误，请联系管理员！'));
            return;
        }
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error, '您点击的链接错误，请联系管理员！！'));
    }
    public void init(){
        ID myUserID = System.UserInfo.getUserId();
        try {
            infoList = [Select Id,TongkuoZongjian__c,ZongjianApprovalManager__c,BuchangApprovalManagerSales__c,BuchangApprovalManager__c,TongkuoZongjianname_text__c,ZongjianApprovalManagername__c,BuchangApprovalManagerSalesname__c,BuchangApprovalManagername__c 
            From user where id = : myUserID ];
        } catch (exception e) {}
        return ;
    }
     // DB202312692678 zyh 华南主页变更 add start
    public String bbInit(){
        ID myUserID = System.UserInfo.getUserId();
        try {
            infoList = [Select Id,Salesdepartment__c
            From user where id = : myUserID ];
            userId = infoList.Salesdepartment__c;
        } catch (exception e) {}
        return userId;
    }
     // DB202312692678 zyh 华南主页变更 add end
             //add by allen 拆分部署ali生产
             public void testMock(){
                Integer i = 0;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
                i++;
            }
}