Java tutorial
package com.jiangyifen.ec2.ui.mgr.tabsheet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.jiangyifen.ec2.entity.User; import com.jiangyifen.ec2.globaldata.ResourceDataMgr; import com.jiangyifen.ec2.globaldata.ShareData; import com.jiangyifen.ec2.ui.csr.workarea.sms.SendMutiMessageView; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.About; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.CustomerServiceRecordStatusManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.DeptManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.DialplanInfoView; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.DutyTableManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.ExtManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.InnerConfigManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.MusicOnHoldManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.OperationLogView; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.OutlineManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.QueueManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.RoleManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.StaticQueueMemberManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.SystemInfo; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.SystemLicence; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.SystemStatus; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.UserManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.UserOutlineManagement; import com.jiangyifen.ec2.ui.mgr.system.tabsheet.ivr.IvrManagement; import com.jiangyifen.ec2.ui.mgr.tabsheet.blacklist.BlacklistView; import com.jiangyifen.ec2.ui.mgr.tabsheet.csrtimers.CsrTimersOrderManagement; import com.jiangyifen.ec2.ui.mgr.tabsheet.meettingrecord.MeettingDetailRecordManagement; import com.jiangyifen.ec2.ui.mgr.tabsheet.misscalllog.MissCallLogManagement; import com.jiangyifen.ec2.ui.mgr.tabsheet.supervise.CallStatusSupervise; import com.jiangyifen.ec2.ui.mgr.tabsheet.supervise.EmployeeStatusSupervise; import com.jiangyifen.ec2.ui.mgr.tabsheet.supervise.MeetMeSupervise; import com.jiangyifen.ec2.ui.mgr.tabsheet.supervise.QueueStatusSupervise; import com.jiangyifen.ec2.ui.mgr.tabsheet.supervise.SipStatusSupervise; import com.jiangyifen.ec2.ui.report.tabsheet.AutodialDetail; import com.jiangyifen.ec2.ui.report.tabsheet.BusinessDetail; import com.jiangyifen.ec2.ui.report.tabsheet.CallCheck; import com.jiangyifen.ec2.ui.report.tabsheet.CallCheckByCallTimeLength; import com.jiangyifen.ec2.ui.report.tabsheet.ConcurrentStatics; import com.jiangyifen.ec2.ui.report.tabsheet.CsrWork; import com.jiangyifen.ec2.ui.report.tabsheet.CustomerDetail; import com.jiangyifen.ec2.ui.report.tabsheet.CustomerSatisfactionInvestigate; import com.jiangyifen.ec2.ui.report.tabsheet.EmployeeCheck; import com.jiangyifen.ec2.ui.report.tabsheet.EmployeeLoginLogoutDetail; import com.jiangyifen.ec2.ui.report.tabsheet.KPI; import com.jiangyifen.ec2.ui.report.tabsheet.ProjectFinishedStatus; import com.jiangyifen.ec2.ui.report.tabsheet.ProjectPool; import com.jiangyifen.ec2.ui.report.tabsheet.QuestionnaireDetail; import com.jiangyifen.ec2.ui.report.tabsheet.QueueDetail; import com.jiangyifen.ec2.ui.report.tabsheet.ServiceRecordStatus; import com.jiangyifen.ec2.ui.report.tabsheet.WorkflowTransferLogView; import com.jiangyifen.ec2.ui.report.tabsheet.advkpi.AdvanceKPIReportView; import com.jiangyifen.ec2.ui.report.tabsheet.callstatistic.CallStatisticNativeSqlOverviewReport; import com.jiangyifen.ec2.utils.SpringContextHolder; import com.vaadin.ui.Component; import com.vaadin.ui.TabSheet; import com.vaadin.ui.TabSheet.SelectedTabChangeListener; @SuppressWarnings("serial") public class MgrTabSheet extends TabSheet implements SelectedTabChangeListener { // ? private Logger logger = LoggerFactory.getLogger(this.getClass()); /** * ??? */ // ?Tab private ResourceImport resourceImport; // ?Tab private GlobalSearch globalSearch; // ?Tab private MgrServiceRecordAllView mgrServiceRecordView; // Tab private ProjectControl projectControl; // Tab private AutoDialout autoDialout; // ?Tab private ResourceRecycle resourceRecycle; // ?Tab private SoundDialout soundDialout; // Tab private SoundUpload soundUpload; // ??Tab private InnerConfigManagement innerConfig; // ????Tab private CustomerServiceRecordStatusManagement serviceRecordStatusManagement; // ???Tab private NoticeSend noticeSend; // ??Tab private HistoryNotice historyNotice; private boolean isSend; // ????? // ?? private CsrTimersOrderManagement csrTimersOrderManagement; // ---------------Tab--------------------- // TODO // ? private CallCheck callCheck; // ?? private CallCheckByCallTimeLength callCheckByCallTimeLength; // private EmployeeCheck employeeCheck; // ? private EmployeeLoginLogoutDetail loginLogoutDetail; // ? private ConcurrentStatics concurrentStatics; // ?Tab private CallStatisticNativeSqlOverviewReport callStatisticNativeSqlOverviewReport; // ?Tab private ProjectFinishedStatus projectFinishedStatus; // ?Tab private ServiceRecordStatus serviceRecordStatus; // private QueueDetail queueDetail; // private AutodialDetail autodialDetail; // ? private CustomerSatisfactionInvestigate satisfactionInvestigate; // kpi private KPI kpi; // advanceKPIReportView private AdvanceKPIReportView advanceKPIReportView; // projectPool private ProjectPool projectPool; // private TransferLog transferLog; private WorkflowTransferLogView workflowTransferLogView; // ? private QuestionnaireDetail questionnaire; // private CustomerDetail customerDetail; // private BusinessDetail businessDetail; // private CsrWork csrWorkDetail; /** * ?? */ // "?" Tab?? private CallRecordManagement callRecordManagement; // ?? private MissCallLogManagement missCallLogManagement; // "??" Tab?? private MeettingDetailRecordManagement meettingDetailRecordManagement; // ?? private ResourceManage resourceManage; /** * ?? */ // ??? private CustomerMemberManagement customerMemberManagement; // ? private CustomerMigrateLogView customerMigrateLogView; /** * ? */ // ??? private EmployeeStatusSupervise employeeStatusSupervise; // ? private SipStatusSupervise sipStatusSupervise; // ? private QueueStatusSupervise queueStatusSupervise; // ?? private CallStatusSupervise callStatusSupervise; // private MeetMeSupervise meetMeSupervise; /** * ??? */ // ??Tab private CommodityManagement commodityManagement; // ??Tab private OrderManagement orderManagement; // ??Tab private QuestionnaireManagement questionnaireManagement; // ??Tab private QuestionnaireManagementEdit questionnaireManagementEdit; /** * ?? */ // ??Tab private MessageTemplateManage templateManage; // ???Tab private SendMessageManage sendMessageManage; private SendMutiMessageView sendMutiMessageView; // ?? private MessageShow historySms; /** * ?? */ // ? // private KnowledgeManagement knowledgeManagement; private KbInfoManagement kbInfoManagement; // private KnowledgeView knowledgeView; /** * ??? */ // ? Tab private UserManagement userManagement; // ? Tab private RoleManagement roleManagement; // ? Tab private DeptManagement deptManagement; // ? Tab private ExtManagement extManagement; // ? Tab private OutlineManagement outlineManagement; // ?? Tab private UserOutlineManagement userOutlineManagement; // ? Tab private QueueManagement queueManagement; // private IvrManagement ivrManagement; // ? Tab private MusicOnHoldManagement musicOnHoldManagement; // ??? Tab private DynQueueMemberManagement dynQueueMemberManagement; // ???? Tab private StaticQueueMemberManagement staticQueueMemberManagement; // ?? Tab private DutyTableManagement dutyTableManagement; // ? Tab private MgrPhone2PhoneSettingView mgrPhone2PhoneSettingView; // ???? Tab private BlacklistView blacklistView; // ?? Tab private DialplanInfoView dialplanInfoView; //?? private SatisNumManager satisNumManager; // ? private MgrMeetMe mgrMeetMe; // ? private OperationLogView operationLogView; /** * ? */ // ??Tab private SystemStatus systemStatusManagement; // ?? ? private SystemInfo systemInfoManagement; // License? Tab private SystemLicence systemLicenceManagement; // AboutTab private About aboutManagement; // ?Tab private Tab selectTab; private User loginUser; public MgrTabSheet() { loginUser = SpringContextHolder.getLoginUser(); ShareData.mgrToTabSheet.put(loginUser.getId(), this); this.addListener(this); this.setImmediate(true); this.setCloseHandler(new CloseHandler() { // lc tab,tab,tab?tab.tab,,??? @Override public void onTabClose(TabSheet tabsheet, Component tabContent) { if (tabContent == callCheck) { callCheck.getTabSheet().removeAllComponents(); tabsheet.removeComponent(callCheck); } else if (tabContent == callCheckByCallTimeLength) { callCheckByCallTimeLength.getTabSheet().removeAllComponents(); tabsheet.removeComponent(callCheckByCallTimeLength); } else if (tabContent == employeeCheck) { employeeCheck.getTabSheet().removeAllComponents(); tabsheet.removeComponent(employeeCheck); } else if (tabContent == loginLogoutDetail) { loginLogoutDetail.getTabSheet().removeAllComponents(); tabsheet.removeComponent(loginLogoutDetail); } else if (tabContent == concurrentStatics) { concurrentStatics.getTabSheet().removeAllComponents(); tabsheet.removeComponent(concurrentStatics); } else if (tabContent == projectFinishedStatus) { projectFinishedStatus.getTabSheet().removeAllComponents(); tabsheet.removeComponent(projectFinishedStatus); } else if (tabContent == serviceRecordStatus) { serviceRecordStatus.getTabSheet().removeAllComponents(); tabsheet.removeComponent(serviceRecordStatus); } else if (tabContent == queueDetail) { queueDetail.getTabSheet().removeAllComponents(); tabsheet.removeComponent(queueDetail); } else if (tabContent == autodialDetail) { autodialDetail.getTabSheet().removeAllComponents(); tabsheet.removeComponent(autodialDetail); } else if (tabContent == satisfactionInvestigate) { satisfactionInvestigate.getTabSheet().removeAllComponents(); tabsheet.removeComponent(satisfactionInvestigate); } else if (tabContent == kpi) { kpi.getTabSheet().removeAllComponents(); tabsheet.removeComponent(kpi); } else if (tabContent == projectPool) { projectPool.getTabSheet().removeAllComponents(); tabsheet.removeComponent(projectPool); } // jrh ?? [] ?? // else if (tabContent == transferLog) { // transferLog.getTabSheet().removeAllComponents(); // tabsheet.removeComponent(transferLog); // } else if (tabContent == questionnaire) { questionnaire.getTabSheet().removeAllComponents(); tabsheet.removeComponent(questionnaire); } else if (tabContent == customerDetail) { customerDetail.getTabSheet().removeAllComponents(); tabsheet.removeComponent(customerDetail); } else if (tabContent == businessDetail) { businessDetail.getTabSheet().removeAllComponents(); tabsheet.removeComponent(businessDetail); } else if (tabContent == csrWorkDetail) { csrWorkDetail.getTabSheet().removeAllComponents(); tabsheet.removeComponent(csrWorkDetail); } // jrh ?? else if (tabContent == projectControl) { tabsheet.removeComponent(projectControl); projectControl = null; } else { tabsheet.removeComponent(tabContent); // ? stopSupperviceThread(tabContent, "onTabClose"); } } }); } /****************** ?? *****************/ public void showResourceImport() { if (resourceImport == null) { resourceImport = new ResourceImport(); } else { resourceImport.updateTable(false); } selectTab = this.addTab(resourceImport, "?", ResourceDataMgr.resource_import); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showGlobalSearch() { if (globalSearch == null) { globalSearch = new GlobalSearch(); } selectTab = this.addTab(globalSearch, "?", ResourceDataMgr.global_search); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showServiceRecord() { if (mgrServiceRecordView == null) { mgrServiceRecordView = new MgrServiceRecordAllView(); } selectTab = this.addTab(mgrServiceRecordView, "?", ResourceDataMgr.service_record); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showCallRecordManage() { if (callRecordManagement == null) { callRecordManagement = new CallRecordManagement(); } selectTab = this.addTab(callRecordManagement, "?", ResourceDataMgr.call_record); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showMissCallLogManage() { if (missCallLogManagement == null) { missCallLogManagement = new MissCallLogManagement(); } selectTab = this.addTab(missCallLogManagement, "??", ResourceDataMgr.call_record); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showMeettingDetailRecordView() { if (meettingDetailRecordManagement == null) { meettingDetailRecordManagement = new MeettingDetailRecordManagement(); } selectTab = this.addTab(meettingDetailRecordManagement, "?", ResourceDataMgr.call_record); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showResourceManage() { Tab tab = this.getTab(resourceManage); if (tab == null) { resourceManage = new ResourceManage(); } selectTab = this.addTab(resourceManage, "??", ResourceDataMgr.resource_manage_16_ico); selectTab.setClosable(true); this.setSelectedTab(resourceManage); } /****************** ?? *****************/ public void showProjectControl() { if (projectControl == null) { projectControl = new ProjectControl(); } selectTab = this.addTab(projectControl, "", ResourceDataMgr.project_control); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /****************** ?? *****************/ public void showAutoDialout() { if (autoDialout == null) { autoDialout = new AutoDialout(); } selectTab = this.addTab(autoDialout, "", ResourceDataMgr.auto_dialout); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /** * ? */ public void showResourceRecycle() { // TODO // if (resourceRecycle == null) { // ??? resourceRecycle = new ResourceRecycle(); // } selectTab = this.addTab(resourceRecycle, "?", ResourceDataMgr.resource_resycle_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /** * ? */ public void showSoundDialout() { if (soundDialout == null) { soundDialout = new SoundDialout(); } selectTab = this.addTab(soundDialout, "?", ResourceDataMgr.sound_dialout); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /** * */ public void showSoundUpload() { if (soundUpload == null) { soundUpload = new SoundUpload(); } selectTab = this.addTab(soundUpload, "", ResourceDataMgr.sound_upload); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /****************** ?? *****************/ public void showNoticeSend() { if (noticeSend == null) { noticeSend = new NoticeSend(this); } else { // ??????Csr??? noticeSend.updateCsrInfo(); } selectTab = this.addTab(noticeSend, "???", ResourceDataMgr.message_send); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showHistoryNotice(Boolean isSend) {// ????? if (historyNotice == null) { historyNotice = new HistoryNotice(this); } this.isSend = isSend; selectTab = this.addTab(historyNotice, "??", ResourceDataMgr.history_message); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showCsrTimersOrderManage() { if (csrTimersOrderManagement == null) { csrTimersOrderManagement = new CsrTimersOrderManagement(); } selectTab = this.addTab(csrTimersOrderManagement, "??", ResourceDataMgr.csr_timers_order_16); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /****************** ?? ******************/ /** * ?? */ public void showCallStatisticOverviewReport() { // if (callStatisticOverviewReport == null) { // callStatisticOverviewReport = new CallStatisticOverviewReport(); // } // // selectTab = this.addTab(callStatisticOverviewReport, "?", // ResourceDataMgr.report_base_16_ico); // selectTab.setClosable(true); // this.setSelectedTab(selectTab); if (callStatisticNativeSqlOverviewReport == null) { callStatisticNativeSqlOverviewReport = new CallStatisticNativeSqlOverviewReport(); } selectTab = this.addTab(callStatisticNativeSqlOverviewReport, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /** * ? chb */ public void showProjectFinishedStatus() { if (projectFinishedStatus == null) { projectFinishedStatus = new ProjectFinishedStatus(); } selectTab = this.addTab(projectFinishedStatus, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /** * ? chb */ public void showServiceRecordStatus() { if (serviceRecordStatus == null) { serviceRecordStatus = new ServiceRecordStatus(); } selectTab = this.addTab(serviceRecordStatus, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showCallCheck() { if (callCheck == null) {//lxy 0526 ?tab callCheck = new CallCheck(); } selectTab = this.addTab(callCheck, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(callCheck); } public void showCallCheckByCallTimeLength() { if (callCheckByCallTimeLength == null) {//lxy 0526 ?tab callCheckByCallTimeLength = new CallCheckByCallTimeLength(); } selectTab = this.addTab(callCheckByCallTimeLength, "", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(callCheckByCallTimeLength); } public void showEmployeeCheck() { employeeCheck = new EmployeeCheck(); selectTab = this.addTab(employeeCheck, "", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(employeeCheck); } public void showEmployeeLoginLogoutDetail() { if (loginLogoutDetail == null) { loginLogoutDetail = new EmployeeLoginLogoutDetail(); } selectTab = this.addTab(loginLogoutDetail, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(loginLogoutDetail); } public void showConcurrentStatics() { if (concurrentStatics == null) { concurrentStatics = new ConcurrentStatics(); } selectTab = this.addTab(concurrentStatics, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showQueueDetail() { if (queueDetail == null) { queueDetail = new QueueDetail(); } selectTab = this.addTab(queueDetail, "", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showAutodialDetail() { if (autodialDetail == null) { autodialDetail = new AutodialDetail(); } selectTab = this.addTab(autodialDetail, "", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(autodialDetail); } public void showSatisfactionInvestigate() { if (satisfactionInvestigate == null) { satisfactionInvestigate = new CustomerSatisfactionInvestigate(); } selectTab = this.addTab(satisfactionInvestigate, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(satisfactionInvestigate); } public void showKpi() { kpi = new KPI(); selectTab = this.addTab(kpi, "KPI", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(kpi); } public void showAdvanceKpiReportView() { if (advanceKPIReportView == null) { advanceKPIReportView = new AdvanceKPIReportView(); } selectTab = this.addTab(advanceKPIReportView, "KPI", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(advanceKPIReportView); } public void showProjectPool() { ProjectPool projectPool = new ProjectPool(); selectTab = this.addTab(projectPool, "", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(projectPool); } /** * jrh ?? */ public void showWorkflowTransferLog() { if (workflowTransferLogView == null) { workflowTransferLogView = new WorkflowTransferLogView(); } selectTab = this.addTab(workflowTransferLogView, "??", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(workflowTransferLogView); } public void showQuestionnaireDetail() { QuestionnaireDetail questionnaire = new QuestionnaireDetail(); selectTab = this.addTab(questionnaire, "?", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(questionnaire); } public void showCustomerDetail() { CustomerDetail customerDetail = new CustomerDetail(); selectTab = this.addTab(customerDetail, "", ResourceDataMgr.report_base_16_ico); selectTab.setClosable(true); this.setSelectedTab(customerDetail); } public void showBusinessDetail() { BusinessDetail businessDetail = new BusinessDetail(); selectTab = this.addTab(businessDetail, "", null); selectTab.setClosable(true); this.setSelectedTab(businessDetail); } public void showCsrWorkDetail() { CsrWork csrWorkDetail = new CsrWork(); selectTab = this.addTab(csrWorkDetail, "", null); selectTab.setClosable(true); this.setSelectedTab(csrWorkDetail); } /****************** ??? jrh ******************/ public void showCustomerMemberManagement() { if (customerMemberManagement == null) { customerMemberManagement = new CustomerMemberManagement(); } selectTab = this.addTab(customerMemberManagement, "??", ResourceDataMgr.customer_member_mangement); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showCustomerMigrateLogView() { if (customerMigrateLogView == null) { customerMigrateLogView = new CustomerMigrateLogView(); } selectTab = this.addTab(customerMigrateLogView, "?", ResourceDataMgr.customer_migrate_log); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /****************** ? jrh ******************/ public void showEmployeeStatusSupervise() { if (employeeStatusSupervise == null) { employeeStatusSupervise = new EmployeeStatusSupervise(); } try { // TODO ? selectTab = this.addTab(employeeStatusSupervise, "???", ResourceDataMgr.supervise_detail_16_ico); } catch (Exception e) { showEmployeeStatusSupervise(); logger.error("???according ?---" + e.getMessage(), e); } selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showExtenStatusSupervise() { if (sipStatusSupervise == null) { sipStatusSupervise = new SipStatusSupervise(); } selectTab = this.addTab(sipStatusSupervise, "?", ResourceDataMgr.supervise_detail_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showQueueStatusSupervise() { if (queueStatusSupervise == null) { queueStatusSupervise = new QueueStatusSupervise(); } try { // TODO ? selectTab = this.addTab(queueStatusSupervise, "?", ResourceDataMgr.supervise_detail_16_ico); } catch (Exception e) { showQueueStatusSupervise(); logger.error("?according ?---" + e.getMessage(), e); } selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showCallStatusSupervise() { if (callStatusSupervise == null) { callStatusSupervise = new CallStatusSupervise(); } selectTab = this.addTab(callStatusSupervise, "??", ResourceDataMgr.supervise_detail_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showMeetMeSupervise() { if (meetMeSupervise == null) { meetMeSupervise = new MeetMeSupervise(); } selectTab = this.addTab(meetMeSupervise, "", ResourceDataMgr.supervise_detail_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /****************** ?? jrh ******************/ public void showUserManagement() { if (userManagement == null) { userManagement = new UserManagement(); } selectTab = this.addTab(userManagement, "?", ResourceDataMgr.user_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showRoleManagement() { if (roleManagement == null) { roleManagement = new RoleManagement(); } selectTab = this.addTab(roleManagement, "?", ResourceDataMgr.role_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showDeptManagement() { if (deptManagement == null) { deptManagement = new DeptManagement(); } selectTab = this.addTab(deptManagement, "?", ResourceDataMgr.department_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showExtManagement() { if (extManagement == null) { extManagement = new ExtManagement(); } selectTab = this.addTab(extManagement, "?", ResourceDataMgr.exten_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showOutlineManagement() { if (outlineManagement == null) { outlineManagement = new OutlineManagement(); } selectTab = this.addTab(outlineManagement, "?", ResourceDataMgr.outline_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showUserOutlineManagement() { if (userOutlineManagement == null) { userOutlineManagement = new UserOutlineManagement(); } selectTab = this.addTab(userOutlineManagement, "??", ResourceDataMgr.outline_member); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showQueueManagement() { if (queueManagement == null) { queueManagement = new QueueManagement(); } selectTab = this.addTab(queueManagement, "?", ResourceDataMgr.queue_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showMusicOnHoldManagement() { if (musicOnHoldManagement == null) { musicOnHoldManagement = new MusicOnHoldManagement(); } selectTab = this.addTab(musicOnHoldManagement, "????", ResourceDataMgr.moh_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showDynQueueMemberManagement() { if (dynQueueMemberManagement == null) { dynQueueMemberManagement = new DynQueueMemberManagement(); } selectTab = this.addTab(dynQueueMemberManagement, "???", ResourceDataMgr.dynamic_qm_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showStaticQueueMemberManagement() { if (staticQueueMemberManagement == null) { staticQueueMemberManagement = new StaticQueueMemberManagement(); } selectTab = this.addTab(staticQueueMemberManagement, "????", ResourceDataMgr.static_qm_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showInnerConfig() { if (innerConfig == null) { innerConfig = new InnerConfigManagement(); } selectTab = this.addTab(innerConfig, "??", ResourceDataMgr.internal_setting_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showRecordStatusManagement() { if (serviceRecordStatusManagement == null) { serviceRecordStatusManagement = new CustomerServiceRecordStatusManagement(); } selectTab = this.addTab(serviceRecordStatusManagement, "???", ResourceDataMgr.internal_setting_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showDutyTableManagement() { if (dutyTableManagement == null) { dutyTableManagement = new DutyTableManagement(); } selectTab = this.addTab(dutyTableManagement, "??", ResourceDataMgr.duty_report_manage); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showMgrPhone2PhoneSettingManagement() { if (mgrPhone2PhoneSettingView == null) { mgrPhone2PhoneSettingView = new MgrPhone2PhoneSettingView(); } selectTab = this.addTab(mgrPhone2PhoneSettingView, "??", ResourceDataMgr.phone2phone_16_icon); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showBlacklistManagement() { if (blacklistView == null) { blacklistView = new BlacklistView(); } selectTab = this.addTab(blacklistView, "????", ResourceDataMgr.blacklist_16_icon); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showDialPlanManagement() { if (dialplanInfoView == null) { dialplanInfoView = new DialplanInfoView(); } selectTab = this.addTab(dialplanInfoView, "?", ResourceDataMgr.dial_plan_16_icon); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showSatisNumManagement() { if (satisNumManager == null) { satisNumManager = new SatisNumManager(); } selectTab = this.addTab(satisNumManager, "??", ResourceDataMgr.dial_plan_16_icon); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showMgrMeetMe() { if (mgrMeetMe == null) { mgrMeetMe = new MgrMeetMe(); } selectTab = this.addTab(mgrMeetMe, "?", ResourceDataMgr.meeting_room_16_icon); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showOperationLogView() { if (operationLogView == null) { operationLogView = new OperationLogView(); } selectTab = this.addTab(operationLogView, "?", ResourceDataMgr.operation_log_16_icon); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showSystemStatusManagement() { if (systemStatusManagement == null) { systemStatusManagement = new SystemStatus(); } selectTab = this.addTab(systemStatusManagement, "?", ResourceDataMgr.system_status_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showSystemInfoManagement() { this.removeComponent(systemInfoManagement); // if (systemInfoManagement == null) { systemInfoManagement = new SystemInfo(); // } selectTab = this.addTab(systemInfoManagement, "?", ResourceDataMgr.system_info_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showSystemLicenceManagement() { this.removeComponent(systemLicenceManagement); // if (systemLicenceManagement == null) { //chb systemLicenceManagement = new SystemLicence(); // } selectTab = this.addTab(systemLicenceManagement, "Licence", ResourceDataMgr.license_info_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showAboutManagement() { if (aboutManagement == null) { aboutManagement = new About(); } selectTab = this.addTab(aboutManagement, "", ResourceDataMgr.about_us_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } // ?? public void showCommodityManagement() { if (commodityManagement == null) { commodityManagement = new CommodityManagement(); } selectTab = this.addTab(commodityManagement, "??", ResourceDataMgr.commodity_manage_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } // ?? public void showOrderManagement() { if (orderManagement == null) { orderManagement = new OrderManagement(); } selectTab = this.addTab(orderManagement, "??", ResourceDataMgr.oder_manage_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } // ?? public void showQuestionnaireManagement() { if (questionnaireManagement == null) { questionnaireManagement = new QuestionnaireManagement(); } selectTab = this.addTab(questionnaireManagement, "??", ResourceDataMgr.questionnarie_manage_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } // ? public void showQuestionnaireManagementEdit() { if (questionnaireManagementEdit == null) { questionnaireManagementEdit = new QuestionnaireManagementEdit(); } selectTab = this.addTab(questionnaireManagementEdit, "?", ResourceDataMgr.questionnarie_manage_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } // ? public void showTemplateManage() { if (templateManage == null) { templateManage = new MessageTemplateManage(); } selectTab = this.addTab(templateManage, "??", ResourceDataMgr.phone_message_template_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } // ?? public void showSendMessageManage() { // jrh if (sendMutiMessageView == null) { sendMutiMessageView = new SendMutiMessageView(); } selectTab = this.addTab(sendMutiMessageView, "??", ResourceDataMgr.phone_message_send_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); // jrh ????? // if (sendMessageManage == null) { // sendMessageManage = new SendMessageManage(); // } // selectTab = this.addTab(sendMessageManage, "??", // ResourceDataMgr.phone_message_send_16_ico); // selectTab.setClosable(true); // this.setSelectedTab(selectTab); } // ?? public void showHistorySms() { if (historySms == null) { historySms = new MessageShow(); } else { historySms.updateTable(false); } selectTab = this.addTab(historySms, "?", ResourceDataMgr.history_message_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showKnowledgeManage() { /* * if (knowledgeManagement == null) { knowledgeManagement = new * KnowledgeManagement(); } else { * knowledgeManagement.updateTable(false); } selectTab = * this.addTab(knowledgeManagement, "?", * ResourceDataMgr.kownledge_manage_16_ico); * selectTab.setClosable(true); this.setSelectedTab(selectTab); */ if (kbInfoManagement == null) { kbInfoManagement = new KbInfoManagement(); } selectTab = this.addTab(kbInfoManagement, "?", ResourceDataMgr.kownledge_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /** * ? */ public void showKnowledgeView() { if (knowledgeView == null) { knowledgeView = new KnowledgeView(); } else { knowledgeView.update(); } selectTab = this.addTab(knowledgeView, "", ResourceDataMgr.kownledge_scan_16_ico); selectTab.setClosable(true); this.setSelectedTab(selectTab); } public void showIvrManagement() { if (ivrManagement == null) { ivrManagement = new IvrManagement(); } selectTab = this.addTab(ivrManagement, "??", null); selectTab.setClosable(true); this.setSelectedTab(selectTab); } /** * jrh 2012-12-18 ?????????tab ?? */ @Override public void selectedTabChange(SelectedTabChangeEvent event) { Component selected = this.getSelectedTab(); if (selected != null) { if (selected == projectControl) { // projectControl.updateTable(false); } else if (selected == autoDialout) { // autoDialout.updateTable(false); } else if (selected == soundDialout) { // ? soundDialout.updateTable(false); } else if (selected == soundUpload) { // ? soundUpload.updateTable(false); } else if (selected == soundUpload) { // soundUpload.updateTable(false); } else if (selected == resourceImport) { // ? resourceImport.updateTable(false); } else if (selected == globalSearch) { // ? // TODO ? } else if (selected == mgrServiceRecordView) { // ? mgrServiceRecordView.updateTable(false); } else if (selected == callRecordManagement) { // ? callRecordManagement.updateTable(false); } else if (selected == missCallLogManagement) { // ?? missCallLogManagement.updateTable(false); } else if (selected == meettingDetailRecordManagement) { // ? meettingDetailRecordManagement.updateTable(false); } else if (selected == noticeSend) { // ??? noticeSend.updateCsrInfo(); } else if (selected == historyNotice) { // ??? historyNotice.updateTable(isSend); } else if (selected == csrTimersOrderManagement) { // ??? csrTimersOrderManagement.updateTable(true); // ******************* supervise manage ? // *****************************// } else if (selected == customerMemberManagement) { // ?? customerMemberManagement.updateTable(false); } else if (selected == customerMigrateLogView) { // ? customerMigrateLogView.updateTable(false); // ******************* supervise manage ? // *****************************// } else if (selected == employeeStatusSupervise) { // ??? employeeStatusSupervise.update(); } else if (selected == sipStatusSupervise) { // ? sipStatusSupervise.update(); } else if (selected == queueStatusSupervise) { // ? queueStatusSupervise.update(); } else if (selected == callStatusSupervise) { // ?? callStatusSupervise.update(); } else if (selected == meetMeSupervise) { // meetMeSupervise.update(); // ******************* system manage ? // *****************************// } else if (selected == userManagement) { // ? userManagement.updateTable(false); } else if (selected == roleManagement) { // ? roleManagement.updateTable(false); } else if (selected == deptManagement) { // ? deptManagement.updateTable(false); } else if (selected == extManagement) { // ? extManagement.updateTable(false); } else if (selected == outlineManagement) { // ? outlineManagement.updateTable(false); } else if (selected == userOutlineManagement) { // ? userOutlineManagement.updateTable(); } else if (selected == queueManagement) { // ? queueManagement.updateTable(false); } else if (selected == ivrManagement) { // IVR? ivrManagement.refreshTable(true); } else if (selected == musicOnHoldManagement) { // ???? musicOnHoldManagement.updateTable(false); } else if (selected == operationLogView) { // ? operationLogView.updateTable(false); } else if (selected == dynQueueMemberManagement) { // ??? dynQueueMemberManagement.updateTable(); } else if (selected == staticQueueMemberManagement) { // ???? staticQueueMemberManagement.updateTable(); } else if (selected == innerConfig) { // ? innerConfig.updateTableKeywords(); innerConfig.updateCustomerServiceRecordLevel(); } else if (selected == serviceRecordStatusManagement) { // ???? serviceRecordStatusManagement.refreshTable(false); } else if (selected == mgrPhone2PhoneSettingView) { // ? mgrPhone2PhoneSettingView.update(); } else if (selected == blacklistView) { // ???? blacklistView.refreshTable(false); } else if (selected == dutyTableManagement) { // ?? // dutyTableManagement.updateTable(false); } else if (selected == commodityManagement) { // ?? commodityManagement.updateTable(false); } else if (selected == orderManagement) { // ?? orderManagement.refreshTable(false); } else if (selected == questionnaireManagement) { // ?? questionnaireManagement.updateTable(false); } else if (selected == questionnaireManagementEdit) { // ?? questionnaireManagementEdit.updateTable(false); questionnaireManagementEdit.refreshComponentInfo(); } else if (selected == historySms) { // ??? historySms.updateTable(false); } else if (selected == sendMutiMessageView) { // ? sendMutiMessageView.refreshTemplates(); } else if (selected == kbInfoManagement) { // kbInfoManagement.refreshComponentInfo(); kbInfoManagement.updateTable(false); } } // ? stopSupperviceThread(selected, "onTabChange"); } /** * ? * ??Tab ????Tab * tab ?????? * tab ????? * @param selected * @param eventType */ public void stopSupperviceThread(Component selected, String eventType) { if ("onTabChange".equals(eventType)) { if (employeeStatusSupervise != null && selected != employeeStatusSupervise) { employeeStatusSupervise.setGotoRun(false); } if (sipStatusSupervise != null && selected != sipStatusSupervise) { sipStatusSupervise.setGotoRun(false); } if (queueStatusSupervise != null && selected != queueStatusSupervise) { queueStatusSupervise.setGotoRun(false); } if (callStatusSupervise != null && selected != callStatusSupervise) { callStatusSupervise.setGotoRun(false); } if (meetMeSupervise != null && selected != meetMeSupervise) { meetMeSupervise.setGotoRun(false); } } else if ("onTabClose".equals(eventType)) { if (employeeStatusSupervise != null && selected == employeeStatusSupervise) { employeeStatusSupervise.setGotoRun(false); } else if (sipStatusSupervise != null && selected == sipStatusSupervise) { sipStatusSupervise.setGotoRun(false); } else if (queueStatusSupervise != null && selected == queueStatusSupervise) { queueStatusSupervise.setGotoRun(false); } else if (callStatusSupervise != null && selected == callStatusSupervise) { callStatusSupervise.setGotoRun(false); } else if (meetMeSupervise != null && selected == meetMeSupervise) { meetMeSupervise.setGotoRun(false); } } } }