为TD2表增加BFPriority字段,用于控制补发通道的优先级。在AutoSend_ReportProcess_ReSend函数中检索补发通道时做了控制并排序。(BFPriority>0的通道才参与补发)
This commit is contained in:
parent
485c0589ff
commit
efad233be6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -15750,6 +15750,7 @@ try
|
||||
m_AdoRS.GetCollect( _T("Mon_ReportFail") , pTD2DataRet->Mon_ReportFail);
|
||||
m_AdoRS.GetCollect(_T("OftenUse"), pTD2DataRet->lOftenUse);
|
||||
m_AdoRS.GetCollect(_T("LoginName"), pTD2DataRet->szLoginName);
|
||||
m_AdoRS.GetCollect(_T("BFPriority"), pTD2DataRet->lBFPriority);
|
||||
m_AdoRS.MoveNext();
|
||||
pTD2DataRet ++;
|
||||
}
|
||||
@ -15802,6 +15803,7 @@ try
|
||||
CString strXYTDID;
|
||||
CString strOftenUse;
|
||||
CString strLoginName;
|
||||
CString strBFPriority;
|
||||
|
||||
strTDID.Format( _T("%d") , pData->lTDID );
|
||||
strTDType.Format( _T("%d") , pData->lTDType );
|
||||
@ -15823,6 +15825,7 @@ try
|
||||
strXYTDID.Format( _T("%d") , pData->lXYTDID );
|
||||
strOftenUse.Format(_T("%d"), pData->lOftenUse);
|
||||
strLoginName = pData->szLoginName; strLoginName.Replace(_T("'"), _T("''"));
|
||||
strBFPriority.Format(_T("%d"), pData->lBFPriority);
|
||||
|
||||
strSelect = CString("update TD2 set ") +
|
||||
CString("TDType='") + strTDType + CString("',") +
|
||||
@ -15846,6 +15849,7 @@ try
|
||||
#endif
|
||||
CString(",OftenUse=") + strOftenUse + CString(" ") +
|
||||
CString(",LoginName='") + strLoginName + CString("' ") +
|
||||
CString(",BFPriority='") + strBFPriority + CString("' ") +
|
||||
CString("where TDID=") + strTDID ;
|
||||
|
||||
BOOL b = m_AdoRS.Open( strSelect );
|
||||
@ -15912,6 +15916,7 @@ try
|
||||
CString strXYTDID;
|
||||
CString strOftenUse;
|
||||
CString strLoginName;
|
||||
CString strBFPriority;
|
||||
|
||||
strTDID.Format( _T("%d") , pData->lTDID );
|
||||
strTDType.Format( _T("%d") , pData->lTDType );
|
||||
@ -15933,29 +15938,31 @@ try
|
||||
strXYTDID.Format( _T("%d") , pData->lXYTDID );
|
||||
strOftenUse.Format(_T("%d"), pData->lOftenUse);
|
||||
strLoginName = pData->szLoginName; strLoginName.Replace(_T("'"), _T("''"));
|
||||
strBFPriority.Format(_T("%d"), pData->lBFPriority);
|
||||
|
||||
|
||||
strSelect = CString("insert into TD2 (TDType,Name,AccessPort,BZ,Status,Ability,Limits,TDNum,Mode,SendRet,ContentLen,LongContentLen,SignLen,XYLen,XYTDID,DefaultTD,OftenUse,LoginName) values(") +
|
||||
CString(" '") + strTDType + CString("',") +
|
||||
CString(" '") + strName + CString("',") +
|
||||
CString(" '") + strAccessPort + CString("',") +
|
||||
CString(" '") + strBZ + CString("',") +
|
||||
CString(" '") + strStatus + CString("',") +
|
||||
CString(" '") + strAbility + CString("',") +
|
||||
CString(" '") + strLimits + CString("',") +
|
||||
CString(" '") + strTDNum + CString("',") +
|
||||
CString(" '") + strMode + CString("',") +
|
||||
CString(" '") + strSendRet + CString("',") +
|
||||
CString(" '") + strContentLen + CString("',") +
|
||||
CString(" '") + strLongContentLen + CString("',") +
|
||||
CString(" '") + strSignLen + CString("',") +
|
||||
CString(" '") + strXYLen + CString("',") +
|
||||
CString(" '") + strXYTDID + CString("',") +
|
||||
CString(" '") + strDefaultTD + CString("',") +
|
||||
CString(" '") + strOftenUse + CString("',")+
|
||||
CString(" '") + strLoginName + CString("')");
|
||||
strSelect = CString("insert into TD2 (TDType,Name,AccessPort,BZ,Status,Ability,Limits,TDNum,Mode,SendRet,ContentLen,LongContentLen,SignLen,XYLen,XYTDID,DefaultTD,OftenUse,LoginName,BFPriority) values(") +
|
||||
CString(" '") + strTDType + CString("',") +
|
||||
CString(" '") + strName + CString("',") +
|
||||
CString(" '") + strAccessPort + CString("',") +
|
||||
CString(" '") + strBZ + CString("',") +
|
||||
CString(" '") + strStatus + CString("',") +
|
||||
CString(" '") + strAbility + CString("',") +
|
||||
CString(" '") + strLimits + CString("',") +
|
||||
CString(" '") + strTDNum + CString("',") +
|
||||
CString(" '") + strMode + CString("',") +
|
||||
CString(" '") + strSendRet + CString("',") +
|
||||
CString(" '") + strContentLen + CString("',") +
|
||||
CString(" '") + strLongContentLen + CString("',") +
|
||||
CString(" '") + strSignLen + CString("',") +
|
||||
CString(" '") + strXYLen + CString("',") +
|
||||
CString(" '") + strXYTDID + CString("',") +
|
||||
CString(" '") + strDefaultTD + CString("',") +
|
||||
CString(" '") + strOftenUse + CString("',") +
|
||||
CString(" '") + strLoginName + CString("',") +
|
||||
CString(" '") + strBFPriority + CString("')");
|
||||
|
||||
BOOL b = m_AdoRS.Open( strSelect );
|
||||
BOOL b = m_AdoRS.Open(strSelect);
|
||||
//long lCount = m_AdoRS.GetRecordCount();
|
||||
if ( b )
|
||||
{
|
||||
|
@ -20870,7 +20870,8 @@ long CSmsCenterDlg::AutoSend_ReportProcess_ReSend(CAdoRecordSet* pAdoRS, long lS
|
||||
strAllSendRet += str;
|
||||
pAdoRS->MoveNext();
|
||||
}
|
||||
str.Format(_T("select * from td2 with(nolock) where Status=1 and TDType=%d and GGTD<>1 and Mode=0 and Ability=%d and TDNum not in (2,3) and SendRet not in (%s) order by tdnum"), lRecvNumType, lTDMsgType, strAllSendRet);
|
||||
//str.Format(_T("select * from td2 with(nolock) where Status=1 and TDType=%d and GGTD<>1 and Mode=0 and Ability=%d and TDNum not in (2,3) and SendRet not in (%s) order by tdnum"), lRecvNumType, lTDMsgType, strAllSendRet);
|
||||
str.Format(_T("select * from td2 with(nolock) where Status=1 and TDType=%d and SendRet not in (%s) and Ability=%d and Mode=0 and BFPriority>0 order by BFPriority desc"), lRecvNumType, strAllSendRet, lTDMsgType );
|
||||
if (!pAdoRS->Open(str) || pAdoRS->IsEOF()) //已经没有可用通道了。
|
||||
{
|
||||
lReSendType = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user