Browse Source

!10864 去掉ReadJS请求中已废弃的aid字段
Merge pull request !10864 from 80174847/oilyang_fixed_everything

杨诗友80174847 1 month ago
parent
commit
57c22fcefc

+ 1 - 3
Module/mod_CardIssuerStand/CardIssuerStand.xml

@@ -287,9 +287,7 @@
 			<req>
 				<!--读取模式:1 读磁、2 读芯,接触优先、3 读芯,非接优先、4 读芯,只走非接、5 读磁读芯,接触优先、6 读磁读芯非接优先、7 读磁读芯,只走非接-->
 				<param name="mode" type="int" />
-				<!--Aid列表-->
-				<param name="aid" type="string"/>
-				<!--业务数据-->
+				<!--业务数据。aid提供,按照TLV的格式加到businessData,终端应用按照指定的aid进行尝试接触IC读取-->
 				<param name="businessData" type="string"/>
 				<param name="reserved1" type="array_int"/>
 				<param name="reserved2" type="array_string"/>

+ 3 - 3
Module/mod_CardIssuerStand/CardIssuerStandFSM.cpp

@@ -1752,7 +1752,6 @@ ErrorCodeEnum CCardIssuerFSM::OpenDevice(BYTE btOpenType, const char* pDevSN)
 					DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA23B8")("sensor say:retain bin is full!回收箱满了,请及时清理!");
 				}
 			}
-			LogWarn(Severity_Low, Error_Unexpect, CardIssuer_UserErrorCode_Open_Success, "读卡器打开成功");
 			return Error_Succeed;
 		}
 		else
@@ -5868,7 +5867,7 @@ int CCardIssuerFSM::PreOnlineJS_ReadViaContact(SpReqAnsContext<CardIssuerStandSe
 	//oiltmp TODO? need to judge if need movecard to the position?
 	LOG_FUNCTION();
 	long l_beginTime, l_endTime;
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("PreOnlineJS_Contact, aid[%s], business data[%s]", ctx->Req.aid.GetData(), ctx->Req.businessData.GetData());
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("PreOnlineJS_Contact, business data[%s]", ctx->Req.businessData.GetData());
 
 	m_pCardProcess->DataInit();
 	//split the business data for pboc process
@@ -6054,7 +6053,7 @@ int CCardIssuerFSM::PreOnlineJS_ReadViaRF(SpReqAnsContext<CardIssuerStandService
 		//oiltmp move card failed, not to halt process?
 	}
 
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("PreOnlineJS_RF, aid[%s], business data[%s]", ctx->Req.aid.GetData(), ctx->Req.businessData.GetData());
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("PreOnlineJS_RF, business data[%s]", ctx->Req.businessData.GetData());
 
 	m_pCardProcess->DataInit();
 	//数据已读出,开始pmoc流程
@@ -6501,6 +6500,7 @@ int CCardIssuerFSM::ReadJS(SpReqAnsContext<CardIssuerStandService_ReadJS_Req, Ca
 	}
 		break;
 	default:
+		ctx->Answer(Error_Unexpect, CardIssuer_UserErrorCode_UnkownReadJSMode);
 		break;
 	}
 	return 0;

+ 1 - 1
Module/mod_CardIssuerStand/CardIssuerStand_UserErrorCode.h

@@ -54,6 +54,7 @@
 #define CardIssuer_UserErrorCode_InsertCardSucceed					(CardIssuer_UserErrorCode_Start + 45) //前端插卡
 
 #define CardIssuer_UserErrorCode_StandEntityInFailState				(CardIssuer_UserErrorCode_Start + 46)	//卡机处于故障态,请稍后重试,重试还有问题请联系厂商维护
+#define CardIssuer_UserErrorCode_UnkownReadJSMode					(CardIssuer_UserErrorCode_Start + 47)	//未知的ReadJS读卡模式
 
 #define CardIssuer_UserErrorCode_CardStore_SlotNum					(CardIssuer_UserErrorCode_Start + 49) //记录卡库容量
 #define CardIssuer_UserErrorCode_Invoke_Access_IniDev_Failed		(CardIssuer_UserErrorCode_Start + 50) //建立加密通道时,调用准入接口失败
@@ -159,7 +160,6 @@
 #define CardIssuer_UserErrorCode_ICCommand_RF_RecvData_Invalid      (CardIssuer_UserErrorCode_Start + 124)	//APDU接收到的非接数据无效
 #define CardIssuer_UserErrorCode_RFTypeABCommand_Failed             (CardIssuer_UserErrorCode_Start + 125)	//BuildSupportedAppList调用RFTypeABCommand失败
 //
-#define CardIssuer_UserErrorCode_Open_Success						(CardIssuer_UserErrorCode_Start + 141)	//读卡器最终打开成功
 #define CardIssuer_UserErrorCode_Open_Failed						(CardIssuer_UserErrorCode_Start + 142)	//读卡器最终打开失败
 
 

+ 1 - 2
Module/mod_CardIssuerStand/CardIssuerStand_def_g.h

@@ -664,14 +664,13 @@ struct CardIssuerStandService_GetDevInfo_Ans
 struct CardIssuerStandService_ReadJS_Req
 {
 	int mode;
-	CSimpleStringA aid;
 	CSimpleStringA businessData;
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
 
 	void Serialize(SpBuffer &Buf)
 	{
-		auto & buf = Buf & mode & aid & businessData & reserved1 & reserved2;
+		auto & buf = Buf & mode & businessData & reserved1 & reserved2;
 	}
 
 };

+ 1 - 1
Module/mod_CardIssuerStand/mod_cardissuerStand.cpp

@@ -146,7 +146,7 @@ void CardIssuerServerSession::Handle_ReadJS(SpReqAnsContext<CardIssuerStandServi
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
-	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke ReadJS req.aid=%s, req.mode=%d, req.business=%s", ctx->Req.aid.GetData(), ctx->Req.mode, ctx->Req.businessData.GetData());
+	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke ReadJS req.mode=%d, req.business=%s", ctx->Req.mode, ctx->Req.businessData.GetData());
 	m_pEntity->ReadJS(ctx);
 }
 void CardIssuerServerSession::Handle_PostOnlineJS(SpReqAnsContext<CardIssuerStandService_PostOnlineJS_Req, CardIssuerStandService_PostOnlineJS_Ans>::Pointer ctx)