BOOL CInlineQueData::GetFirstTakeNumData(SLZData& data,const CStringArray& arrStrQueId) { BOOL flag = FALSE; BOOL canDo = FALSE; POSITION pos = m_lstInlineQue.GetHeadPosition(); SLZData tempdata; while(pos) { tempdata = m_lstInlineQue.GetNext(pos); for(int i=0;i<arrStrQueId.GetCount();i++) { if(arrStrQueId[i].Compare(tempdata.GetBussinessType()) == 0) { canDo = TRUE; break; } } if(canDo) { if(!flag) { data = tempdata; flag = TRUE; } else { data = data.GetTakingNumTime() < tempdata.GetTakingNumTime() ? data : tempdata; } } } return flag; }
CString CProducePacket::ProduceSendPacket(const SLZData& data,int leftNum,SendDataType dataType,CString cardNum/* =_T */,CardType cardType/*cardNotDefine*/) { CString packet = _T("<?xml version=\"1.0\" encoding=\"UTF-8\"?><dataPacket version=\"1.0\"><headCode>hallQue</headCode>"); packet.AppendFormat(_T("<dataType>%d</dataType>"),dataType); packet.AppendFormat(_T("<orgName>%s</orgName>"),data.GetOrganName()); packet.AppendFormat(_T("<orgID>%s</orgID>"),data.GetOrganId()); packet.AppendFormat(_T("<cardType>%d</cardType>"),cardType); packet.AppendFormat(_T("<cardNum>%s</cardNum>"),cardNum); packet.AppendFormat(_T("<queID>%s</queID>"),data.GetBussinessType()); packet.AppendFormat(_T("<queNum>%s</queNum>"),data.GetQueueNumber()); CString wStrtakeNumTime = ExChangeTime(data.GetTakingNumTime()); packet.AppendFormat(_T("<enterTime>%s</enterTime>"),wStrtakeNumTime); CString wStrCallTime = ExChangeTime(data.GetCallTime()); packet.AppendFormat(_T("<callTime>%s</callTime>"),wStrCallTime); packet.AppendFormat(_T("<workerID>%s</workerID>"),data.GetStaffId()); packet.AppendFormat(_T("<windowNum>%d</windowNum>"),data.GetWindowId()); CString wStrFinishTime = ExChangeTime(data.GetFinishTime()); packet.AppendFormat(_T("<scoreTime>%s</scoreTime>"),wStrFinishTime); packet.AppendFormat(_T("<scoreLev>%d</scoreLev>"),data.GetEvaluateLevel()); // int len = CCommonConvert::CStringToChar(packet,NULL); // char* strPacket = new char[len+1]; // memset(strPacket,0,len+1); // CCommonConvert::CStringToChar(packet,strPacket); // std::string stdStrPacket(strPacket); // return stdStrPacket; return packet; }