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

IvrFlow.h 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*************************************************************************
  2. 【文件名】 IvrFlow.h
  3. 【功能模块和目的】 流程基类头文件
  4. 【开发者及日期】 郑石诺 2015/01/24
  5. 【版本】 V1.0.0
  6. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  7. 【更改记录】
  8. *************************************************************************/
  9. #pragma once
  10. class CFlowTemplate;
  11. class CCellBase;
  12. /*************************************************************************
  13. 【类名】 CIvrFlow
  14. 【功能】
  15. 【接口说明】 流程基类
  16. 【开发者及日期】 郑石诺 2015/01/24
  17. 【版本】 V1.0.0
  18. 【版权信息】 Copyright (C)2015 河南华谊网络科技有限公司
  19. 【更改记录】
  20. *************************************************************************/
  21. class CIvrFlow : public CWnd
  22. {
  23. DECLARE_DYNAMIC(CIvrFlow)
  24. public:
  25. CIvrFlow(int Id);
  26. virtual ~CIvrFlow(void);
  27. int id(void) const { return m_Id; } // 获取流程Id
  28. IVR_FLOW_STATE state(void) const { return m_State; } // 获取流程状态
  29. IVR_FLOW_STATE& state(void) { return m_State; }
  30. bool hangUpSign(void) const { return m_IsHangUp; } // 获取挂机标识
  31. bool& hangUpSign(void) { return m_IsHangUp; }
  32. DataSet& recordSet(void) { return m_RecordSet; } // 流程附属数据库操作记录集
  33. CFlowTemplate* CurrentTemp(void) { return m_pFlowTemplate; }
  34. ULONG assoCallId(void) const { return m_AssoCallId; }
  35. CCellBase* currentCell(void) { return m_pCurrentCell; }
  36. int start(CFlowTemplate* pFlowTemp = NULL, int StartPos = 1); // 开始流程
  37. int next(int NextPos); // 执行流程
  38. int procPdu(CPduEntity* pPduEntity); // 处理Pdu命令
  39. void onNetLinkUpdated(bool IsConnect); // 响应网络断开或连接
  40. void addVar(const CString& VarName, const CString& VarValue); // 添加流程系统变量
  41. bool findVarValue(const CString& VarName, CString& VarValue); // 查找系统变量的值
  42. bool replaceVar(const CString& Src, CString& Dst); // 根据流程中的变量对指定字符串进行替换
  43. void copyVar(CIvrFlow& DestFlow); // 复制系统变量
  44. // 保存流程信息
  45. void setFlowInfo(ULONG CallId, UINT TrunkId, const CString& CallerNum, const CString& CalleeNum);
  46. void setFlowInfo(ULONG CallId, UINT TrunkId, int TaskId, UINT OpType, const CString& CallerNum, const CString& CalleeNum);
  47. void setFlowAssoData(CString AssoData);
  48. void onTimerTimeUp(int NextPos);
  49. private:
  50. void __release(void); // 释放资源
  51. void __clearFlow(void); // 清理流程
  52. void __deleteCurrentCell(void); // 删除当前节点
  53. void __onTimerTimeOut(void); // 流程节点最大执行时间超时
  54. void __onNextCellNull(int NullCellPos);
  55. protected:
  56. DECLARE_MESSAGE_MAP()
  57. afx_msg void OnTimer(UINT_PTR nIDEvent);
  58. private:
  59. typedef CMap<CString, LPCTSTR, CString, LPCTSTR> VarTable;
  60. int m_Id; // 流程Id
  61. IVR_FLOW_STATE m_State; // 流程状态
  62. bool m_IsHangUp; // 是否有未处理的挂机命令
  63. bool m_IsNetLinkUp; // 网络是否连接
  64. ULONG m_AssoCallId; // 关联CallId
  65. CFlowTemplate* m_pFlowTemplate; // 流程文件类指针
  66. CCellBase* m_pCurrentCell; // 保存当前执行Cell
  67. VarTable m_VarTable; // 流程变量表
  68. DataSet m_RecordSet; // 从数据库中读取记录的值列表
  69. };