Pārlūkot izejas kodu

Z991239-6255 #comment feat: 大机非接日志精简

Signed-Off-By: commit-hook
刘文涛80174520 4 mēneši atpakaļ
vecāks
revīzija
42752e0c37
1 mainītis faili ar 14 papildinājumiem un 11 dzēšanām
  1. 14 11
      Module/mod_ContactlessCard/ContactlessFSM.cpp

+ 14 - 11
Module/mod_ContactlessCard/ContactlessFSM.cpp

@@ -1655,7 +1655,7 @@ void CContactlessCardFSM::QueryHasCardJS(SpReqAnsContext<ContactlessCardService_
 int CContactlessCardFSM::EjectJS(SpReqAnsContext<ContactlessCardService_EjectJS_Req, ContactlessCardService_EjectJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("吐卡开始");
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("吐卡开始");
 	m_pCardProcess->DataInit();
 	int ret = 0;
 	int getDevInfoCount = 0;
@@ -1717,7 +1717,7 @@ int CContactlessCardFSM::EjectJS(SpReqAnsContext<ContactlessCardService_EjectJS_
 int CContactlessCardFSM::ReadJS(SpReqAnsContext<ContactlessCardService_ReadJS_Req, ContactlessCardService_ReadJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("读卡开始");
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("读卡开始");
 	int ret = InternalAcceptCardJS();
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("InternalAcceptCardJS ret:%d", ret);
 
@@ -1743,7 +1743,7 @@ int CContactlessCardFSM::ReadJS(SpReqAnsContext<ContactlessCardService_ReadJS_Re
 int CContactlessCardFSM::PostOnlineJS(SpReqAnsContext<ContactlessCardService_PostOnlineJS_Req, ContactlessCardService_PostOnlineJS_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("(PostOnlineJS) 联机后IC接触处理");
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("(PostOnlineJS) 联机后IC接触处理");
 	m_pCardProcess->DataInit();
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("postOnLine data[%s]", ctx->Req.data.GetData());
 	m_pCardProcess->SplitOnlineReplyData(ctx->Req.data, strlen(ctx->Req.data));
@@ -1802,7 +1802,7 @@ int CContactlessCardFSM::InternalAcceptCardJS()
 				bool bIC = m_pCardProcess->DetectIfICCard(CARD_MACHINE_RFIC, m_hDevHelper, activeCardType);
 				l_endTime = SP::Module::Comm::RVCGetTickCount();
 				if (bIC) {
-					DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("InternalAcceptCardJS::DetectIfICCard activeCardType=%d", activeCardType);
+					DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("InternalAcceptCardJS::DetectIfICCard activeCardType=%d", activeCardType);
 					if (activeCardType == 'A' || activeCardType == 'B' || activeCardType == 'M') {
 						err = 0;//探测到IC卡
 					}
@@ -1875,7 +1875,7 @@ int CContactlessCardFSM::PreOnlineJS(SpReqAnsContext<ContactlessCardService_Read
 		char* pAIDTmp = new char[64];
 		memset(pAIDTmp, 0, 64);
 		HexBuf2StrBuf(aidFromBus.value, &pAIDTmp, aidFromBus.lenth);
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("<PreOnline>, the aid is[%s],len:%d .", pAIDTmp, strlen(pAIDTmp));
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("<PreOnlineJS>, the aid is[%s],len:%d .", pAIDTmp, strlen(pAIDTmp));
 		CAutoArray<CSimpleString> preAIDs;
 		preAIDs.Init(1);
 		preAIDs[0] = (CSimpleStringA)pAIDTmp;
@@ -1910,7 +1910,9 @@ int CContactlessCardFSM::PreOnlineJS(SpReqAnsContext<ContactlessCardService_Read
 	CSimpleStringA taaResult;
 	BYTE bt9f27 = 0;
 	int retTAA = m_pCardProcess->TermActionAnalyze(CARD_MACHINE_RFIC, m_hDevHelper, taaResult, true, m_bCDA, bt9f27);
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("<PreOnlineJS>,TermActionAnalyze retTAA:%d, taaResult:%s", retTAA, taaResult.GetData());
+	if (retTAA != 0 || taaResult.GetLength() == 0) {
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("<PreOnlineJS>,TermActionAnalyze retTAA:%d, taaResult:%s", retTAA, taaResult.GetData());
+	}
 	switch (retTAA)
 	{//to be added oiltest 20140929
 	case -1:	//some data may be wrong
@@ -1926,7 +1928,6 @@ int CContactlessCardFSM::PreOnlineJS(SpReqAnsContext<ContactlessCardService_Read
 
 	if (ctx->Ans.result.GetLength() == 0)
 	{
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("<PreOnlineJS>,TermActionAnalyze result len = 0");
 		ctx->Ans.icState = 0;
 		ctx->Answer(Error_Succeed);
 		return 0;
@@ -1992,7 +1993,7 @@ int CContactlessCardFSM::PreOnlineJS(SpReqAnsContext<ContactlessCardService_Read
 
 		int pos = FindHexCharPosition(track2.value, 0x0d, track2.lenth);
 		pICTrack2[37] = '\0';
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("<PreOnline>, split pos:%d", pos);
+		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("<PreOnlineJS>, split pos:%d", pos);
 		char* ddd = new char[40];
 		ZeroMemory(ddd, 40);
 		memcpy(ddd, pICTrack2, pos - 1);
@@ -2009,7 +2010,6 @@ int CContactlessCardFSM::PreOnlineJS(SpReqAnsContext<ContactlessCardService_Read
 			t2ICAccount = track2Data.t2Account;
 			//t2ICCardSerial = track2Data.t2CardSerial;
 			t2ICCVC = track2Data.t2CVC;
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("done(ic).");
 		}
 
 		if (strnicmp(track2Data.t2Account, ddd, strlen(ddd)))
@@ -2027,10 +2027,13 @@ int CContactlessCardFSM::PreOnlineJS(SpReqAnsContext<ContactlessCardService_Read
 
 
 	//80 1e 80 0008 328ab54bfc986b85 07010103a0b000010a010000000000754048769000
-	if (m_pCardProcess->GetP1() == 0x1)
+	if (m_pCardProcess->GetP1() == 0x1) {
 		actionType = "ARQC";
-	else
+	}
+	else {
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("<PreOnlineJS>, actionType is empty");
 		actionType = "";
+	}
 	//【55域】
 	//	基本域:
 	//	9F26	8b	应用密文AC