升龙物业 老版本 ocx IPO, 加密狗 转值班电话

LogicLine.cpp 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #include "StdAfx.h"
  2. #include "LogicLine.h"
  3. #include "StatisticsMgr.h"
  4. #include "SessionHolder.h"
  5. #include "CallSession.h"
  6. CLogicLine::CLogicLine(UINT ResId) : m_LineId(ResId), m_LineStatus(INNER_STATE_DISABLED), m_CallId(0), m_HoldCallId(0),
  7. m_CurrentOpType(PDU_CMD_UNKNOWN), m_CurrentOpResult(TRUE), m_TaskIdBinded(TASK_ID_INVALID), m_CallerNum(_T("")), m_CalleeNum(_T("")), m_RecordFile(_T(""))
  8. {
  9. }
  10. /*****************************************************************
  11. **【函数名称】 __reportLineStatus
  12. **【函数功能】 统计线路状态变化
  13. **【参数】
  14. **【返回值】
  15. ****************************************************************/
  16. void CLogicLine::_reportLineStatus( void )
  17. {
  18. if(m_CallId == 0 || m_HoldCallId != 0) return;
  19. // 状态变化统计
  20. T_EvtStateChanged repInfo;
  21. memset(&repInfo, 0, sizeof(repInfo));
  22. repInfo.nLineState = m_LineStatus; // 状态
  23. repInfo.nAgentId = getAgentNum(); // 工号
  24. lstrcpy(repInfo.szCallerNum, m_CallerNum); // 被叫
  25. lstrcpy(repInfo.szFileName, m_RecordFile); // 录音文件
  26. CStatisticsMgr::GetInstance().onCallDetail(m_CallId, REP_EVENT_STATE_CHANGED, m_LineId, &repInfo);
  27. }
  28. /*****************************************************************
  29. **【函数名称】 setRecordFile
  30. **【函数功能】 设置坐席录音文件名,录音文件名在挂机前不能被修改
  31. **【参数】 strFileName: 录音文件名
  32. **【返回值】
  33. ****************************************************************/
  34. void CLogicLine::setRecordFile( const CString& strFileName )
  35. {
  36. if(m_RecordFile == "" && strFileName != "")
  37. {
  38. // 设置录音文件名,并向坐席发送
  39. m_RecordFile = strFileName;
  40. pushRecord2ACD();
  41. }
  42. // 统计 REP_EVENT_REC_BEGIN
  43. T_EvtRecBegin repInfo;
  44. memset(&repInfo, 0, sizeof(repInfo));
  45. lstrcpy(repInfo.szFileName, m_RecordFile);
  46. CStatisticsMgr::GetInstance().onCallDetail(m_CallId, REP_EVENT_REC_BEGIN, m_LineId, &repInfo);
  47. }
  48. /*****************************************************************
  49. **【函数名称】 resetLine
  50. **【函数功能】 线路重置
  51. **【参数】
  52. **【返回值】
  53. ****************************************************************/
  54. void CLogicLine::resetLine()
  55. {
  56. // 清除线路信息
  57. m_CallId = 0;
  58. m_RecordFile = _T("");
  59. m_CallerNum = _T("");
  60. m_CalleeNum = _T("");
  61. m_CurrentOpType = PDU_CMD_UNKNOWN;
  62. }
  63. /*****************************************************************
  64. **【函数名称】 assoLine
  65. **【函数功能】 获取对端线路指针
  66. **【参数】
  67. **【返回值】 对端线路指针
  68. ****************************************************************/
  69. CLogicLine* CLogicLine::assoLine()
  70. {
  71. CCallSession* pSession = CSessionHolder::GetInstance().findSession(m_CallId);
  72. if(pSession == NULL)
  73. return NULL;
  74. return pSession->getAssoLine(this);
  75. }