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

StrategyMinAnswer.cpp 821B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "StdAfx.h"
  2. #include "StrategyMinAnswer.h"
  3. #include "Agent.h"
  4. #include "AgentGroup.h"
  5. CStrategyMinAnswer::CStrategyMinAnswer(void)
  6. {
  7. }
  8. CStrategyMinAnswer::~CStrategyMinAnswer(void)
  9. {
  10. }
  11. /*****************************************************************
  12. **【函数名称】 _locateAgent
  13. **【函数功能】 得到当前排队策略下可用座席
  14. **【参数】
  15. **【返回值】
  16. ****************************************************************/
  17. CAgent* CStrategyMinAnswer::_locateAgent( CAgentGroup& AgentGroup )
  18. {
  19. UINT nMinAnswerCount = 99999;
  20. CAgent* pAgentRet = NULL;
  21. for(int i = 0; i < AgentGroup.GetCount(); ++i)
  22. {
  23. CAgent* pAgent = AgentGroup[i];
  24. if(pAgent->answerCount() < nMinAnswerCount && pAgent->isFree())
  25. {
  26. pAgentRet = pAgent;
  27. nMinAnswerCount = pAgentRet->answerCount();
  28. } // end if
  29. }
  30. return pAgentRet;
  31. }