|
|
@@ -46,6 +46,7 @@ void CAcdCore::__onAgentStateUpdated( UINT AgentId )
|
|
46
|
46
|
// 如果有座席变为空闲,通知来电队列刷新排队
|
|
47
|
47
|
if(State == AGENT_STATE_FREE)
|
|
48
|
48
|
m_QueueMgr.onAgentFree(pAgent);
|
|
|
49
|
+
|
|
49
|
50
|
}
|
|
50
|
51
|
|
|
51
|
52
|
/*****************************************************************
|
|
|
@@ -64,6 +65,9 @@ void CAcdCore::__onPhoneStateUpdated( UINT ExtenId )
|
|
64
|
65
|
|
|
65
|
66
|
// 通知事件订阅
|
|
66
|
67
|
m_SubjectRepository.onPhoneStateUpdated(pExten->assoAgent(), pExten->id(), pExten->state());
|
|
|
68
|
+
|
|
|
69
|
+ // 2022-09-01 驻马店 保存分机号,坐席状态
|
|
|
70
|
+ m_DepttelextOffice.UpdateDepttelext(pExten->id(), pExten->state());
|
|
67
|
71
|
}
|
|
68
|
72
|
|
|
69
|
73
|
/*****************************************************************
|
|
|
@@ -759,14 +763,26 @@ void CAcdCore::__onCmdDataSendToAgent(CPduEntity * a_pCmd)
|
|
759
|
763
|
}
|
|
760
|
764
|
std::vector<int> VecAgentID = m_AgentOffice.getAgentIDAll();
|
|
761
|
765
|
|
|
762
|
|
- for (auto iter = VecAgentID.begin(); iter != VecAgentID.end(); iter++)
|
|
|
766
|
+ bool isSuccess = CNetworkAcd::GetInstance().send2Server(a_pCmd);
|
|
|
767
|
+ ILogger::getInstance().log(LOG_CLASS_BUSI, LOG_LEVEL_NORMAL, _T("{Core}: 通知[%d][%s],当前数量:%d"), a_pCmd->GetCmdType(), isSuccess ? "成功" : "失败", count);
|
|
|
768
|
+}
|
|
|
769
|
+
|
|
|
770
|
+void CAcdCore::__onCmdGetAgentList(CPduEntity * a_pCmd)
|
|
|
771
|
+{
|
|
|
772
|
+ CString szAgentList;
|
|
|
773
|
+ m_AgentOffice.getAllAgentStateList(szAgentList);
|
|
|
774
|
+ int t_agent_id = a_pCmd->GetDataUInt(1);
|
|
|
775
|
+ if (!pushAgentList(t_agent_id, szAgentList.GetBuffer(0))) // 如果rcf失败在使用原来参数传递
|
|
763
|
776
|
{
|
|
764
|
|
- bool isSuccess = CNetworkAcd::GetInstance().send2Server(a_pCmd);
|
|
765
|
|
- if (isSuccess)
|
|
766
|
|
- ILogger::getInstance().log(LOG_CLASS_BUSI, LOG_LEVEL_NORMAL, _T("{Core}: 通知坐席%d 成功,当前数量:%d"), *iter, count);
|
|
767
|
|
- else
|
|
768
|
|
- ILogger::getInstance().log(LOG_CLASS_BUSI, LOG_LEVEL_NORMAL, _T("{Core}: 通知坐席%d 失败,当前数量:%d"), *iter, count);
|
|
|
777
|
+ if (szAgentList.GetLength() >= 512)
|
|
|
778
|
+ {
|
|
|
779
|
+ szAgentList = szAgentList.Left(511);
|
|
|
780
|
+ ILogger::getInstance().log(LOG_CLASS_SOCKET, LOG_LEVEL_WARNING, _T("ACD -> HP-SERVER,坐席[%lu]获取坐席列表字符超出被截取 "), a_pCmd->GetDataUInt(1));
|
|
|
781
|
+ }
|
|
|
782
|
+ a_pCmd->SetDataString(2, szAgentList);
|
|
769
|
783
|
}
|
|
|
784
|
+ szAgentList.ReleaseBuffer();
|
|
|
785
|
+ CNetworkAcd::GetInstance().send2Server(a_pCmd);
|
|
770
|
786
|
}
|
|
771
|
787
|
|
|
772
|
788
|
void CAcdCore::__onCmdAgentReqExten(CPduEntity * a_pCmd)
|
|
|
@@ -800,6 +816,13 @@ void CAcdCore::__onCmdAgentRecoverAgent(CPduEntity * a_pCmd)
|
|
800
|
816
|
CNetworkAcd::GetInstance().send2Server(a_pCmd);
|
|
801
|
817
|
}
|
|
802
|
818
|
|
|
|
819
|
+void CAcdCore::__onCmdExtStateList(CPduEntity * a_pCmd)
|
|
|
820
|
+{
|
|
|
821
|
+ std::string extStateList = m_DepttelextOffice.GetAllDeptTelext();
|
|
|
822
|
+ pushZmdExtenStateList(extStateList);
|
|
|
823
|
+ CNetworkAcd::GetInstance().send2Server(a_pCmd);
|
|
|
824
|
+}
|
|
|
825
|
+
|
|
803
|
826
|
/*****************************************************************
|
|
804
|
827
|
**【函数名称】 stage1Start
|
|
805
|
828
|
**【函数功能】 第一阶段启动
|
|
|
@@ -830,6 +853,14 @@ bool CAcdCore::stage1Start( void )
|
|
830
|
853
|
AfxMessageBox("加载视频账号配置信息失败");
|
|
831
|
854
|
return false;
|
|
832
|
855
|
}
|
|
|
856
|
+ // 加载分机号部门信息失败
|
|
|
857
|
+ if (!m_DepttelextOffice.InitDepttelext())
|
|
|
858
|
+ {
|
|
|
859
|
+ IOtlConnection::getInstance()->Disconnect();
|
|
|
860
|
+ AfxMessageBox("加载分机部门信息失败");
|
|
|
861
|
+ return false;
|
|
|
862
|
+ }
|
|
|
863
|
+ std::cout << m_DepttelextOffice.GetAllDeptTelext() << std::endl;
|
|
833
|
864
|
return true;
|
|
834
|
865
|
}
|
|
835
|
866
|
|
|
|
@@ -1013,6 +1044,10 @@ void CAcdCore::onRecvCommand( CPduEntity* a_pPduEntity )
|
|
1013
|
1044
|
__onCmdDataSendToAgent(a_pPduEntity);
|
|
1014
|
1045
|
break;
|
|
1015
|
1046
|
|
|
|
1047
|
+ case PDU_CMD_AGENT_GET_AGENTLIST:
|
|
|
1048
|
+ __onCmdGetAgentList(a_pPduEntity);
|
|
|
1049
|
+ break;
|
|
|
1050
|
+
|
|
1016
|
1051
|
case PDU_CMD_AGENT_VIDEO_REQ_EXTEN: // 请求注册视频分机号
|
|
1017
|
1052
|
__onCmdAgentReqExten(a_pPduEntity);
|
|
1018
|
1053
|
break;
|
|
|
@@ -1022,6 +1057,9 @@ void CAcdCore::onRecvCommand( CPduEntity* a_pPduEntity )
|
|
1022
|
1057
|
case PDU_CMD_AGENT_VIDEO_RECOVER_EXTEN: // 释放请求的视频分机号
|
|
1023
|
1058
|
__onCmdAgentRecoverAgent(a_pPduEntity);
|
|
1024
|
1059
|
break;
|
|
|
1060
|
+ case PDU_CMD_EXTEN_STATE_LIST_ZMD: // 分机状态列表
|
|
|
1061
|
+ __onCmdExtStateList(a_pPduEntity);
|
|
|
1062
|
+ break;
|
|
1025
|
1063
|
default:
|
|
1026
|
1064
|
return;
|
|
1027
|
1065
|
} // end switch
|