Browse Source

!10218 更新分支基线
Merge pull request !10218 from 80274480/ST2

陈礼鹏80274480 1 năm trước cách đây
mục cha
commit
6264236e94
46 tập tin đã thay đổi với 8315 bổ sung2358 xóa
  1. 96 39
      DevAdapter/include/CardAssist.cpp
  2. 5 2
      DevAdapter/include/CardAssist.h
  3. 8 2
      Framework/RvcLogSdk/log_util.c
  4. 0 29
      Module/include/CommEntitySettings.hpp
  5. 0 11
      Module/include/CommEntityUtil.hpp
  6. 8 7
      Module/include/DevEntityCommBase.hpp
  7. 9 51
      Module/include/DevFSMCommBase.hpp
  8. 126 17
      Module/mod_CardIssuerStand/CardIssuerFSM.cpp
  9. 44 43
      Module/mod_CardIssuerStand/CardIssuerFSM.h
  10. 449 0
      Module/mod_CardIssuerStand/CardIssuerStand.xml
  11. 1607 0
      Module/mod_CardIssuerStand/CardIssuerStand_client_g.h
  12. 999 0
      Module/mod_CardIssuerStand/CardIssuerStand_def_g.h
  13. 5 5
      Module/mod_CardIssuerStand/CardIssuerStand_msg_g.h
  14. 1001 0
      Module/mod_CardIssuerStand/CardIssuerStand_server_g.h
  15. 3 0
      Module/mod_CardIssuerStand/CardIssuer_UserErrorCode.h
  16. 0 1001
      Module/mod_CardIssuerStand/CardIssuer_server_g.h
  17. 26 22
      Module/mod_CardIssuerStand/mod_cardissuer.cpp
  18. 44 44
      Module/mod_CardIssuerStand/mod_cardissuer.h
  19. 1 0
      Module/mod_CardReadAdapter/CMakeLists.txt
  20. 642 256
      Module/mod_CardReadAdapter/CardReadAdapterFSM.cpp
  21. 26 5
      Module/mod_CardReadAdapter/CardReadAdapterFSM.h
  22. 71 7
      Module/mod_CardReadAdapter/mod_CardReadAdapter.cpp
  23. 19 3
      Module/mod_CardReadAdapter/mod_CardReadAdapter.h
  24. 1 1
      Module/mod_cardissuerstore/CMakeLists.txt
  25. 231 141
      Module/mod_cardissuerstore/CardIssuerFSM.cpp
  26. 78 77
      Module/mod_cardissuerstore/CardIssuerFSM.h
  27. 449 0
      Module/mod_cardissuerstore/CardIssuerStore.xml
  28. 175 172
      Module/mod_cardissuerstore/CardIssuerStore_UserErrorCode.h
  29. 127 127
      Module/mod_cardissuerstore/CardIssuerStore_client_g.h
  30. 173 174
      Module/mod_cardissuerstore/CardIssuerStore_def_g.h
  31. 45 0
      Module/mod_cardissuerstore/CardIssuerStore_msg_g.h
  32. 1001 0
      Module/mod_cardissuerstore/CardIssuerStore_server_g.h
  33. 26 22
      Module/mod_cardissuerstore/mod_cardissuer.cpp
  34. 52 52
      Module/mod_cardissuerstore/mod_cardissuer.h
  35. 3 2
      Module/mod_gpio/mod_gpio.cpp
  36. 1 0
      Module/mod_guiconsole/CMakeLists.txt
  37. 8 8
      Module/mod_guiconsole/mainfrm.cpp
  38. 80 31
      Module/mod_guiconsole/mod_guiconsole.cpp
  39. 10 1
      Module/mod_healthmanager/mod_healthmanager.cpp
  40. 80 0
      Module/mod_livenessdetection/LivenessDetection.xml
  41. 179 0
      Module/mod_livenessdetection/LivenessDetection_client_g.h
  42. 76 0
      Module/mod_livenessdetection/LivenessDetection_def_g.h
  43. 112 0
      Module/mod_livenessdetection/LivenessDetection_msg_g.h
  44. 137 0
      Module/mod_livenessdetection/LivenessDetection_server_g.h
  45. 22 0
      Module/mod_livenessdetection/mod_livenessdetection.h
  46. 60 6
      Module/mod_vtmloader/VtmLoaderFSM.cpp

+ 96 - 39
DevAdapter/include/CardAssist.cpp

@@ -379,7 +379,7 @@ bool CCardProcess::DetectIfICCard(CardReadType eType, DeviceBaseClass *pCardX, i
 	cardType = 0;
 	ErrorCodeEnum eErr;
 	CSimpleStringA errMsg(true);
-	if (eType == CARD_MACHINE_ISSUER)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		l_beginTime = GetTickCount();
@@ -390,7 +390,12 @@ bool CCardProcess::DetectIfICCard(CardReadType eType, DeviceBaseClass *pCardX, i
 		if(eErr != Error_Succeed){
 			QueryLastErr(eType, errMsg);
 			errMsg = CSimpleStringA::Format("DetectIfICCard::ContactIC failed(%d):%s", eErr, errMsg.GetData());
-			LogWarn(Severity_Middle, Error_Unexpect, CardIssuer_UserErrorCode_ContactIC_Failed, errMsg.GetData());
+			if (eType == CARD_MACHINE_ISSUER) {
+				LogWarn(Severity_Middle, Error_Unexpect, CardIssuer_UserErrorCode_ContactIC_Failed, errMsg.GetData());
+			}
+			else {
+				LogWarn(Severity_Middle, Error_Unexpect, CardIssuerStore_UserErrorCode_ContactIC_Failed, errMsg.GetData());
+			}
 		}
 
 		l_beginTime = GetTickCount();
@@ -402,10 +407,22 @@ bool CCardProcess::DetectIfICCard(CardReadType eType, DeviceBaseClass *pCardX, i
 		{
 			QueryLastErr(eType, errMsg);
 			errMsg = CSimpleStringA::Format("DetectIfICCard::ActiveICCard failed(%d):%s", eErr, errMsg.GetData());
-			if (bIssue)
-				LogWarn(Severity_Middle, Error_Unexpect, CardIssuer_UserErrorCode_IssueCard_ActiveICCard_Failed, errMsg.GetData());
-			else
-				LogWarn(Severity_Middle, Error_Unexpect, CardIssuer_UserErrorCode_ActiveICCard_Failed, errMsg.GetData());
+			if (eType == CARD_MACHINE_ISSUER) {
+				if (bIssue) {
+					LogWarn(Severity_Middle, Error_Unexpect, CardIssuer_UserErrorCode_IssueCard_ActiveICCard_Failed, errMsg.GetData());
+				}
+				else {
+					LogWarn(Severity_Middle, Error_Unexpect, CardIssuer_UserErrorCode_ActiveICCard_Failed, errMsg.GetData());
+				}
+			}
+			else {
+				if (bIssue) {
+					LogWarn(Severity_Middle, Error_Unexpect, CardIssuerStore_UserErrorCode_IssueCard_ActiveICCard_Failed, errMsg.GetData());
+				}
+				else {
+					LogWarn(Severity_Middle, Error_Unexpect, CardIssuerStore_UserErrorCode_ActiveICCard_Failed, errMsg.GetData());
+				}
+			}
 			pCardI->DeactivateICCard();
 			pCardI->ReleaseIC();
 			return false;
@@ -429,7 +446,7 @@ bool CCardProcess::DetectIfICCard(CardReadType eType, DeviceBaseClass *pCardX, i
 		cardType = ch;
 		DbgInfo(CSimpleStringA::Format("Detect contactless card type %d",ch));
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		char ch;
@@ -465,7 +482,7 @@ ErrorCodeEnum CCardProcess::BuildSupportedAppList(CardReadType eType,DeviceBaseC
 	char *pse1 = "1PAY.SYS.DDF01";
 	char *pse2 = "2PAY.SYS.DDF01";//oiltmp 20160107 should change to "2PAY.SYS.DDF01"
 	
-	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_SWIPER)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE || eType == CARD_MACHINE_SWIPER)
 	{
 		tmpPse1 = strlen(pse1);
 		pData = new BYTE[tmpPse1+1];
@@ -473,7 +490,7 @@ ErrorCodeEnum CCardProcess::BuildSupportedAppList(CardReadType eType,DeviceBaseC
 		memcpy(pData, pse1, tmpPse1);
 		ConstructAPDU(cls, ins, p1, p2, tmpPse1, pData, &le);
 	}
-	else if (eType == CARD_MACHINE_RFIC || eType == CARD_MACHINE_SWIPER_RF || eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_RFIC || eType == CARD_MACHINE_SWIPER_RF || eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		tmpPse2 = strlen(pse2);
 		pData = new BYTE[tmpPse2+1];
@@ -507,7 +524,13 @@ ErrorCodeEnum CCardProcess::BuildSupportedAppList(CardReadType eType,DeviceBaseC
 		eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 		errICCommand = CardIssuer_UserErrorCode_ICCommand_Failed;
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_STORE) 
+	{
+		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
+		eErr = pCardI->ICCommand(cmdSend, cmdRecv);
+		errICCommand = CardIssuerStore_UserErrorCode_ICCommand_Failed;
+	}
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -575,7 +598,12 @@ ErrorCodeEnum CCardProcess::BuildSupportedAppList(CardReadType eType,DeviceBaseC
 						eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 						errICCommand = CardIssuer_UserErrorCode_ICCommand_Failed;
 					}
-					else if (eType == CARD_MACHINE_ISSUER_RF)
+					else if (eType == CARD_MACHINE_ISSUER_STORE) 
+					{
+						eErr = pCardI->ICCommand(cmdSend, cmdRecv);
+						errICCommand = CardIssuerStore_UserErrorCode_ICCommand_Failed;
+					}
+					else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 					{
 						eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
 						errICCommand = ContactlessCard_UserErrorCode_RFTypeABCommand_Failed;
@@ -655,9 +683,15 @@ ErrorCodeEnum CCardProcess::BuildSupportedAppList(CardReadType eType,DeviceBaseC
 			case CARD_MACHINE_ISSUER:
 				errICCommand = CardIssuer_UserErrorCode_ICCommand_RecvData_Invalid;
 				break;
+			case CARD_MACHINE_ISSUER_STORE:
+				errICCommand = CardIssuerStore_UserErrorCode_ICCommand_RecvData_Invalid;
+				break;
 			case CARD_MACHINE_ISSUER_RF:
 				errICCommand = ContactlessCard_UserErrorCode_ICCommand_RecvData_Invalid;
 				break;
+			case CARD_MACHINE_ISSUER_STORE_RF:
+				errICCommand = ContactlessCard_UserErrorCode_ICCommand_RecvData_Invalid;
+				break;
 			case CARD_MACHINE_RFIC:
 				errICCommand = ContactlessCard_UserErrorCode_ICCommand_RecvData_Invalid;
 				break;
@@ -710,7 +744,7 @@ ErrorCodeEnum CCardProcess::BuildAppListByAIDs(CardReadType eType,DeviceBaseClas
 	CmdInfo cmdSend,cmdRecv;
 
 	ErrorCodeEnum eErr = Error_Unexpect;
-	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_RF)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 	}
@@ -738,11 +772,11 @@ Step7:
 		memset(cmdSend.data,0,MAX_IC_BUFFER_SIZE);
 		memcpy(cmdSend.data,m_APDUsendBuf,m_lenAPDU);
 
-		if (eType == CARD_MACHINE_ISSUER)
+		if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 		{
 			eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 		}
-		else if (eType == CARD_MACHINE_ISSUER_RF)
+		else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 		{
 			eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
 		}
@@ -886,7 +920,13 @@ ErrorCodeEnum CCardProcess::AppSelected(CardReadType eType,DeviceBaseClass *pCar
 		eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 		errICCommand = CardIssuer_UserErrorCode_ICCommand_Failed;
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_STORE)
+	{
+		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
+		eErr = pCardI->ICCommand(cmdSend, cmdRecv);
+		errICCommand = CardIssuerStore_UserErrorCode_ICCommand_Failed;
+	}
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -936,7 +976,13 @@ ErrorCodeEnum CCardProcess::AppSelected(CardReadType eType,DeviceBaseClass *pCar
 				eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 				errICCommand = CardIssuer_UserErrorCode_ICCommand_Failed;
 			}
-			else if (eType == CARD_MACHINE_ISSUER_RF)
+			else if (eType == CARD_MACHINE_ISSUER_STORE)
+			{
+				pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
+				eErr = pCardI->ICCommand(cmdSend, cmdRecv);
+				errICCommand = CardIssuerStore_UserErrorCode_ICCommand_Failed;
+			}
+			else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 			{
 				pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 				eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -993,9 +1039,15 @@ ErrorCodeEnum CCardProcess::AppSelected(CardReadType eType,DeviceBaseClass *pCar
 			case CARD_MACHINE_ISSUER:
 				errICCommand = CardIssuer_UserErrorCode_ICCommand_RecvData_Invalid;
 				break;
+			case CARD_MACHINE_ISSUER_STORE:
+				errICCommand = CardIssuerStore_UserErrorCode_ICCommand_RecvData_Invalid;
+				break;
 			case CARD_MACHINE_ISSUER_RF:
 				errICCommand = ContactlessCard_UserErrorCode_ICCommand_RecvData_Invalid;
 				break;
+			case CARD_MACHINE_ISSUER_STORE_RF:
+				errICCommand = ContactlessCard_UserErrorCode_ICCommand_RecvData_Invalid;
+				break;
 			case CARD_MACHINE_RFIC:
 				errICCommand = ContactlessCard_UserErrorCode_ICCommand_RecvData_Invalid;
 				break;
@@ -1026,7 +1078,7 @@ ErrorCodeEnum CCardProcess::ReadData(CardReadType eType,DeviceBaseClass *pCardX,
 	m_AIP[1] = data[1];
 
 	ErrorCodeEnum eErr;
-	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_RF)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 	}
@@ -1051,11 +1103,11 @@ ErrorCodeEnum CCardProcess::ReadData(CardReadType eType,DeviceBaseClass *pCardX,
 			ZeroMemory(cmdSend.data,sizeof(cmdSend.data));
 			ZeroMemory(cmdRecv.data,sizeof(cmdRecv.data));
 			memcpy(cmdSend.data,m_APDUsendBuf,m_lenAPDU);
-			if (eType == CARD_MACHINE_ISSUER)
+			if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 			{
 				eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 			}
-			else if (eType == CARD_MACHINE_ISSUER_RF)
+			else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 			{
 				eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
 			}
@@ -1151,12 +1203,12 @@ void CCardProcess::ProcessDDFRecord(CardReadType eType,DeviceBaseClass *pCardX,v
 	memcpy(cmdSend.data,m_APDUsendBuf,m_lenAPDU);
 
 	ErrorCodeEnum eErr;
-	if (eType == CARD_MACHINE_ISSUER)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -1192,11 +1244,11 @@ void CCardProcess::ProcessDDFRecord(CardReadType eType,DeviceBaseClass *pCardX,v
 					memset(cmdSend.data,0,MAX_IC_BUFFER_SIZE);
 					memcpy(cmdSend.data,m_APDUsendBuf,m_lenAPDU);
 
-					if (eType == CARD_MACHINE_ISSUER)
+					if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 					{
 						eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 					}
-					else if (eType == CARD_MACHINE_ISSUER_RF)
+					else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 					{
 						eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
 					}
@@ -1604,12 +1656,12 @@ int CCardProcess::TermActionAnalyze(CardReadType eType,DeviceBaseClass *pCardX,C
 	//DbgInfo(CSimpleStringA::Format("<TermActionAnalyze>, 1st GenAc cmd[%s]",show));
 
 	ErrorCodeEnum eErr;
-	if (eType == CARD_MACHINE_ISSUER)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -1639,11 +1691,11 @@ int CCardProcess::TermActionAnalyze(CardReadType eType,DeviceBaseClass *pCardX,C
 			ZeroMemory(show,MAX_TEST_SHOW);
 			HexBuf2StrBuf(cmdSend.data,&show,m_lenAPDU);
 			DbgInfo(CSimpleStringA::Format("get response cmd[%s]",show));
-			if (eType == CARD_MACHINE_ISSUER)
+			if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 			{
 				eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 			}
-			else if (eType == CARD_MACHINE_ISSUER_RF)
+			else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 			{
 				eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
 			}
@@ -1918,12 +1970,12 @@ int CCardProcess::IssueBankAuth(CardReadType eType,DeviceBaseClass *pCardX)
 	memcpy(cmdSend.data,m_APDUsendBuf,m_lenAPDU);
 
 	ErrorCodeEnum eErr;
-	if (eType == CARD_MACHINE_ISSUER)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -1991,7 +2043,7 @@ void CCardProcess::ExecuteIssuerScript(CardReadType eType,DeviceBaseClass *pCard
 
 	CardIssuerClass *pCardI;
 	ErrorCodeEnum eErr;
-	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_RF)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 	}
@@ -2018,11 +2070,11 @@ void CCardProcess::ExecuteIssuerScript(CardReadType eType,DeviceBaseClass *pCard
 			DbgInfo(CSimpleStringA::Format("issuer script[%s].",show));
 			delete []show;
 			//
-			if (eType == CARD_MACHINE_ISSUER)
+			if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 			{
 				eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 			}
-			else if (eType == CARD_MACHINE_ISSUER_RF)
+			else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 			{
 				eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
 			}
@@ -2098,12 +2150,12 @@ int CCardProcess::TransEnd(CardReadType eType,DeviceBaseClass *pCardX,bool bCDA)
 	DbgInfo(CSimpleStringA::Format("2nd GenAc cmd[%s]",show));
 
 	ErrorCodeEnum eErr;
-	if (eType == CARD_MACHINE_ISSUER)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -2133,11 +2185,11 @@ int CCardProcess::TransEnd(CardReadType eType,DeviceBaseClass *pCardX,bool bCDA)
 			ZeroMemory(show,MAX_TEST_SHOW);
 			HexBuf2StrBuf(cmdSend.data,&show,m_lenAPDU);
 			DbgInfo(CSimpleStringA::Format("get response cmd[%s]",show));
-			if (eType == CARD_MACHINE_ISSUER)
+			if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 			{
 				eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 			}
-			else if (eType == CARD_MACHINE_ISSUER_RF)
+			else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 			{
 				eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
 			}
@@ -2220,12 +2272,12 @@ void CCardProcess::GetBaseInfoNotInRecord(CardReadType eType,DeviceBaseClass *pC
 	memcpy(cmdSend.data,m_APDUsendBuf,m_lenAPDU);
 
 	ErrorCodeEnum eErr;
-	if (eType == CARD_MACHINE_ISSUER)
+	if (eType == CARD_MACHINE_ISSUER || eType == CARD_MACHINE_ISSUER_STORE)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->ICCommand(cmdSend,cmdRecv);
 	}
-	else if (eType == CARD_MACHINE_ISSUER_RF)
+	else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 	{
 		pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 		eErr = pCardI->RFTypeABCommand(cmdSend, cmdRecv);
@@ -2342,7 +2394,12 @@ int CCardProcess::GetICDataFromCard(CardReadType eType,DeviceBaseClass *pCardX,
 			pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 			errBuildAppList = CardIssuer_UserErrorCode_BuildSupportedAppList_Failed;
 		}
-		else if (eType == CARD_MACHINE_ISSUER_RF)
+		else if (eType == CARD_MACHINE_ISSUER_STORE)
+		{
+			pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
+			errBuildAppList = CardIssuerStore_UserErrorCode_BuildSupportedAppList_Failed;
+		}
+		else if (eType == CARD_MACHINE_ISSUER_RF || eType == CARD_MACHINE_ISSUER_STORE_RF)
 		{
 			pCardI = dynamic_cast<CardIssuerClass*>(pCardX);
 			errBuildAppList = ContactlessCard_UserErrorCode_BuildSupportedAppList_Failed;

+ 5 - 2
DevAdapter/include/CardAssist.h

@@ -6,6 +6,7 @@
 #include "CardIssuerClass.h"
 #include "RFICClass.h"
 #include "../../Module/mod_CardIssuerStand/CardIssuer_UserErrorCode.h"
+#include "../../Module/mod_cardissuerstore/CardIssuerStore_UserErrorCode.h"
 #include "../../Module/mod_ContactlessCard/ContactlessCard_UserErrorCode.h"
 
 #include <vector>
@@ -17,7 +18,9 @@ enum CardReadType
 	CARD_MACHINE_SWIPER,
 	CARD_MACHINE_RFIC,
 	CARD_MACHINE_SWIPER_RF,
-	CARD_MACHINE_ISSUER_RF
+	CARD_MACHINE_ISSUER_RF,
+	CARD_MACHINE_ISSUER_STORE,
+	CARD_MACHINE_ISSUER_STORE_RF
 };
 enum TagVectorType
 {
@@ -91,7 +94,7 @@ public:
 	{
 		DevErrorInfo devErrInfo;
 		memset(&devErrInfo, 0, sizeof(devErrInfo));
-		if (carReadType == CARD_MACHINE_ISSUER || carReadType == CARD_MACHINE_ISSUER_RF){
+		if (carReadType == CARD_MACHINE_ISSUER || carReadType == CARD_MACHINE_ISSUER_RF || carReadType == CARD_MACHINE_ISSUER_STORE || carReadType == CARD_MACHINE_ISSUER_STORE_RF){
 			pCardI->GetLastErr(devErrInfo);
 		}
 		else if (carReadType == CARD_MACHINE_RFIC) {

+ 8 - 2
Framework/RvcLogSdk/log_util.c

@@ -170,6 +170,10 @@ int GetLocalIP(char* ip_str)
 	char tmp[256];
 	int i;
 
+	//set to 0.0.0.0 temperatorily, need to be fixed later
+	strcpy(ip_str, "0.0.0.0");
+	return 0;
+
 	if (strlen(exist_ip_str) != 0)
 	{
 		strcpy(ip_str, exist_ip_str);
@@ -177,8 +181,10 @@ int GetLocalIP(char* ip_str)
 	}
 	__try {
 		ent = gethostbyname(tmp);
-	} __except (EXCEPTION_EXECUTE_HANDLER) {
-		strcpy(ip_str, "");
+	}
+	__except (EXCEPTION_EXECUTE_HANDLER) {
+		strcpy(ip_str, "0.0.0.0");
+		strcpy(exist_ip_str, "0.0.0.0");
 		return -1;
 	}
 

+ 0 - 29
Module/include/CommEntitySettings.hpp

@@ -75,35 +75,6 @@ static inline bool IsUsingSubBranchServerConfig(CEntityBase* pEntity)
     return (enable == 1);
 }
 
-/*!
- * @brief 先从集中配置中读取信息,如果没有,再从本地cfg实体配置文件读取信息
- * section 使用实体名称,从 GetFunction()->GetEntityName中获取
- * @param[in]  retStrValue 不为空,则说明读的时字符串,retDwValue 不为空说明读取的是数字,不能都为空,也不能都不为空
- * @param[out] 
- * @return : 
- */
-static inline ErrorCodeEnum ReadConfigFromCenterSettings(
-    CEntityBase* pEntity, LPCTSTR lpcszKey, CSimpleStringA* retStrValue, int* retValue)
-{
-    ErrorCodeEnum result(Error_Succeed);
-    if ((lpcszKey == NULL || strlen(lpcszKey) == 0)
-        || (retStrValue == NULL && retValue == NULL)
-        || (retStrValue != NULL && retValue != NULL)
-        || pEntity == NULL) {
-
-        return Error_Param;
-    }
-
-    CSmartPointer<IConfigInfo> pCenConfig;
-    result = pEntity->GetFunction()->OpenConfig(Config_CenterSetting, pCenConfig);
-    if (retStrValue != NULL) {
-        result = pCenConfig->ReadConfigValue(pEntity->GetEntityName(), lpcszKey, *retStrValue);
-    } else if(retValue != NULL) {
-        result = pCenConfig->ReadConfigValueInt(pEntity->GetEntityName(), lpcszKey, *retValue);
-    }
-    return result;
-}
-
 static inline void InitializeOtherLogSwitch(CEntityBase* pEntity, const CSimpleStringA& strModuleName)
 {
 	LOG_FUNCTION();

+ 0 - 11
Module/include/CommEntityUtil.hpp

@@ -253,17 +253,6 @@ CSimpleStringA GetCurrMachineType(CEntityBase* pEntity)
     pEntity->GetFunction()->GetSystemStaticInfo(sysInfo);
     return sysInfo.strMachineType;
 }
-
-inline
-CSimpleStringA GetCurrEntityConfigPath(CEntityBase* pEntity)
-{
-    CSimpleStringA strConfigDir(true);
-    pEntity->GetFunction()->GetPath("cfg", strConfigDir);
-    CSimpleStringA result(strConfigDir + SPLIT_SLASH_STR + pEntity->GetEntityName() + ".ini");
-    Dbg("config path: %s", result.GetData());
-    return result;
-}
-
             enum Site
             {
                 CMB_UNKNOWN,

+ 8 - 7
Module/include/DevEntityCommBase.hpp

@@ -155,8 +155,12 @@ inline ErrorCodeEnum CDevAdptEntityBase::ExtractVendorLibName()
 	ErrorCodeEnum erroCode = GetFunction()->OpenConfig(Config_Root, spRootConfig);
 	if (IS_SUCCEED(erroCode)) 
 	{
-		CSimpleStringA strSection = CSimpleStringA("Device.") + GetEntityName();
-		vendorLibInfo.strDevice = GetEntityName();
+		CSimpleStringA strDeviceEntityName = GetEntityName();
+		if (strDeviceEntityName.Compare("CardIssuerStore", true) == 0 || strDeviceEntityName.Compare("CardIssuerStand", true) == 0) {
+			strDeviceEntityName = "CardIssuer";
+		}
+		CSimpleStringA strSection = CSimpleStringA("Device.") + strDeviceEntityName;
+		vendorLibInfo.strDevice = strDeviceEntityName;
 		spRootConfig->ReadConfigValue(strSection, "Vendor", vendorLibInfo.strVendor);
 		spRootConfig->ReadConfigValue(strSection, "Version", vendorLibInfo.strVersion);
 		spRootConfig->ReadConfigValue(strSection, "Batch", vendorLibInfo.strBatch);
@@ -209,11 +213,8 @@ inline void CDevAdptEntityBase::InitializeVendorLogSwitch()
 	GetFunction()->OpenConfig(Config_CenterSetting, centerConfig);
 
 	CSimpleStringA str;
-	centerConfig->ReadConfigValue(GetEntityName(), vendorLibInfo.strVendor, str);
-	if (str.IsNullOrEmpty()) {
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("To get config [All]  key...");
-		centerConfig->ReadConfigValue(GetEntityName(), "All", str);
-	}
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("To get config [All]  key...");
+	centerConfig->ReadConfigValue(GetEntityName(), "All", str);
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("All: %s", str.GetData());
 
 	if (!str.IsNullOrEmpty()) {

+ 9 - 51
Module/include/DevFSMCommBase.hpp

@@ -648,18 +648,6 @@ struct ErrorPackage {
 	ErrorPackage() :msgHead(true), devSN(true), devErrCode(Error_Succeed), apiErrCode(0) {}
 };
 
-///*TODO(80374374@3/31/2023):  */
-/*
-	CEntityStaticInfo esi = {0};
-	ErrorCodeEnum ec = GetEntityBase()->GetFunction()->GetEntityStaticInfo(
-		GetEntityBase()->GetEntityName(), esi);
-	if(ec == Error_Succeed)
-	{
-		DbgSysInfoWithLink("wEntityDevelopID: 0x%X", esi.wEntityDevelopID);
-		HARDWARE_ENTITY_RESET_ENTITYID(m_entCode, esi.wEntityDevelopID);
-	}
-*/
-
 struct DevEntityErrorCode {
 
 	DWORD dwEntityId;
@@ -705,7 +693,8 @@ class CCommDevFSM : public FSMImpl<TFSM>
 public:
 	CCommDevFSM() :m_FirstStart(TRUE), m_bOpened(false), m_bOpening(false), m_csAlarmMsg("No more information"), m_contiErrTimes(0)
 	{
-		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("CardIssuer", 0x2030021f));
+		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("CardIssuerStand", 0x2030021f));
+		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("CardIssuerStore", 0x2200021f));
 		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("ContactlessCard", 0x21300203));
 		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("CardSwiper", 0x20200207));
 		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("FingerPrint", 0x20400211));
@@ -716,7 +705,8 @@ public:
 		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("WatchDog", 0x20d00201));
 		m_WarnCodeMap.insert(std::make_pair<std::string, DWORD>("Ups", 0x20e00201));
 
-		m_RootIniCodeMap.insert(std::make_pair<std::string, DWORD>("CardIssuer", 0x20300299));
+		m_RootIniCodeMap.insert(std::make_pair<std::string, DWORD>("CardIssuerStand", 0x20300299));
+		m_RootIniCodeMap.insert(std::make_pair<std::string, DWORD>("CardIssuerStore", 0x22000299));
 		m_RootIniCodeMap.insert(std::make_pair<std::string, DWORD>("ContactlessCard", 0x21300224));
 		m_RootIniCodeMap.insert(std::make_pair<std::string, DWORD>("CardSwiper", 0x20200238));
 		m_RootIniCodeMap.insert(std::make_pair<std::string, DWORD>("FingerPrint", 0x20400229));
@@ -785,11 +775,11 @@ public:
 		this->GetEntityBase()->GetFunction()->OpenConfig(Config_Root, spConfigRoot);
 
 		CSimpleStringA entityName(this->GetEntityBase()->GetEntityName());
+		if (entityName.Compare("CardIssuerStore", true) == 0 || entityName.Compare("CardIssuerStand", true) == 0) {
+			entityName = "CardIssuer";
+		}
 		CSimpleStringA sectionName = CSimpleStringA::Format("Device.%s", entityName.GetData());
-		CSimpleStringA csVendor(true), csVersion(true), csBatch(true), csPort(true), csBaudrate(true);
-		//spConfigRoot->ReadConfigValue(sectionName.GetData(), "Vendor", csVendor);
-		//spConfigRoot->ReadConfigValue(sectionName.GetData(), "Version", csVersion);
-		//spConfigRoot->ReadConfigValue(sectionName.GetData(), "Batch", csBatch);
+		CSimpleStringA csPort(true), csBaudrate(true);
 		spConfigRoot->ReadConfigValue(sectionName.GetData(), "Port", csPort);
 		spConfigRoot->ReadConfigValue(sectionName.GetData(), "Baudrate", csBaudrate);
 
@@ -883,7 +873,6 @@ public:
 	{
 		CSimpleStringA entityName(this->GetEntityBase()->GetEntityName());
 		std::map<std::string, std::string> rootInfo;
-#if 1
 		rootInfo["Vendor"] = m_adapterInfo.strVendor.GetData();
 		rootInfo["Version"] = m_adapterInfo.strVersion.GetData();
 		rootInfo["Batch"] = m_adapterInfo.strBatch.GetData();
@@ -897,36 +886,6 @@ public:
 			rootInfo["Checkdata"] = m_adapterInfo.strCheckdata.GetData();
 			rootInfo["Keysn"] = m_adapterInfo.strKeysn.GetData();
 		}
-#else
-		CSmartPointer<IConfigInfo> spConfigRoot;
-		this->GetEntityBase()->GetFunction()->OpenConfig(Config_Root, spConfigRoot);
-		CSimpleStringA sectionName = CSimpleStringA::Format("Device.%s", entityName.GetData());
-		CSimpleStringA csVendor(true), csVersion(true), csBatch(true), csPort(true), csBaudrate(true);
-		spConfigRoot->ReadConfigValue(sectionName.GetData(), "Vendor", csVendor);
-		spConfigRoot->ReadConfigValue(sectionName.GetData(), "Version", csVersion);
-		spConfigRoot->ReadConfigValue(sectionName.GetData(), "Batch", csBatch);
-		spConfigRoot->ReadConfigValue(sectionName.GetData(), "Port", csPort);
-		spConfigRoot->ReadConfigValue(sectionName.GetData(), "Baudrate", csBaudrate);
-
-		CSimpleStringA csPortNum(true), csCheckData(true), csKeySN(true), csInOutDir(true);
-		rootInfo["Vendor"] = csVendor;
-		rootInfo["Version"] = csVersion;
-		rootInfo["Batch"] = csBatch;
-		rootInfo["Port"] = csPort;
-		rootInfo["Baudrate"] = csBaudrate;
-
-		if (!entityName.Compare("Gpio")) {
-			spConfigRoot->ReadConfigValue(sectionName.GetData(), "PortNum", csPortNum);
-			spConfigRoot->ReadConfigValue(sectionName.GetData(), "InOutDir", csInOutDir);
-			rootInfo["PortNum"] = csPortNum;
-			rootInfo["InOutDir"] = csInOutDir;
-		} else if (!entityName.Compare("PinPad")) {
-			spConfigRoot->ReadConfigValue(sectionName.GetData(), "Checkdata", csCheckData);
-			spConfigRoot->ReadConfigValue(sectionName.GetData(), "Keysn", csKeySN);
-			rootInfo["Checkdata"] = csCheckData;
-			rootInfo["Keysn"] = csKeySN;
-		}
-#endif
 
         std::pair<bool, std::string> strResult;
         strResult = generateJsonStr(rootInfo);
@@ -953,7 +912,6 @@ public:
 	bool ToLogWarnInfoAboutTermExtend(std::map<std::string, std::string> additionalParams)
 	{
 		bool bUpload(false);
-		CSimpleStringA entityName(this->GetEntityBase()->GetEntityName());
 		int fileSize = 0;
 		//calculate file hash value
 		std::map<std::string, std::string> termInfo;
@@ -1001,6 +959,7 @@ public:
 			strFileHash = nullptr;
 		}
 
+		CSimpleStringA entityName(this->GetEntityBase()->GetEntityName());
 		if (!entityName.Compare("Gpio")) {
 			termInfo["PortNum"] = m_adapterInfo.strPortNum.GetData();
 			termInfo["InOutDir"] = m_adapterInfo.strInOutDir.GetData();
@@ -1122,7 +1081,6 @@ protected:
 	{
         CEntityStaticInfo esi = { 0 };
         ErrorCodeEnum ec = this->GetEntityBase()->GetFunction()->GetEntityStaticInfo(this->GetEntityBase()->GetEntityName(), esi);
-
         if (ec == Error_Succeed) {
             DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("wEntityDevelopID: 0x%X", esi.wEntityDevelopID);
             m_entCode.ResetWithEntityID(esi.wEntityDevelopID);

+ 126 - 17
Module/mod_CardIssuerStand/CardIssuerFSM.cpp

@@ -8,7 +8,7 @@
 //oilyang@20200522 go on using
 // deprecated!! [4/17/2020 16:15 @Gifur]
 #include "CardIssuer_UserErrorCode.h"	//后续替代EventCode.h,暂时混合使用,时间太紧
-#include "CardIssuer_msg_g.h"
+#include "CardIssuerStand_msg_g.h"
 #include "ModuleMix.h"
 
 #include "publicFunExport.h"
@@ -1178,6 +1178,95 @@ ErrorCodeEnum CCardIssuerFSM::OnInit()
 	m_minorVerion = sysInfo.MachineVersion.GetMinor();
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("CardIssuer, MachineType:%s, Site:%s, TerminalNo:%s, MachineVersion:%d.%d",
 		m_csMachineType.GetData(), m_csSite.GetData(), m_terminalNo.GetData(), m_majorVerion, m_minorVerion));
+
+	//因替换实体名,需要兼容把以前旧的运行时文件拷贝成新的实体名运行文件
+	CSimpleStringA runinfoPath(true);
+	CSmartPointer<IConfigInfo> spConfig;
+	ErrorCodeEnum  err = GetEntityBase()->GetFunction()->GetPath("RunInfo", runinfoPath);
+	if (err != Error_Succeed) {
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("get system RunInfo value failed.");
+		return Error_Exception;
+	}
+	err = GetEntityBase()->GetFunction()->OpenConfig(Config_Run, spConfig);
+	if (err != Error_Succeed) {
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("get cfg file failed ");
+		return err;
+	}
+
+	CSimpleStringA runinfoOldFile = runinfoPath + SPLIT_SLASH_STR + "runcfg" + SPLIT_SLASH_STR + "CardIssuer.ini"; 
+	CSimpleStringA runinfoNewFile = runinfoPath + SPLIT_SLASH_STR + "runcfg" + SPLIT_SLASH_STR + "CardIssuerStand.ini";
+
+	int enterMainPageInt = 0;
+
+	if (ExistsFile(runinfoNewFile.GetData())) {
+		if (ExistsFile(runinfoOldFile)) {
+			//新在,旧也在,新进入首页则不拷贝,否则重新拷贝
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("CardIssuerStand.ini is Exist. CardIssuer.ini is Exist");
+			spConfig->ReadConfigValueInt("all", "enterMainPage", enterMainPageInt);
+			if (enterMainPageInt == 2) {
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("CardIssuerStand.ini is Exist. enterMainPage=%d, no recopy", enterMainPageInt);
+			}
+			else if (enterMainPageInt == 1) {
+				//先删再拷贝
+				if (RemoveFileA(runinfoNewFile.GetData())) {
+					if (CopyFileA(runinfoOldFile.GetData(), runinfoNewFile.GetData(), FALSE)) {
+						LogWarn(Severity_Low, Error_Unexpect, CardIssuer_UserErrorCode_CopyRuncfg, "Recopy old CardIssuer.ini succ");
+						spConfig->WriteConfigValueInt("all", "enterMainPage", 1);//写入初值
+					}
+					else {
+#ifdef RVC_OS_WIN
+						DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Recopy old CardIssuer.ini failed.err=%d", (int)GetLastError());
+#else
+						DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Recopy old CardIssuer.ini failed.err=%d", errno);
+#endif
+						return Error_Exception;
+					}
+				}
+				else {
+#ifdef RVC_OS_WIN
+					DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("remove CardIssuerStand.ini failed.err=%d", (int)GetLastError());
+#else
+					DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("remove CardIssuerStand.ini failed.err=%d", errno);
+#endif
+					return Error_Exception;
+				}
+			}
+			else {
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("CardIssuerStand.ini is Exist. but enterMainPage=%d is invalid, continued use CardIssuerStand.ini", enterMainPageInt);
+			}
+
+		}
+		else {
+			//新在,旧不在,不处理
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("CardIssuerStand.ini is Exist. CardIssuer.ini not Exist .enterMainPage=%d", enterMainPageInt);
+		}
+	}
+	else {
+		if (ExistsFile(runinfoOldFile)) {
+			//新不在,旧在,拷贝,附初值
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("CardIssuerStand.ini is not Exist. CardIssuer.ini is Exist");
+			if (CopyFileA(runinfoOldFile.GetData(), runinfoNewFile.GetData(), FALSE)) {
+				LogWarn(Severity_Low, Error_Unexpect, CardIssuer_UserErrorCode_CopyRuncfg, "copy old CardIssuer.ini succ.");
+				spConfig->WriteConfigValueInt("all", "enterMainPage", 1);//写入初值
+			}
+			else {
+#ifdef RVC_OS_WIN
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("copy old CardIssuer.ini failed.err=%d", (int)GetLastError());
+#else
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("copy old CardIssuer.ini failed.err=%d", errno);
+#endif
+				return Error_Exception;
+			}
+
+		}
+		else {
+			//新旧都不在,附初值
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("CardIssuerStand.ini is not Exist. CardIssuer.ini is not Exist");
+			spConfig->WriteConfigValueInt("all", "enterMainPage", 1);//写入初值
+		}
+	}
+
+
 	m_devStatus.eMedia = CI_MEDIA_NOTPRESENT;
 	m_bHasHopper[0] = false;
 	m_bHasHopper[1] = false;
@@ -1825,7 +1914,7 @@ int CCardIssuerFSM::UnAcceptCard()
 	}
 	return 1;
 }
-int CCardIssuerFSM::IssueCard(SpReqAnsContext<CardIssuerService_Issue_Req, CardIssuerService_Issue_Ans>::Pointer ctx, SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctxEx)
+int CCardIssuerFSM::IssueCard(SpReqAnsContext<CardIssuerStandService_Issue_Req, CardIssuerStandService_Issue_Ans>::Pointer ctx, SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctxEx)
 {
 	LOG_FUNCTION();
 
@@ -2162,7 +2251,7 @@ int CCardIssuerFSM::IssueCard(SpReqAnsContext<CardIssuerService_Issue_Req, CardI
 }
 
 /** 0:succeed,1:failed [Gifur@2022516]*/
-int CCardIssuerFSM::CaptureCard(SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx)
+int CCardIssuerFSM::CaptureCard(SpReqAnsContext<CardIssuerStandService_Capture_Req,CardIssuerStandService_Capture_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	if (ctx != NULL)
@@ -2219,7 +2308,7 @@ int CCardIssuerFSM::CaptureCard(SpReqAnsContext<CardIssuerService_Capture_Req,Ca
 }
 
 /** 0:succeed,1:failed [Gifur@2022516]*/
-int CCardIssuerFSM::EjectCard(SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx)
+int CCardIssuerFSM::EjectCard(SpReqAnsContext<CardIssuerStandService_Eject_Req,CardIssuerStandService_Eject_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	Sleep(300);//oilyang@20230106 for keba said "maybe we need stay for machine to prepare..."
@@ -2413,7 +2502,7 @@ Err:
 	}
 	return err;
 }
-int CCardIssuerFSM::AcceptCard(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx)
+int CCardIssuerFSM::AcceptCard(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	m_pCardProcess->DataInit();
@@ -2523,7 +2612,7 @@ int CCardIssuerFSM::SplitTrack2(CSimpleStringA pTrack2,Track2Data &decodeData)
 	return 0;
 }
 
-int CCardIssuerFSM::ReadCard(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
+int CCardIssuerFSM::ReadCard(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx)
 {
 	bool bCtOK = false;
 	memset(m_magTracks.track[0].data, 0, sizeof(m_magTracks.track[0].data));
@@ -2540,7 +2629,7 @@ int CCardIssuerFSM::ReadCard(SpReqAnsContext<CardIssuerService_Read_Req, CardIss
 	else
 		return ret;
 }
-int CCardIssuerFSM::ReadCard_Contact(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx, bool& bICOK)
+int CCardIssuerFSM::ReadCard_Contact(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx, bool& bICOK)
 {
 	bICOK = false;
 	m_currCardNo = "";
@@ -2816,7 +2905,7 @@ int CCardIssuerFSM::ReadCard_Contact(SpReqAnsContext<CardIssuerService_Read_Req,
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040220303")("ReadCard suc.");
 	return 0;
 }
-int CCardIssuerFSM::ReadCard_RF(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
+int CCardIssuerFSM::ReadCard_RF(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	ErrorCodeEnum eErr, eMagReadErr;
@@ -3067,7 +3156,7 @@ int CCardIssuerFSM::ReadCard_RF(SpReqAnsContext<CardIssuerService_Read_Req, Card
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040220303")("ReadCard suc.");
 	return 0;
 }
-int CCardIssuerFSM::PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
+int CCardIssuerFSM::PreOnline(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx)
 {
 	if (m_bUseRFTillNext)
 		return PreOnline_RF(ctx);
@@ -3079,7 +3168,7 @@ int CCardIssuerFSM::PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, C
 	else
 		return ret;
 }
-int CCardIssuerFSM::PreOnline_Contact(SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx, bool& bICOK)
+int CCardIssuerFSM::PreOnline_Contact(SpReqAnsContext<CardIssuerStandService_PreOnline_Req,CardIssuerStandService_PreOnline_Ans>::Pointer ctx, bool& bICOK)
 {
 	LOG_FUNCTION();
 	//oilyang@20220611 only return 0;if unexpected,process and return 0
@@ -3460,7 +3549,7 @@ int CCardIssuerFSM::PreOnline_Contact(SpReqAnsContext<CardIssuerService_PreOnlin
 	ctx->Answer(Error_Succeed);
 	return 0;
 }
-int CCardIssuerFSM::PreOnline_RF(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
+int CCardIssuerFSM::PreOnline_RF(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	long l_beginTime, l_endTime;
@@ -3796,7 +3885,7 @@ int CCardIssuerFSM::PreOnline_RF(SpReqAnsContext<CardIssuerService_PreOnline_Req
 	ctx->Answer(Error_Succeed);
 	return 0;
 }
-int CCardIssuerFSM::PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
+int CCardIssuerFSM::PostOnline(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx)
 {
 	if (m_bUseRFTillNext)
 		return PostOnline_RF(ctx);
@@ -3808,7 +3897,7 @@ int CCardIssuerFSM::PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req,
 	else
 		return ret;
 }
-int CCardIssuerFSM::PostOnline_Contact(SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx, bool& bICOK)
+int CCardIssuerFSM::PostOnline_Contact(SpReqAnsContext<CardIssuerStandService_PostOnline_Req,CardIssuerStandService_PostOnline_Ans>::Pointer ctx, bool& bICOK)
 {
 	LOG_FUNCTION();
 	m_pCardProcess->DataInit();
@@ -3842,7 +3931,7 @@ int CCardIssuerFSM::PostOnline_Contact(SpReqAnsContext<CardIssuerService_PostOnl
 	ctx->Answer(Error_Succeed);
 	return 0;
 }
-int CCardIssuerFSM::PostOnline_RF(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
+int CCardIssuerFSM::PostOnline_RF(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	m_pCardProcess->DataInit();
@@ -3867,7 +3956,7 @@ int CCardIssuerFSM::PostOnline_RF(SpReqAnsContext<CardIssuerService_PostOnline_R
 	ctx->Answer(Error_Succeed);
 	return 0;
 }
-int CCardIssuerFSM::WriteCard(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx)
+int CCardIssuerFSM::WriteCard(SpReqAnsContext<CardIssuerStandService_WriteTrack_Req, CardIssuerStandService_WriteTrack_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	ErrorCodeEnum eErr;
@@ -4818,7 +4907,7 @@ bool CCardIssuerFSM::IsValidCardNo(const char *pCardNo,int len)
 	}
 	return true;
 }
-int CCardIssuerFSM::SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx)
+int CCardIssuerFSM::SAMICCommand(SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx)
 {
 	ErrorCodeEnum eErr = Error_Unexpect;
 	long l_beginTime, l_endTime;
@@ -5450,10 +5539,30 @@ int CCardIssuerFSM::JudgeCardType(CSimpleStringA cardno, bool& bMismatch)
 	//	return 3;
 	return cardType;
 }
+
+void CCardIssuerFSM::SetEnterMainPage()
+{
+	//设置运行时文件
+	CSmartPointer<IConfigInfo> spConfig;
+	int enterMainPageInt = 0;
+	ErrorCodeEnum err = GetEntityBase()->GetFunction()->OpenConfig(Config_Run, spConfig);
+	if (err != Error_Succeed) {
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("SetEnterMainPage, get cfg file failed ");
+	}
+	else {
+		//新在,旧也在,新进入首页则不拷贝,否则重新拷贝
+		spConfig->ReadConfigValueInt("all", "enterMainPage", enterMainPageInt);
+		if (2 != enterMainPageInt) {
+			spConfig->WriteConfigValueInt("all", "enterMainPage", 2);//进入首页
+			LogWarn(Severity_Low, Error_Unexpect, CardIssuer_UserErrorCode_EnterMainPage_SetFlag, "CardIssuerStand enterMainPage set succ");
+		}
+	}
+}
+
 void CCardIssuerFSM::HttpsLogCallBack(const char* logtxt) {
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("%s", logtxt);
 }
-void CCardIssuerFSM::QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx)
+void CCardIssuerFSM::QueryCIStatus(SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req, CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx)
 {
 	if (m_hDevHelper == nullptr)
 		ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);

+ 44 - 43
Module/mod_CardIssuerStand/CardIssuerFSM.h

@@ -4,7 +4,7 @@
 #pragma once
 
 #include "SpFSM.h"
-#include "CardIssuer_server_g.h"
+#include "CardIssuerStand_server_g.h"
 //#include "GUIConsole_client_g.h"
 #include "HeartBeat_client_g.h"
 #include "AccessAuthorization_client_g.h"
@@ -15,7 +15,7 @@
 #include "IHttpFunc.h"
 #include "json/json.h"
 #define REFLECTION(var) #var
-using namespace CardIssuer;
+using namespace CardIssuerStand;
 //using namespace GUIConsole;
 using namespace HeartBeat;
 using namespace AccessAuthorization;
@@ -112,7 +112,7 @@ class CardInitFinishedEvent : public FSMEvent
 public:
 	CardInitFinishedEvent() : FSMEvent(USER_EVT_INITFINISHED){}
 	~CardInitFinishedEvent(){}
-	SpReqAnsContext<CardIssuerService_Insert_Req,CardIssuerService_Insert_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Insert_Req,CardIssuerStandService_Insert_Ans>::Pointer ctx;
 
 protected:
 private:
@@ -123,7 +123,7 @@ class CardAcceptEvent : public FSMEvent
 public:
 	CardAcceptEvent() : FSMEvent(USER_EVT_ACCEPT) {}
 	~CardAcceptEvent() {}
-	SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -138,7 +138,7 @@ class CardIssueEvent : public FSMEvent
 public:
 	CardIssueEvent() : FSMEvent(USER_EVT_ISSUE) {}
 	~CardIssueEvent() {}
-	SpReqAnsContext<CardIssuerService_Issue_Req, CardIssuerService_Issue_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Issue_Req, CardIssuerStandService_Issue_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -165,7 +165,7 @@ class CardReadEvent : public FSMEvent
 public:
 	CardReadEvent() : FSMEvent(USER_EVT_READ) {}
 	~CardReadEvent() {}
-	SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -182,7 +182,7 @@ class CardReadFinishedEvent : public FSMEvent
 public:
 	CardReadFinishedEvent() : FSMEvent(USER_EVT_READ_FINISHED) {}
 	~CardReadFinishedEvent() {}
-	SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -214,7 +214,7 @@ class PreOnlineEvent : public FSMEvent
 public:
 	PreOnlineEvent() : FSMEvent(USER_EVT_PREONLINE){}
 	~PreOnlineEvent(){}
-	SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_PreOnline_Req,CardIssuerStandService_PreOnline_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
@@ -228,7 +228,7 @@ class PostOnlineEvent : public FSMEvent
 public:
 	PostOnlineEvent() : FSMEvent(USER_EVT_POSTONLINE){}
 	~PostOnlineEvent(){}
-	SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_PostOnline_Req,CardIssuerStandService_PostOnline_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
@@ -242,7 +242,7 @@ class CardCaptureEvent : public FSMEvent
 public:
 	CardCaptureEvent() : FSMEvent(USER_EVT_CAPTURE){}
 	~CardCaptureEvent(){}
-	SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Capture_Req,CardIssuerStandService_Capture_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
@@ -257,7 +257,7 @@ class CardEjectEvent : public FSMEvent
 public:
 	CardEjectEvent() : FSMEvent(USER_EVT_EJECT){}
 	~CardEjectEvent(){}
-	SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Eject_Req,CardIssuerStandService_Eject_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
@@ -271,7 +271,7 @@ class CardWriteEvent : public FSMEvent
 public:
 	CardWriteEvent() : FSMEvent(USER_EVT_WRITE){}
 	~CardWriteEvent(){}
-	SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_WriteTrack_Req,CardIssuerStandService_WriteTrack_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
@@ -288,7 +288,7 @@ class CardWriteFinishedEvent : public FSMEvent
 public:
 	CardWriteFinishedEvent() : FSMEvent(USER_EVT_WRITE_FINISHED){}
 	~CardWriteFinishedEvent(){}
-	SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_WriteTrack_Req,CardIssuerStandService_WriteTrack_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
@@ -304,7 +304,7 @@ class GetMaterialExEvent : public FSMEvent
 public:
 	GetMaterialExEvent() : FSMEvent(USER_EVT_GET_MATERIAL_EX) {}
 	~GetMaterialExEvent() {}
-	SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req, CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -318,7 +318,7 @@ class SetMaterialExEvent : public FSMEvent
 public:
 	SetMaterialExEvent() : FSMEvent(USER_EVT_SET_MATERIAL_EX){}
 	~SetMaterialExEvent(){}
-	SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req, CardIssuerStandService_SetMaterialCountEx_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -332,7 +332,7 @@ class CardIssueExEvent : public FSMEvent
 public:
 	CardIssueExEvent() : FSMEvent(USER_EVT_ISSUE_EX){}
 	~CardIssueExEvent(){}
-	SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -347,7 +347,7 @@ class SAMICCommandEvent : public FSMEvent
 public:
 	SAMICCommandEvent() : FSMEvent(USER_EVT_SAM_IC){}
 	~SAMICCommandEvent(){}
-	SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -841,23 +841,23 @@ public:
 	int Initial();
 	bool GetDevStatus(bool bPrint=true);
 	int UnAcceptCard();
-	int CaptureCard(SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx);
-	int EjectCard(SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx);
+	int CaptureCard(SpReqAnsContext<CardIssuerStandService_Capture_Req,CardIssuerStandService_Capture_Ans>::Pointer ctx);
+	int EjectCard(SpReqAnsContext<CardIssuerStandService_Eject_Req,CardIssuerStandService_Eject_Ans>::Pointer ctx);
 	int WaitFetchingCard();
-	int ReadCard(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx);
-	int PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx);
-	int PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx);
-	int ReadCard_Contact(SpReqAnsContext<CardIssuerService_Read_Req,CardIssuerService_Read_Ans>::Pointer ctx, bool& bICOK);
-	int PreOnline_Contact(SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx, bool& bICOK);
-	int PostOnline_Contact(SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx, bool& bICOK);
-	int ReadCard_RF(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx);
-	int PreOnline_RF(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx);
-	int PostOnline_RF(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx);
+	int ReadCard(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx);
+	int PreOnline(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx);
+	int PostOnline(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx);
+	int ReadCard_Contact(SpReqAnsContext<CardIssuerStandService_Read_Req,CardIssuerStandService_Read_Ans>::Pointer ctx, bool& bICOK);
+	int PreOnline_Contact(SpReqAnsContext<CardIssuerStandService_PreOnline_Req,CardIssuerStandService_PreOnline_Ans>::Pointer ctx, bool& bICOK);
+	int PostOnline_Contact(SpReqAnsContext<CardIssuerStandService_PostOnline_Req,CardIssuerStandService_PostOnline_Ans>::Pointer ctx, bool& bICOK);
+	int ReadCard_RF(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx);
+	int PreOnline_RF(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx);
+	int PostOnline_RF(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx);
 	int Reset();
 	int InternalAcceptCard();
-	int AcceptCard(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx);
-	int IssueCard(SpReqAnsContext<CardIssuerService_Issue_Req, CardIssuerService_Issue_Ans>::Pointer ctx, SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctxEx);
-	int WriteCard(SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx);
+	int AcceptCard(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx);
+	int IssueCard(SpReqAnsContext<CardIssuerStandService_Issue_Req, CardIssuerStandService_Issue_Ans>::Pointer ctx, SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctxEx);
+	int WriteCard(SpReqAnsContext<CardIssuerStandService_WriteTrack_Req,CardIssuerStandService_WriteTrack_Ans>::Pointer ctx);
 
 	bool GetWaitFlag(){return m_bWaitingAccept;}
 	void SetWaitMore(){m_bWaitAccepteMore = true;}
@@ -890,7 +890,7 @@ public:
 	int SyncDataToDB(bool bMaintain[12],bool bSetCaptured=true);//同步物料计数
 	void SetHopperNum(int hopperNum);
 	void DoExitWhenIdle();
-	int SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx);
+	int SAMICCommand(SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx);
 
 	bool WriteCardInfo(CSmartPointer<IConfigInfo> &cfgRun, const char *acc, const char* serial, int slot, bool bClear = false, bool bHasCard = false);
 	bool ReadCardInfo(CSmartPointer<IConfigInfo> &cfgRun, CSimpleStringA &acc, CSimpleStringA &serial, int slot);
@@ -914,10 +914,11 @@ public:
 	bool GetDevInitFlag() { return m_bOpened; }
 
 	void SetInWhatPage(int bValue) { m_iInWhatPage = bValue; }
+	void SetEnterMainPage();
 	void WaitCardActive();
 	static void HttpsLogCallBack(const char* logtxt);
 	int JudgeCardType(CSimpleStringA cardno, bool &bMismatch);
-	void QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx);
+	void QueryCIStatus(SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req, CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx);
 	bool RegistCardWhileCaptureCard(CSimpleStringA cardno);
 	bool SyncMaterialCount(IHttpFunc* client,SyncMaterialCountInfo syncInfo);
 protected:
@@ -994,7 +995,7 @@ struct InitTask : public ITaskSp
 struct AcceptTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx;
 	AcceptTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
@@ -1007,8 +1008,8 @@ struct AcceptTask : public ITaskSp
 struct IssueTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_Issue_Req, CardIssuerService_Issue_Ans>::Pointer ctx;
-	SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctxEx;
+	SpReqAnsContext<CardIssuerStandService_Issue_Req, CardIssuerStandService_Issue_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctxEx;
 	IssueTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
@@ -1030,7 +1031,7 @@ struct IssueTask : public ITaskSp
 
 struct ReadTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_Read_Req,CardIssuerService_Read_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Read_Req,CardIssuerStandService_Read_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	ReadTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1043,7 +1044,7 @@ struct ReadTask : public ITaskSp
 };
 struct PreOnlineTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_PreOnline_Req,CardIssuerStandService_PreOnline_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	PreOnlineTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1055,7 +1056,7 @@ struct PreOnlineTask : public ITaskSp
 };
 struct PostOnlineTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_PostOnline_Req,CardIssuerStandService_PostOnline_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	PostOnlineTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1068,7 +1069,7 @@ struct PostOnlineTask : public ITaskSp
 struct CaptureTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Capture_Req,CardIssuerStandService_Capture_Ans>::Pointer ctx;
 	CaptureTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
@@ -1079,7 +1080,7 @@ struct CaptureTask : public ITaskSp
 };
 struct EjectTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_Eject_Req,CardIssuerStandService_Eject_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	EjectTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1113,7 +1114,7 @@ struct ResetTask : public ITaskSp
 };
 struct WriteTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_WriteTrack_Req,CardIssuerStandService_WriteTrack_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	WriteTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1137,7 +1138,7 @@ struct DoExitWhenIdleTask : public ITaskSp
 struct SAMICCommandTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx;
 	SAMICCommandTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{

+ 449 - 0
Module/mod_CardIssuerStand/CardIssuerStand.xml

@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="gb2312" ?>
+<entity name="CardIssuerStand">
+	<class name="CardIssuerStandService" overlap="true" exclusive="false">	
+		<twoway name="Insert" overlap="true" method_id="0">
+			<req>
+				<param name="aid" type="string"/>
+			</req>
+			<res>
+			</res>			
+		</twoway>
+		<oneway name="CancelInsert" overlap="true" method_id="1">			
+		</oneway>
+		<oneway name="InsertWaitMore" overlap="true" method_id="2">			
+		</oneway>					
+		<twoway name="Read" overlap="true" method_id="3">
+			<req>
+				<param name="aid" type="string"/>
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="int"/>
+				<param name="reserved3" type="string"/>
+				<param name="reserved4" type="string"/>
+			</req>
+			<res>
+				<param name="track1" type="string"/>
+				<param name="track2" type="string"/>
+				<param name="track3" type="string"/>
+				<param name="ICType" type="int"/>
+				<param name="ICData" type="string"/>
+				<param name="status" type="int" />
+				<param name="t2Account" type="string" />
+				<param name="t2Region" type="string" />
+				<param name="t2CardSerial" type="string" />
+				<param name="t2CVC" type="string" />
+				<param name="t2ExpireDate" type="string" />
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="int"/>
+				<param name="reserved3" type="string"/>
+				<param name="reserved4" type="string"/>
+			</res>
+		</twoway>			
+		<twoway name="Capture" overlap="true" method_id="4">
+			<req>
+			</req>
+			<res>
+			</res>			
+		</twoway>
+		<twoway name="Eject" overlap="true" method_id="5">
+			<req>
+			</req>
+			<res>
+			</res>			
+		</twoway>						
+		<twoway name="PreOnline" overlap="true" method_id="6">
+			<req>
+				<param name="businessData" type="string"/>
+				<param name="reserved1" type="string"/>
+				<param name="reserved2" type="string"/>
+			</req>
+			<res>
+				<param name="result" type="string"/>
+			</res>			
+		</twoway>
+		<twoway name="PostOnline" overlap="true" method_id="7">
+			<req>
+				<param name="data" type="string"/>
+			</req>
+			<res>
+				<param name="result" type="string"/>
+			</res>			
+		</twoway>
+		<oneway name="Exit" overlap="true" method_id="8">			
+		</oneway>			
+		<twoway name="Issue" overlap="true" method_id="9">
+			<req>
+			</req>
+			<res>
+			</res>			
+		</twoway>				
+		<twoway name="GetMaterialCount" overlap="true" method_id="10">
+			<req>
+			</req>
+			<res>
+				<param name="remains" type="int"/>
+				<param name="captured" type="int"/>
+				<param name="issued" type="int"/>
+				<param name="mixed" type="int"/>
+			</res>			
+		</twoway>
+		<twoway name="SetMaterialCount" overlap="true" method_id="11">
+			<req>
+				<param name="remains" type="int"/>
+				<param name="captured" type="int"/>
+				<param name="issued" type="int"/>
+				<param name="bRemains" type="bool"/>
+				<param name="bCaptured" type="bool"/>				
+				<param name="bIssued" type="bool"/>
+				<param name="mixed" type="int"/>
+				<param name="bMixed" type="bool"/>
+			</req>
+			<res>
+			</res>			
+		</twoway>
+		<oneway name="SetIssueFlag" overlap="true" method_id="12">			
+		</oneway>
+		<twoway name="ReadEx" overlap="true" method_id="13">
+			<req>
+				<param name="aid" type="string"/>
+				<param name="reserved1" type="string"/>
+				<param name="reserved2" type="string"/>
+			</req>
+			<res>
+				<param name="track1" type="string"/>
+				<param name="track2" type="string"/>
+				<param name="track3" type="string"/>
+				<param name="CDType" type="int"/>
+				<param name="ICType" type="int"/>
+				<param name="CMBType" type="int"/>
+				<param name="ICData" type="string"/>
+				<param name="status" type="int" />
+				<param name="t2Account" type="string" />
+				<param name="t2Region" type="string" />
+				<param name="t2CardSerial" type="string" />
+				<param name="t2CVC" type="string" />
+				<param name="t2ExpireDate" type="string" />
+				<param name="reserved1" type="string"/>
+				<param name="reserved2" type="string"/>
+			</res>
+		</twoway>
+		<twoway name="QueryCardInfo" overlap="true" method_id="14">
+			<req>
+			</req>
+			<res>
+				<param name="position" type="int"/>
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="string"/>
+			</res>			
+		</twoway>
+		<twoway name="WriteTrack" overlap="true" method_id="15">
+			<req>
+				<param name="mode" type="int"/>
+				<param name="co" type="int"/>
+				<param name="track1" type="wstring"/>
+				<param name="track2" type="wstring"/>
+				<param name="track3" type="wstring"/>
+				<param name="reserved" type="wstring"/>
+			</req>
+			<res>
+				<param name="result" type="int"/>
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="string"/>
+			</res>
+		</twoway>
+		<twoway name="GetMaterialCountEx" overlap="true" method_id="16">
+			<req>
+				<param name="GetHopper" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>		
+			</req>
+			<res>
+				<param name="captured" type="int"/>
+				<param name="hasHopper" type="array_int"/>
+				<param name="CardBoxNo" type="array_string"/>
+				<param name="PsbCode" type="array_string"/>
+				<param name="PsbName" type="array_string"/>
+				<param name="Maintainer" type="array_string"/>
+				<param name="MaintainTime" type="array_string"/>
+				<param name="CardInit" type="array_int"/>
+				<param name="CardPercent" type="array_int"/>
+				<param name="remains" type="array_int"/>
+				<param name="issued" type="array_int"/>
+				<param name="mixed" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</res>			
+		</twoway>
+		<twoway name="SetMaterialCountEx" overlap="true" method_id="17">
+			<req>
+				<param name="SetHopper" type="array_int"/>
+				<param name="SetCaptured" type="int"/>
+				<param name="captured" type="int"/>
+				<param name="CardBoxNo" type="array_string"/>
+				<param name="PsbCode" type="array_string"/>
+				<param name="PsbName" type="array_string"/>
+				<param name="Maintainer" type="array_string"/>
+				<param name="MaintainTime" type="array_string"/>
+				<param name="CardInit" type="array_int"/>
+				<param name="CardPercent" type="array_int"/>
+				<param name="remains" type="array_int"/>
+				<param name="issued" type="array_int"/>
+				<param name="mixed" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>	
+			</res>			
+		</twoway>
+		<twoway name="SetSomeFlag" overlap="true" method_id="18">
+			<req>
+				<param name="IssueBusiness" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</res>				
+		</twoway>
+		<twoway name="GetSCIInfo" overlap="true" method_id="19">
+			<req>
+			</req>
+			<res>
+				<param name="connected" type="int"/>
+				<param name="DevSN" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</res>			
+		</twoway>
+		<twoway name="IssueEx" overlap="true" method_id="20">
+			<req>
+				<param name="hopper" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="OpenSafeLock" overlap="true" method_id="21">
+			<req>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="SAMICCommand" overlap="true" method_id="22">
+			<req>
+				<param name="cmdType" type="int"/>
+				<param name="param1" type="array_int"/>
+				<param name="param2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="ret1" type="array_int"/>
+				<param name="ret2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="QueryPrinterStatus" overlap="true" method_id="23">
+			<req>
+				<param name="param1" type="array_int"/>
+				<param name="param2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="ret1" type="array_int"/>
+				<param name="ret2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="Print" overlap="true" method_id="24">
+			<req>
+				<param name="data1" type="blob"/>
+				<param name="data2" type="blob"/>
+				<param name="data3" type="blob"/>
+				<param name="data4" type="blob"/>
+				<param name="data5" type="blob"/>
+				<param name="data6" type="blob"/>				
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="QuerySCIList" overlap="true" method_id="25">
+			<req>			
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="sciNo" type="array_string"/>
+        <param name="arrMateriel" type="array_string"/>
+        <param name="CardGroove" type="array_string"/>
+        <param name="CardBoxNo" type="array_string"/>
+        <param name="PsbCode" type="array_string"/>
+        <param name="PsbName" type="array_string"/>
+        <param name="CardInit" type="array_uint"/>
+        <param name="CardRemains" type="array_uint"/>
+        <param name="CardIssued" type="array_uint"/>
+        <param name="CardMixed" type="array_uint"/>
+        <param name="CardPercent" type="array_uint"/>
+        <param name="Maintainer" type="array_string"/>
+        <param name="MaintainTime" type="array_string"/>
+        <param name="UpdateTime" type="array_string"/>				
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>		
+		<twoway name="BindSCI" overlap="true" method_id="26">
+			<req>
+				<param name="type" type="int"/>
+				<param name="sciNo" type="string" />			
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="PreOnlineOnStore" overlap="true" method_id="27">
+			<req>
+				<param name="account" type="string"/>
+				<param name="termNo" type="string"/>
+				<param name="businessData" type="string"/>
+				<param name="slot" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="findCard" type="int"/>
+				<param name="cardPos" type="int"/>
+				<param name="result" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="NotifyPreonline" overlap="true" method_id="28">
+			<req>
+				<param name="findCard" type="int"/>
+				<param name="cardPos" type="int"/>			
+				<param name="errCode" type="int"/>			
+				<param name="account" type="string"/>
+				<param name="termNo" type="string"/>
+				<param name="data" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="QueryCardInfoOnStore" overlap="true" method_id="29">
+			<req>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="findCard" type="int"/>
+				<param name="cardPos" type="int"/>					
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="GetAddCardInfo" overlap="true" method_id="30">
+			<req>
+				<param name="isSync" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="count" type="int"/>
+				<param name="slot" type="array_int"/>
+				<param name="account" type="array_string"/>							
+				<param name="cardSerial" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>		
+		<twoway name="PrintCardImmediately" overlap="true" method_id="31">
+			<req>
+				<param name="formFile" type="string"/>
+				<param name="printData" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="ret" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="QueryCIStatus" overlap="true" method_id="32">
+			<req>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="retainBin" type="int"/>
+				<param name="hopperNo" type="array_int"/>
+				<param name="hopperStatus" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>																		
+		<twoway name="GetDevInfo" overlap="true" method_id="65535">
+			<req>
+			</req>
+			<res>
+				<param name="type" type="string" />
+				<param name="model" type="string" />
+				<param name="version" type="string" />
+				<param name="state" type="int" />
+			</res>			
+		</twoway>							
+	</class>
+	<message name="FetchCard">
+			<param name="status" type="int"/>
+	</message>
+	<message name="SCIConnect">
+			<param name="status" type="int"/>
+	</message>			
+</entity>

+ 1607 - 0
Module/mod_CardIssuerStand/CardIssuerStand_client_g.h

@@ -0,0 +1,1607 @@
+
+#ifndef __CARDISSUERSTAND_CLIENT_G_H
+#define __CARDISSUERSTAND_CLIENT_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "CardIssuerStand_def_g.h"
+
+namespace CardIssuerStand {
+class CardIssuerStandService_ClientBase : public CClientSessionBase {
+public:
+	explicit CardIssuerStandService_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
+
+	CardIssuerStandService_ClientBase* operator () (const linkContext &curLink) 
+	{
+		m_context = curLink;
+		return this;
+	}
+
+protected:
+	virtual ~CardIssuerStandService_ClientBase()
+	{
+		/// override by user
+	}
+public:
+
+	void OnConnectSucceed()
+	{
+		bSessionClosed = false;
+	}
+	void OnClose(ErrorCodeEnum)
+	{
+		Dbg("session closed.");
+		bSessionClosed = true;
+	}
+	bool QuerySessionClosed()
+	{
+		return bSessionClosed;
+	}
+	ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
+	{
+		CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
+		ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "CardIssuerStand", "CardIssuerStandService", spAsyncWait);
+		if (Error == Error_Succeed) {
+			m_bSysManaged = true;
+			bSessionClosed = false;
+		}
+		return Error;
+	}
+	ErrorCodeEnum Connect()
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Connect(spAsyncWait);
+		if (Error == Error_Succeed) {
+			Error = spAsyncWait->WaitAnswer();
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum Insert(CardIssuerStandService_Insert_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_Insert, CardIssuerStandService_MethodSignature_Insert, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum Insert(CardIssuerStandService_Insert_Req &Req, CardIssuerStandService_Insert_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Insert(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Insert(CardIssuerStandService_Insert_Req &Req, CardIssuerStandService_Insert_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Insert(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Insert(CardIssuerStandService_Insert_Req &Req, CardIssuerStandService_Insert_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Insert(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum CancelInsert()
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->OnewayCall(CardIssuerStandService_Method_CancelInsert, CardIssuerStandService_MethodSignature_CancelInsert, m_context);
+		m_context.clear();
+		return ret;
+	}
+
+	ErrorCodeEnum InsertWaitMore()
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->OnewayCall(CardIssuerStandService_Method_InsertWaitMore, CardIssuerStandService_MethodSignature_InsertWaitMore, m_context);
+		m_context.clear();
+		return ret;
+	}
+
+	ErrorCodeEnum Read(CardIssuerStandService_Read_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_Read, CardIssuerStandService_MethodSignature_Read, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum Read(CardIssuerStandService_Read_Req &Req, CardIssuerStandService_Read_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Read(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Read(CardIssuerStandService_Read_Req &Req, CardIssuerStandService_Read_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Read(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Read(CardIssuerStandService_Read_Req &Req, CardIssuerStandService_Read_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Read(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum Capture(CardIssuerStandService_Capture_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_Capture, CardIssuerStandService_MethodSignature_Capture, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum Capture(CardIssuerStandService_Capture_Req &Req, CardIssuerStandService_Capture_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Capture(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Capture(CardIssuerStandService_Capture_Req &Req, CardIssuerStandService_Capture_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Capture(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Capture(CardIssuerStandService_Capture_Req &Req, CardIssuerStandService_Capture_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Capture(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum Eject(CardIssuerStandService_Eject_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_Eject, CardIssuerStandService_MethodSignature_Eject, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum Eject(CardIssuerStandService_Eject_Req &Req, CardIssuerStandService_Eject_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Eject(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Eject(CardIssuerStandService_Eject_Req &Req, CardIssuerStandService_Eject_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Eject(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Eject(CardIssuerStandService_Eject_Req &Req, CardIssuerStandService_Eject_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Eject(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum PreOnline(CardIssuerStandService_PreOnline_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_PreOnline, CardIssuerStandService_MethodSignature_PreOnline, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum PreOnline(CardIssuerStandService_PreOnline_Req &Req, CardIssuerStandService_PreOnline_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PreOnline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PreOnline(CardIssuerStandService_PreOnline_Req &Req, CardIssuerStandService_PreOnline_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PreOnline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PreOnline(CardIssuerStandService_PreOnline_Req &Req, CardIssuerStandService_PreOnline_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PreOnline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum PostOnline(CardIssuerStandService_PostOnline_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_PostOnline, CardIssuerStandService_MethodSignature_PostOnline, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum PostOnline(CardIssuerStandService_PostOnline_Req &Req, CardIssuerStandService_PostOnline_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PostOnline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PostOnline(CardIssuerStandService_PostOnline_Req &Req, CardIssuerStandService_PostOnline_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PostOnline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PostOnline(CardIssuerStandService_PostOnline_Req &Req, CardIssuerStandService_PostOnline_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PostOnline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum Exit()
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->OnewayCall(CardIssuerStandService_Method_Exit, CardIssuerStandService_MethodSignature_Exit, m_context);
+		m_context.clear();
+		return ret;
+	}
+
+	ErrorCodeEnum Issue(CardIssuerStandService_Issue_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_Issue, CardIssuerStandService_MethodSignature_Issue, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum Issue(CardIssuerStandService_Issue_Req &Req, CardIssuerStandService_Issue_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Issue(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Issue(CardIssuerStandService_Issue_Req &Req, CardIssuerStandService_Issue_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Issue(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Issue(CardIssuerStandService_Issue_Req &Req, CardIssuerStandService_Issue_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Issue(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum GetMaterialCount(CardIssuerStandService_GetMaterialCount_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_GetMaterialCount, CardIssuerStandService_MethodSignature_GetMaterialCount, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum GetMaterialCount(CardIssuerStandService_GetMaterialCount_Req &Req, CardIssuerStandService_GetMaterialCount_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetMaterialCount(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetMaterialCount(CardIssuerStandService_GetMaterialCount_Req &Req, CardIssuerStandService_GetMaterialCount_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetMaterialCount(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetMaterialCount(CardIssuerStandService_GetMaterialCount_Req &Req, CardIssuerStandService_GetMaterialCount_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetMaterialCount(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum SetMaterialCount(CardIssuerStandService_SetMaterialCount_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_SetMaterialCount, CardIssuerStandService_MethodSignature_SetMaterialCount, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum SetMaterialCount(CardIssuerStandService_SetMaterialCount_Req &Req, CardIssuerStandService_SetMaterialCount_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetMaterialCount(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SetMaterialCount(CardIssuerStandService_SetMaterialCount_Req &Req, CardIssuerStandService_SetMaterialCount_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetMaterialCount(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SetMaterialCount(CardIssuerStandService_SetMaterialCount_Req &Req, CardIssuerStandService_SetMaterialCount_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetMaterialCount(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum SetIssueFlag()
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->OnewayCall(CardIssuerStandService_Method_SetIssueFlag, CardIssuerStandService_MethodSignature_SetIssueFlag, m_context);
+		m_context.clear();
+		return ret;
+	}
+
+	ErrorCodeEnum ReadEx(CardIssuerStandService_ReadEx_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_ReadEx, CardIssuerStandService_MethodSignature_ReadEx, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum ReadEx(CardIssuerStandService_ReadEx_Req &Req, CardIssuerStandService_ReadEx_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = ReadEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum ReadEx(CardIssuerStandService_ReadEx_Req &Req, CardIssuerStandService_ReadEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = ReadEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum ReadEx(CardIssuerStandService_ReadEx_Req &Req, CardIssuerStandService_ReadEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = ReadEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum QueryCardInfo(CardIssuerStandService_QueryCardInfo_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_QueryCardInfo, CardIssuerStandService_MethodSignature_QueryCardInfo, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum QueryCardInfo(CardIssuerStandService_QueryCardInfo_Req &Req, CardIssuerStandService_QueryCardInfo_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCardInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryCardInfo(CardIssuerStandService_QueryCardInfo_Req &Req, CardIssuerStandService_QueryCardInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCardInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryCardInfo(CardIssuerStandService_QueryCardInfo_Req &Req, CardIssuerStandService_QueryCardInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCardInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum WriteTrack(CardIssuerStandService_WriteTrack_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_WriteTrack, CardIssuerStandService_MethodSignature_WriteTrack, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum WriteTrack(CardIssuerStandService_WriteTrack_Req &Req, CardIssuerStandService_WriteTrack_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = WriteTrack(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum WriteTrack(CardIssuerStandService_WriteTrack_Req &Req, CardIssuerStandService_WriteTrack_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = WriteTrack(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum WriteTrack(CardIssuerStandService_WriteTrack_Req &Req, CardIssuerStandService_WriteTrack_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = WriteTrack(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum GetMaterialCountEx(CardIssuerStandService_GetMaterialCountEx_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_GetMaterialCountEx, CardIssuerStandService_MethodSignature_GetMaterialCountEx, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum GetMaterialCountEx(CardIssuerStandService_GetMaterialCountEx_Req &Req, CardIssuerStandService_GetMaterialCountEx_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetMaterialCountEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetMaterialCountEx(CardIssuerStandService_GetMaterialCountEx_Req &Req, CardIssuerStandService_GetMaterialCountEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetMaterialCountEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetMaterialCountEx(CardIssuerStandService_GetMaterialCountEx_Req &Req, CardIssuerStandService_GetMaterialCountEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetMaterialCountEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum SetMaterialCountEx(CardIssuerStandService_SetMaterialCountEx_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_SetMaterialCountEx, CardIssuerStandService_MethodSignature_SetMaterialCountEx, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum SetMaterialCountEx(CardIssuerStandService_SetMaterialCountEx_Req &Req, CardIssuerStandService_SetMaterialCountEx_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetMaterialCountEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SetMaterialCountEx(CardIssuerStandService_SetMaterialCountEx_Req &Req, CardIssuerStandService_SetMaterialCountEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetMaterialCountEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SetMaterialCountEx(CardIssuerStandService_SetMaterialCountEx_Req &Req, CardIssuerStandService_SetMaterialCountEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetMaterialCountEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum SetSomeFlag(CardIssuerStandService_SetSomeFlag_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_SetSomeFlag, CardIssuerStandService_MethodSignature_SetSomeFlag, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum SetSomeFlag(CardIssuerStandService_SetSomeFlag_Req &Req, CardIssuerStandService_SetSomeFlag_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetSomeFlag(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SetSomeFlag(CardIssuerStandService_SetSomeFlag_Req &Req, CardIssuerStandService_SetSomeFlag_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetSomeFlag(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SetSomeFlag(CardIssuerStandService_SetSomeFlag_Req &Req, CardIssuerStandService_SetSomeFlag_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SetSomeFlag(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum GetSCIInfo(CardIssuerStandService_GetSCIInfo_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_GetSCIInfo, CardIssuerStandService_MethodSignature_GetSCIInfo, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum GetSCIInfo(CardIssuerStandService_GetSCIInfo_Req &Req, CardIssuerStandService_GetSCIInfo_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetSCIInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetSCIInfo(CardIssuerStandService_GetSCIInfo_Req &Req, CardIssuerStandService_GetSCIInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetSCIInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetSCIInfo(CardIssuerStandService_GetSCIInfo_Req &Req, CardIssuerStandService_GetSCIInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetSCIInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum IssueEx(CardIssuerStandService_IssueEx_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_IssueEx, CardIssuerStandService_MethodSignature_IssueEx, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum IssueEx(CardIssuerStandService_IssueEx_Req &Req, CardIssuerStandService_IssueEx_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = IssueEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum IssueEx(CardIssuerStandService_IssueEx_Req &Req, CardIssuerStandService_IssueEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = IssueEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum IssueEx(CardIssuerStandService_IssueEx_Req &Req, CardIssuerStandService_IssueEx_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = IssueEx(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum OpenSafeLock(CardIssuerStandService_OpenSafeLock_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_OpenSafeLock, CardIssuerStandService_MethodSignature_OpenSafeLock, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum OpenSafeLock(CardIssuerStandService_OpenSafeLock_Req &Req, CardIssuerStandService_OpenSafeLock_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = OpenSafeLock(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum OpenSafeLock(CardIssuerStandService_OpenSafeLock_Req &Req, CardIssuerStandService_OpenSafeLock_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = OpenSafeLock(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum OpenSafeLock(CardIssuerStandService_OpenSafeLock_Req &Req, CardIssuerStandService_OpenSafeLock_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = OpenSafeLock(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum SAMICCommand(CardIssuerStandService_SAMICCommand_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_SAMICCommand, CardIssuerStandService_MethodSignature_SAMICCommand, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum SAMICCommand(CardIssuerStandService_SAMICCommand_Req &Req, CardIssuerStandService_SAMICCommand_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SAMICCommand(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SAMICCommand(CardIssuerStandService_SAMICCommand_Req &Req, CardIssuerStandService_SAMICCommand_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SAMICCommand(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum SAMICCommand(CardIssuerStandService_SAMICCommand_Req &Req, CardIssuerStandService_SAMICCommand_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = SAMICCommand(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum QueryPrinterStatus(CardIssuerStandService_QueryPrinterStatus_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_QueryPrinterStatus, CardIssuerStandService_MethodSignature_QueryPrinterStatus, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum QueryPrinterStatus(CardIssuerStandService_QueryPrinterStatus_Req &Req, CardIssuerStandService_QueryPrinterStatus_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryPrinterStatus(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryPrinterStatus(CardIssuerStandService_QueryPrinterStatus_Req &Req, CardIssuerStandService_QueryPrinterStatus_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryPrinterStatus(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryPrinterStatus(CardIssuerStandService_QueryPrinterStatus_Req &Req, CardIssuerStandService_QueryPrinterStatus_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryPrinterStatus(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum Print(CardIssuerStandService_Print_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_Print, CardIssuerStandService_MethodSignature_Print, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum Print(CardIssuerStandService_Print_Req &Req, CardIssuerStandService_Print_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Print(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Print(CardIssuerStandService_Print_Req &Req, CardIssuerStandService_Print_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Print(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum Print(CardIssuerStandService_Print_Req &Req, CardIssuerStandService_Print_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Print(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum QuerySCIList(CardIssuerStandService_QuerySCIList_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_QuerySCIList, CardIssuerStandService_MethodSignature_QuerySCIList, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum QuerySCIList(CardIssuerStandService_QuerySCIList_Req &Req, CardIssuerStandService_QuerySCIList_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QuerySCIList(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QuerySCIList(CardIssuerStandService_QuerySCIList_Req &Req, CardIssuerStandService_QuerySCIList_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QuerySCIList(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QuerySCIList(CardIssuerStandService_QuerySCIList_Req &Req, CardIssuerStandService_QuerySCIList_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QuerySCIList(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum BindSCI(CardIssuerStandService_BindSCI_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_BindSCI, CardIssuerStandService_MethodSignature_BindSCI, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum BindSCI(CardIssuerStandService_BindSCI_Req &Req, CardIssuerStandService_BindSCI_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = BindSCI(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum BindSCI(CardIssuerStandService_BindSCI_Req &Req, CardIssuerStandService_BindSCI_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = BindSCI(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum BindSCI(CardIssuerStandService_BindSCI_Req &Req, CardIssuerStandService_BindSCI_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = BindSCI(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum PreOnlineOnStore(CardIssuerStandService_PreOnlineOnStore_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_PreOnlineOnStore, CardIssuerStandService_MethodSignature_PreOnlineOnStore, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum PreOnlineOnStore(CardIssuerStandService_PreOnlineOnStore_Req &Req, CardIssuerStandService_PreOnlineOnStore_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PreOnlineOnStore(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PreOnlineOnStore(CardIssuerStandService_PreOnlineOnStore_Req &Req, CardIssuerStandService_PreOnlineOnStore_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PreOnlineOnStore(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PreOnlineOnStore(CardIssuerStandService_PreOnlineOnStore_Req &Req, CardIssuerStandService_PreOnlineOnStore_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PreOnlineOnStore(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum NotifyPreonline(CardIssuerStandService_NotifyPreonline_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_NotifyPreonline, CardIssuerStandService_MethodSignature_NotifyPreonline, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum NotifyPreonline(CardIssuerStandService_NotifyPreonline_Req &Req, CardIssuerStandService_NotifyPreonline_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = NotifyPreonline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum NotifyPreonline(CardIssuerStandService_NotifyPreonline_Req &Req, CardIssuerStandService_NotifyPreonline_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = NotifyPreonline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum NotifyPreonline(CardIssuerStandService_NotifyPreonline_Req &Req, CardIssuerStandService_NotifyPreonline_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = NotifyPreonline(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum QueryCardInfoOnStore(CardIssuerStandService_QueryCardInfoOnStore_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_QueryCardInfoOnStore, CardIssuerStandService_MethodSignature_QueryCardInfoOnStore, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum QueryCardInfoOnStore(CardIssuerStandService_QueryCardInfoOnStore_Req &Req, CardIssuerStandService_QueryCardInfoOnStore_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCardInfoOnStore(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryCardInfoOnStore(CardIssuerStandService_QueryCardInfoOnStore_Req &Req, CardIssuerStandService_QueryCardInfoOnStore_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCardInfoOnStore(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryCardInfoOnStore(CardIssuerStandService_QueryCardInfoOnStore_Req &Req, CardIssuerStandService_QueryCardInfoOnStore_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCardInfoOnStore(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum GetAddCardInfo(CardIssuerStandService_GetAddCardInfo_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_GetAddCardInfo, CardIssuerStandService_MethodSignature_GetAddCardInfo, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum GetAddCardInfo(CardIssuerStandService_GetAddCardInfo_Req &Req, CardIssuerStandService_GetAddCardInfo_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetAddCardInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetAddCardInfo(CardIssuerStandService_GetAddCardInfo_Req &Req, CardIssuerStandService_GetAddCardInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetAddCardInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetAddCardInfo(CardIssuerStandService_GetAddCardInfo_Req &Req, CardIssuerStandService_GetAddCardInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetAddCardInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum PrintCardImmediately(CardIssuerStandService_PrintCardImmediately_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_PrintCardImmediately, CardIssuerStandService_MethodSignature_PrintCardImmediately, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum PrintCardImmediately(CardIssuerStandService_PrintCardImmediately_Req &Req, CardIssuerStandService_PrintCardImmediately_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PrintCardImmediately(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PrintCardImmediately(CardIssuerStandService_PrintCardImmediately_Req &Req, CardIssuerStandService_PrintCardImmediately_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PrintCardImmediately(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum PrintCardImmediately(CardIssuerStandService_PrintCardImmediately_Req &Req, CardIssuerStandService_PrintCardImmediately_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = PrintCardImmediately(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum QueryCIStatus(CardIssuerStandService_QueryCIStatus_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_QueryCIStatus, CardIssuerStandService_MethodSignature_QueryCIStatus, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum QueryCIStatus(CardIssuerStandService_QueryCIStatus_Req &Req, CardIssuerStandService_QueryCIStatus_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCIStatus(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryCIStatus(CardIssuerStandService_QueryCIStatus_Req &Req, CardIssuerStandService_QueryCIStatus_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCIStatus(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum QueryCIStatus(CardIssuerStandService_QueryCIStatus_Req &Req, CardIssuerStandService_QueryCIStatus_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = QueryCIStatus(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum GetDevInfo(CardIssuerStandService_GetDevInfo_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(CardIssuerStandService_Method_GetDevInfo, CardIssuerStandService_MethodSignature_GetDevInfo, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum GetDevInfo(CardIssuerStandService_GetDevInfo_Req &Req, CardIssuerStandService_GetDevInfo_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetDevInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetDevInfo(CardIssuerStandService_GetDevInfo_Req &Req, CardIssuerStandService_GetDevInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetDevInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum GetDevInfo(CardIssuerStandService_GetDevInfo_Req &Req, CardIssuerStandService_GetDevInfo_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = GetDevInfo(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+
+	bool SafeDelete()
+	{
+		if (!m_bSysManaged) {
+			delete this;
+		}
+		return m_bSysManaged;
+	}
+
+protected:
+	bool m_bSysManaged;
+	CEntityBase *m_pEntityBase;
+	linkContext m_context;
+	bool bSessionClosed;
+};
+
+///////////////////////////
+
+} // namespace CardIssuerStand
+#endif // __CARDISSUERSTAND_CLIENT_G_H

+ 999 - 0
Module/mod_CardIssuerStand/CardIssuerStand_def_g.h

@@ -0,0 +1,999 @@
+#ifndef __CARDISSUERSTAND_DEF_G_H
+#define __CARDISSUERSTAND_DEF_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "SpHelper.h"
+
+namespace CardIssuerStand {
+//
+// const goes here
+//
+
+#define CardIssuerStandService_Method_Insert 0
+#define CardIssuerStandService_Method_CancelInsert 1
+#define CardIssuerStandService_Method_InsertWaitMore 2
+#define CardIssuerStandService_Method_Read 3
+#define CardIssuerStandService_Method_Capture 4
+#define CardIssuerStandService_Method_Eject 5
+#define CardIssuerStandService_Method_PreOnline 6
+#define CardIssuerStandService_Method_PostOnline 7
+#define CardIssuerStandService_Method_Exit 8
+#define CardIssuerStandService_Method_Issue 9
+#define CardIssuerStandService_Method_GetMaterialCount 10
+#define CardIssuerStandService_Method_SetMaterialCount 11
+#define CardIssuerStandService_Method_SetIssueFlag 12
+#define CardIssuerStandService_Method_ReadEx 13
+#define CardIssuerStandService_Method_QueryCardInfo 14
+#define CardIssuerStandService_Method_WriteTrack 15
+#define CardIssuerStandService_Method_GetMaterialCountEx 16
+#define CardIssuerStandService_Method_SetMaterialCountEx 17
+#define CardIssuerStandService_Method_SetSomeFlag 18
+#define CardIssuerStandService_Method_GetSCIInfo 19
+#define CardIssuerStandService_Method_IssueEx 20
+#define CardIssuerStandService_Method_OpenSafeLock 21
+#define CardIssuerStandService_Method_SAMICCommand 22
+#define CardIssuerStandService_Method_QueryPrinterStatus 23
+#define CardIssuerStandService_Method_Print 24
+#define CardIssuerStandService_Method_QuerySCIList 25
+#define CardIssuerStandService_Method_BindSCI 26
+#define CardIssuerStandService_Method_PreOnlineOnStore 27
+#define CardIssuerStandService_Method_NotifyPreonline 28
+#define CardIssuerStandService_Method_QueryCardInfoOnStore 29
+#define CardIssuerStandService_Method_GetAddCardInfo 30
+#define CardIssuerStandService_Method_PrintCardImmediately 31
+#define CardIssuerStandService_Method_QueryCIStatus 32
+#define CardIssuerStandService_Method_GetDevInfo 65535
+
+#define CardIssuerStandService_MethodSignature_Insert 1091033773
+#define CardIssuerStandService_MethodSignature_CancelInsert -1202478828
+#define CardIssuerStandService_MethodSignature_InsertWaitMore 493791658
+#define CardIssuerStandService_MethodSignature_Read 591445479
+#define CardIssuerStandService_MethodSignature_Capture -1807054569
+#define CardIssuerStandService_MethodSignature_Eject -377455114
+#define CardIssuerStandService_MethodSignature_PreOnline 640958030
+#define CardIssuerStandService_MethodSignature_PostOnline 923284555
+#define CardIssuerStandService_MethodSignature_Exit -1158854104
+#define CardIssuerStandService_MethodSignature_Issue 438783077
+#define CardIssuerStandService_MethodSignature_GetMaterialCount -605917749
+#define CardIssuerStandService_MethodSignature_SetMaterialCount 870103115
+#define CardIssuerStandService_MethodSignature_SetIssueFlag 187641303
+#define CardIssuerStandService_MethodSignature_ReadEx -842531343
+#define CardIssuerStandService_MethodSignature_QueryCardInfo 154962579
+#define CardIssuerStandService_MethodSignature_WriteTrack -1424799012
+#define CardIssuerStandService_MethodSignature_GetMaterialCountEx 1356148904
+#define CardIssuerStandService_MethodSignature_SetMaterialCountEx -1512312761
+#define CardIssuerStandService_MethodSignature_SetSomeFlag -2033418025
+#define CardIssuerStandService_MethodSignature_GetSCIInfo 1097494981
+#define CardIssuerStandService_MethodSignature_IssueEx 1390328640
+#define CardIssuerStandService_MethodSignature_OpenSafeLock 177980614
+#define CardIssuerStandService_MethodSignature_SAMICCommand 406988293
+#define CardIssuerStandService_MethodSignature_QueryPrinterStatus -890728447
+#define CardIssuerStandService_MethodSignature_Print 2096006675
+#define CardIssuerStandService_MethodSignature_QuerySCIList -1772231453
+#define CardIssuerStandService_MethodSignature_BindSCI -1242011672
+#define CardIssuerStandService_MethodSignature_PreOnlineOnStore 158325869
+#define CardIssuerStandService_MethodSignature_NotifyPreonline -808637659
+#define CardIssuerStandService_MethodSignature_QueryCardInfoOnStore 1217447214
+#define CardIssuerStandService_MethodSignature_GetAddCardInfo 684031940
+#define CardIssuerStandService_MethodSignature_PrintCardImmediately -1976184201
+#define CardIssuerStandService_MethodSignature_QueryCIStatus -1907000703
+#define CardIssuerStandService_MethodSignature_GetDevInfo 296205965
+
+#define CardIssuerStandService_LogCode_Insert "QLR040220300"
+#define CardIssuerStandService_LogCode_CancelInsert "QLR040220301"
+#define CardIssuerStandService_LogCode_InsertWaitMore "QLR040220302"
+#define CardIssuerStandService_LogCode_Read "QLR040220303"
+#define CardIssuerStandService_LogCode_Capture "QLR040220304"
+#define CardIssuerStandService_LogCode_Eject "QLR040220305"
+#define CardIssuerStandService_LogCode_PreOnline "QLR040220306"
+#define CardIssuerStandService_LogCode_PostOnline "QLR040220307"
+#define CardIssuerStandService_LogCode_Exit "QLR040220308"
+#define CardIssuerStandService_LogCode_Issue "QLR040220309"
+#define CardIssuerStandService_LogCode_GetMaterialCount "QLR040220310"
+#define CardIssuerStandService_LogCode_SetMaterialCount "QLR040220311"
+#define CardIssuerStandService_LogCode_SetIssueFlag "QLR040220312"
+#define CardIssuerStandService_LogCode_ReadEx "QLR040220313"
+#define CardIssuerStandService_LogCode_QueryCardInfo "QLR040220314"
+#define CardIssuerStandService_LogCode_WriteTrack "QLR040220315"
+#define CardIssuerStandService_LogCode_GetMaterialCountEx "QLR040220316"
+#define CardIssuerStandService_LogCode_SetMaterialCountEx "QLR040220317"
+#define CardIssuerStandService_LogCode_SetSomeFlag "QLR040220318"
+#define CardIssuerStandService_LogCode_GetSCIInfo "QLR040220319"
+#define CardIssuerStandService_LogCode_IssueEx "QLR040220320"
+#define CardIssuerStandService_LogCode_OpenSafeLock "QLR040220321"
+#define CardIssuerStandService_LogCode_SAMICCommand "QLR040220322"
+#define CardIssuerStandService_LogCode_QueryPrinterStatus "QLR040220323"
+#define CardIssuerStandService_LogCode_Print "QLR040220324"
+#define CardIssuerStandService_LogCode_QuerySCIList "QLR040220325"
+#define CardIssuerStandService_LogCode_BindSCI "QLR040220326"
+#define CardIssuerStandService_LogCode_PreOnlineOnStore "QLR040220327"
+#define CardIssuerStandService_LogCode_NotifyPreonline "QLR040220328"
+#define CardIssuerStandService_LogCode_QueryCardInfoOnStore "QLR040220329"
+#define CardIssuerStandService_LogCode_GetAddCardInfo "QLR040220330"
+#define CardIssuerStandService_LogCode_PrintCardImmediately "QLR040220331"
+#define CardIssuerStandService_LogCode_QueryCIStatus "QLR040220332"
+#define CardIssuerStandService_LogCode_GetDevInfo "QLR040220399"
+
+struct CardIssuerStandService_Insert_Req
+{
+	CSimpleStringA aid;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & aid;
+	}
+
+};
+
+struct CardIssuerStandService_Insert_Ans
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_CancelInsert_Info
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_InsertWaitMore_Info
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_Read_Req
+{
+	CSimpleStringA aid;
+	int reserved1;
+	int reserved2;
+	CSimpleStringA reserved3;
+	CSimpleStringA reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & aid & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_Read_Ans
+{
+	CSimpleStringA track1;
+	CSimpleStringA track2;
+	CSimpleStringA track3;
+	int ICType;
+	CSimpleStringA ICData;
+	int status;
+	CSimpleStringA t2Account;
+	CSimpleStringA t2Region;
+	CSimpleStringA t2CardSerial;
+	CSimpleStringA t2CVC;
+	CSimpleStringA t2ExpireDate;
+	int reserved1;
+	int reserved2;
+	CSimpleStringA reserved3;
+	CSimpleStringA reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & track1 & track2 & track3 & ICType & ICData & status & t2Account & t2Region & t2CardSerial & t2CVC & t2ExpireDate & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_Capture_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_Capture_Ans
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_Eject_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_Eject_Ans
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_PreOnline_Req
+{
+	CSimpleStringA businessData;
+	CSimpleStringA reserved1;
+	CSimpleStringA reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & businessData & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_PreOnline_Ans
+{
+	CSimpleStringA result;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & result;
+	}
+
+};
+
+struct CardIssuerStandService_PostOnline_Req
+{
+	CSimpleStringA data;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & data;
+	}
+
+};
+
+struct CardIssuerStandService_PostOnline_Ans
+{
+	CSimpleStringA result;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & result;
+	}
+
+};
+
+struct CardIssuerStandService_Exit_Info
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_Issue_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_Issue_Ans
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_GetMaterialCount_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_GetMaterialCount_Ans
+{
+	int remains;
+	int captured;
+	int issued;
+	int mixed;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & remains & captured & issued & mixed;
+	}
+
+};
+
+struct CardIssuerStandService_SetMaterialCount_Req
+{
+	int remains;
+	int captured;
+	int issued;
+	bool bRemains;
+	bool bCaptured;
+	bool bIssued;
+	int mixed;
+	bool bMixed;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & remains & captured & issued & bRemains & bCaptured & bIssued & mixed & bMixed;
+	}
+
+};
+
+struct CardIssuerStandService_SetMaterialCount_Ans
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_SetIssueFlag_Info
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_ReadEx_Req
+{
+	CSimpleStringA aid;
+	CSimpleStringA reserved1;
+	CSimpleStringA reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & aid & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_ReadEx_Ans
+{
+	CSimpleStringA track1;
+	CSimpleStringA track2;
+	CSimpleStringA track3;
+	int CDType;
+	int ICType;
+	int CMBType;
+	CSimpleStringA ICData;
+	int status;
+	CSimpleStringA t2Account;
+	CSimpleStringA t2Region;
+	CSimpleStringA t2CardSerial;
+	CSimpleStringA t2CVC;
+	CSimpleStringA t2ExpireDate;
+	CSimpleStringA reserved1;
+	CSimpleStringA reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & track1 & track2 & track3 & CDType & ICType & CMBType & ICData & status & t2Account & t2Region & t2CardSerial & t2CVC & t2ExpireDate & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_QueryCardInfo_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_QueryCardInfo_Ans
+{
+	int position;
+	int reserved1;
+	CSimpleStringA reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & position & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_WriteTrack_Req
+{
+	int mode;
+	int co;
+	CSimpleStringW track1;
+	CSimpleStringW track2;
+	CSimpleStringW track3;
+	CSimpleStringW reserved;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & mode & co & track1 & track2 & track3 & reserved;
+	}
+
+};
+
+struct CardIssuerStandService_WriteTrack_Ans
+{
+	int result;
+	int reserved1;
+	CSimpleStringA reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & result & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_GetMaterialCountEx_Req
+{
+	CAutoArray<int> GetHopper;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & GetHopper & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_GetMaterialCountEx_Ans
+{
+	int captured;
+	CAutoArray<int> hasHopper;
+	CAutoArray<CSimpleStringA> CardBoxNo;
+	CAutoArray<CSimpleStringA> PsbCode;
+	CAutoArray<CSimpleStringA> PsbName;
+	CAutoArray<CSimpleStringA> Maintainer;
+	CAutoArray<CSimpleStringA> MaintainTime;
+	CAutoArray<int> CardInit;
+	CAutoArray<int> CardPercent;
+	CAutoArray<int> remains;
+	CAutoArray<int> issued;
+	CAutoArray<int> mixed;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & captured & hasHopper & CardBoxNo & PsbCode & PsbName & Maintainer & MaintainTime & CardInit & CardPercent & remains & issued & mixed & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_SetMaterialCountEx_Req
+{
+	CAutoArray<int> SetHopper;
+	int SetCaptured;
+	int captured;
+	CAutoArray<CSimpleStringA> CardBoxNo;
+	CAutoArray<CSimpleStringA> PsbCode;
+	CAutoArray<CSimpleStringA> PsbName;
+	CAutoArray<CSimpleStringA> Maintainer;
+	CAutoArray<CSimpleStringA> MaintainTime;
+	CAutoArray<int> CardInit;
+	CAutoArray<int> CardPercent;
+	CAutoArray<int> remains;
+	CAutoArray<int> issued;
+	CAutoArray<int> mixed;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & SetHopper & SetCaptured & captured & CardBoxNo & PsbCode & PsbName & Maintainer & MaintainTime & CardInit & CardPercent & remains & issued & mixed & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_SetMaterialCountEx_Ans
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_SetSomeFlag_Req
+{
+	int IssueBusiness;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & IssueBusiness & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_SetSomeFlag_Ans
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_GetSCIInfo_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_GetSCIInfo_Ans
+{
+	int connected;
+	CSimpleStringA DevSN;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & connected & DevSN & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_IssueEx_Req
+{
+	int hopper;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & hopper & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_IssueEx_Ans
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_OpenSafeLock_Req
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_OpenSafeLock_Ans
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_SAMICCommand_Req
+{
+	int cmdType;
+	CAutoArray<int> param1;
+	CAutoArray<CSimpleStringA> param2;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & cmdType & param1 & param2 & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_SAMICCommand_Ans
+{
+	CAutoArray<int> ret1;
+	CAutoArray<CSimpleStringA> ret2;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ret1 & ret2 & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_QueryPrinterStatus_Req
+{
+	CAutoArray<int> param1;
+	CAutoArray<CSimpleStringA> param2;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & param1 & param2 & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_QueryPrinterStatus_Ans
+{
+	CAutoArray<int> ret1;
+	CAutoArray<CSimpleStringA> ret2;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ret1 & ret2 & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_Print_Req
+{
+	CBlob data1;
+	CBlob data2;
+	CBlob data3;
+	CBlob data4;
+	CBlob data5;
+	CBlob data6;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & data1 & data2 & data3 & data4 & data5 & data6 & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_Print_Ans
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_QuerySCIList_Req
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_QuerySCIList_Ans
+{
+	CAutoArray<CSimpleStringA> sciNo;
+	CAutoArray<CSimpleStringA> arrMateriel;
+	CAutoArray<CSimpleStringA> CardGroove;
+	CAutoArray<CSimpleStringA> CardBoxNo;
+	CAutoArray<CSimpleStringA> PsbCode;
+	CAutoArray<CSimpleStringA> PsbName;
+	CAutoArray<unsigned int> CardInit;
+	CAutoArray<unsigned int> CardRemains;
+	CAutoArray<unsigned int> CardIssued;
+	CAutoArray<unsigned int> CardMixed;
+	CAutoArray<unsigned int> CardPercent;
+	CAutoArray<CSimpleStringA> Maintainer;
+	CAutoArray<CSimpleStringA> MaintainTime;
+	CAutoArray<CSimpleStringA> UpdateTime;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & sciNo & arrMateriel & CardGroove & CardBoxNo & PsbCode & PsbName & CardInit & CardRemains & CardIssued & CardMixed & CardPercent & Maintainer & MaintainTime & UpdateTime & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_BindSCI_Req
+{
+	int type;
+	CSimpleStringA sciNo;
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & type & sciNo & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_BindSCI_Ans
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<CSimpleStringA> reserved2;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2;
+	}
+
+};
+
+struct CardIssuerStandService_PreOnlineOnStore_Req
+{
+	CSimpleStringA account;
+	CSimpleStringA termNo;
+	CSimpleStringA businessData;
+	int slot;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & account & termNo & businessData & slot & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_PreOnlineOnStore_Ans
+{
+	int findCard;
+	int cardPos;
+	CSimpleStringA result;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & findCard & cardPos & result & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_NotifyPreonline_Req
+{
+	int findCard;
+	int cardPos;
+	int errCode;
+	CSimpleStringA account;
+	CSimpleStringA termNo;
+	CSimpleStringA data;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & findCard & cardPos & errCode & account & termNo & data & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_NotifyPreonline_Ans
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_QueryCardInfoOnStore_Req
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_QueryCardInfoOnStore_Ans
+{
+	int findCard;
+	int cardPos;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & findCard & cardPos & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_GetAddCardInfo_Req
+{
+	int isSync;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & isSync & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_GetAddCardInfo_Ans
+{
+	int count;
+	CAutoArray<int> slot;
+	CAutoArray<CSimpleStringA> account;
+	CAutoArray<CSimpleStringA> cardSerial;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & count & slot & account & cardSerial & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_PrintCardImmediately_Req
+{
+	CSimpleStringA formFile;
+	CSimpleStringA printData;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & formFile & printData & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_PrintCardImmediately_Ans
+{
+	int ret;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ret & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_QueryCIStatus_Req
+{
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_QueryCIStatus_Ans
+{
+	int retainBin;
+	CAutoArray<int> hopperNo;
+	CAutoArray<int> hopperStatus;
+	CAutoArray<int> reserved1;
+	CAutoArray<int> reserved2;
+	CAutoArray<CSimpleStringA> reserved3;
+	CAutoArray<CSimpleStringA> reserved4;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & retainBin & hopperNo & hopperStatus & reserved1 & reserved2 & reserved3 & reserved4;
+	}
+
+};
+
+struct CardIssuerStandService_GetDevInfo_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct CardIssuerStandService_GetDevInfo_Ans
+{
+	CSimpleStringA type;
+	CSimpleStringA model;
+	CSimpleStringA version;
+	int state;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & type & model & version & state;
+	}
+
+};
+
+
+///////////////////////////
+
+} // namespace CardIssuerStand
+
+#endif // __CARDISSUERSTAND_DEF_G_H

+ 5 - 5
Module/mod_CardIssuerStand/CardIssuer_msg_g.h → Module/mod_CardIssuerStand/CardIssuerStand_msg_g.h

@@ -1,6 +1,6 @@
 
-#ifndef __CARDISSUER_MSG_G_H
-#define __CARDISSUER_MSG_G_H
+#ifndef __CARDISSUERSTAND_MSG_G_H
+#define __CARDISSUERSTAND_MSG_G_H
 
 #pragma once
 
@@ -8,7 +8,7 @@
 
 #include "SpHelper.h"
 
-namespace CardIssuer {
+namespace CardIssuerStand {
 #define eMsg_FetchCard 0
 #define eMsg_SCIConnect 1
 
@@ -41,5 +41,5 @@ struct SCIConnect
 
 ///////////////////////////
 
-} // namespace CardIssuer
-#endif // __CARDISSUER_MSG_G_H
+} // namespace CardIssuerStand
+#endif // __CARDISSUERSTAND_MSG_G_H

+ 1001 - 0
Module/mod_CardIssuerStand/CardIssuerStand_server_g.h

@@ -0,0 +1,1001 @@
+
+#ifndef __CARDISSUERSTAND_SERVER_G_H
+#define __CARDISSUERSTAND_SERVER_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "CardIssuerStand_def_g.h"
+
+namespace CardIssuerStand {
+class CardIssuerStandService_ServerSessionBase : public CServerSessionBase
+{
+public:
+	CardIssuerStandService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual ~CardIssuerStandService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual bool IsExclusive() { return false; }
+
+	virtual bool IsSessionOverlap() { return true; }
+
+	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		case CardIssuerStandService_Method_Insert:
+			if (dwSignature == CardIssuerStandService_MethodSignature_Insert) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_CancelInsert:
+			if (dwSignature == CardIssuerStandService_MethodSignature_CancelInsert) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_InsertWaitMore:
+			if (dwSignature == CardIssuerStandService_MethodSignature_InsertWaitMore) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Read:
+			if (dwSignature == CardIssuerStandService_MethodSignature_Read) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Capture:
+			if (dwSignature == CardIssuerStandService_MethodSignature_Capture) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Eject:
+			if (dwSignature == CardIssuerStandService_MethodSignature_Eject) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PreOnline:
+			if (dwSignature == CardIssuerStandService_MethodSignature_PreOnline) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PostOnline:
+			if (dwSignature == CardIssuerStandService_MethodSignature_PostOnline) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Exit:
+			if (dwSignature == CardIssuerStandService_MethodSignature_Exit) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Issue:
+			if (dwSignature == CardIssuerStandService_MethodSignature_Issue) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetMaterialCount:
+			if (dwSignature == CardIssuerStandService_MethodSignature_GetMaterialCount) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetMaterialCount:
+			if (dwSignature == CardIssuerStandService_MethodSignature_SetMaterialCount) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetIssueFlag:
+			if (dwSignature == CardIssuerStandService_MethodSignature_SetIssueFlag) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_ReadEx:
+			if (dwSignature == CardIssuerStandService_MethodSignature_ReadEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryCardInfo:
+			if (dwSignature == CardIssuerStandService_MethodSignature_QueryCardInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_WriteTrack:
+			if (dwSignature == CardIssuerStandService_MethodSignature_WriteTrack) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetMaterialCountEx:
+			if (dwSignature == CardIssuerStandService_MethodSignature_GetMaterialCountEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetMaterialCountEx:
+			if (dwSignature == CardIssuerStandService_MethodSignature_SetMaterialCountEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetSomeFlag:
+			if (dwSignature == CardIssuerStandService_MethodSignature_SetSomeFlag) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetSCIInfo:
+			if (dwSignature == CardIssuerStandService_MethodSignature_GetSCIInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_IssueEx:
+			if (dwSignature == CardIssuerStandService_MethodSignature_IssueEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_OpenSafeLock:
+			if (dwSignature == CardIssuerStandService_MethodSignature_OpenSafeLock) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SAMICCommand:
+			if (dwSignature == CardIssuerStandService_MethodSignature_SAMICCommand) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryPrinterStatus:
+			if (dwSignature == CardIssuerStandService_MethodSignature_QueryPrinterStatus) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Print:
+			if (dwSignature == CardIssuerStandService_MethodSignature_Print) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QuerySCIList:
+			if (dwSignature == CardIssuerStandService_MethodSignature_QuerySCIList) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_BindSCI:
+			if (dwSignature == CardIssuerStandService_MethodSignature_BindSCI) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PreOnlineOnStore:
+			if (dwSignature == CardIssuerStandService_MethodSignature_PreOnlineOnStore) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_NotifyPreonline:
+			if (dwSignature == CardIssuerStandService_MethodSignature_NotifyPreonline) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryCardInfoOnStore:
+			if (dwSignature == CardIssuerStandService_MethodSignature_QueryCardInfoOnStore) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetAddCardInfo:
+			if (dwSignature == CardIssuerStandService_MethodSignature_GetAddCardInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PrintCardImmediately:
+			if (dwSignature == CardIssuerStandService_MethodSignature_PrintCardImmediately) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryCIStatus:
+			if (dwSignature == CardIssuerStandService_MethodSignature_QueryCIStatus) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetDevInfo:
+			if (dwSignature == CardIssuerStandService_MethodSignature_GetDevInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		case CardIssuerStandService_Method_Insert:
+			if (dwSignature != CardIssuerStandService_MethodSignature_Insert) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_CancelInsert:
+			if (dwSignature != CardIssuerStandService_MethodSignature_CancelInsert) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_InsertWaitMore:
+			if (dwSignature != CardIssuerStandService_MethodSignature_InsertWaitMore) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Read:
+			if (dwSignature != CardIssuerStandService_MethodSignature_Read) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Capture:
+			if (dwSignature != CardIssuerStandService_MethodSignature_Capture) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Eject:
+			if (dwSignature != CardIssuerStandService_MethodSignature_Eject) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PreOnline:
+			if (dwSignature != CardIssuerStandService_MethodSignature_PreOnline) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PostOnline:
+			if (dwSignature != CardIssuerStandService_MethodSignature_PostOnline) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Exit:
+			if (dwSignature != CardIssuerStandService_MethodSignature_Exit) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Issue:
+			if (dwSignature != CardIssuerStandService_MethodSignature_Issue) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetMaterialCount:
+			if (dwSignature != CardIssuerStandService_MethodSignature_GetMaterialCount) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetMaterialCount:
+			if (dwSignature != CardIssuerStandService_MethodSignature_SetMaterialCount) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetIssueFlag:
+			if (dwSignature != CardIssuerStandService_MethodSignature_SetIssueFlag) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_ReadEx:
+			if (dwSignature != CardIssuerStandService_MethodSignature_ReadEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryCardInfo:
+			if (dwSignature != CardIssuerStandService_MethodSignature_QueryCardInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_WriteTrack:
+			if (dwSignature != CardIssuerStandService_MethodSignature_WriteTrack) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetMaterialCountEx:
+			if (dwSignature != CardIssuerStandService_MethodSignature_GetMaterialCountEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetMaterialCountEx:
+			if (dwSignature != CardIssuerStandService_MethodSignature_SetMaterialCountEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SetSomeFlag:
+			if (dwSignature != CardIssuerStandService_MethodSignature_SetSomeFlag) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetSCIInfo:
+			if (dwSignature != CardIssuerStandService_MethodSignature_GetSCIInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_IssueEx:
+			if (dwSignature != CardIssuerStandService_MethodSignature_IssueEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_OpenSafeLock:
+			if (dwSignature != CardIssuerStandService_MethodSignature_OpenSafeLock) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_SAMICCommand:
+			if (dwSignature != CardIssuerStandService_MethodSignature_SAMICCommand) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryPrinterStatus:
+			if (dwSignature != CardIssuerStandService_MethodSignature_QueryPrinterStatus) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_Print:
+			if (dwSignature != CardIssuerStandService_MethodSignature_Print) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QuerySCIList:
+			if (dwSignature != CardIssuerStandService_MethodSignature_QuerySCIList) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_BindSCI:
+			if (dwSignature != CardIssuerStandService_MethodSignature_BindSCI) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PreOnlineOnStore:
+			if (dwSignature != CardIssuerStandService_MethodSignature_PreOnlineOnStore) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_NotifyPreonline:
+			if (dwSignature != CardIssuerStandService_MethodSignature_NotifyPreonline) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryCardInfoOnStore:
+			if (dwSignature != CardIssuerStandService_MethodSignature_QueryCardInfoOnStore) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetAddCardInfo:
+			if (dwSignature != CardIssuerStandService_MethodSignature_GetAddCardInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_PrintCardImmediately:
+			if (dwSignature != CardIssuerStandService_MethodSignature_PrintCardImmediately) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_QueryCIStatus:
+			if (dwSignature != CardIssuerStandService_MethodSignature_QueryCIStatus) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStandService_Method_GetDevInfo:
+			if (dwSignature != CardIssuerStandService_MethodSignature_GetDevInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	virtual void Handle_Insert(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_CancelInsert(SpOnewayCallContext<CardIssuerStandService_CancelInsert_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerStandService_InsertWaitMore_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Read(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Capture(SpReqAnsContext<CardIssuerStandService_Capture_Req, CardIssuerStandService_Capture_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Eject(SpReqAnsContext<CardIssuerStandService_Eject_Req, CardIssuerStandService_Eject_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PreOnline(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PostOnline(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Exit(SpOnewayCallContext<CardIssuerStandService_Exit_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Issue(SpReqAnsContext<CardIssuerStandService_Issue_Req, CardIssuerStandService_Issue_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetMaterialCount(SpReqAnsContext<CardIssuerStandService_GetMaterialCount_Req, CardIssuerStandService_GetMaterialCount_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetMaterialCount(SpReqAnsContext<CardIssuerStandService_SetMaterialCount_Req, CardIssuerStandService_SetMaterialCount_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerStandService_SetIssueFlag_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_ReadEx(SpReqAnsContext<CardIssuerStandService_ReadEx_Req, CardIssuerStandService_ReadEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryCardInfo(SpReqAnsContext<CardIssuerStandService_QueryCardInfo_Req, CardIssuerStandService_QueryCardInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_WriteTrack(SpReqAnsContext<CardIssuerStandService_WriteTrack_Req, CardIssuerStandService_WriteTrack_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req, CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req, CardIssuerStandService_SetMaterialCountEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetSomeFlag(SpReqAnsContext<CardIssuerStandService_SetSomeFlag_Req, CardIssuerStandService_SetSomeFlag_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetSCIInfo(SpReqAnsContext<CardIssuerStandService_GetSCIInfo_Req, CardIssuerStandService_GetSCIInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_IssueEx(SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_OpenSafeLock(SpReqAnsContext<CardIssuerStandService_OpenSafeLock_Req, CardIssuerStandService_OpenSafeLock_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryPrinterStatus(SpReqAnsContext<CardIssuerStandService_QueryPrinterStatus_Req, CardIssuerStandService_QueryPrinterStatus_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Print(SpReqAnsContext<CardIssuerStandService_Print_Req, CardIssuerStandService_Print_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QuerySCIList(SpReqAnsContext<CardIssuerStandService_QuerySCIList_Req, CardIssuerStandService_QuerySCIList_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_BindSCI(SpReqAnsContext<CardIssuerStandService_BindSCI_Req, CardIssuerStandService_BindSCI_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PreOnlineOnStore(SpReqAnsContext<CardIssuerStandService_PreOnlineOnStore_Req, CardIssuerStandService_PreOnlineOnStore_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_NotifyPreonline(SpReqAnsContext<CardIssuerStandService_NotifyPreonline_Req, CardIssuerStandService_NotifyPreonline_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerStandService_QueryCardInfoOnStore_Req, CardIssuerStandService_QueryCardInfoOnStore_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerStandService_GetAddCardInfo_Req, CardIssuerStandService_GetAddCardInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerStandService_PrintCardImmediately_Req, CardIssuerStandService_PrintCardImmediately_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req, CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetDevInfo(SpReqAnsContext<CardIssuerStandService_GetDevInfo_Req, CardIssuerStandService_GetDevInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
+	{
+		CAutoBuffer Buf;
+		DWORD dwMessageID;
+		DWORD dwMessageSignature;
+		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
+		if (Error == Error_Succeed) {
+#ifdef DEBUG
+			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
+#else
+			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
+				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
+				return;
+			}
+#endif
+			switch (dwMessageID) {
+				case CardIssuerStandService_Method_Insert:
+					{
+						SpReqAnsContext<CardIssuerStandService_Insert_Req,CardIssuerStandService_Insert_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_Insert_Req,CardIssuerStandService_Insert_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Insert(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_CancelInsert:
+					{
+						SpOnewayCallContext<CardIssuerStandService_CancelInsert_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStandService_CancelInsert_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_CancelInsert(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_InsertWaitMore:
+					{
+						SpOnewayCallContext<CardIssuerStandService_InsertWaitMore_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStandService_InsertWaitMore_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_InsertWaitMore(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_Read:
+					{
+						SpReqAnsContext<CardIssuerStandService_Read_Req,CardIssuerStandService_Read_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_Read_Req,CardIssuerStandService_Read_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Read(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_Capture:
+					{
+						SpReqAnsContext<CardIssuerStandService_Capture_Req,CardIssuerStandService_Capture_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_Capture_Req,CardIssuerStandService_Capture_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Capture(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_Eject:
+					{
+						SpReqAnsContext<CardIssuerStandService_Eject_Req,CardIssuerStandService_Eject_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_Eject_Req,CardIssuerStandService_Eject_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Eject(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_PreOnline:
+					{
+						SpReqAnsContext<CardIssuerStandService_PreOnline_Req,CardIssuerStandService_PreOnline_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_PreOnline_Req,CardIssuerStandService_PreOnline_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PreOnline(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_PostOnline:
+					{
+						SpReqAnsContext<CardIssuerStandService_PostOnline_Req,CardIssuerStandService_PostOnline_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_PostOnline_Req,CardIssuerStandService_PostOnline_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PostOnline(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_Exit:
+					{
+						SpOnewayCallContext<CardIssuerStandService_Exit_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStandService_Exit_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Exit(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_Issue:
+					{
+						SpReqAnsContext<CardIssuerStandService_Issue_Req,CardIssuerStandService_Issue_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_Issue_Req,CardIssuerStandService_Issue_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Issue(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_GetMaterialCount:
+					{
+						SpReqAnsContext<CardIssuerStandService_GetMaterialCount_Req,CardIssuerStandService_GetMaterialCount_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_GetMaterialCount_Req,CardIssuerStandService_GetMaterialCount_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetMaterialCount(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_SetMaterialCount:
+					{
+						SpReqAnsContext<CardIssuerStandService_SetMaterialCount_Req,CardIssuerStandService_SetMaterialCount_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_SetMaterialCount_Req,CardIssuerStandService_SetMaterialCount_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetMaterialCount(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_SetIssueFlag:
+					{
+						SpOnewayCallContext<CardIssuerStandService_SetIssueFlag_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStandService_SetIssueFlag_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetIssueFlag(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_ReadEx:
+					{
+						SpReqAnsContext<CardIssuerStandService_ReadEx_Req,CardIssuerStandService_ReadEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_ReadEx_Req,CardIssuerStandService_ReadEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_ReadEx(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_QueryCardInfo:
+					{
+						SpReqAnsContext<CardIssuerStandService_QueryCardInfo_Req,CardIssuerStandService_QueryCardInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_QueryCardInfo_Req,CardIssuerStandService_QueryCardInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryCardInfo(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_WriteTrack:
+					{
+						SpReqAnsContext<CardIssuerStandService_WriteTrack_Req,CardIssuerStandService_WriteTrack_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_WriteTrack_Req,CardIssuerStandService_WriteTrack_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_WriteTrack(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_GetMaterialCountEx:
+					{
+						SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req,CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req,CardIssuerStandService_GetMaterialCountEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetMaterialCountEx(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_SetMaterialCountEx:
+					{
+						SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req,CardIssuerStandService_SetMaterialCountEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req,CardIssuerStandService_SetMaterialCountEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetMaterialCountEx(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_SetSomeFlag:
+					{
+						SpReqAnsContext<CardIssuerStandService_SetSomeFlag_Req,CardIssuerStandService_SetSomeFlag_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_SetSomeFlag_Req,CardIssuerStandService_SetSomeFlag_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetSomeFlag(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_GetSCIInfo:
+					{
+						SpReqAnsContext<CardIssuerStandService_GetSCIInfo_Req,CardIssuerStandService_GetSCIInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_GetSCIInfo_Req,CardIssuerStandService_GetSCIInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetSCIInfo(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_IssueEx:
+					{
+						SpReqAnsContext<CardIssuerStandService_IssueEx_Req,CardIssuerStandService_IssueEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_IssueEx_Req,CardIssuerStandService_IssueEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_IssueEx(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_OpenSafeLock:
+					{
+						SpReqAnsContext<CardIssuerStandService_OpenSafeLock_Req,CardIssuerStandService_OpenSafeLock_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_OpenSafeLock_Req,CardIssuerStandService_OpenSafeLock_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_OpenSafeLock(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_SAMICCommand:
+					{
+						SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req,CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req,CardIssuerStandService_SAMICCommand_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SAMICCommand(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_QueryPrinterStatus:
+					{
+						SpReqAnsContext<CardIssuerStandService_QueryPrinterStatus_Req,CardIssuerStandService_QueryPrinterStatus_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_QueryPrinterStatus_Req,CardIssuerStandService_QueryPrinterStatus_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryPrinterStatus(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_Print:
+					{
+						SpReqAnsContext<CardIssuerStandService_Print_Req,CardIssuerStandService_Print_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_Print_Req,CardIssuerStandService_Print_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Print(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_QuerySCIList:
+					{
+						SpReqAnsContext<CardIssuerStandService_QuerySCIList_Req,CardIssuerStandService_QuerySCIList_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_QuerySCIList_Req,CardIssuerStandService_QuerySCIList_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QuerySCIList(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_BindSCI:
+					{
+						SpReqAnsContext<CardIssuerStandService_BindSCI_Req,CardIssuerStandService_BindSCI_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_BindSCI_Req,CardIssuerStandService_BindSCI_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_BindSCI(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_PreOnlineOnStore:
+					{
+						SpReqAnsContext<CardIssuerStandService_PreOnlineOnStore_Req,CardIssuerStandService_PreOnlineOnStore_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_PreOnlineOnStore_Req,CardIssuerStandService_PreOnlineOnStore_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PreOnlineOnStore(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_NotifyPreonline:
+					{
+						SpReqAnsContext<CardIssuerStandService_NotifyPreonline_Req,CardIssuerStandService_NotifyPreonline_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_NotifyPreonline_Req,CardIssuerStandService_NotifyPreonline_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_NotifyPreonline(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_QueryCardInfoOnStore:
+					{
+						SpReqAnsContext<CardIssuerStandService_QueryCardInfoOnStore_Req,CardIssuerStandService_QueryCardInfoOnStore_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_QueryCardInfoOnStore_Req,CardIssuerStandService_QueryCardInfoOnStore_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryCardInfoOnStore(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_GetAddCardInfo:
+					{
+						SpReqAnsContext<CardIssuerStandService_GetAddCardInfo_Req,CardIssuerStandService_GetAddCardInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_GetAddCardInfo_Req,CardIssuerStandService_GetAddCardInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetAddCardInfo(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_PrintCardImmediately:
+					{
+						SpReqAnsContext<CardIssuerStandService_PrintCardImmediately_Req,CardIssuerStandService_PrintCardImmediately_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_PrintCardImmediately_Req,CardIssuerStandService_PrintCardImmediately_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PrintCardImmediately(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_QueryCIStatus:
+					{
+						SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req,CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req,CardIssuerStandService_QueryCIStatus_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryCIStatus(ctx);
+					}
+					break;
+				case CardIssuerStandService_Method_GetDevInfo:
+					{
+						SpReqAnsContext<CardIssuerStandService_GetDevInfo_Req,CardIssuerStandService_GetDevInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStandService_GetDevInfo_Req,CardIssuerStandService_GetDevInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetDevInfo(ctx);
+					}
+					break;
+				default:
+					assert(0);
+					break;
+			}
+			
+		} else {
+			pTransactionContext->SendAnswer(Error);
+		}
+	}
+
+};
+
+
+///////////////////////////
+
+} // namespace CardIssuerStand
+#endif // __CARDISSUERSTAND_SERVER_G_H

+ 3 - 0
Module/mod_CardIssuerStand/CardIssuer_UserErrorCode.h

@@ -208,4 +208,7 @@
 #define CardIssuer_UserErrorCode_KakuPanKu_MoveCardFromSlot_Failed				(CardIssuer_UserErrorCode_Start + 200)	//卡库盘库失败,卡槽移卡失败
 #define CardIssuer_UserErrorCode_KakuPanKu_ReadAccount_Failed					(CardIssuer_UserErrorCode_Start + 201)	//卡库盘库失败,读卡失败吞卡
 #define CardIssuer_UserErrorCode_KakuPanKu_MoveCardToSlot_Failed				(CardIssuer_UserErrorCode_Start + 202)	//卡库盘库失败,卡移回卡槽失败
+
+#define CardIssuer_UserErrorCode_EnterMainPage_SetFlag		0x20300300 //卡机进入首页设置运行时标志位
+#define CardIssuer_UserErrorCode_CopyRuncfg					0x20300301 //卡机拷贝旧运行时文件
 #endif //_CARDISSUERSTAND_USER_ERRORCODE_H

+ 0 - 1001
Module/mod_CardIssuerStand/CardIssuer_server_g.h

@@ -1,1001 +0,0 @@
-
-#ifndef __CARDISSUER_SERVER_G_H
-#define __CARDISSUER_SERVER_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "CardIssuer_def_g.h"
-
-namespace CardIssuer {
-class CardIssuerService_ServerSessionBase : public CServerSessionBase
-{
-public:
-	CardIssuerService_ServerSessionBase()
-	{
-		/// override by user
-	}
-
-	virtual ~CardIssuerService_ServerSessionBase()
-	{
-		/// override by user
-	}
-
-	virtual bool IsExclusive() { return false; }
-
-	virtual bool IsSessionOverlap() { return true; }
-
-	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		case CardIssuerService_Method_Insert:
-			if (dwSignature == CardIssuerService_MethodSignature_Insert) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_CancelInsert:
-			if (dwSignature == CardIssuerService_MethodSignature_CancelInsert) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_InsertWaitMore:
-			if (dwSignature == CardIssuerService_MethodSignature_InsertWaitMore) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Read:
-			if (dwSignature == CardIssuerService_MethodSignature_Read) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Capture:
-			if (dwSignature == CardIssuerService_MethodSignature_Capture) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Eject:
-			if (dwSignature == CardIssuerService_MethodSignature_Eject) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PreOnline:
-			if (dwSignature == CardIssuerService_MethodSignature_PreOnline) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PostOnline:
-			if (dwSignature == CardIssuerService_MethodSignature_PostOnline) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Exit:
-			if (dwSignature == CardIssuerService_MethodSignature_Exit) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Issue:
-			if (dwSignature == CardIssuerService_MethodSignature_Issue) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetMaterialCount:
-			if (dwSignature == CardIssuerService_MethodSignature_GetMaterialCount) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetMaterialCount:
-			if (dwSignature == CardIssuerService_MethodSignature_SetMaterialCount) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetIssueFlag:
-			if (dwSignature == CardIssuerService_MethodSignature_SetIssueFlag) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_ReadEx:
-			if (dwSignature == CardIssuerService_MethodSignature_ReadEx) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryCardInfo:
-			if (dwSignature == CardIssuerService_MethodSignature_QueryCardInfo) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_WriteTrack:
-			if (dwSignature == CardIssuerService_MethodSignature_WriteTrack) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetMaterialCountEx:
-			if (dwSignature == CardIssuerService_MethodSignature_GetMaterialCountEx) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetMaterialCountEx:
-			if (dwSignature == CardIssuerService_MethodSignature_SetMaterialCountEx) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetSomeFlag:
-			if (dwSignature == CardIssuerService_MethodSignature_SetSomeFlag) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetSCIInfo:
-			if (dwSignature == CardIssuerService_MethodSignature_GetSCIInfo) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_IssueEx:
-			if (dwSignature == CardIssuerService_MethodSignature_IssueEx) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_OpenSafeLock:
-			if (dwSignature == CardIssuerService_MethodSignature_OpenSafeLock) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SAMICCommand:
-			if (dwSignature == CardIssuerService_MethodSignature_SAMICCommand) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryPrinterStatus:
-			if (dwSignature == CardIssuerService_MethodSignature_QueryPrinterStatus) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Print:
-			if (dwSignature == CardIssuerService_MethodSignature_Print) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QuerySCIList:
-			if (dwSignature == CardIssuerService_MethodSignature_QuerySCIList) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_BindSCI:
-			if (dwSignature == CardIssuerService_MethodSignature_BindSCI) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PreOnlineOnStore:
-			if (dwSignature == CardIssuerService_MethodSignature_PreOnlineOnStore) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_NotifyPreonline:
-			if (dwSignature == CardIssuerService_MethodSignature_NotifyPreonline) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryCardInfoOnStore:
-			if (dwSignature == CardIssuerService_MethodSignature_QueryCardInfoOnStore) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetAddCardInfo:
-			if (dwSignature == CardIssuerService_MethodSignature_GetAddCardInfo) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PrintCardImmediately:
-			if (dwSignature == CardIssuerService_MethodSignature_PrintCardImmediately) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryCIStatus:
-			if (dwSignature == CardIssuerService_MethodSignature_QueryCIStatus) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetDevInfo:
-			if (dwSignature == CardIssuerService_MethodSignature_GetDevInfo) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		case CardIssuerService_Method_Insert:
-			if (dwSignature != CardIssuerService_MethodSignature_Insert) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_CancelInsert:
-			if (dwSignature != CardIssuerService_MethodSignature_CancelInsert) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_InsertWaitMore:
-			if (dwSignature != CardIssuerService_MethodSignature_InsertWaitMore) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Read:
-			if (dwSignature != CardIssuerService_MethodSignature_Read) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Capture:
-			if (dwSignature != CardIssuerService_MethodSignature_Capture) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Eject:
-			if (dwSignature != CardIssuerService_MethodSignature_Eject) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PreOnline:
-			if (dwSignature != CardIssuerService_MethodSignature_PreOnline) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PostOnline:
-			if (dwSignature != CardIssuerService_MethodSignature_PostOnline) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Exit:
-			if (dwSignature != CardIssuerService_MethodSignature_Exit) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Issue:
-			if (dwSignature != CardIssuerService_MethodSignature_Issue) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetMaterialCount:
-			if (dwSignature != CardIssuerService_MethodSignature_GetMaterialCount) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetMaterialCount:
-			if (dwSignature != CardIssuerService_MethodSignature_SetMaterialCount) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetIssueFlag:
-			if (dwSignature != CardIssuerService_MethodSignature_SetIssueFlag) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_ReadEx:
-			if (dwSignature != CardIssuerService_MethodSignature_ReadEx) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryCardInfo:
-			if (dwSignature != CardIssuerService_MethodSignature_QueryCardInfo) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_WriteTrack:
-			if (dwSignature != CardIssuerService_MethodSignature_WriteTrack) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetMaterialCountEx:
-			if (dwSignature != CardIssuerService_MethodSignature_GetMaterialCountEx) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetMaterialCountEx:
-			if (dwSignature != CardIssuerService_MethodSignature_SetMaterialCountEx) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SetSomeFlag:
-			if (dwSignature != CardIssuerService_MethodSignature_SetSomeFlag) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetSCIInfo:
-			if (dwSignature != CardIssuerService_MethodSignature_GetSCIInfo) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_IssueEx:
-			if (dwSignature != CardIssuerService_MethodSignature_IssueEx) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_OpenSafeLock:
-			if (dwSignature != CardIssuerService_MethodSignature_OpenSafeLock) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_SAMICCommand:
-			if (dwSignature != CardIssuerService_MethodSignature_SAMICCommand) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryPrinterStatus:
-			if (dwSignature != CardIssuerService_MethodSignature_QueryPrinterStatus) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_Print:
-			if (dwSignature != CardIssuerService_MethodSignature_Print) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QuerySCIList:
-			if (dwSignature != CardIssuerService_MethodSignature_QuerySCIList) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_BindSCI:
-			if (dwSignature != CardIssuerService_MethodSignature_BindSCI) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PreOnlineOnStore:
-			if (dwSignature != CardIssuerService_MethodSignature_PreOnlineOnStore) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_NotifyPreonline:
-			if (dwSignature != CardIssuerService_MethodSignature_NotifyPreonline) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryCardInfoOnStore:
-			if (dwSignature != CardIssuerService_MethodSignature_QueryCardInfoOnStore) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetAddCardInfo:
-			if (dwSignature != CardIssuerService_MethodSignature_GetAddCardInfo) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_PrintCardImmediately:
-			if (dwSignature != CardIssuerService_MethodSignature_PrintCardImmediately) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_QueryCIStatus:
-			if (dwSignature != CardIssuerService_MethodSignature_QueryCIStatus) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		case CardIssuerService_Method_GetDevInfo:
-			if (dwSignature != CardIssuerService_MethodSignature_GetDevInfo) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	virtual void Handle_Insert(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_CancelInsert(SpOnewayCallContext<CardIssuerService_CancelInsert_Info>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerService_InsertWaitMore_Info>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_Issue(SpReqAnsContext<CardIssuerService_Issue_Req, CardIssuerService_Issue_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_GetMaterialCount(SpReqAnsContext<CardIssuerService_GetMaterialCount_Req, CardIssuerService_GetMaterialCount_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_SetMaterialCount(SpReqAnsContext<CardIssuerService_SetMaterialCount_Req, CardIssuerService_SetMaterialCount_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_ReadEx(SpReqAnsContext<CardIssuerService_ReadEx_Req, CardIssuerService_ReadEx_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_GetSCIInfo(SpReqAnsContext<CardIssuerService_GetSCIInfo_Req, CardIssuerService_GetSCIInfo_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_OpenSafeLock(SpReqAnsContext<CardIssuerService_OpenSafeLock_Req, CardIssuerService_OpenSafeLock_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_QueryPrinterStatus(SpReqAnsContext<CardIssuerService_QueryPrinterStatus_Req, CardIssuerService_QueryPrinterStatus_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_Print(SpReqAnsContext<CardIssuerService_Print_Req, CardIssuerService_Print_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_QuerySCIList(SpReqAnsContext<CardIssuerService_QuerySCIList_Req, CardIssuerService_QuerySCIList_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_BindSCI(SpReqAnsContext<CardIssuerService_BindSCI_Req, CardIssuerService_BindSCI_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_PreOnlineOnStore(SpReqAnsContext<CardIssuerService_PreOnlineOnStore_Req, CardIssuerService_PreOnlineOnStore_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_NotifyPreonline(SpReqAnsContext<CardIssuerService_NotifyPreonline_Req, CardIssuerService_NotifyPreonline_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerService_GetAddCardInfo_Req, CardIssuerService_GetAddCardInfo_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void Handle_GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
-	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
-	{
-		CAutoBuffer Buf;
-		DWORD dwMessageID;
-		DWORD dwMessageSignature;
-		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
-		if (Error == Error_Succeed) {
-#ifdef DEBUG
-			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
-#else
-			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
-				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
-				return;
-			}
-#endif
-			switch (dwMessageID) {
-				case CardIssuerService_Method_Insert:
-					{
-						SpReqAnsContext<CardIssuerService_Insert_Req,CardIssuerService_Insert_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_Insert_Req,CardIssuerService_Insert_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_Insert(ctx);
-					}
-					break;
-				case CardIssuerService_Method_CancelInsert:
-					{
-						SpOnewayCallContext<CardIssuerService_CancelInsert_Info>::Pointer ctx;
-						ctx.Attach(new SpOnewayCallContext<CardIssuerService_CancelInsert_Info>());
-						SpBuffer2Object(Buf, ctx->Info);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_CancelInsert(ctx);
-					}
-					break;
-				case CardIssuerService_Method_InsertWaitMore:
-					{
-						SpOnewayCallContext<CardIssuerService_InsertWaitMore_Info>::Pointer ctx;
-						ctx.Attach(new SpOnewayCallContext<CardIssuerService_InsertWaitMore_Info>());
-						SpBuffer2Object(Buf, ctx->Info);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_InsertWaitMore(ctx);
-					}
-					break;
-				case CardIssuerService_Method_Read:
-					{
-						SpReqAnsContext<CardIssuerService_Read_Req,CardIssuerService_Read_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_Read_Req,CardIssuerService_Read_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_Read(ctx);
-					}
-					break;
-				case CardIssuerService_Method_Capture:
-					{
-						SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_Capture(ctx);
-					}
-					break;
-				case CardIssuerService_Method_Eject:
-					{
-						SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_Eject(ctx);
-					}
-					break;
-				case CardIssuerService_Method_PreOnline:
-					{
-						SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_PreOnline(ctx);
-					}
-					break;
-				case CardIssuerService_Method_PostOnline:
-					{
-						SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_PostOnline(ctx);
-					}
-					break;
-				case CardIssuerService_Method_Exit:
-					{
-						SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx;
-						ctx.Attach(new SpOnewayCallContext<CardIssuerService_Exit_Info>());
-						SpBuffer2Object(Buf, ctx->Info);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_Exit(ctx);
-					}
-					break;
-				case CardIssuerService_Method_Issue:
-					{
-						SpReqAnsContext<CardIssuerService_Issue_Req,CardIssuerService_Issue_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_Issue_Req,CardIssuerService_Issue_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_Issue(ctx);
-					}
-					break;
-				case CardIssuerService_Method_GetMaterialCount:
-					{
-						SpReqAnsContext<CardIssuerService_GetMaterialCount_Req,CardIssuerService_GetMaterialCount_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_GetMaterialCount_Req,CardIssuerService_GetMaterialCount_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_GetMaterialCount(ctx);
-					}
-					break;
-				case CardIssuerService_Method_SetMaterialCount:
-					{
-						SpReqAnsContext<CardIssuerService_SetMaterialCount_Req,CardIssuerService_SetMaterialCount_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_SetMaterialCount_Req,CardIssuerService_SetMaterialCount_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_SetMaterialCount(ctx);
-					}
-					break;
-				case CardIssuerService_Method_SetIssueFlag:
-					{
-						SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx;
-						ctx.Attach(new SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>());
-						SpBuffer2Object(Buf, ctx->Info);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_SetIssueFlag(ctx);
-					}
-					break;
-				case CardIssuerService_Method_ReadEx:
-					{
-						SpReqAnsContext<CardIssuerService_ReadEx_Req,CardIssuerService_ReadEx_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_ReadEx_Req,CardIssuerService_ReadEx_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_ReadEx(ctx);
-					}
-					break;
-				case CardIssuerService_Method_QueryCardInfo:
-					{
-						SpReqAnsContext<CardIssuerService_QueryCardInfo_Req,CardIssuerService_QueryCardInfo_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_QueryCardInfo_Req,CardIssuerService_QueryCardInfo_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_QueryCardInfo(ctx);
-					}
-					break;
-				case CardIssuerService_Method_WriteTrack:
-					{
-						SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_WriteTrack(ctx);
-					}
-					break;
-				case CardIssuerService_Method_GetMaterialCountEx:
-					{
-						SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req,CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req,CardIssuerService_GetMaterialCountEx_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_GetMaterialCountEx(ctx);
-					}
-					break;
-				case CardIssuerService_Method_SetMaterialCountEx:
-					{
-						SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req,CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req,CardIssuerService_SetMaterialCountEx_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_SetMaterialCountEx(ctx);
-					}
-					break;
-				case CardIssuerService_Method_SetSomeFlag:
-					{
-						SpReqAnsContext<CardIssuerService_SetSomeFlag_Req,CardIssuerService_SetSomeFlag_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_SetSomeFlag_Req,CardIssuerService_SetSomeFlag_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_SetSomeFlag(ctx);
-					}
-					break;
-				case CardIssuerService_Method_GetSCIInfo:
-					{
-						SpReqAnsContext<CardIssuerService_GetSCIInfo_Req,CardIssuerService_GetSCIInfo_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_GetSCIInfo_Req,CardIssuerService_GetSCIInfo_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_GetSCIInfo(ctx);
-					}
-					break;
-				case CardIssuerService_Method_IssueEx:
-					{
-						SpReqAnsContext<CardIssuerService_IssueEx_Req,CardIssuerService_IssueEx_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_IssueEx_Req,CardIssuerService_IssueEx_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_IssueEx(ctx);
-					}
-					break;
-				case CardIssuerService_Method_OpenSafeLock:
-					{
-						SpReqAnsContext<CardIssuerService_OpenSafeLock_Req,CardIssuerService_OpenSafeLock_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_OpenSafeLock_Req,CardIssuerService_OpenSafeLock_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_OpenSafeLock(ctx);
-					}
-					break;
-				case CardIssuerService_Method_SAMICCommand:
-					{
-						SpReqAnsContext<CardIssuerService_SAMICCommand_Req,CardIssuerService_SAMICCommand_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_SAMICCommand_Req,CardIssuerService_SAMICCommand_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_SAMICCommand(ctx);
-					}
-					break;
-				case CardIssuerService_Method_QueryPrinterStatus:
-					{
-						SpReqAnsContext<CardIssuerService_QueryPrinterStatus_Req,CardIssuerService_QueryPrinterStatus_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_QueryPrinterStatus_Req,CardIssuerService_QueryPrinterStatus_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_QueryPrinterStatus(ctx);
-					}
-					break;
-				case CardIssuerService_Method_Print:
-					{
-						SpReqAnsContext<CardIssuerService_Print_Req,CardIssuerService_Print_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_Print_Req,CardIssuerService_Print_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_Print(ctx);
-					}
-					break;
-				case CardIssuerService_Method_QuerySCIList:
-					{
-						SpReqAnsContext<CardIssuerService_QuerySCIList_Req,CardIssuerService_QuerySCIList_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_QuerySCIList_Req,CardIssuerService_QuerySCIList_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_QuerySCIList(ctx);
-					}
-					break;
-				case CardIssuerService_Method_BindSCI:
-					{
-						SpReqAnsContext<CardIssuerService_BindSCI_Req,CardIssuerService_BindSCI_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_BindSCI_Req,CardIssuerService_BindSCI_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_BindSCI(ctx);
-					}
-					break;
-				case CardIssuerService_Method_PreOnlineOnStore:
-					{
-						SpReqAnsContext<CardIssuerService_PreOnlineOnStore_Req,CardIssuerService_PreOnlineOnStore_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_PreOnlineOnStore_Req,CardIssuerService_PreOnlineOnStore_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_PreOnlineOnStore(ctx);
-					}
-					break;
-				case CardIssuerService_Method_NotifyPreonline:
-					{
-						SpReqAnsContext<CardIssuerService_NotifyPreonline_Req,CardIssuerService_NotifyPreonline_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_NotifyPreonline_Req,CardIssuerService_NotifyPreonline_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_NotifyPreonline(ctx);
-					}
-					break;
-				case CardIssuerService_Method_QueryCardInfoOnStore:
-					{
-						SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req,CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req,CardIssuerService_QueryCardInfoOnStore_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_QueryCardInfoOnStore(ctx);
-					}
-					break;
-				case CardIssuerService_Method_GetAddCardInfo:
-					{
-						SpReqAnsContext<CardIssuerService_GetAddCardInfo_Req,CardIssuerService_GetAddCardInfo_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_GetAddCardInfo_Req,CardIssuerService_GetAddCardInfo_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_GetAddCardInfo(ctx);
-					}
-					break;
-				case CardIssuerService_Method_PrintCardImmediately:
-					{
-						SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req,CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req,CardIssuerService_PrintCardImmediately_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_PrintCardImmediately(ctx);
-					}
-					break;
-				case CardIssuerService_Method_QueryCIStatus:
-					{
-						SpReqAnsContext<CardIssuerService_QueryCIStatus_Req,CardIssuerService_QueryCIStatus_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_QueryCIStatus_Req,CardIssuerService_QueryCIStatus_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_QueryCIStatus(ctx);
-					}
-					break;
-				case CardIssuerService_Method_GetDevInfo:
-					{
-						SpReqAnsContext<CardIssuerService_GetDevInfo_Req,CardIssuerService_GetDevInfo_Ans>::Pointer ctx;
-						ctx.Attach(new SpReqAnsContext<CardIssuerService_GetDevInfo_Req,CardIssuerService_GetDevInfo_Ans>(pTransactionContext));
-						SpBuffer2Object(Buf, ctx->Req);
-						pTransactionContext->GetLinkContext(ctx->link);
-						EntityResource::setLink(ctx->link);
-						Handle_GetDevInfo(ctx);
-					}
-					break;
-				default:
-					assert(0);
-					break;
-			}
-			
-		} else {
-			pTransactionContext->SendAnswer(Error);
-		}
-	}
-
-};
-
-
-///////////////////////////
-
-} // namespace CardIssuer
-#endif // __CARDISSUER_SERVER_G_H

+ 26 - 22
Module/mod_CardIssuerStand/mod_cardissuer.cpp

@@ -10,14 +10,14 @@
 
 #include "CardIssuerClass.h"
 
-void CardIssuerServerSession::Handle_Insert(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_Insert(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Insert");
 	m_pEntity->Insert(ctx);
 }
-void CardIssuerServerSession::Handle_Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_Read(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
@@ -25,7 +25,7 @@ void CardIssuerServerSession::Handle_Read(SpReqAnsContext<CardIssuerService_Read
 	m_pEntity->Read(ctx);
 }
 
-void CardIssuerServerSession::Handle_Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_Capture(SpReqAnsContext<CardIssuerStandService_Capture_Req, CardIssuerStandService_Capture_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
@@ -33,7 +33,7 @@ void CardIssuerServerSession::Handle_Capture(SpReqAnsContext<CardIssuerService_C
 	m_pEntity->Capture(ctx);
 }
 
-void CardIssuerServerSession::Handle_Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_Eject(SpReqAnsContext<CardIssuerStandService_Eject_Req, CardIssuerStandService_Eject_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
@@ -41,104 +41,104 @@ void CardIssuerServerSession::Handle_Eject(SpReqAnsContext<CardIssuerService_Eje
 	m_pEntity->Eject(ctx);
 }
 
-void CardIssuerServerSession::Handle_CancelInsert(SpOnewayCallContext<CardIssuerService_CancelInsert_Info>::Pointer ctx)
+void CardIssuerServerSession::Handle_CancelInsert(SpOnewayCallContext<CardIssuerStandService_CancelInsert_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("CancelInsert");
 	m_pEntity->CancelInsert(ctx);
 }
-void CardIssuerServerSession::Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerService_InsertWaitMore_Info>::Pointer ctx)
+void CardIssuerServerSession::Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerStandService_InsertWaitMore_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("InsertWaitMore");
 	m_pEntity->InsertWaitMore(ctx);
 }
-void CardIssuerServerSession::Handle_PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_PreOnline(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PreOnline");
 	m_pEntity->PreOnline(ctx);
 }
-void CardIssuerServerSession::Handle_PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_PostOnline(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PostOnline");
 	m_pEntity->PostOnline(ctx);
 }
-void CardIssuerServerSession::Handle_Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx)
+void CardIssuerServerSession::Handle_Exit(SpOnewayCallContext<CardIssuerStandService_Exit_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Exit");
 	m_pEntity->Exit(ctx);
 }
- void CardIssuerServerSession::Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx)
+ void CardIssuerServerSession::Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerStandService_SetIssueFlag_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetIssueFlag");
 	m_pEntity->SetIssueFlag(ctx);
 }
-void CardIssuerServerSession::Handle_QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_QueryCardInfo(SpReqAnsContext<CardIssuerStandService_QueryCardInfo_Req, CardIssuerStandService_QueryCardInfo_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCardInfo");
 	m_pEntity->QueryCardInfo(ctx);
 }
-void CardIssuerServerSession::Handle_WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_WriteTrack(SpReqAnsContext<CardIssuerStandService_WriteTrack_Req, CardIssuerStandService_WriteTrack_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("WriteTrack");
 	m_pEntity->WriteTrack(ctx);
 }
-void CardIssuerServerSession::Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req, CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("GetMaterialCountEx");
 	m_pEntity->GetMaterialCountEx(ctx);
 }
-void CardIssuerServerSession::Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req, CardIssuerStandService_SetMaterialCountEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetMaterialCountEx");
 	m_pEntity->SetMaterialCountEx(ctx);
 }
-void CardIssuerServerSession::Handle_SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_SetSomeFlag(SpReqAnsContext<CardIssuerStandService_SetSomeFlag_Req, CardIssuerStandService_SetSomeFlag_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetSomeFlag");
 	m_pEntity->SetSomeFlag(ctx);
 }
-void CardIssuerServerSession::Handle_IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_IssueEx(SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("IssueEx");
 	m_pEntity->IssueEx(ctx);
 }
-void CardIssuerServerSession::Handle_SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_SAMICCommand(SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx)
 {
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SAMICCommand");
 	m_pEntity->SAMICCommand(ctx);
 }
-void CardIssuerServerSession::Handle_QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req, CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCIStatus");
 	m_pEntity->QueryCIStatus(ctx);
 }
-void CardIssuerServerSession::Handle_GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx)
+void CardIssuerServerSession::Handle_GetDevInfo(SpReqAnsContext<CardIssuerStandService_GetDevInfo_Req, CardIssuerStandService_GetDevInfo_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
@@ -149,12 +149,16 @@ void CCardIssuerEntity::OnSysVarEvent(const char* pszKey, const char* pszValue,
 {
 	if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
 	{
-		if (_strnicmp(pszValue, "M", strlen("M")) == 0)
+		if (_strnicmp(pszValue, "M", strlen("M")) == 0) {
 			m_fsm.SetInWhatPage(PageType_MainPage);
-		else if (_strnicmp(pszValue, "U", strlen("U")) == 0)
+			m_fsm.SetEnterMainPage();//ÉèÖýøÈëÊ×Ò³
+		}
+		else if (_strnicmp(pszValue, "U", strlen("U")) == 0) {
 			m_fsm.SetInWhatPage(PageType_UserDesktop);
-		else
+		}
+		else {
 			m_fsm.SetInWhatPage(PageType_Other);
+		}
 	}
 }
 

+ 44 - 44
Module/mod_CardIssuerStand/mod_cardissuer.h

@@ -1,35 +1,35 @@
-#include "CardIssuer_server_g.h"
-#include "CardIssuer_def_g.h"
+#include "CardIssuerStand_server_g.h"
+#include "CardIssuerStand_def_g.h"
 #include "CardIssuerFSM.h"
 #include "DevEntityCommBase.hpp"
-using namespace CardIssuer;
+using namespace CardIssuerStand;
 
 class CCardIssuerEntity;
 
-class CardIssuerServerSession : public CardIssuerService_ServerSessionBase
+class CardIssuerServerSession : public CardIssuerStandService_ServerSessionBase
 {
 public:
 	CardIssuerServerSession(CCardIssuerEntity* pEntity):m_pEntity(pEntity){}
 	virtual ~CardIssuerServerSession(){}
-	virtual void Handle_Insert(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx);
-	virtual void Handle_Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx);
-	virtual void Handle_Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx);
-	virtual void Handle_Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx);
-	virtual void Handle_CancelInsert(SpOnewayCallContext<CardIssuerService_CancelInsert_Info>::Pointer ctx);
-	virtual void Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerService_InsertWaitMore_Info>::Pointer ctx);
-	virtual void Handle_PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx);
-	virtual void Handle_PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx);
-	virtual void Handle_Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx);	
-	virtual void Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx);
-	virtual void Handle_QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx);
-	virtual void Handle_WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx);
-	virtual void Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx);
-	virtual void Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx);
-	virtual void Handle_SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx);
-	virtual void Handle_IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx);
-	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx);
-	virtual void Handle_QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx);
-	virtual void Handle_GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx);
+	virtual void Handle_Insert(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx);
+	virtual void Handle_Read(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx);
+	virtual void Handle_Capture(SpReqAnsContext<CardIssuerStandService_Capture_Req, CardIssuerStandService_Capture_Ans>::Pointer ctx);
+	virtual void Handle_Eject(SpReqAnsContext<CardIssuerStandService_Eject_Req, CardIssuerStandService_Eject_Ans>::Pointer ctx);
+	virtual void Handle_CancelInsert(SpOnewayCallContext<CardIssuerStandService_CancelInsert_Info>::Pointer ctx);
+	virtual void Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerStandService_InsertWaitMore_Info>::Pointer ctx);
+	virtual void Handle_PreOnline(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx);
+	virtual void Handle_PostOnline(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx);
+	virtual void Handle_Exit(SpOnewayCallContext<CardIssuerStandService_Exit_Info>::Pointer ctx);
+	virtual void Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerStandService_SetIssueFlag_Info>::Pointer ctx);
+	virtual void Handle_QueryCardInfo(SpReqAnsContext<CardIssuerStandService_QueryCardInfo_Req, CardIssuerStandService_QueryCardInfo_Ans>::Pointer ctx);
+	virtual void Handle_WriteTrack(SpReqAnsContext<CardIssuerStandService_WriteTrack_Req, CardIssuerStandService_WriteTrack_Ans>::Pointer ctx);
+	virtual void Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req, CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx);
+	virtual void Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req, CardIssuerStandService_SetMaterialCountEx_Ans>::Pointer ctx);
+	virtual void Handle_SetSomeFlag(SpReqAnsContext<CardIssuerStandService_SetSomeFlag_Req, CardIssuerStandService_SetSomeFlag_Ans>::Pointer ctx);
+	virtual void Handle_IssueEx(SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctx);
+	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx);
+	virtual void Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req, CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx);
+	virtual void Handle_GetDevInfo(SpReqAnsContext<CardIssuerStandService_GetDevInfo_Req, CardIssuerStandService_GetDevInfo_Ans>::Pointer ctx);
 private:
 	CCardIssuerEntity* m_pEntity;
 };
@@ -41,7 +41,7 @@ public:
 	{
 	}
 	virtual ~CCardIssuerEntity(){}
-	virtual const char *GetEntityName() const { return "CardIssuer"; }
+	virtual const char *GetEntityName() const { return "CardIssuerStand"; }
 	virtual void OnPreStart(CAutoArray<CSimpleStringA> strArgs,CSmartPointer<ITransactionContext> pTransactionContext) 
 	{ 
 		LOG_FUNCTION();
@@ -87,7 +87,7 @@ public:
 		return new CardIssuerServerSession(this);
 	}
 
-	void Insert(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx)
+	void Insert(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		if(!m_fsm.GetDevInitFlag()){
@@ -102,14 +102,14 @@ public:
 		}
 	}
 
-	void Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
+	void Read(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		CardReadEvent* e = new CardReadEvent();
 		e->ctx = ctx;
 		m_fsm.PostEventFIFO(e);
 	}
-	void Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx)
+	void Capture(SpReqAnsContext<CardIssuerStandService_Capture_Req, CardIssuerStandService_Capture_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		CardCaptureEvent* e = new CardCaptureEvent();
@@ -117,26 +117,26 @@ public:
 		m_fsm.PostEventFIFO(e);
 	}
 
-	void Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx)
+	void Eject(SpReqAnsContext<CardIssuerStandService_Eject_Req, CardIssuerStandService_Eject_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		CardEjectEvent* e = new CardEjectEvent();
 		e->ctx = ctx;
 		m_fsm.PostEventFIFO(e);
 	}
-	void CancelInsert(SpOnewayCallContext<CardIssuerService_CancelInsert_Info>::Pointer ctx)
+	void CancelInsert(SpOnewayCallContext<CardIssuerStandService_CancelInsert_Info>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		CancelAcceptEvent *e = new CancelAcceptEvent();
 		m_fsm.PostEventFIFO(e);
 	}
-	void InsertWaitMore(SpOnewayCallContext<CardIssuerService_InsertWaitMore_Info>::Pointer ctx)
+	void InsertWaitMore(SpOnewayCallContext<CardIssuerStandService_InsertWaitMore_Info>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		if (m_fsm.GetWaitFlag())
 			m_fsm.SetWaitMore();
 	}
-	void Issue(SpReqAnsContext<CardIssuerService_Issue_Req, CardIssuerService_Issue_Ans>::Pointer ctx)
+	void Issue(SpReqAnsContext<CardIssuerStandService_Issue_Req, CardIssuerStandService_Issue_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		m_bNewSessionInit = false;
@@ -144,7 +144,7 @@ public:
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
+	void PreOnline(SpReqAnsContext<CardIssuerStandService_PreOnline_Req, CardIssuerStandService_PreOnline_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		if (!m_fsm.GetDevInitFlag()) {
@@ -170,21 +170,21 @@ public:
 			m_fsm.PostEventFIFO(e);
 		}
 	}
-	void PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
+	void PostOnline(SpReqAnsContext<CardIssuerStandService_PostOnline_Req, CardIssuerStandService_PostOnline_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		PostOnlineEvent* e = new PostOnlineEvent();
 		e->ctx = ctx;
 		m_fsm.PostEventFIFO(e);
 	}
-	void Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx)
+	void Exit(SpOnewayCallContext<CardIssuerStandService_Exit_Info>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		m_bNewSessionInit = false;
 		FSMEvent *evt = new FSMEvent(USER_EVT_EXIT);
 		m_fsm.PostEventFIFO(evt);
 	}
-	void QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx)
+	void QueryCardInfo(SpReqAnsContext<CardIssuerStandService_QueryCardInfo_Req, CardIssuerStandService_QueryCardInfo_Ans>::Pointer ctx)
 	{
 		if (m_bNewSessionInit)
 		{
@@ -199,28 +199,28 @@ public:
 			ctx->Answer(Error_Succeed);
 		}
 	}
-	void WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx)
+	void WriteTrack(SpReqAnsContext<CardIssuerStandService_WriteTrack_Req, CardIssuerStandService_WriteTrack_Ans>::Pointer ctx)
 	{
 		CardWriteEvent *pEvt = new CardWriteEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx){ m_fsm.FrontSetIssueFlag(true); }
-	void GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx)
+	void SetIssueFlag(SpOnewayCallContext<CardIssuerStandService_SetIssueFlag_Info>::Pointer ctx){ m_fsm.FrontSetIssueFlag(true); }
+	void GetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req, CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx)
 	{
 		m_bNewSessionInit = false;
 		GetMaterialExEvent *pEvt = new GetMaterialExEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx)
+	void SetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_SetMaterialCountEx_Req, CardIssuerStandService_SetMaterialCountEx_Ans>::Pointer ctx)
 	{
 		m_bNewSessionInit = false;
 		SetMaterialExEvent *pEvt = new SetMaterialExEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx)
+	void SetSomeFlag(SpReqAnsContext<CardIssuerStandService_SetSomeFlag_Req, CardIssuerStandService_SetSomeFlag_Ans>::Pointer ctx)
 	{
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("set issue flag to %d", ctx->Req.IssueBusiness);
 		if (ctx->Req.IssueBusiness == 1)
@@ -254,7 +254,7 @@ public:
 		ctx->Answer(Error_Succeed);
 
 	}
-	void IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx)
+	void IssueEx(SpReqAnsContext<CardIssuerStandService_IssueEx_Req, CardIssuerStandService_IssueEx_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		int state = m_fsm.GetFSMState();
@@ -271,14 +271,14 @@ public:
 			m_fsm.PostEventFIFO(pEvt);
 		}
 	}
-	void SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx)
+	void SAMICCommand(SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		SAMICCommandEvent *pEvt = new SAMICCommandEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx)
+	void GetDevInfo(SpReqAnsContext<CardIssuerStandService_GetDevInfo_Req, CardIssuerStandService_GetDevInfo_Ans>::Pointer ctx)
 	{
 		ctx->Ans.state = m_fsm.GetDevState();
 
@@ -290,7 +290,7 @@ public:
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("GetDevInfo state=%d",ctx->Ans.state);
 		ctx->Answer(Error_Succeed);
 	}
-	void QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx)
+	void QueryCIStatus(SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req, CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx)
 	{
 		m_fsm.QueryCIStatus(ctx);
 	}

+ 1 - 0
Module/mod_CardReadAdapter/CMakeLists.txt

@@ -15,6 +15,7 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${ModuleCommonHeadPath}
 	${MODULE_BASE_DIR}/mod_heartbeat
 	${MODULE_BASE_DIR}/mod_CardIssuerStand
+	${MODULE_BASE_DIR}/mod_cardissuerstore
 	${MODULE_BASE_DIR}/mod_ContactlessCard
 )
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 642 - 256
Module/mod_CardReadAdapter/CardReadAdapterFSM.cpp


+ 26 - 5
Module/mod_CardReadAdapter/CardReadAdapterFSM.h

@@ -9,11 +9,14 @@
 #include "CardIssuerClass.h"
 //#include "CardAssist.h"
 #include "CardIssuer_UserErrorCode.h"
+#include "CardIssuerStore_UserErrorCode.h"
 //#include "ICDataElement.h"
 using namespace CardReadAdapter;
-#include "CardIssuer_client_g.h"
+#include "CardIssuerStand_client_g.h"
+#include "CardIssuerStore_client_g.h"
 #include "ContactlessCard_client_g.h"
-#include "CardIssuer_msg_g.h"
+#include "CardIssuerStand_msg_g.h"
+#include "CardIssuerStore_msg_g.h"
 #include "ContactlessCard_msg_g.h"
 #include "CardReadAdapter_msg_g.h"
 #include "HeartBeat_client_g.h"
@@ -22,7 +25,8 @@ using namespace CardReadAdapter;
 #include <map>
 using namespace std;
 using namespace HeartBeat;
-using namespace CardIssuer;
+using namespace CardIssuerStand;
+using namespace CardIssuerStore;
 using namespace ContactlessCard;
 
 
@@ -765,7 +769,7 @@ public:
 
 		END_FSM_RULE()
 
-		CCardReadAdapterFSM() : m_pCardIssuer(NULL), m_pContactless(NULL), m_pHBClient(NULL){}
+		CCardReadAdapterFSM() : m_pCardIssuer(NULL), m_pCardIssuerStore(NULL), m_pContactless(NULL), m_pHBClient(NULL){}
 	~CCardReadAdapterFSM(){}
 	virtual ErrorCodeEnum OnInit();
 	virtual ErrorCodeEnum OnExit();
@@ -871,7 +875,8 @@ protected:
 	int m_ejectTries;
 private:
 	CCardReadAdapterEntity *m_pEty;
-	CardIssuerService_ClientBase *m_pCardIssuer;
+	CardIssuerStandService_ClientBase *m_pCardIssuer;
+	CardIssuerStoreService_ClientBase* m_pCardIssuerStore;
 	ContactlessCardService_ClientBase *m_pContactless;
 	HeartBeatService_ClientBase* m_pHBClient;
 	BusinessContext m_busCtx;
@@ -922,22 +927,38 @@ private:
 		switch (eErrCode)
 		{
 		case 0x20300240:
+		case 0x22000240:
 			return 0x203002E0;
 		case 0x20300242:
+		case 0x22000242:
 			return 0x203002E1;
 		case 0x20300243:
+		case 0x22000243:
 		case 0x203002a1:
+		case 0x220002a1:
 			return 0x203002E2;
 		case 0x20300244:
+		case 0x22000244:
 			return 0x203002E3;
 		case 0x20300246:
+		case 0x22000246:
 			return 0x203002E4;
 		case 0x2030000D:
+		case 0x2200000D:
 			return 0x203002E5;
 		default:
 			return eErrCode;
 		}
 	}
+
+	bool IsCardIssuerStore() {
+		if (m_eMachineType == SP::Module::Comm::RVC_CardStore || m_eMachineType == SP::Module::Comm::RVC_CardPrinter) {
+			return true;
+		}
+		else {
+			return false;
+		}
+	}
 };
 struct InitTask : public ITaskSp
 {

+ 71 - 7
Module/mod_CardReadAdapter/mod_CardReadAdapter.cpp

@@ -8,6 +8,8 @@
 #include "SpBase.h"
 #include "mod_CardReadAdapter.h"
 
+const int iCardIssuerFetchCard = 1;
+const int iContactlessFetchCard = 2;
 
 void CardReadAdapterServerSession::Handle_Read(SpReqAnsContext<CardReadAdapterService_Read_Req, CardReadAdapterService_Read_Ans>::Pointer ctx)
 {
@@ -264,11 +266,11 @@ void CCardReadAdapterEntity::OnBroadcastEvent(CUUID SubID, const char *pszEntity
 		return;
 
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("OnBroadcastEvent,msg:%s,%d,%d",pszEntityName,dwMessageId,dwMessageSignature);
-	if (_strnicmp(pszEntityName, "CardIssuer", strlen("CardIssuer")) == 0)
+	if (_strnicmp(pszEntityName, "CardIssuerStand", strlen("CardIssuerStand")) == 0)
 	{
 		if (dwMessageSignature == eMsgSig_FetchCard)
 		{
-			CardIssuer::FetchCard fc;
+			CardIssuerStand::FetchCard fc;
 			SpBuffer2Object(Buffer, fc);
 			CardIsserFetchCard evt;
 			evt.status = fc.status;
@@ -276,7 +278,25 @@ void CCardReadAdapterEntity::OnBroadcastEvent(CUUID SubID, const char *pszEntity
 		}
 		else if (dwMessageSignature == eMsgSig_SCIConnect)
 		{
-			CardIssuer::SCIConnect scic;
+			CardIssuerStand::SCIConnect scic;
+			SpBuffer2Object(Buffer, scic);
+			CardIssuerSCIConnect evt;
+			evt.status = scic.status;
+			SpSendBroadcast(GetFunction(), SP_MSG_OF(CardIssuerSCIConnect), SP_MSG_SIG_OF(CardIssuerSCIConnect), evt);
+		}
+	}
+	else if (_strnicmp(pszEntityName, "CardIssuerStore", strlen("CardIssuerStore")) == 0)
+	{
+		if (dwMessageSignature == eMsgSig_FetchCard)
+		{
+			CardIssuerStore::FetchCard fc;
+			SpBuffer2Object(Buffer, fc);
+			DoBroadMsgTask* task = new DoBroadMsgTask(this, iCardIssuerFetchCard,fc.status);
+			GetFunction()->PostThreadPoolTask(task);
+		}
+		else if (dwMessageSignature == eMsgSig_SCIConnect)
+		{
+			CardIssuerStore::SCIConnect scic;
 			SpBuffer2Object(Buffer, scic);
 			CardIssuerSCIConnect evt;
 			evt.status = scic.status;
@@ -299,17 +319,61 @@ void CCardReadAdapterEntity::OnBroadcastEvent(CUUID SubID, const char *pszEntity
 			}
 			else
 			{
-				ContactlessCardFetchCard evt;
-				evt.status = fc.status;
-				SpSendBroadcast(GetFunction(), SP_MSG_OF(ContactlessCardFetchCard), SP_MSG_SIG_OF(ContactlessCardFetchCard), evt);
+				DoBroadMsgTask* task = new DoBroadMsgTask(this, iContactlessFetchCard, fc.status);
+				GetFunction()->PostThreadPoolTask(task);
 			}
 		}
 	}
 	
 }
+void CCardReadAdapterEntity::DoBroadMsg(int msgType,int status)
+{
+	ULLINT ullStart = SP::Module::Comm::RVCGetTickCount();
+	ULLINT ullEnd;
+	do
+	{
+		//in not "Working" (S3) state , means have done work
+		if (_stricmp(m_fsm.GetCurrStateName(), "Working") != 0)
+			break;
+		else
+		{
+			Sleep(200);
+			ullEnd = SP::Module::Comm::RVCGetTickCount();
+		}
+	} while (ullEnd - ullStart < m_msgMaxInterval);//need to set in center setting or not?
 
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("DoBroadcastMsg cost:%d(ms)", ullEnd - ullStart);
 
-
+	if (msgType == iCardIssuerFetchCard)
+	{
+		CardIsserFetchCard evt;
+		evt.status = status;
+		SpSendBroadcast(GetFunction(), SP_MSG_OF(CardIsserFetchCard), SP_MSG_SIG_OF(CardIsserFetchCard), evt);
+	}
+	else if (msgType == iContactlessFetchCard)
+	{
+		ContactlessCardFetchCard evt;
+		evt.status = status;
+		SpSendBroadcast(GetFunction(), SP_MSG_OF(ContactlessCardFetchCard), SP_MSG_SIG_OF(ContactlessCardFetchCard), evt);
+	}
+}
+void CCardReadAdapterEntity::DoStart()
+{
+	CSmartPointer<IConfigInfo> spCerConfig;
+	ErrorCodeEnum eErr = GetFunction()->OpenConfig(Config_CenterSetting, spCerConfig);
+	if (eErr != Error_Succeed) {
+		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("open CenterSetting file failed!");
+		return;
+	}
+	do
+	{
+		int value(0);
+		spCerConfig->ReadConfigValueInt(GetEntityName(), "MsgMaxInterval", value);
+		if (value > 1000 && value < 10000) {
+			m_msgMaxInterval = value;
+		}
+	} while (false);
+}
 SP_BEGIN_ENTITY_MAP()
 	SP_ENTITY(CCardReadAdapterEntity)
 SP_END_ENTITY_MAP()

+ 19 - 3
Module/mod_CardReadAdapter/mod_CardReadAdapter.h

@@ -51,7 +51,7 @@ private:
 class CCardReadAdapterEntity : public CEntityBase,public IBroadcastListener
 {
 public:
-	CCardReadAdapterEntity() :bInitialized(false)//, m_bCIMsg(false), m_bCCMsg(false), m_bCSMsg(false)
+	CCardReadAdapterEntity() :bInitialized(false),m_msgMaxInterval(5000)//, m_bCIMsg(false), m_bCCMsg(false), m_bCSMsg(false)
 	{
 		//MessageBoxA(NULL, "", "", MB_OK);
 	}
@@ -64,7 +64,9 @@ public:
 		ErrorCodeEnum eStart = m_fsm.Init(this);
 		if (eStart == Error_Succeed)
 		{
-			GetFunction()->SubscribeBroadcast("CardIssuer", "", this, m_uuidCIMsg);
+			DoStart();
+			GetFunction()->SubscribeBroadcast("CardIssuerStand", "", this, m_uuidCIMsg);
+			GetFunction()->SubscribeBroadcast("CardIssuerStore", "", this, m_uuidCISMsg);
 			GetFunction()->SubscribeBroadcast("ContactlessCard", "", this, m_uuidCCMsg);
 		}
 		pTransactionContext->SendAnswer(eStart);
@@ -404,13 +406,27 @@ public:
 	virtual bool IsService()const{return true;}
 	virtual bool IsMultiThread()const{return true;}
 	virtual void OnBroadcastEvent(CUUID SubID, const char *pszEntityName, DWORD dwMessageId, DWORD dwMessageSignature, CAutoBuffer Buffer);
+	void DoBroadMsg(int msgType, int status);
+	void DoStart();
 protected:
 private:
 	
 	CCardReadAdapterFSM m_fsm;
-	CUUID m_uuidCIMsg, m_uuidCSMsg, m_uuidCCMsg;
+	CUUID m_uuidCIMsg, m_uuidCISMsg, m_uuidCSMsg, m_uuidCCMsg;
 	bool bInitialized, m_bNewSessionInit;// , m_bCIMsg, m_bCCMsg, m_bCSMsg;
+	int m_msgMaxInterval;
 
 private:
 
 };
+struct DoBroadMsgTask : public ITaskSp
+{
+	CCardReadAdapterEntity* pEntity;
+	int m_msgType;
+	int m_status;
+	DoBroadMsgTask(CCardReadAdapterEntity* f, int msgType, int status) : pEntity(f),m_msgType(msgType),m_status(status) {}
+	void Process()
+	{
+		pEntity->DoBroadMsg(m_msgType, m_status);
+	}
+};

+ 1 - 1
Module/mod_cardissuerstore/CMakeLists.txt

@@ -5,6 +5,7 @@ set(${MODULE_PREFIX}_SRCS
 	mod_cardissuer.h
 	CardIssuerFSM.cpp
 	CardIssuerFSM.h
+	CardIssuerStore_UserErrorCode.h
 	${DevHeadPath}/CardAssist.cpp)
 list(APPEND ${MODULE_PREFIX}_SRCS)
 set(MOD_VERSION_STRING "1.0.0-dev1")
@@ -16,7 +17,6 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${ModuleCommonHeadPath}
 	${MODULE_BASE_DIR}/mod_heartbeat
 	${MODULE_BASE_DIR}/mod_accessauth
-	${MODULE_BASE_DIR}/mod_CardIssuerStand
 	${RVC_OTHER_DEPENDENIES_DIR}/libpublicFun
 	${CONAN_INCLUDE_DIRS_OPENSSL}
 	${CONAN_INCLUDE_DIRS_JSONCPP}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 231 - 141
Module/mod_cardissuerstore/CardIssuerFSM.cpp


+ 78 - 77
Module/mod_cardissuerstore/CardIssuerFSM.h

@@ -4,7 +4,7 @@
 #pragma once
 
 #include "SpFSM.h"
-#include "CardIssuer_server_g.h"
+#include "CardIssuerStore_server_g.h"
 #include "HeartBeat_client_g.h"
 #include "AccessAuthorization_client_g.h"
 #include "DevFSMCommBase.hpp"
@@ -16,7 +16,7 @@
 #include "json/json.h"
 #include "CardIssuerStore_UserErrorCode.h"	//后续替代EventCode.h,暂时混合使用,时间太紧
 #define REFLECTION(var) #var
-using namespace CardIssuer;
+using namespace CardIssuerStore;
 using namespace HeartBeat;
 using namespace AccessAuthorization;
 
@@ -125,7 +125,7 @@ class CardInitFinishedEvent : public FSMEvent
 public:
 	CardInitFinishedEvent() : FSMEvent(USER_EVT_INITFINISHED){}
 	~CardInitFinishedEvent(){}
-	SpReqAnsContext<CardIssuerService_Insert_Req,CardIssuerService_Insert_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Insert_Req,CardIssuerStoreService_Insert_Ans>::Pointer ctx;
 
 protected:
 private:
@@ -136,13 +136,13 @@ class QueryCardInfoOnStoreEvent : public FSMEvent
 public:
 	QueryCardInfoOnStoreEvent() : FSMEvent(USER_EVT_QUERYCARDINFO_ON_STORE) {}
 	~QueryCardInfoOnStoreEvent() {}
-	SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
 		{
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate CardStore unhandled");
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -152,13 +152,13 @@ class CardReadEvent : public FSMEvent
 public:
 	CardReadEvent() : FSMEvent(USER_EVT_READ) {}
 	~CardReadEvent() {}
-	SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
 		{
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("card read unhandled");
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 protected:
@@ -169,7 +169,7 @@ class CardReadFinishedEvent : public FSMEvent
 public:
 	CardReadFinishedEvent() : FSMEvent(USER_EVT_READ_FINISHED) {}
 	~CardReadFinishedEvent() {}
-	SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
@@ -201,11 +201,11 @@ class PreOnlineEvent : public FSMEvent
 public:
 	PreOnlineEvent() : FSMEvent(USER_EVT_PREONLINE){}
 	~PreOnlineEvent(){}
-	SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_PreOnline_Req,CardIssuerStoreService_PreOnline_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 	}
 protected:
 private:
@@ -215,11 +215,11 @@ class PostOnlineEvent : public FSMEvent
 public:
 	PostOnlineEvent() : FSMEvent(USER_EVT_POSTONLINE){}
 	~PostOnlineEvent(){}
-	SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_PostOnline_Req,CardIssuerStoreService_PostOnline_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 	}
 protected:
 private:
@@ -229,11 +229,11 @@ class CardCaptureEvent : public FSMEvent
 public:
 	CardCaptureEvent() : FSMEvent(USER_EVT_CAPTURE){}
 	~CardCaptureEvent(){}
-	SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Capture_Req,CardIssuerStoreService_Capture_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 	}
 
 protected:
@@ -244,11 +244,11 @@ class CardEjectEvent : public FSMEvent
 public:
 	CardEjectEvent() : FSMEvent(USER_EVT_EJECT){}
 	~CardEjectEvent(){}
-	SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Eject_Req,CardIssuerStoreService_Eject_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 	}
 protected:
 private:
@@ -258,13 +258,13 @@ class CardWriteEvent : public FSMEvent
 public:
 	CardWriteEvent() : FSMEvent(USER_EVT_WRITE){}
 	~CardWriteEvent(){}
-	SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req,CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
 		{
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("card read unhandled");
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 protected:
@@ -275,7 +275,7 @@ class CardWriteFinishedEvent : public FSMEvent
 public:
 	CardWriteFinishedEvent() : FSMEvent(USER_EVT_WRITE_FINISHED){}
 	~CardWriteFinishedEvent(){}
-	SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req,CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
 		if (ctx != NULL)
@@ -291,11 +291,11 @@ class GetMaterialExEvent : public FSMEvent
 public:
 	GetMaterialExEvent() : FSMEvent(USER_EVT_GET_MATERIAL_EX){}
 	~GetMaterialExEvent(){}
-	SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req, CardIssuerStoreService_GetMaterialCountEx_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 	}
 protected:
 private:
@@ -305,11 +305,11 @@ class SetMaterialExEvent : public FSMEvent
 public:
 	SetMaterialExEvent() : FSMEvent(USER_EVT_SET_MATERIAL_EX){}
 	~SetMaterialExEvent(){}
-	SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req, CardIssuerStoreService_SetMaterialCountEx_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 	}
 protected:
 private:
@@ -319,13 +319,13 @@ class CardIssueExEvent : public FSMEvent
 public:
 	CardIssueExEvent() : FSMEvent(USER_EVT_ISSUE_EX){}
 	~CardIssueExEvent(){}
-	SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
 		{
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("card issue ex unhandled");
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -334,13 +334,13 @@ class SAMICCommandEvent : public FSMEvent
 public:
 	SAMICCommandEvent() : FSMEvent(USER_EVT_SAM_IC){}
 	~SAMICCommandEvent(){}
-	SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
 		{
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("sam/ic unhandled");
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -349,12 +349,12 @@ class PrintCardImEvent : public FSMEvent
 public:
 	PrintCardImEvent() : FSMEvent(USER_EVT_PRINT_CARD_IM) {}
 	~PrintCardImEvent() {}
-	SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL){
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("PrintCardIm unhandled");
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -363,11 +363,11 @@ class PrintCardImFinishedEvent : public FSMEvent
 public:
 	PrintCardImFinishedEvent() : FSMEvent(USER_EVT_PRINT_CARD_IM_FINISHED) {}
 	~PrintCardImFinishedEvent() {}
-	SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
-			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_EntityInStateCannotProcess);
+			ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 	}
 };
 typedef struct EacQueryByEac_X1 {
@@ -804,7 +804,7 @@ public:
 			, m_bCardFromHopper(true), m_bStopUseRF(false),m_rfVendorList(""), m_bUseRFTillNext(false), m_csSwallowCardUrl(""),m_csSyncMaterialUrl(""), m_bNewAnsError(false)
 		, m_bCrossPreOnline(false), m_csMagT2Track(""), m_csMagT3Track(""), m_csMagAccout(""), m_csMagRegion(""), m_csMagCardSerial(""), m_csMagCVC(""), m_csMagExpireDate("")
 		{
-			HARDWARE_ENTITY_RESET_ENTITYID(m_entCode, 0x203);
+			HARDWARE_ENTITY_RESET_ENTITYID(m_entCode, 0x220);
 			cmdDecodeMag2 = NULL;
 			cmdDecodeEx = NULL;
 			m_aidList.Init(3);
@@ -865,23 +865,23 @@ public:
 	int Initial();
 	bool GetDevStatus(bool bPrint=true);
 	int UnAcceptCard();
-	int CaptureCard(SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx);
-	int EjectCard(SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx);
+	int CaptureCard(SpReqAnsContext<CardIssuerStoreService_Capture_Req,CardIssuerStoreService_Capture_Ans>::Pointer ctx);
+	int EjectCard(SpReqAnsContext<CardIssuerStoreService_Eject_Req,CardIssuerStoreService_Eject_Ans>::Pointer ctx);
 	int WaitFetchingCard();
-	int ReadCard(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx);
-	int PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx);
-	int PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx);
-	int ReadCard_Contact(SpReqAnsContext<CardIssuerService_Read_Req,CardIssuerService_Read_Ans>::Pointer ctx, bool& bICOK);
-	int PreOnline_Contact(SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx, bool& bICOK, bool& bContinue);
-	int PostOnline_Contact(SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx, bool& bICOK);
-	int ReadCard_RF(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx);
-	int PreOnline_RF(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx);
-	int PostOnline_RF(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx);
+	int ReadCard(SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx);
+	int PreOnline(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req, CardIssuerStoreService_PreOnline_Ans>::Pointer ctx);
+	int PostOnline(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req, CardIssuerStoreService_PostOnline_Ans>::Pointer ctx);
+	int ReadCard_Contact(SpReqAnsContext<CardIssuerStoreService_Read_Req,CardIssuerStoreService_Read_Ans>::Pointer ctx, bool& bICOK);
+	int PreOnline_Contact(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req,CardIssuerStoreService_PreOnline_Ans>::Pointer ctx, bool& bICOK, bool& bContinue);
+	int PostOnline_Contact(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req,CardIssuerStoreService_PostOnline_Ans>::Pointer ctx, bool& bICOK);
+	int ReadCard_RF(SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx);
+	int PreOnline_RF(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req, CardIssuerStoreService_PreOnline_Ans>::Pointer ctx);
+	int PostOnline_RF(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req, CardIssuerStoreService_PostOnline_Ans>::Pointer ctx);
 	int Reset();
 	int InternalAcceptCard();
-	int AcceptCard(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx);
-	int IssueCard(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctxEx);
-	int WriteCard(SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx);
+	int AcceptCard(SpReqAnsContext<CardIssuerStoreService_Insert_Req, CardIssuerStoreService_Insert_Ans>::Pointer ctx);
+	int IssueCard(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctxEx);
+	int WriteCard(SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req,CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx);
 
 	//bool GetWaitFlag(){return m_bWaitingAccept;}
 	//void SetWaitMore(){m_bWaitAccepteMore = true;}
@@ -913,25 +913,25 @@ public:
 	int SyncDataToDB(bool bMaintain[12],bool bSetCaptured=true);//同步物料计数
 	void SetHopperNum(int hopperNum);
 	void DoExitWhenIdle();
-	int SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx);
+	int SAMICCommand(SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx);
 	bool WriteSlotInfo(CSmartPointer<IConfigInfo> &cfgRun, const char *acc, const char *cardSerial,int slot,bool bClear=false);
 	bool ReadSlotInfo(CSmartPointer<IConfigInfo> &cfgRun, CSimpleStringA &acc, CSimpleStringA &cardSerial, int slot, int &hasCard);
 	bool WriteCardInfo(CSmartPointer<IConfigInfo> &cfgRun, const char *acc, const char* serial, int slot, bool bClear = false, bool bHasCard = false);
 	bool ReadCardInfo(CSmartPointer<IConfigInfo> &cfgRun, CSimpleStringA &acc, CSimpleStringA &serial, int slot);
-	int IssueCardFromStore(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx,bool isSpec=false);
-	int AddCardToStoreStepFirst(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx);
-	int AddCardToStoreStepLast(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx);
+	int IssueCardFromStore(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx,bool isSpec=false);
+	int AddCardToStoreStepFirst(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx);
+	int AddCardToStoreStepLast(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx);
 	int FindFirstEmptySlot();
 	bool IsValidSlotNum(const int slot);
 	bool IsSlotHasCard(const int slot);
 	bool OperateCardStore(CSmartPointer<IConfigInfo>&spConfigRun, int slot, int& status);
-	void ReturnCardInfo(int slotNum, int status, CSmartPointer<IConfigInfo>&spConfigRun, SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx);
+	void ReturnCardInfo(int slotNum, int status, CSmartPointer<IConfigInfo>&spConfigRun, SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx);
 	void ClearLocalRecord(CSmartPointer<IConfigInfo>&spConfigRun);
 	bool CheckHasPanKuRecord(CSmartPointer<IConfigInfo>&spConfigRun);
 	void AfterPreOnlineOnStore(ErrorCodeEnum eErr,const int slot);
-	int QueryCardInfoOnStore(SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx);
-	void GetAddCardInfo(SpReqAnsContext<CardIssuerService_GetAddCardInfo_Req, CardIssuerService_GetAddCardInfo_Ans>::Pointer ctx);
-	int PrintCardIm(SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx);
+	int QueryCardInfoOnStore(SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx);
+	void GetAddCardInfo(SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req, CardIssuerStoreService_GetAddCardInfo_Ans>::Pointer ctx);
+	int PrintCardIm(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx);
 	void DecodeTracksData(const char *track2, DWORD dwT2size, const char *track3, DWORD dwT3size,char *&magData,bool bT2OK=true,bool bT3OK=true);
 	int GetFSMState()
 	{ 
@@ -951,9 +951,10 @@ public:
 	bool GetDevInitFlag() { return m_bOpened; }
 
 	void SetInWhatPage(int bValue) { m_iInWhatPage = bValue; }
+	void SetEnterMainPage();
 	static void HttpsLogCallBack(const char* logtxt);
 	int JudgeCardType(CSimpleStringA cardno, bool &bMismatch);
-	void QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx);
+	void QueryCIStatus(SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req, CardIssuerStoreService_QueryCIStatus_Ans>::Pointer ctx);
 	bool RegistCardWhileCaptureCard(CSimpleStringA cardno);
 	bool SyncMaterialCount(IHttpFunc* client,SyncMaterialCountInfo syncInfo);
 	bool CheckIsCrossPreOnline() { return m_bCrossPreOnline; }
@@ -1031,29 +1032,29 @@ private:
 		switch (eErr)
 		{
 		case Error_Dev_HopperHasNoCard:
-			return CardIssuer_UserErrorCode_Dev_HopperHasNoCard;
+			return CardIssuerStore_UserErrorCode_Dev_HopperHasNoCard;
 		case Error_Dev_HopperMissing:
-			return CardIssuer_UserErrorCode_Dev_HopperMissing;
+			return CardIssuerStore_UserErrorCode_Dev_HopperMissing;
 		case Error_Dev_TransCarJammed:
-			return CardIssuer_UserErrorCode_Dev_TransCarJammed;
+			return CardIssuerStore_UserErrorCode_Dev_TransCarJammed;
 		case Error_Dev_RetainBinFull:
-			return CardIssuer_UserErrorCode_Dev_RetainBinFull;
+			return CardIssuerStore_UserErrorCode_Dev_RetainBinFull;
 		case Error_Dev_RetainBinMissing:
-			return CardIssuer_UserErrorCode_Dev_RetainBinMissing;
+			return CardIssuerStore_UserErrorCode_Dev_RetainBinMissing;
 		case Error_Dev_CardInReader:
-			return CardIssuer_UserErrorCode_Dev_CardInReader;
+			return CardIssuerStore_UserErrorCode_Dev_CardInReader;
 		case Error_Dev_SlotHasNoCard:
-			return CardIssuer_UserErrorCode_Dev_SlotHasNoCard;
+			return CardIssuerStore_UserErrorCode_Dev_SlotHasNoCard;
 		case Error_Dev_CardInSlot:
-			return CardIssuer_UserErrorCode_Dev_CardInSlot;
+			return CardIssuerStore_UserErrorCode_Dev_CardInSlot;
 		case Error_Dev_NoCardInReader:
-			return CardIssuer_UserErrorCode_Dev_NoCardInReader;
+			return CardIssuerStore_UserErrorCode_Dev_NoCardInReader;
 		case Error_Dev_CardJammed:
-			return CardIssuer_UserErrorCode_Dev_CardJammed;
+			return CardIssuerStore_UserErrorCode_Dev_CardJammed;
 		case Error_Dev_SlotJammed:
-			return CardIssuer_UserErrorCode_Dev_SlotJammed;
+			return CardIssuerStore_UserErrorCode_Dev_SlotJammed;
 		case Error_Dev_SlotInvalid:
-			return CardIssuer_UserErrorCode_Dev_SlotInvalid;
+			return CardIssuerStore_UserErrorCode_Dev_SlotInvalid;
 		default:
 			bTrans = false;
 			return dwApiCode;
@@ -1079,7 +1080,7 @@ struct InitTask : public ITaskSp
 struct IssueTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctxEx;
+	SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctxEx;
 	IssueTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
@@ -1099,7 +1100,7 @@ struct IssueTask : public ITaskSp
 struct QueryCardInfoOnStoreTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx;
 	QueryCardInfoOnStoreTask(CCardIssuerFSM* f) : fsm(f){}
 	void Process()
 	{
@@ -1119,7 +1120,7 @@ struct QueryCardInfoOnStoreTask : public ITaskSp
 
 struct ReadTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_Read_Req,CardIssuerService_Read_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Read_Req,CardIssuerStoreService_Read_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	ReadTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1132,7 +1133,7 @@ struct ReadTask : public ITaskSp
 };
 struct PreOnlineTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_PreOnline_Req,CardIssuerService_PreOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_PreOnline_Req,CardIssuerStoreService_PreOnline_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	PreOnlineTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1145,7 +1146,7 @@ struct PreOnlineTask : public ITaskSp
 };
 struct PostOnlineTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_PostOnline_Req,CardIssuerService_PostOnline_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_PostOnline_Req,CardIssuerStoreService_PostOnline_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	PostOnlineTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1158,7 +1159,7 @@ struct PostOnlineTask : public ITaskSp
 struct CaptureTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_Capture_Req,CardIssuerService_Capture_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Capture_Req,CardIssuerStoreService_Capture_Ans>::Pointer ctx;
 	CaptureTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
@@ -1169,7 +1170,7 @@ struct CaptureTask : public ITaskSp
 };
 struct EjectTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_Eject_Req,CardIssuerService_Eject_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_Eject_Req,CardIssuerStoreService_Eject_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	EjectTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1203,7 +1204,7 @@ struct ResetTask : public ITaskSp
 };
 struct WriteTask : public ITaskSp
 {
-	SpReqAnsContext<CardIssuerService_WriteTrack_Req,CardIssuerService_WriteTrack_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req,CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx;
 	CCardIssuerFSM* fsm;
 	WriteTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
@@ -1226,7 +1227,7 @@ struct DoExitWhenIdleTask : public ITaskSp
 struct SAMICCommandTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx;
 	SAMICCommandTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
@@ -1239,7 +1240,7 @@ struct SAMICCommandTask : public ITaskSp
 struct PrintCardImTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx;
+	SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx;
 	PrintCardImTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{

+ 449 - 0
Module/mod_cardissuerstore/CardIssuerStore.xml

@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="gb2312" ?>
+<entity name="CardIssuerStore">
+	<class name="CardIssuerStoreService" overlap="true" exclusive="false">	
+		<twoway name="Insert" overlap="true" method_id="0">
+			<req>
+				<param name="aid" type="string"/>
+			</req>
+			<res>
+			</res>			
+		</twoway>
+		<oneway name="CancelInsert" overlap="true" method_id="1">			
+		</oneway>
+		<oneway name="InsertWaitMore" overlap="true" method_id="2">			
+		</oneway>					
+		<twoway name="Read" overlap="true" method_id="3">
+			<req>
+				<param name="aid" type="string"/>
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="int"/>
+				<param name="reserved3" type="string"/>
+				<param name="reserved4" type="string"/>
+			</req>
+			<res>
+				<param name="track1" type="string"/>
+				<param name="track2" type="string"/>
+				<param name="track3" type="string"/>
+				<param name="ICType" type="int"/>
+				<param name="ICData" type="string"/>
+				<param name="status" type="int" />
+				<param name="t2Account" type="string" />
+				<param name="t2Region" type="string" />
+				<param name="t2CardSerial" type="string" />
+				<param name="t2CVC" type="string" />
+				<param name="t2ExpireDate" type="string" />
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="int"/>
+				<param name="reserved3" type="string"/>
+				<param name="reserved4" type="string"/>
+			</res>
+		</twoway>			
+		<twoway name="Capture" overlap="true" method_id="4">
+			<req>
+			</req>
+			<res>
+			</res>			
+		</twoway>
+		<twoway name="Eject" overlap="true" method_id="5">
+			<req>
+			</req>
+			<res>
+			</res>			
+		</twoway>						
+		<twoway name="PreOnline" overlap="true" method_id="6">
+			<req>
+				<param name="businessData" type="string"/>
+				<param name="reserved1" type="string"/>
+				<param name="reserved2" type="string"/>
+			</req>
+			<res>
+				<param name="result" type="string"/>
+			</res>			
+		</twoway>
+		<twoway name="PostOnline" overlap="true" method_id="7">
+			<req>
+				<param name="data" type="string"/>
+			</req>
+			<res>
+				<param name="result" type="string"/>
+			</res>			
+		</twoway>
+		<oneway name="Exit" overlap="true" method_id="8">			
+		</oneway>			
+		<twoway name="Issue" overlap="true" method_id="9">
+			<req>
+			</req>
+			<res>
+			</res>			
+		</twoway>				
+		<twoway name="GetMaterialCount" overlap="true" method_id="10">
+			<req>
+			</req>
+			<res>
+				<param name="remains" type="int"/>
+				<param name="captured" type="int"/>
+				<param name="issued" type="int"/>
+				<param name="mixed" type="int"/>
+			</res>			
+		</twoway>
+		<twoway name="SetMaterialCount" overlap="true" method_id="11">
+			<req>
+				<param name="remains" type="int"/>
+				<param name="captured" type="int"/>
+				<param name="issued" type="int"/>
+				<param name="bRemains" type="bool"/>
+				<param name="bCaptured" type="bool"/>				
+				<param name="bIssued" type="bool"/>
+				<param name="mixed" type="int"/>
+				<param name="bMixed" type="bool"/>
+			</req>
+			<res>
+			</res>			
+		</twoway>
+		<oneway name="SetIssueFlag" overlap="true" method_id="12">			
+		</oneway>
+		<twoway name="ReadEx" overlap="true" method_id="13">
+			<req>
+				<param name="aid" type="string"/>
+				<param name="reserved1" type="string"/>
+				<param name="reserved2" type="string"/>
+			</req>
+			<res>
+				<param name="track1" type="string"/>
+				<param name="track2" type="string"/>
+				<param name="track3" type="string"/>
+				<param name="CDType" type="int"/>
+				<param name="ICType" type="int"/>
+				<param name="CMBType" type="int"/>
+				<param name="ICData" type="string"/>
+				<param name="status" type="int" />
+				<param name="t2Account" type="string" />
+				<param name="t2Region" type="string" />
+				<param name="t2CardSerial" type="string" />
+				<param name="t2CVC" type="string" />
+				<param name="t2ExpireDate" type="string" />
+				<param name="reserved1" type="string"/>
+				<param name="reserved2" type="string"/>
+			</res>
+		</twoway>
+		<twoway name="QueryCardInfo" overlap="true" method_id="14">
+			<req>
+			</req>
+			<res>
+				<param name="position" type="int"/>
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="string"/>
+			</res>			
+		</twoway>
+		<twoway name="WriteTrack" overlap="true" method_id="15">
+			<req>
+				<param name="mode" type="int"/>
+				<param name="co" type="int"/>
+				<param name="track1" type="wstring"/>
+				<param name="track2" type="wstring"/>
+				<param name="track3" type="wstring"/>
+				<param name="reserved" type="wstring"/>
+			</req>
+			<res>
+				<param name="result" type="int"/>
+				<param name="reserved1" type="int"/>
+				<param name="reserved2" type="string"/>
+			</res>
+		</twoway>
+		<twoway name="GetMaterialCountEx" overlap="true" method_id="16">
+			<req>
+				<param name="GetHopper" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>		
+			</req>
+			<res>
+				<param name="captured" type="int"/>
+				<param name="hasHopper" type="array_int"/>
+				<param name="CardBoxNo" type="array_string"/>
+				<param name="PsbCode" type="array_string"/>
+				<param name="PsbName" type="array_string"/>
+				<param name="Maintainer" type="array_string"/>
+				<param name="MaintainTime" type="array_string"/>
+				<param name="CardInit" type="array_int"/>
+				<param name="CardPercent" type="array_int"/>
+				<param name="remains" type="array_int"/>
+				<param name="issued" type="array_int"/>
+				<param name="mixed" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</res>			
+		</twoway>
+		<twoway name="SetMaterialCountEx" overlap="true" method_id="17">
+			<req>
+				<param name="SetHopper" type="array_int"/>
+				<param name="SetCaptured" type="int"/>
+				<param name="captured" type="int"/>
+				<param name="CardBoxNo" type="array_string"/>
+				<param name="PsbCode" type="array_string"/>
+				<param name="PsbName" type="array_string"/>
+				<param name="Maintainer" type="array_string"/>
+				<param name="MaintainTime" type="array_string"/>
+				<param name="CardInit" type="array_int"/>
+				<param name="CardPercent" type="array_int"/>
+				<param name="remains" type="array_int"/>
+				<param name="issued" type="array_int"/>
+				<param name="mixed" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>	
+			</res>			
+		</twoway>
+		<twoway name="SetSomeFlag" overlap="true" method_id="18">
+			<req>
+				<param name="IssueBusiness" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</res>				
+		</twoway>
+		<twoway name="GetSCIInfo" overlap="true" method_id="19">
+			<req>
+			</req>
+			<res>
+				<param name="connected" type="int"/>
+				<param name="DevSN" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>
+			</res>			
+		</twoway>
+		<twoway name="IssueEx" overlap="true" method_id="20">
+			<req>
+				<param name="hopper" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="OpenSafeLock" overlap="true" method_id="21">
+			<req>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="SAMICCommand" overlap="true" method_id="22">
+			<req>
+				<param name="cmdType" type="int"/>
+				<param name="param1" type="array_int"/>
+				<param name="param2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="ret1" type="array_int"/>
+				<param name="ret2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="QueryPrinterStatus" overlap="true" method_id="23">
+			<req>
+				<param name="param1" type="array_int"/>
+				<param name="param2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="ret1" type="array_int"/>
+				<param name="ret2" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="Print" overlap="true" method_id="24">
+			<req>
+				<param name="data1" type="blob"/>
+				<param name="data2" type="blob"/>
+				<param name="data3" type="blob"/>
+				<param name="data4" type="blob"/>
+				<param name="data5" type="blob"/>
+				<param name="data6" type="blob"/>				
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="QuerySCIList" overlap="true" method_id="25">
+			<req>			
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="sciNo" type="array_string"/>
+        <param name="arrMateriel" type="array_string"/>
+        <param name="CardGroove" type="array_string"/>
+        <param name="CardBoxNo" type="array_string"/>
+        <param name="PsbCode" type="array_string"/>
+        <param name="PsbName" type="array_string"/>
+        <param name="CardInit" type="array_uint"/>
+        <param name="CardRemains" type="array_uint"/>
+        <param name="CardIssued" type="array_uint"/>
+        <param name="CardMixed" type="array_uint"/>
+        <param name="CardPercent" type="array_uint"/>
+        <param name="Maintainer" type="array_string"/>
+        <param name="MaintainTime" type="array_string"/>
+        <param name="UpdateTime" type="array_string"/>				
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>		
+		<twoway name="BindSCI" overlap="true" method_id="26">
+			<req>
+				<param name="type" type="int"/>
+				<param name="sciNo" type="string" />			
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>			
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_string"/>					
+			</res>			
+		</twoway>
+		<twoway name="PreOnlineOnStore" overlap="true" method_id="27">
+			<req>
+				<param name="account" type="string"/>
+				<param name="termNo" type="string"/>
+				<param name="businessData" type="string"/>
+				<param name="slot" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="findCard" type="int"/>
+				<param name="cardPos" type="int"/>
+				<param name="result" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="NotifyPreonline" overlap="true" method_id="28">
+			<req>
+				<param name="findCard" type="int"/>
+				<param name="cardPos" type="int"/>			
+				<param name="errCode" type="int"/>			
+				<param name="account" type="string"/>
+				<param name="termNo" type="string"/>
+				<param name="data" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="QueryCardInfoOnStore" overlap="true" method_id="29">
+			<req>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="findCard" type="int"/>
+				<param name="cardPos" type="int"/>					
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="GetAddCardInfo" overlap="true" method_id="30">
+			<req>
+				<param name="isSync" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="count" type="int"/>
+				<param name="slot" type="array_int"/>
+				<param name="account" type="array_string"/>							
+				<param name="cardSerial" type="array_string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>		
+		<twoway name="PrintCardImmediately" overlap="true" method_id="31">
+			<req>
+				<param name="formFile" type="string"/>
+				<param name="printData" type="string"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="ret" type="int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>
+		<twoway name="QueryCIStatus" overlap="true" method_id="32">
+			<req>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>
+			</req>
+			<res>
+				<param name="retainBin" type="int"/>
+				<param name="hopperNo" type="array_int"/>
+				<param name="hopperStatus" type="array_int"/>
+				<param name="reserved1" type="array_int"/>
+				<param name="reserved2" type="array_int"/>
+				<param name="reserved3" type="array_string"/>
+				<param name="reserved4" type="array_string"/>				
+			</res>			
+		</twoway>																		
+		<twoway name="GetDevInfo" overlap="true" method_id="65535">
+			<req>
+			</req>
+			<res>
+				<param name="type" type="string" />
+				<param name="model" type="string" />
+				<param name="version" type="string" />
+				<param name="state" type="int" />
+			</res>			
+		</twoway>							
+	</class>
+	<message name="FetchCard">
+			<param name="status" type="int"/>
+	</message>
+	<message name="SCIConnect">
+			<param name="status" type="int"/>
+	</message>			
+</entity>

+ 175 - 172
Module/mod_cardissuerstore/CardIssuerStore_UserErrorCode.h

@@ -2,210 +2,213 @@
 #define _CARDISSUERSTORE_USER_ERRORCODE_H
 #pragma once
 
-#define CardIssuer_UserErrorCode_Start 0x20300200
-
-#define CardIssuer_UserErrorCode_No_Encryted_Channel				(CardIssuer_UserErrorCode_Start + 1)	//未建立安全通道
-#define CardIssuer_UserErrorCode_Open_RunCfgFile_Failed				(CardIssuer_UserErrorCode_Start + 2)	//打开运行时配置失败
-#define CardIssuer_UserErrorCode_EntityInFailState					(CardIssuer_UserErrorCode_Start + 3)	//卡机处于故障态,请稍后重试,重试还有问题请联系厂商维护
-#define CardIssuer_UserErrorCode_NotHas_Hopper1						(CardIssuer_UserErrorCode_Start + 4)	//未检测到卡箱1,请确认卡箱1是否有卡箱
-#define CardIssuer_UserErrorCode_NotHas_Hopper2						(CardIssuer_UserErrorCode_Start + 5)	//未检测到卡箱2,请确认卡箱2是否有卡箱
-#define CardIssuer_UserErrorCode_NotHas_Hopper3						(CardIssuer_UserErrorCode_Start + 6)	//未检测到卡箱3,请确认卡箱3是否有卡箱
-#define CardIssuer_UserErrorCode_NoCardInHopper1					(CardIssuer_UserErrorCode_Start + 7)	//卡箱1未检测到卡片	请确认卡箱1内卡片是否为空或重新摆放卡片
-#define CardIssuer_UserErrorCode_NoCardInHopper2					(CardIssuer_UserErrorCode_Start + 8)	//卡箱2未检测到卡片	请确认卡箱2内卡片是否为空或重新摆放卡片
-#define CardIssuer_UserErrorCode_NoCardInHopper3					(CardIssuer_UserErrorCode_Start + 9)	//卡箱3未检测到卡片	请确认卡箱3内卡片是否为空或重新摆放卡片
-#define CardIssuer_UserErrorCode_NoCardRemains_Hopper1				(CardIssuer_UserErrorCode_Start + 10)	//卡箱1剩余卡片计数为0(空)
-#define CardIssuer_UserErrorCode_NoCardRemains_Hopper2				(CardIssuer_UserErrorCode_Start + 11)	//卡箱2剩余卡片计数为0(空)
-#define CardIssuer_UserErrorCode_NoCardRemains_Hopper3				(CardIssuer_UserErrorCode_Start + 12)	//卡箱3剩余卡片计数为0(空)
-#define CardIssuer_UserErrorCode_MoveCard_FromHopper				(CardIssuer_UserErrorCode_Start + 13)	//卡片从卡箱移到读卡器
-#define CardIssuer_UserErrorCode_MoveCardToGate_Failed				(CardIssuer_UserErrorCode_Start + 14)	//前端进卡,吐卡失败
-#define CardIssuer_UserErrorCode_KakuFindEmptySlot_Failed			(CardIssuer_UserErrorCode_Start + 15)	//卡库找不到空闲卡槽
-#define CardIssuer_UserErrorCode_KakuHaveOldPanKuRecord				(CardIssuer_UserErrorCode_Start + 16)	//卡库有旧的盘库记录
-#define CardIssuer_UserErrorCode_KakuQuerySlot_Failed				(CardIssuer_UserErrorCode_Start + 17)	//卡库查询卡槽状态失败
-#define CardIssuer_UserErrorCode_KakuHaveNoPanKuRecord				(CardIssuer_UserErrorCode_Start + 18)	//卡库没有盘库记录
-#define CardIssuer_UserErrorCode_KakuPanKu_Failed					(CardIssuer_UserErrorCode_Start + 19)	//卡库盘库失败
-
-#define CardIssuer_UserErrorCode_Customer_Forget_Fectch_Card		(CardIssuer_UserErrorCode_Start + 20)	//客户超时未取卡
-#define CardIssuer_UserErrorCode_NotHas_Hopper4						(CardIssuer_UserErrorCode_Start + 21)	//未检测到卡箱4,请确认卡箱1是否有卡箱
-#define CardIssuer_UserErrorCode_NotHas_Hopper5						(CardIssuer_UserErrorCode_Start + 22)	//未检测到卡箱5,请确认卡箱2是否有卡箱
-#define CardIssuer_UserErrorCode_NotHas_Hopper6						(CardIssuer_UserErrorCode_Start + 23)	//未检测到卡箱6,请确认卡箱3是否有卡箱
-#define CardIssuer_UserErrorCode_NoCardInHopper4					(CardIssuer_UserErrorCode_Start + 24)	//卡箱4未检测到卡片	请确认卡箱4内卡片是否为空或重新摆放卡片
-#define CardIssuer_UserErrorCode_NoCardInHopper5					(CardIssuer_UserErrorCode_Start + 25)	//卡箱5未检测到卡片	请确认卡箱5内卡片是否为空或重新摆放卡片
-#define CardIssuer_UserErrorCode_NoCardInHopper6					(CardIssuer_UserErrorCode_Start + 26)	//卡箱6未检测到卡片	请确认卡箱6内卡片是否为空或重新摆放卡片
-#define CardIssuer_UserErrorCode_ICChannel_Failed					(CardIssuer_UserErrorCode_Start + 27)	//IC指令通道失败(实时制卡APDU)
-#define CardIssuer_UserErrorCode_NoCardRemains_Hopper4				(CardIssuer_UserErrorCode_Start + 28)	//卡箱4剩余卡片计数为0(空)
-#define CardIssuer_UserErrorCode_NoCardRemains_Hopper5				(CardIssuer_UserErrorCode_Start + 29)	//卡箱5剩余卡片计数为0(空)
-#define CardIssuer_UserErrorCode_NoCardRemains_Hopper6				(CardIssuer_UserErrorCode_Start + 30)	//卡箱6剩余卡片计数为0(空)
-#define CardIssuer_UserErrorCode_LogInfoAboutTerm					(CardIssuer_UserErrorCode_Start + 31)	//告警上送终端模块信息
-#define CardIssuer_UserErrorCode_KebaDeviceInfo						(CardIssuer_UserErrorCode_Start + 32)	//告警上送科堡机型信息
-#define CardIssuer_UserErrorCode_RootInfo							(CardIssuer_UserErrorCode_Start + 33)  //root中版本批次号
-#define CardIssuer_UserErrorCode_Adapter_Version					(CardIssuer_UserErrorCode_Start + 34)//告警适配器版本号(长城卡库是将驱动版本号告警上来)
-#define CardIssuer_UserErrorCode_DevOpenTime						(CardIssuer_UserErrorCode_Start + 35) //统计DevOpen时长
-
-#define CardIssuer_UserErrorCode_CaptureCard_OnExit					(CardIssuer_UserErrorCode_Start + 36) //OnExit时吞卡,实体退出。实际上会吗?
-#define CardIssuer_UserErrorCode_CaptureCard_Reset					(CardIssuer_UserErrorCode_Start + 37) //Reset时吞卡
-#define CardIssuer_UserErrorCode_CaptureCard_IssueExit				(CardIssuer_UserErrorCode_Start + 38) //发卡时业务强退
-#define CardIssuer_UserErrorCode_CaptureCard_IdleExit				(CardIssuer_UserErrorCode_Start + 39) //Idle空闲状态处理Exit事件时吞卡
-#define CardIssuer_UserErrorCode_CaptureCard_FromBusiness			(CardIssuer_UserErrorCode_Start + 40) //业务主动发起调用CaptureCard
-
-#define CardIssuer_UserErrorCode_EntityInStateCannotProcess			(CardIssuer_UserErrorCode_Start + 41) //卡机当前状态无法处理此请求
-#define CardIssuer_UserErrorCode_MoveCardToSlot						(CardIssuer_UserErrorCode_Start + 42) //卡片移到卡槽
-#define CardIssuer_UserErrorCode_MoveCardFromSlot					(CardIssuer_UserErrorCode_Start + 43) //卡槽移到卡机
-#define CardIssuer_UserErrorCode_PrintCardFaceRightNow				(CardIssuer_UserErrorCode_Start + 44) //卡面打印
-#define CardIssuer_UserErrorCode_InsertCardSucceed					(CardIssuer_UserErrorCode_Start + 45) //前端插卡
-
-#define CardIssuer_UserErrorCode_StandEntityInFailState				(CardIssuer_UserErrorCode_Start + 46)	//卡机处于故障态,请稍后重试,重试还有问题请联系厂商维护
-
-#define CardIssuer_UserErrorCode_CardStore_SlotNum					(CardIssuer_UserErrorCode_Start + 49) //记录卡库容量
-#define CardIssuer_UserErrorCode_Invoke_Access_IniDev_Failed		(CardIssuer_UserErrorCode_Start + 50) //建立加密通道时,调用准入接口失败
-#define CardIssuer_UserErrorCode_Connect_Access_Failed				(CardIssuer_UserErrorCode_Start + 51) //建立加密通道时,连接准入实体失败
-#define CardIssuer_UserErrorCode_Safe_Channel_Build_Failed			(CardIssuer_UserErrorCode_Start + 52) //安全加密通道建立失败
-#define CardIssuer_UserErrorCode_No_More_Card_Issue					(CardIssuer_UserErrorCode_Start + 53) //卡箱已无卡往出发
-
-#define CardIssuer_UserErrorCode_CFG_RUN_POINTER_FAILED				(CardIssuer_UserErrorCode_Start + 54) //卡箱已无卡往出发
-
-#define CardIssuer_UserErrorCode_RETAIN_BIN_IS_FULL_SENSOR			(CardIssuer_UserErrorCode_Start + 55)//厂商传感器,回收箱满
-#define CardIssuer_UserErrorCode_FEW_CARD_REMAINS					(CardIssuer_UserErrorCode_Start + 56)//卡箱少卡
-#define CardIssuer_UserErrorCode_RETAIN_BIN_IS_FULL					(CardIssuer_UserErrorCode_Start + 57)//计数显示,回收箱满
-
-#define CardIssuer_UserErrorCode_Create_Object_Failed				(CardIssuer_UserErrorCode_Start + 58)//创建适配器指针对象失败
-#define CardIssuer_UserErrorCode_Track2_ServiceCode					(CardIssuer_UserErrorCode_Start + 59)//记录二磁道的服务代码
+#define CardIssuerStore_UserErrorCode_Start 0x22000200
+
+#define CardIssuerStore_UserErrorCode_No_Encryted_Channel				(CardIssuerStore_UserErrorCode_Start + 1)	//未建立安全通道
+#define CardIssuerStore_UserErrorCode_Open_RunCfgFile_Failed				(CardIssuerStore_UserErrorCode_Start + 2)	//打开运行时配置失败
+#define CardIssuerStore_UserErrorCode_EntityInFailState					(CardIssuerStore_UserErrorCode_Start + 3)	//卡机处于故障态,请稍后重试,重试还有问题请联系厂商维护
+#define CardIssuerStore_UserErrorCode_NotHas_Hopper1						(CardIssuerStore_UserErrorCode_Start + 4)	//未检测到卡箱1,请确认卡箱1是否有卡箱
+#define CardIssuerStore_UserErrorCode_NotHas_Hopper2						(CardIssuerStore_UserErrorCode_Start + 5)	//未检测到卡箱2,请确认卡箱2是否有卡箱
+#define CardIssuerStore_UserErrorCode_NotHas_Hopper3						(CardIssuerStore_UserErrorCode_Start + 6)	//未检测到卡箱3,请确认卡箱3是否有卡箱
+#define CardIssuerStore_UserErrorCode_NoCardInHopper1					(CardIssuerStore_UserErrorCode_Start + 7)	//卡箱1未检测到卡片	请确认卡箱1内卡片是否为空或重新摆放卡片
+#define CardIssuerStore_UserErrorCode_NoCardInHopper2					(CardIssuerStore_UserErrorCode_Start + 8)	//卡箱2未检测到卡片	请确认卡箱2内卡片是否为空或重新摆放卡片
+#define CardIssuerStore_UserErrorCode_NoCardInHopper3					(CardIssuerStore_UserErrorCode_Start + 9)	//卡箱3未检测到卡片	请确认卡箱3内卡片是否为空或重新摆放卡片
+#define CardIssuerStore_UserErrorCode_NoCardRemains_Hopper1				(CardIssuerStore_UserErrorCode_Start + 10)	//卡箱1剩余卡片计数为0(空)
+#define CardIssuerStore_UserErrorCode_NoCardRemains_Hopper2				(CardIssuerStore_UserErrorCode_Start + 11)	//卡箱2剩余卡片计数为0(空)
+#define CardIssuerStore_UserErrorCode_NoCardRemains_Hopper3				(CardIssuerStore_UserErrorCode_Start + 12)	//卡箱3剩余卡片计数为0(空)
+#define CardIssuerStore_UserErrorCode_MoveCard_FromHopper				(CardIssuerStore_UserErrorCode_Start + 13)	//卡片从卡箱移到读卡器
+#define CardIssuerStore_UserErrorCode_MoveCardToGate_Failed				(CardIssuerStore_UserErrorCode_Start + 14)	//前端进卡,吐卡失败
+#define CardIssuerStore_UserErrorCode_KakuFindEmptySlot_Failed			(CardIssuerStore_UserErrorCode_Start + 15)	//卡库找不到空闲卡槽
+#define CardIssuerStore_UserErrorCode_KakuHaveOldPanKuRecord				(CardIssuerStore_UserErrorCode_Start + 16)	//卡库有旧的盘库记录
+#define CardIssuerStore_UserErrorCode_KakuQuerySlot_Failed				(CardIssuerStore_UserErrorCode_Start + 17)	//卡库查询卡槽状态失败
+#define CardIssuerStore_UserErrorCode_KakuHaveNoPanKuRecord				(CardIssuerStore_UserErrorCode_Start + 18)	//卡库没有盘库记录
+#define CardIssuerStore_UserErrorCode_KakuPanKu_Failed					(CardIssuerStore_UserErrorCode_Start + 19)	//卡库盘库失败
+
+#define CardIssuerStore_UserErrorCode_Customer_Forget_Fectch_Card		(CardIssuerStore_UserErrorCode_Start + 20)	//客户超时未取卡
+#define CardIssuerStore_UserErrorCode_NotHas_Hopper4						(CardIssuerStore_UserErrorCode_Start + 21)	//未检测到卡箱4,请确认卡箱1是否有卡箱
+#define CardIssuerStore_UserErrorCode_NotHas_Hopper5						(CardIssuerStore_UserErrorCode_Start + 22)	//未检测到卡箱5,请确认卡箱2是否有卡箱
+#define CardIssuerStore_UserErrorCode_NotHas_Hopper6						(CardIssuerStore_UserErrorCode_Start + 23)	//未检测到卡箱6,请确认卡箱3是否有卡箱
+#define CardIssuerStore_UserErrorCode_NoCardInHopper4					(CardIssuerStore_UserErrorCode_Start + 24)	//卡箱4未检测到卡片	请确认卡箱4内卡片是否为空或重新摆放卡片
+#define CardIssuerStore_UserErrorCode_NoCardInHopper5					(CardIssuerStore_UserErrorCode_Start + 25)	//卡箱5未检测到卡片	请确认卡箱5内卡片是否为空或重新摆放卡片
+#define CardIssuerStore_UserErrorCode_NoCardInHopper6					(CardIssuerStore_UserErrorCode_Start + 26)	//卡箱6未检测到卡片	请确认卡箱6内卡片是否为空或重新摆放卡片
+#define CardIssuerStore_UserErrorCode_ICChannel_Failed					(CardIssuerStore_UserErrorCode_Start + 27)	//IC指令通道失败(实时制卡APDU)
+#define CardIssuerStore_UserErrorCode_NoCardRemains_Hopper4				(CardIssuerStore_UserErrorCode_Start + 28)	//卡箱4剩余卡片计数为0(空)
+#define CardIssuerStore_UserErrorCode_NoCardRemains_Hopper5				(CardIssuerStore_UserErrorCode_Start + 29)	//卡箱5剩余卡片计数为0(空)
+#define CardIssuerStore_UserErrorCode_NoCardRemains_Hopper6				(CardIssuerStore_UserErrorCode_Start + 30)	//卡箱6剩余卡片计数为0(空)
+#define CardIssuerStore_UserErrorCode_LogInfoAboutTerm					(CardIssuerStore_UserErrorCode_Start + 31)	//告警上送终端模块信息
+#define CardIssuerStore_UserErrorCode_KebaDeviceInfo						(CardIssuerStore_UserErrorCode_Start + 32)	//告警上送科堡机型信息
+#define CardIssuerStore_UserErrorCode_RootInfo							(CardIssuerStore_UserErrorCode_Start + 33)  //root中版本批次号
+#define CardIssuerStore_UserErrorCode_Adapter_Version					(CardIssuerStore_UserErrorCode_Start + 34)//告警适配器版本号(长城卡库是将驱动版本号告警上来)
+#define CardIssuerStore_UserErrorCode_DevOpenTime						(CardIssuerStore_UserErrorCode_Start + 35) //统计DevOpen时长
+
+#define CardIssuerStore_UserErrorCode_CaptureCard_OnExit					(CardIssuerStore_UserErrorCode_Start + 36) //OnExit时吞卡,实体退出。实际上会吗?
+#define CardIssuerStore_UserErrorCode_CaptureCard_Reset					(CardIssuerStore_UserErrorCode_Start + 37) //Reset时吞卡
+#define CardIssuerStore_UserErrorCode_CaptureCard_IssueExit				(CardIssuerStore_UserErrorCode_Start + 38) //发卡时业务强退
+#define CardIssuerStore_UserErrorCode_CaptureCard_IdleExit				(CardIssuerStore_UserErrorCode_Start + 39) //Idle空闲状态处理Exit事件时吞卡
+#define CardIssuerStore_UserErrorCode_CaptureCard_FromBusiness			(CardIssuerStore_UserErrorCode_Start + 40) //业务主动发起调用CaptureCard
+
+#define CardIssuerStore_UserErrorCode_EntityInStateCannotProcess			(CardIssuerStore_UserErrorCode_Start + 41) //卡机当前状态无法处理此请求
+#define CardIssuerStore_UserErrorCode_MoveCardToSlot						(CardIssuerStore_UserErrorCode_Start + 42) //卡片移到卡槽
+#define CardIssuerStore_UserErrorCode_MoveCardFromSlot					(CardIssuerStore_UserErrorCode_Start + 43) //卡槽移到卡机
+#define CardIssuerStore_UserErrorCode_PrintCardFaceRightNow				(CardIssuerStore_UserErrorCode_Start + 44) //卡面打印
+#define CardIssuerStore_UserErrorCode_InsertCardSucceed					(CardIssuerStore_UserErrorCode_Start + 45) //前端插卡
+
+#define CardIssuerStore_UserErrorCode_StandEntityInFailState				(CardIssuerStore_UserErrorCode_Start + 46)	//卡机处于故障态,请稍后重试,重试还有问题请联系厂商维护
+
+#define CardIssuerStore_UserErrorCode_CardStore_SlotNum					(CardIssuerStore_UserErrorCode_Start + 49) //记录卡库容量
+#define CardIssuerStore_UserErrorCode_Invoke_Access_IniDev_Failed		(CardIssuerStore_UserErrorCode_Start + 50) //建立加密通道时,调用准入接口失败
+#define CardIssuerStore_UserErrorCode_Connect_Access_Failed				(CardIssuerStore_UserErrorCode_Start + 51) //建立加密通道时,连接准入实体失败
+#define CardIssuerStore_UserErrorCode_Safe_Channel_Build_Failed			(CardIssuerStore_UserErrorCode_Start + 52) //安全加密通道建立失败
+#define CardIssuerStore_UserErrorCode_No_More_Card_Issue					(CardIssuerStore_UserErrorCode_Start + 53) //卡箱已无卡往出发
+
+#define CardIssuerStore_UserErrorCode_CFG_RUN_POINTER_FAILED				(CardIssuerStore_UserErrorCode_Start + 54) //卡箱已无卡往出发
+
+#define CardIssuerStore_UserErrorCode_RETAIN_BIN_IS_FULL_SENSOR			(CardIssuerStore_UserErrorCode_Start + 55)//厂商传感器,回收箱满
+#define CardIssuerStore_UserErrorCode_FEW_CARD_REMAINS					(CardIssuerStore_UserErrorCode_Start + 56)//卡箱少卡
+#define CardIssuerStore_UserErrorCode_RETAIN_BIN_IS_FULL					(CardIssuerStore_UserErrorCode_Start + 57)//计数显示,回收箱满
+
+#define CardIssuerStore_UserErrorCode_Create_Object_Failed				(CardIssuerStore_UserErrorCode_Start + 58)//创建适配器指针对象失败
+#define CardIssuerStore_UserErrorCode_Track2_ServiceCode					(CardIssuerStore_UserErrorCode_Start + 59)//记录二磁道的服务代码
 
 //跨机激活过程
-#define CardIssuer_UserErrorCode_PreOnline_Connect_Heatbeat_Failed	(CardIssuer_UserErrorCode_Start + 60)	//跨机,连接心跳实体失败
-#define CardIssuer_UserErrorCode_PreOnline_Send_CardActive			(CardIssuer_UserErrorCode_Start + 61)	//跨机,调用CardActive
-#define CardIssuer_UserErrorCode_PreOnline_Recv_CardActive			(CardIssuer_UserErrorCode_Start + 62)	//跨机,CardActive返回
-#define CardIssuer_UserErrorCode_PreOnline_Slot_Is_Invalid			(CardIssuer_UserErrorCode_Start + 63)	//跨机,web传给卡库的卡槽号无效
-#define CardIssuer_UserErrorCode_PreOnline_Slot_Has_No_Card			(CardIssuer_UserErrorCode_Start + 64)	//跨机,卡槽中无卡
-#define CardIssuer_UserErrorCode_PreOnline_MoveCardFromSlot_Info	(CardIssuer_UserErrorCode_Start + 65)	//跨机,从卡槽中移卡读卡后,读出的一些信息
-
-#define CardIssuer_UserErrorCode_ContactIC_Failed					(CardIssuer_UserErrorCode_Start + 66)	//DetectIfICCard调用ContactIC失败
-#define CardIssuer_UserErrorCode_ActiveICCard_Failed				(CardIssuer_UserErrorCode_Start + 67)	//DetectIfICCard调用ActiveICCard失败
-#define CardIssuer_UserErrorCode_ICCommand_Failed					(CardIssuer_UserErrorCode_Start + 68)	//BuildSupportedAppList调用ICCommand失败
-#define CardIssuer_UserErrorCode_ICCommand_Receive_Data_Error		(CardIssuer_UserErrorCode_Start + 69)	//PSE return error
-#define CardIssuer_UserErrorCode_BuildSupportedAppList_Failed		(CardIssuer_UserErrorCode_Start + 70)	//BuildSupportedAppList failed
-#define CardIssuer_UserErrorCode_AppSelected_Failed					(CardIssuer_UserErrorCode_Start + 71)	//AppSelected failed
-
-#define CardIssuer_UserErrorCode_QueryCardInfoOnStore_JustQueryInfo	(CardIssuer_UserErrorCode_Start + 72)	//跨机后,再次调用QueryCardInfoOnStore查询卡信息
-#define CardIssuer_UserErrorCode_NotifyPreOnline_ParamInfo			(CardIssuer_UserErrorCode_Start + 73)	//跨机后,大机心跳调用NotifyPreOnline
+#define CardIssuerStore_UserErrorCode_PreOnline_Connect_Heatbeat_Failed	(CardIssuerStore_UserErrorCode_Start + 60)	//跨机,连接心跳实体失败
+#define CardIssuerStore_UserErrorCode_PreOnline_Send_CardActive			(CardIssuerStore_UserErrorCode_Start + 61)	//跨机,调用CardActive
+#define CardIssuerStore_UserErrorCode_PreOnline_Recv_CardActive			(CardIssuerStore_UserErrorCode_Start + 62)	//跨机,CardActive返回
+#define CardIssuerStore_UserErrorCode_PreOnline_Slot_Is_Invalid			(CardIssuerStore_UserErrorCode_Start + 63)	//跨机,web传给卡库的卡槽号无效
+#define CardIssuerStore_UserErrorCode_PreOnline_Slot_Has_No_Card			(CardIssuerStore_UserErrorCode_Start + 64)	//跨机,卡槽中无卡
+#define CardIssuerStore_UserErrorCode_PreOnline_MoveCardFromSlot_Info	(CardIssuerStore_UserErrorCode_Start + 65)	//跨机,从卡槽中移卡读卡后,读出的一些信息
+
+#define CardIssuerStore_UserErrorCode_ContactIC_Failed					(CardIssuerStore_UserErrorCode_Start + 66)	//DetectIfICCard调用ContactIC失败
+#define CardIssuerStore_UserErrorCode_ActiveICCard_Failed				(CardIssuerStore_UserErrorCode_Start + 67)	//DetectIfICCard调用ActiveICCard失败
+#define CardIssuerStore_UserErrorCode_ICCommand_Failed					(CardIssuerStore_UserErrorCode_Start + 68)	//BuildSupportedAppList调用ICCommand失败
+#define CardIssuerStore_UserErrorCode_ICCommand_Receive_Data_Error		(CardIssuerStore_UserErrorCode_Start + 69)	//PSE return error
+#define CardIssuerStore_UserErrorCode_BuildSupportedAppList_Failed		(CardIssuerStore_UserErrorCode_Start + 70)	//BuildSupportedAppList failed
+#define CardIssuerStore_UserErrorCode_AppSelected_Failed					(CardIssuerStore_UserErrorCode_Start + 71)	//AppSelected failed
+
+#define CardIssuerStore_UserErrorCode_QueryCardInfoOnStore_JustQueryInfo	(CardIssuerStore_UserErrorCode_Start + 72)	//跨机后,再次调用QueryCardInfoOnStore查询卡信息
+#define CardIssuerStore_UserErrorCode_NotifyPreOnline_ParamInfo			(CardIssuerStore_UserErrorCode_Start + 73)	//跨机后,大机心跳调用NotifyPreOnline
 
 //加卡过程
-#define CardIssuer_UserErrorCode_AddCardToStoreStepFirst			(CardIssuer_UserErrorCode_Start + 74)	//加卡第一步,从卡箱移到读卡器
-#define CardIssuer_UserErrorCode_AddCardToStoreStepLast				(CardIssuer_UserErrorCode_Start + 75)	//加卡第二步,从读卡器移到卡槽
-#define CardIssuer_UserErrorCode_ReadAccount_Data_Error				(CardIssuer_UserErrorCode_Start + 76)	//加卡过程,卡片数据有误
-#define CardIssuer_UserErrorCode_AddCardToStoreStepFirst_Failed		(CardIssuer_UserErrorCode_Start + 77)	//加卡过程,移卡到卡槽失败
-#define CardIssuer_UserErrorCode_NotifyPreonline_Wait_TooLong		(CardIssuer_UserErrorCode_Start + 78)	//NotifyPreonline收到时已经超过等待时间
+#define CardIssuerStore_UserErrorCode_AddCardToStoreStepFirst			(CardIssuerStore_UserErrorCode_Start + 74)	//加卡第一步,从卡箱移到读卡器
+#define CardIssuerStore_UserErrorCode_AddCardToStoreStepLast				(CardIssuerStore_UserErrorCode_Start + 75)	//加卡第二步,从读卡器移到卡槽
+#define CardIssuerStore_UserErrorCode_ReadAccount_Data_Error				(CardIssuerStore_UserErrorCode_Start + 76)	//加卡过程,卡片数据有误
+#define CardIssuerStore_UserErrorCode_AddCardToStoreStepFirst_Failed		(CardIssuerStore_UserErrorCode_Start + 77)	//加卡过程,移卡到卡槽失败
+#define CardIssuerStore_UserErrorCode_NotifyPreonline_Wait_TooLong		(CardIssuerStore_UserErrorCode_Start + 78)	//NotifyPreonline收到时已经超过等待时间
 
 //临时 后续去除
-#define CardIssuer_UserErrorCode_EastCom_Not_Exist_DataFile			(CardIssuer_UserErrorCode_Start + 79)	//东信卡库还不存在CardLibDB_CMB.db3文件
-#define CardIssuer_UserErrorCode_EastCom_Exist_DataFile				(CardIssuer_UserErrorCode_Start + 80)	//东信卡库已存在CardLibDB_CMB.db3文件
+#define CardIssuerStore_UserErrorCode_EastCom_Not_Exist_DataFile			(CardIssuerStore_UserErrorCode_Start + 79)	//东信卡库还不存在CardLibDB_CMB.db3文件
+#define CardIssuerStore_UserErrorCode_EastCom_Exist_DataFile				(CardIssuerStore_UserErrorCode_Start + 80)	//东信卡库已存在CardLibDB_CMB.db3文件
 
 //发卡过程
-#define CardIssuer_UserErrorCode_Has_Not_Build_SafeChannel			(CardIssuer_UserErrorCode_Start + 81)	//还未建立安全通道
-#define CardIssuer_UserErrorCode_Invalid_Slot						(CardIssuer_UserErrorCode_Start + 82)	//无效卡槽号
-#define CardIssuer_UserErrorCode_Slot_Has_No_Card					(CardIssuer_UserErrorCode_Start + 83)	//卡槽中无卡
-#define CardIssuer_UserErrorCode_IssueCardFromStore					(CardIssuer_UserErrorCode_Start + 84)	//发卡
-#define CardIssuer_UserErrorCode_Sign_Failed						(CardIssuer_UserErrorCode_Start + 85)	//签发失败,吞卡,req=87
-#define CardIssuer_UserErrorCode_Invalid_Hopper						(CardIssuer_UserErrorCode_Start + 86)	//传入了错误的hopper
+#define CardIssuerStore_UserErrorCode_Has_Not_Build_SafeChannel			(CardIssuerStore_UserErrorCode_Start + 81)	//还未建立安全通道
+#define CardIssuerStore_UserErrorCode_Invalid_Slot						(CardIssuerStore_UserErrorCode_Start + 82)	//无效卡槽号
+#define CardIssuerStore_UserErrorCode_Slot_Has_No_Card					(CardIssuerStore_UserErrorCode_Start + 83)	//卡槽中无卡
+#define CardIssuerStore_UserErrorCode_IssueCardFromStore					(CardIssuerStore_UserErrorCode_Start + 84)	//发卡
+#define CardIssuerStore_UserErrorCode_Sign_Failed						(CardIssuerStore_UserErrorCode_Start + 85)	//签发失败,吞卡,req=87
+#define CardIssuerStore_UserErrorCode_Invalid_Hopper						(CardIssuerStore_UserErrorCode_Start + 86)	//传入了错误的hopper
 
 //Common Func
-#define CardIssuer_UserErrorCode_CaptureCard_ByTerminal				(CardIssuer_UserErrorCode_Start + 87)	//终端自行调用吞卡
-#define CardIssuer_UserErrorCode_EjectCard_ByTerminal				(CardIssuer_UserErrorCode_Start + 88)	//终端自行调用吐卡
-#define CardIssuer_UserErrorCode_CaptureCard_EntityOnStart			(CardIssuer_UserErrorCode_Start + 89)	//实体启动时发现有卡,终端自行调用吞卡
-#define CardIssuer_UserErrorCode_CardPosUnexpectedOnDevOpen			(CardIssuer_UserErrorCode_Start + 90)	//实体启动时卡片位置异常
+#define CardIssuerStore_UserErrorCode_CaptureCard_ByTerminal				(CardIssuerStore_UserErrorCode_Start + 87)	//终端自行调用吞卡
+#define CardIssuerStore_UserErrorCode_EjectCard_ByTerminal				(CardIssuerStore_UserErrorCode_Start + 88)	//终端自行调用吐卡
+#define CardIssuerStore_UserErrorCode_CaptureCard_EntityOnStart			(CardIssuerStore_UserErrorCode_Start + 89)	//实体启动时发现有卡,终端自行调用吞卡
+#define CardIssuerStore_UserErrorCode_CardPosUnexpectedOnDevOpen			(CardIssuerStore_UserErrorCode_Start + 90)	//实体启动时卡片位置异常
 
 
 //读卡过程
-#define CardIssuer_UserErrorCode_ReadCard_Process					(CardIssuer_UserErrorCode_Start + 91)	//调用读卡
-#define CardIssuer_UserErrorCode_TrackSize_Wrong					(CardIssuer_UserErrorCode_Start + 92)	//磁道数据长度错误
-#define CardIssuer_UserErrorCode_Track2Size_Wrong					(CardIssuer_UserErrorCode_Start + 93)	//二磁道数据长度错误
-#define CardIssuer_UserErrorCode_CardBin							(CardIssuer_UserErrorCode_Start + 94)	//MagRead读出的卡bin
-#define CardIssuer_UserErrorCode_CardType							(CardIssuer_UserErrorCode_Start + 95)	//MagRead读出的卡片类型
-#define CardIssuer_UserErrorCode_MaybeIC_Only						(CardIssuer_UserErrorCode_Start + 96)	//可能是纯IC
+#define CardIssuerStore_UserErrorCode_ReadCard_Process					(CardIssuerStore_UserErrorCode_Start + 91)	//调用读卡
+#define CardIssuerStore_UserErrorCode_TrackSize_Wrong					(CardIssuerStore_UserErrorCode_Start + 92)	//磁道数据长度错误
+#define CardIssuerStore_UserErrorCode_Track2Size_Wrong					(CardIssuerStore_UserErrorCode_Start + 93)	//二磁道数据长度错误
+#define CardIssuerStore_UserErrorCode_CardBin							(CardIssuerStore_UserErrorCode_Start + 94)	//MagRead读出的卡bin
+#define CardIssuerStore_UserErrorCode_CardType							(CardIssuerStore_UserErrorCode_Start + 95)	//MagRead读出的卡片类型
+#define CardIssuerStore_UserErrorCode_MaybeIC_Only						(CardIssuerStore_UserErrorCode_Start + 96)	//可能是纯IC
 
 //异常状况
-#define CardIssuer_UserErrorCode_HasCard_In_Machine					(CardIssuer_UserErrorCode_Start + 97)	//读卡器打开时,发现有卡片
-#define CardIssuer_UserErrorCode_CardNo_Maybe_Wrong					(CardIssuer_UserErrorCode_Start + 98)	//卡号可能有误
+#define CardIssuerStore_UserErrorCode_HasCard_In_Machine					(CardIssuerStore_UserErrorCode_Start + 97)	//读卡器打开时,发现有卡片
+#define CardIssuerStore_UserErrorCode_CardNo_Maybe_Wrong					(CardIssuerStore_UserErrorCode_Start + 98)	//卡号可能有误
 
 //读卡器初始化过程
-#define CardIssuer_UserErrorCode_LoadLibraryA_Failed				(CardIssuer_UserErrorCode_Start + 99)	//LoadLibraryA
-#define CardIssuer_UserErrorCode_CreateDevComponent_Failed			(CardIssuer_UserErrorCode_Start + 100)	//CreateDevComponent
-#define CardIssuer_UserErrorCode_ReleaseDevComponent_Failed			(CardIssuer_UserErrorCode_Start + 101)	//ReleaseDevComponent
-#define CardIssuer_UserErrorCode_LoadLibraryA_CMBPrint_Failed		(CardIssuer_UserErrorCode_Start + 102)	//LoadLibraryA CMBPrint
-#define CardIssuer_UserErrorCode_cmdDecodeMag2_Failed				(CardIssuer_UserErrorCode_Start + 103)	//cmdDecodeMag2 
-#define CardIssuer_UserErrorCode_cmdDecodeEx_Failed					(CardIssuer_UserErrorCode_Start + 104)	//cmdDecodeEx
-#define CardIssuer_UserErrorCode_DevOpen_Failed						(CardIssuer_UserErrorCode_Start + 105)	//DevOpen
-#define CardIssuer_UserErrorCode_ConnecetSCI_OpenDevice_Failed		(CardIssuer_UserErrorCode_Start + 106)	//ConnecetSCI_OpenDevice_Failed
-#define CardIssuer_UserErrorCode_ConnecetSCI_Invalid_SCI_Name		(CardIssuer_UserErrorCode_Start + 107)	//Invalid_SCI_Name
+#define CardIssuerStore_UserErrorCode_LoadLibraryA_Failed				(CardIssuerStore_UserErrorCode_Start + 99)	//LoadLibraryA
+#define CardIssuerStore_UserErrorCode_CreateDevComponent_Failed			(CardIssuerStore_UserErrorCode_Start + 100)	//CreateDevComponent
+#define CardIssuerStore_UserErrorCode_ReleaseDevComponent_Failed			(CardIssuerStore_UserErrorCode_Start + 101)	//ReleaseDevComponent
+#define CardIssuerStore_UserErrorCode_LoadLibraryA_CMBPrint_Failed		(CardIssuerStore_UserErrorCode_Start + 102)	//LoadLibraryA CMBPrint
+#define CardIssuerStore_UserErrorCode_cmdDecodeMag2_Failed				(CardIssuerStore_UserErrorCode_Start + 103)	//cmdDecodeMag2 
+#define CardIssuerStore_UserErrorCode_cmdDecodeEx_Failed					(CardIssuerStore_UserErrorCode_Start + 104)	//cmdDecodeEx
+#define CardIssuerStore_UserErrorCode_DevOpen_Failed						(CardIssuerStore_UserErrorCode_Start + 105)	//DevOpen
+#define CardIssuerStore_UserErrorCode_ConnecetSCI_OpenDevice_Failed		(CardIssuerStore_UserErrorCode_Start + 106)	//ConnecetSCI_OpenDevice_Failed
+#define CardIssuerStore_UserErrorCode_ConnecetSCI_Invalid_SCI_Name		(CardIssuerStore_UserErrorCode_Start + 107)	//Invalid_SCI_Name
 
 //物料信息
-#define CardIssuer_UserErrorCode_SyncMaterialCount_Failed			(CardIssuer_UserErrorCode_Start + 108)	//同步物料信息失败
-#define CardIssuer_UserErrorCode_QueryMaterialInfo_Failed			(CardIssuer_UserErrorCode_Start + 109)	//查询物料信息失败
-#define CardIssuer_UserErrorCode_QueryMaterialInfo_Count_Error		(CardIssuer_UserErrorCode_Start + 110)	//查询物料信息数量有误
+#define CardIssuerStore_UserErrorCode_SyncMaterialCount_Failed			(CardIssuerStore_UserErrorCode_Start + 108)	//同步物料信息失败
+#define CardIssuerStore_UserErrorCode_QueryMaterialInfo_Failed			(CardIssuerStore_UserErrorCode_Start + 109)	//查询物料信息失败
+#define CardIssuerStore_UserErrorCode_QueryMaterialInfo_Count_Error		(CardIssuerStore_UserErrorCode_Start + 110)	//查询物料信息数量有误
 
 //蓝牙多合一绑定解绑
-#define CardIssuer_UserErrorCode_BindSCI							(CardIssuer_UserErrorCode_Start + 111)	//绑定类型
-#define CardIssuer_UserErrorCode_Bind_Invalid_SCI_Name				(CardIssuer_UserErrorCode_Start + 112)	//绑定失败,无效的多合一Name
-#define CardIssuer_UserErrorCode_Bind_SyncData_Failed				(CardIssuer_UserErrorCode_Start + 113)	//绑定后,同步信息失败
-#define CardIssuer_UserErrorCode_Unbind_Invalid_SCI_Name			(CardIssuer_UserErrorCode_Start + 114)	//解绑绑定失败,无效的多合一Name
-#define CardIssuer_UserErrorCode_Unbind_SyncData_Failed				(CardIssuer_UserErrorCode_Start + 115)	//解绑绑定后,同步信息失败
+#define CardIssuerStore_UserErrorCode_BindSCI							(CardIssuerStore_UserErrorCode_Start + 111)	//绑定类型
+#define CardIssuerStore_UserErrorCode_Bind_Invalid_SCI_Name				(CardIssuerStore_UserErrorCode_Start + 112)	//绑定失败,无效的多合一Name
+#define CardIssuerStore_UserErrorCode_Bind_SyncData_Failed				(CardIssuerStore_UserErrorCode_Start + 113)	//绑定后,同步信息失败
+#define CardIssuerStore_UserErrorCode_Unbind_Invalid_SCI_Name			(CardIssuerStore_UserErrorCode_Start + 114)	//解绑绑定失败,无效的多合一Name
+#define CardIssuerStore_UserErrorCode_Unbind_SyncData_Failed				(CardIssuerStore_UserErrorCode_Start + 115)	//解绑绑定后,同步信息失败
 
-#define CardIssuer_UserErrorCode_Load_CMBPrint_Failed		(CardIssuer_UserErrorCode_Start + 116)	//加载CMBPrint失败
+#define CardIssuerStore_UserErrorCode_Load_CMBPrint_Failed		(CardIssuerStore_UserErrorCode_Start + 116)	//加载CMBPrint失败
 
 //预留一部分用于CardAssist.cpp中的报错告警
-//自CardIssuer_UserErrorCode_Start + 121 ~ CardIssuer_UserErrorCode_Start + 140
-#define CardIssuer_UserErrorCode_ICCommand_RecvData_Invalid			(CardIssuer_UserErrorCode_Start + 121)	//APDU接收到的数据无效
-#define CardIssuer_UserErrorCode_ActiveContactlessICCard_Failed		(CardIssuer_UserErrorCode_Start + 122)	//激活非接失败
-#define CardIssuer_UserErrorCode_IssueCard_ActiveRF_Failed			(CardIssuer_UserErrorCode_Start + 123)	//发卡时,激活非接失败
+//自CardIssuerStore_UserErrorCode_Start + 121 ~ CardIssuerStore_UserErrorCode_Start + 140
+#define CardIssuerStore_UserErrorCode_ICCommand_RecvData_Invalid			(CardIssuerStore_UserErrorCode_Start + 121)	//APDU接收到的数据无效
+#define CardIssuerStore_UserErrorCode_ActiveContactlessICCard_Failed		(CardIssuerStore_UserErrorCode_Start + 122)	//激活非接失败
+#define CardIssuerStore_UserErrorCode_IssueCard_ActiveRF_Failed			(CardIssuerStore_UserErrorCode_Start + 123)	//发卡时,激活非接失败
 //
-#define CardIssuer_UserErrorCode_Open_Success						(CardIssuer_UserErrorCode_Start + 141)	//读卡器最终打开成功
-#define CardIssuer_UserErrorCode_Open_Failed						(CardIssuer_UserErrorCode_Start + 142)	//读卡器最终打开失败
+#define CardIssuerStore_UserErrorCode_Open_Success						(CardIssuerStore_UserErrorCode_Start + 141)	//读卡器最终打开成功
+#define CardIssuerStore_UserErrorCode_Open_Failed						(CardIssuerStore_UserErrorCode_Start + 142)	//读卡器最终打开失败
 
 
-#define CardIssuer_UserErrorCode_QueryCardInfoOnStore_Inparam		(CardIssuer_UserErrorCode_Start + 143)	//盘库接口入参
-#define CardIssuer_UserErrorCode_CaptureCard_SignFailed				(CardIssuer_UserErrorCode_Start + 144)	//签发失败,业务发起吞卡
-#define CardIssuer_UserErrorCode_CaptureCard_IssueFromCardStore		(CardIssuer_UserErrorCode_Start + 145)	//卡库本地领卡吞卡
-#define CardIssuer_UserErrorCode_CaptureCard_AddCard_ReadFailed		(CardIssuer_UserErrorCode_Start + 146)	//卡库加卡,读卡失败吞卡
-#define CardIssuer_UserErrorCode_CaptureCard_Operate_ReadFailed		(CardIssuer_UserErrorCode_Start + 147)	//卡库盘库,读卡失败吞卡
+#define CardIssuerStore_UserErrorCode_QueryCardInfoOnStore_Inparam		(CardIssuerStore_UserErrorCode_Start + 143)	//盘库接口入参
+#define CardIssuerStore_UserErrorCode_CaptureCard_SignFailed				(CardIssuerStore_UserErrorCode_Start + 144)	//签发失败,业务发起吞卡
+#define CardIssuerStore_UserErrorCode_CaptureCard_IssueFromCardStore		(CardIssuerStore_UserErrorCode_Start + 145)	//卡库本地领卡吞卡
+#define CardIssuerStore_UserErrorCode_CaptureCard_AddCard_ReadFailed		(CardIssuerStore_UserErrorCode_Start + 146)	//卡库加卡,读卡失败吞卡
+#define CardIssuerStore_UserErrorCode_CaptureCard_Operate_ReadFailed		(CardIssuerStore_UserErrorCode_Start + 147)	//卡库盘库,读卡失败吞卡
 
-#define CardIssuer_UserErrorCode_GetAddCardInfo_CardCount			(CardIssuer_UserErrorCode_Start + 150)	//卡库中卡片数量
+#define CardIssuerStore_UserErrorCode_GetAddCardInfo_CardCount			(CardIssuerStore_UserErrorCode_Start + 150)	//卡库中卡片数量
 
 //LogWarn real root config
-#define CardIssuer_UserErrorCode_Real_Root_Config					(CardIssuer_UserErrorCode_Start + 153)	//适配器实际的root配置
-#define CardIssuer_UserErrorCode_DupCallPreOnline_WhileInWorking	(CardIssuer_UserErrorCode_Start + 154)	//CardIssuer实体正忙,再次收到跨机激活
-#define CardIssuer_UserErrorCode_Hopper1_Mixed_Too_Much				(CardIssuer_UserErrorCode_Start + 155)	//卡箱1异常(连续吞卡过多)
-#define CardIssuer_UserErrorCode_Hopper2_Mixed_Too_Much				(CardIssuer_UserErrorCode_Start + 156)	//卡箱2异常(连续吞卡过多)
-#define CardIssuer_UserErrorCode_Hopper3_Mixed_Too_Much				(CardIssuer_UserErrorCode_Start + 157)	//卡箱3异常(连续吞卡过多)
-#define CardIssuer_UserErrorCode_RegistSwallowedCard_Failed			(CardIssuer_UserErrorCode_Start + 158)	//登记吞卡信息失败
-#define CardIssuer_UserErrorCode_CardActive_Service_NoReturn		(CardIssuer_UserErrorCode_Start + 159)	//卡库跨机服务端超时未返回
-#define CardIssuer_UserErrorCode_Maybe_InsertCard_InWrongStyle		(CardIssuer_UserErrorCode_Start + 160)	//可能卡片插反了
-#define CardIssuer_UserErrorCode_IssueCard_ActiveICCard_Failed		(CardIssuer_UserErrorCode_Start + 161)	//发卡时,DetectIfICCard调用ActiveICCard失败
-#define CardIssuer_UserErrorCode_Account_EAC_Mismatch				(CardIssuer_UserErrorCode_Start + 162)	//账户和户口系统的最新账户不匹配
-#define CardIssuer_UserErrorCode_CardStore_Reply_TooLong			(CardIssuer_UserErrorCode_Start + 163)	//跨机时卡库处理耗时过长
-#define CardIssuer_UserErrorCode_HopperCardMixed					(CardIssuer_UserErrorCode_Start + 164)	//卡箱中的卡片放置不对
-#define CardIssuer_UserErrorCode_CardActive_CardStore_OffLine		(CardIssuer_UserErrorCode_Start + 165)	//跨机时卡库不在线
-#define CardIssuer_UserErrorCode_ReadByRF							(CardIssuer_UserErrorCode_Start + 166)	//非接读取成功
-#define CardIssuer_UserErrorCode_CardActive_CardStore_Issuing		(CardIssuer_UserErrorCode_Start + 167)	//跨机时卡库正在本地领卡或加卡
-#define CardIssuer_UserErrorCode_CardActive_CardStore_CallByOther	(CardIssuer_UserErrorCode_Start + 168)	//跨机时卡库正在其他VTM调用
-#define CardIssuer_UserErrorCode_ReadAccount_Cost_Time				(CardIssuer_UserErrorCode_Start + 169)	//ReadAccount耗时
-#define CardIssuer_UserErrorCode_CardActive_CardIssuer_InFaultState	(CardIssuer_UserErrorCode_Start + 170)	//卡库收到跨机请求时卡机未成功打开
-#define CardIssuer_UserErrorCode_Account_NotMatchWithReadAccount	(CardIssuer_UserErrorCode_Start + 171)	//传入卡号与实际读到的不一致
+#define CardIssuerStore_UserErrorCode_Real_Root_Config					(CardIssuerStore_UserErrorCode_Start + 153)	//适配器实际的root配置
+#define CardIssuerStore_UserErrorCode_DupCallPreOnline_WhileInWorking	(CardIssuerStore_UserErrorCode_Start + 154)	//CardIssuer实体正忙,再次收到跨机激活
+#define CardIssuerStore_UserErrorCode_Hopper1_Mixed_Too_Much				(CardIssuerStore_UserErrorCode_Start + 155)	//卡箱1异常(连续吞卡过多)
+#define CardIssuerStore_UserErrorCode_Hopper2_Mixed_Too_Much				(CardIssuerStore_UserErrorCode_Start + 156)	//卡箱2异常(连续吞卡过多)
+#define CardIssuerStore_UserErrorCode_Hopper3_Mixed_Too_Much				(CardIssuerStore_UserErrorCode_Start + 157)	//卡箱3异常(连续吞卡过多)
+#define CardIssuerStore_UserErrorCode_RegistSwallowedCard_Failed			(CardIssuerStore_UserErrorCode_Start + 158)	//登记吞卡信息失败
+#define CardIssuerStore_UserErrorCode_CardActive_Service_NoReturn		(CardIssuerStore_UserErrorCode_Start + 159)	//卡库跨机服务端超时未返回
+#define CardIssuerStore_UserErrorCode_Maybe_InsertCard_InWrongStyle		(CardIssuerStore_UserErrorCode_Start + 160)	//可能卡片插反了
+#define CardIssuerStore_UserErrorCode_IssueCard_ActiveICCard_Failed		(CardIssuerStore_UserErrorCode_Start + 161)	//发卡时,DetectIfICCard调用ActiveICCard失败
+#define CardIssuerStore_UserErrorCode_Account_EAC_Mismatch				(CardIssuerStore_UserErrorCode_Start + 162)	//账户和户口系统的最新账户不匹配
+#define CardIssuerStore_UserErrorCode_CardStore_Reply_TooLong			(CardIssuerStore_UserErrorCode_Start + 163)	//跨机时卡库处理耗时过长
+#define CardIssuerStore_UserErrorCode_HopperCardMixed					(CardIssuerStore_UserErrorCode_Start + 164)	//卡箱中的卡片放置不对
+#define CardIssuerStore_UserErrorCode_CardActive_CardStore_OffLine		(CardIssuerStore_UserErrorCode_Start + 165)	//跨机时卡库不在线
+#define CardIssuerStore_UserErrorCode_ReadByRF							(CardIssuerStore_UserErrorCode_Start + 166)	//非接读取成功
+#define CardIssuerStore_UserErrorCode_CardActive_CardStore_Issuing		(CardIssuerStore_UserErrorCode_Start + 167)	//跨机时卡库正在本地领卡或加卡
+#define CardIssuerStore_UserErrorCode_CardActive_CardStore_CallByOther	(CardIssuerStore_UserErrorCode_Start + 168)	//跨机时卡库正在其他VTM调用
+#define CardIssuerStore_UserErrorCode_ReadAccount_Cost_Time				(CardIssuerStore_UserErrorCode_Start + 169)	//ReadAccount耗时
+#define CardIssuerStore_UserErrorCode_CardActive_CardIssuerStore_InFaultState	(CardIssuerStore_UserErrorCode_Start + 170)	//卡库收到跨机请求时卡机未成功打开
+#define CardIssuerStore_UserErrorCode_Account_NotMatchWithReadAccount	(CardIssuerStore_UserErrorCode_Start + 171)	//传入卡号与实际读到的不一致
 
 //***此段枚举值不可变动,涉及到业务逻辑***	卡库API细化后新增的错误码,也用于前端展示对应话术
-#define CardIssuer_UserErrorCode_Dev_HopperHasNoCard		(CardIssuer_UserErrorCode_Start + 180) //卡箱无卡
-#define CardIssuer_UserErrorCode_Dev_HopperMissing			(CardIssuer_UserErrorCode_Start + 181)//发卡箱缺失
-#define CardIssuer_UserErrorCode_Dev_TransCarJammed			(CardIssuer_UserErrorCode_Start + 182)//传输小车堵塞
-#define CardIssuer_UserErrorCode_Dev_RetainBinFull			(CardIssuer_UserErrorCode_Start + 183)//回收箱满
-#define CardIssuer_UserErrorCode_Dev_RetainBinMissing		(CardIssuer_UserErrorCode_Start + 184)//回收箱缺失
-#define CardIssuer_UserErrorCode_Dev_CardInReader			(CardIssuer_UserErrorCode_Start + 185)//读卡器内有卡
-#define CardIssuer_UserErrorCode_Dev_SlotHasNoCard			(CardIssuer_UserErrorCode_Start + 186)//卡槽内无卡
-#define CardIssuer_UserErrorCode_Dev_CardInSlot				(CardIssuer_UserErrorCode_Start + 187)//卡槽内有卡
-#define CardIssuer_UserErrorCode_Dev_NoCardInReader			(CardIssuer_UserErrorCode_Start + 188)//读卡器内无卡
-#define CardIssuer_UserErrorCode_Dev_CardJammed				(CardIssuer_UserErrorCode_Start + 189)//塞卡
-#define CardIssuer_UserErrorCode_Dev_SlotJammed				(CardIssuer_UserErrorCode_Start + 190)//卡槽堵塞
-#define CardIssuer_UserErrorCode_Dev_SlotInvalid			(CardIssuer_UserErrorCode_Start + 191)//卡槽地址非法(越界等)
+#define CardIssuerStore_UserErrorCode_Dev_HopperHasNoCard		(CardIssuerStore_UserErrorCode_Start + 180) //卡箱无卡
+#define CardIssuerStore_UserErrorCode_Dev_HopperMissing			(CardIssuerStore_UserErrorCode_Start + 181)//发卡箱缺失
+#define CardIssuerStore_UserErrorCode_Dev_TransCarJammed			(CardIssuerStore_UserErrorCode_Start + 182)//传输小车堵塞
+#define CardIssuerStore_UserErrorCode_Dev_RetainBinFull			(CardIssuerStore_UserErrorCode_Start + 183)//回收箱满
+#define CardIssuerStore_UserErrorCode_Dev_RetainBinMissing		(CardIssuerStore_UserErrorCode_Start + 184)//回收箱缺失
+#define CardIssuerStore_UserErrorCode_Dev_CardInReader			(CardIssuerStore_UserErrorCode_Start + 185)//读卡器内有卡
+#define CardIssuerStore_UserErrorCode_Dev_SlotHasNoCard			(CardIssuerStore_UserErrorCode_Start + 186)//卡槽内无卡
+#define CardIssuerStore_UserErrorCode_Dev_CardInSlot				(CardIssuerStore_UserErrorCode_Start + 187)//卡槽内有卡
+#define CardIssuerStore_UserErrorCode_Dev_NoCardInReader			(CardIssuerStore_UserErrorCode_Start + 188)//读卡器内无卡
+#define CardIssuerStore_UserErrorCode_Dev_CardJammed				(CardIssuerStore_UserErrorCode_Start + 189)//塞卡
+#define CardIssuerStore_UserErrorCode_Dev_SlotJammed				(CardIssuerStore_UserErrorCode_Start + 190)//卡槽堵塞
+#define CardIssuerStore_UserErrorCode_Dev_SlotInvalid			(CardIssuerStore_UserErrorCode_Start + 191)//卡槽地址非法(越界等)
 
 //盘库异常明细报错
-#define CardIssuer_UserErrorCode_KakuPanKu_MoveCardFromSlot_Failed				(CardIssuer_UserErrorCode_Start + 200)	//卡库盘库失败,卡槽移卡失败
-#define CardIssuer_UserErrorCode_KakuPanKu_ReadAccount_Failed					(CardIssuer_UserErrorCode_Start + 201)	//卡库盘库失败,读卡失败吞卡
-#define CardIssuer_UserErrorCode_KakuPanKu_MoveCardToSlot_Failed				(CardIssuer_UserErrorCode_Start + 202)	//卡库盘库失败,卡移回卡槽失败
+#define CardIssuerStore_UserErrorCode_KakuPanKu_MoveCardFromSlot_Failed				(CardIssuerStore_UserErrorCode_Start + 200)	//卡库盘库失败,卡槽移卡失败
+#define CardIssuerStore_UserErrorCode_KakuPanKu_ReadAccount_Failed					(CardIssuerStore_UserErrorCode_Start + 201)	//卡库盘库失败,读卡失败吞卡
+#define CardIssuerStore_UserErrorCode_KakuPanKu_MoveCardToSlot_Failed				(CardIssuerStore_UserErrorCode_Start + 202)	//卡库盘库失败,卡移回卡槽失败
+
+#define CardIssuerStore_UserErrorCode_EnterMainPage_SetFlag		0x22000300 //卡库进入首页设置运行时标志位
+#define CardIssuerStore_UserErrorCode_CopyRuncfg				0x22000301 //卡库拷贝旧运行时文件
 #endif //_CARDISSUERSTORE_USER_ERRORCODE_H

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 127 - 127
Module/mod_cardissuerstore/CardIssuerStore_client_g.h


+ 173 - 174
Module/mod_CardIssuerStand/CardIssuer_def_g.h → Module/mod_cardissuerstore/CardIssuerStore_def_g.h

@@ -1,5 +1,5 @@
-#ifndef __CARDISSUER_DEF_G_H
-#define __CARDISSUER_DEF_G_H
+#ifndef __CARDISSUERSTORE_DEF_G_H
+#define __CARDISSUERSTORE_DEF_G_H
 
 #pragma once
 
@@ -7,117 +7,116 @@
 
 #include "SpHelper.h"
 
-namespace CardIssuer {
+namespace CardIssuerStore {
 //
 // const goes here
 //
 
-#define CardIssuerService_Method_Insert 0
-#define CardIssuerService_Method_CancelInsert 1
-#define CardIssuerService_Method_InsertWaitMore 2
-#define CardIssuerService_Method_Read 3
-#define CardIssuerService_Method_Capture 4
-#define CardIssuerService_Method_Eject 5
-#define CardIssuerService_Method_PreOnline 6
-#define CardIssuerService_Method_PostOnline 7
-#define CardIssuerService_Method_Exit 8
-#define CardIssuerService_Method_Issue 9
-#define CardIssuerService_Method_GetMaterialCount 10
-#define CardIssuerService_Method_SetMaterialCount 11
-#define CardIssuerService_Method_SetIssueFlag 12
-#define CardIssuerService_Method_ReadEx 13
-#define CardIssuerService_Method_QueryCardInfo 14
-#define CardIssuerService_Method_WriteTrack 15
-#define CardIssuerService_Method_GetMaterialCountEx 16
-#define CardIssuerService_Method_SetMaterialCountEx 17
-#define CardIssuerService_Method_SetSomeFlag 18
-#define CardIssuerService_Method_GetSCIInfo 19
-#define CardIssuerService_Method_IssueEx 20
-#define CardIssuerService_Method_OpenSafeLock 21
-#define CardIssuerService_Method_SAMICCommand 22
-#define CardIssuerService_Method_QueryPrinterStatus 23
-#define CardIssuerService_Method_Print 24
-#define CardIssuerService_Method_QuerySCIList 25
-#define CardIssuerService_Method_BindSCI 26
-#define CardIssuerService_Method_PreOnlineOnStore 27
-#define CardIssuerService_Method_NotifyPreonline 28
-#define CardIssuerService_Method_QueryCardInfoOnStore 29
-#define CardIssuerService_Method_GetAddCardInfo 30
-#define CardIssuerService_Method_PrintCardImmediately 31
-#define CardIssuerService_Method_QueryCIStatus 32
-#define CardIssuerService_Method_GetDevInfo 65535
-
-#define CardIssuerService_MethodSignature_Insert 1091033773
-#define CardIssuerService_MethodSignature_CancelInsert -1202478828
-#define CardIssuerService_MethodSignature_InsertWaitMore 493791658
-#define CardIssuerService_MethodSignature_Read 591445479
-#define CardIssuerService_MethodSignature_Capture -1807054569
-#define CardIssuerService_MethodSignature_Eject -377455114
-#define CardIssuerService_MethodSignature_PreOnline 640958030
-#define CardIssuerService_MethodSignature_PostOnline 923284555
-#define CardIssuerService_MethodSignature_Exit -1158854104
-#define CardIssuerService_MethodSignature_Issue 438783077
-#define CardIssuerService_MethodSignature_GetMaterialCount -605917749
-#define CardIssuerService_MethodSignature_SetMaterialCount 870103115
-#define CardIssuerService_MethodSignature_SetIssueFlag 187641303
-#define CardIssuerService_MethodSignature_ReadEx -842531343
-#define CardIssuerService_MethodSignature_QueryCardInfo 154962579
-#define CardIssuerService_MethodSignature_WriteTrack -1424799012
-#define CardIssuerService_MethodSignature_GetMaterialCountEx 1356148904
-#define CardIssuerService_MethodSignature_SetMaterialCountEx -1512312761
-#define CardIssuerService_MethodSignature_SetSomeFlag -2033418025
-#define CardIssuerService_MethodSignature_GetSCIInfo 1097494981
-#define CardIssuerService_MethodSignature_IssueEx 1390328640
-#define CardIssuerService_MethodSignature_OpenSafeLock 177980614
-#define CardIssuerService_MethodSignature_SAMICCommand 406988293
-#define CardIssuerService_MethodSignature_QueryPrinterStatus -890728447
-#define CardIssuerService_MethodSignature_Print 2096006675
-#define CardIssuerService_MethodSignature_QuerySCIList -1772231453
-#define CardIssuerService_MethodSignature_BindSCI -1242011672
-#define CardIssuerService_MethodSignature_PreOnlineOnStore 158325869
-#define CardIssuerService_MethodSignature_NotifyPreonline -808637659
-#define CardIssuerService_MethodSignature_QueryCardInfoOnStore 1217447214
-#define CardIssuerService_MethodSignature_GetAddCardInfo 684031940
-#define CardIssuerService_MethodSignature_PrintCardImmediately -1976184201
-#define CardIssuerService_MethodSignature_QueryCIStatus -1907000703
-#define CardIssuerService_MethodSignature_GetDevInfo 296205965
-
-#define CardIssuerService_LogCode_Insert "QLR040220300"
-#define CardIssuerService_LogCode_CancelInsert "QLR040220301"
-#define CardIssuerService_LogCode_InsertWaitMore "QLR040220302"
-#define CardIssuerService_LogCode_Read "QLR040220303"
-#define CardIssuerService_LogCode_Capture "QLR040220304"
-#define CardIssuerService_LogCode_Eject "QLR040220305"
-#define CardIssuerService_LogCode_PreOnline "QLR040220306"
-#define CardIssuerService_LogCode_PostOnline "QLR040220307"
-#define CardIssuerService_LogCode_Exit "QLR040220308"
-#define CardIssuerService_LogCode_Issue "QLR040220309"
-#define CardIssuerService_LogCode_GetMaterialCount "QLR040220310"
-#define CardIssuerService_LogCode_SetMaterialCount "QLR040220311"
-#define CardIssuerService_LogCode_SetIssueFlag "QLR040220312"
-#define CardIssuerService_LogCode_ReadEx "QLR040220313"
-#define CardIssuerService_LogCode_QueryCardInfo "QLR040220314"
-#define CardIssuerService_LogCode_WriteTrack "QLR040220315"
-#define CardIssuerService_LogCode_GetMaterialCountEx "QLR040220316"
-#define CardIssuerService_LogCode_SetMaterialCountEx "QLR040220317"
-#define CardIssuerService_LogCode_SetSomeFlag "QLR040220318"
-#define CardIssuerService_LogCode_GetSCIInfo "QLR040220319"
-#define CardIssuerService_LogCode_IssueEx "QLR040220320"
-#define CardIssuerService_LogCode_OpenSafeLock "QLR040220321"
-#define CardIssuerService_LogCode_SAMICCommand "QLR040220322"
-#define CardIssuerService_LogCode_QueryPrinterStatus "QLR040220323"
-#define CardIssuerService_LogCode_Print "QLR040220324"
-#define CardIssuerService_LogCode_QuerySCIList "QLR040220325"
-#define CardIssuerService_LogCode_BindSCI "QLR040220326"
-#define CardIssuerService_LogCode_PreOnlineOnStore "QLR040220327"
-#define CardIssuerService_LogCode_NotifyPreonline "QLR040220328"
-#define CardIssuerService_LogCode_QueryCardInfoOnStore "QLR040220329"
-#define CardIssuerService_LogCode_GetAddCardInfo "QLR040220330"
-#define CardIssuerService_LogCode_PrintCardImmediately "QLR040220331"
-#define CardIssuerService_LogCode_QueryCIStatus "QLR040220332"
-#define CardIssuerService_LogCode_GetDevInfo "QLR040220399"
-
-struct CardIssuerService_Insert_Req
+#define CardIssuerStoreService_Method_Insert 0
+#define CardIssuerStoreService_Method_CancelInsert 1
+#define CardIssuerStoreService_Method_InsertWaitMore 2
+#define CardIssuerStoreService_Method_Read 3
+#define CardIssuerStoreService_Method_Capture 4
+#define CardIssuerStoreService_Method_Eject 5
+#define CardIssuerStoreService_Method_PreOnline 6
+#define CardIssuerStoreService_Method_PostOnline 7
+#define CardIssuerStoreService_Method_Exit 8
+#define CardIssuerStoreService_Method_Issue 9
+#define CardIssuerStoreService_Method_GetMaterialCount 10
+#define CardIssuerStoreService_Method_SetMaterialCount 11
+#define CardIssuerStoreService_Method_SetIssueFlag 12
+#define CardIssuerStoreService_Method_ReadEx 13
+#define CardIssuerStoreService_Method_QueryCardInfo 14
+#define CardIssuerStoreService_Method_WriteTrack 15
+#define CardIssuerStoreService_Method_GetMaterialCountEx 16
+#define CardIssuerStoreService_Method_SetMaterialCountEx 17
+#define CardIssuerStoreService_Method_SetSomeFlag 18
+#define CardIssuerStoreService_Method_GetSCIInfo 19
+#define CardIssuerStoreService_Method_IssueEx 20
+#define CardIssuerStoreService_Method_OpenSafeLock 21
+#define CardIssuerStoreService_Method_SAMICCommand 22
+#define CardIssuerStoreService_Method_QueryPrinterStatus 23
+#define CardIssuerStoreService_Method_Print 24
+#define CardIssuerStoreService_Method_QuerySCIList 25
+#define CardIssuerStoreService_Method_BindSCI 26
+#define CardIssuerStoreService_Method_PreOnlineOnStore 27
+#define CardIssuerStoreService_Method_NotifyPreonline 28
+#define CardIssuerStoreService_Method_QueryCardInfoOnStore 29
+#define CardIssuerStoreService_Method_GetAddCardInfo 30
+#define CardIssuerStoreService_Method_PrintCardImmediately 31
+#define CardIssuerStoreService_Method_QueryCIStatus 32
+#define CardIssuerStoreService_Method_GetDevInfo 65535
+
+#define CardIssuerStoreService_MethodSignature_Insert 1091033773
+#define CardIssuerStoreService_MethodSignature_CancelInsert -1202478828
+#define CardIssuerStoreService_MethodSignature_InsertWaitMore 493791658
+#define CardIssuerStoreService_MethodSignature_Read 591445479
+#define CardIssuerStoreService_MethodSignature_Capture -1807054569
+#define CardIssuerStoreService_MethodSignature_Eject -377455114
+#define CardIssuerStoreService_MethodSignature_PreOnline 640958030
+#define CardIssuerStoreService_MethodSignature_PostOnline 923284555
+#define CardIssuerStoreService_MethodSignature_Exit -1158854104
+#define CardIssuerStoreService_MethodSignature_Issue 438783077
+#define CardIssuerStoreService_MethodSignature_GetMaterialCount -605917749
+#define CardIssuerStoreService_MethodSignature_SetMaterialCount 870103115
+#define CardIssuerStoreService_MethodSignature_SetIssueFlag 187641303
+#define CardIssuerStoreService_MethodSignature_ReadEx -842531343
+#define CardIssuerStoreService_MethodSignature_QueryCardInfo 154962579
+#define CardIssuerStoreService_MethodSignature_WriteTrack -1424799012
+#define CardIssuerStoreService_MethodSignature_GetMaterialCountEx 1356148904
+#define CardIssuerStoreService_MethodSignature_SetMaterialCountEx -1512312761
+#define CardIssuerStoreService_MethodSignature_SetSomeFlag -2033418025
+#define CardIssuerStoreService_MethodSignature_GetSCIInfo 1097494981
+#define CardIssuerStoreService_MethodSignature_IssueEx 1390328640
+#define CardIssuerStoreService_MethodSignature_OpenSafeLock 177980614
+#define CardIssuerStoreService_MethodSignature_SAMICCommand 406988293
+#define CardIssuerStoreService_MethodSignature_QueryPrinterStatus -890728447
+#define CardIssuerStoreService_MethodSignature_Print 2096006675
+#define CardIssuerStoreService_MethodSignature_QuerySCIList -1772231453
+#define CardIssuerStoreService_MethodSignature_BindSCI -1242011672
+#define CardIssuerStoreService_MethodSignature_PreOnlineOnStore 158325869
+#define CardIssuerStoreService_MethodSignature_NotifyPreonline -808637659
+#define CardIssuerStoreService_MethodSignature_QueryCardInfoOnStore 1217447214
+#define CardIssuerStoreService_MethodSignature_GetAddCardInfo 684031940
+#define CardIssuerStoreService_MethodSignature_PrintCardImmediately -1976184201
+#define CardIssuerStoreService_MethodSignature_QueryCIStatus -1907000703
+#define CardIssuerStoreService_MethodSignature_GetDevInfo 296205965
+
+#define CardIssuerStoreService_LogCode_Insert "QLR040222000"
+#define CardIssuerStoreService_LogCode_CancelInsert "QLR040222001"
+#define CardIssuerStoreService_LogCode_InsertWaitMore "QLR040222002"
+#define CardIssuerStoreService_LogCode_Read "QLR040222003"
+#define CardIssuerStoreService_LogCode_Capture "QLR040222004"
+#define CardIssuerStoreService_LogCode_Eject "QLR040222005"
+#define CardIssuerStoreService_LogCode_PreOnline "QLR040222006"
+#define CardIssuerStoreService_LogCode_PostOnline "QLR040222007"
+#define CardIssuerStoreService_LogCode_Exit "QLR040222008"
+#define CardIssuerStoreService_LogCode_Issue "QLR040222009"
+#define CardIssuerStoreService_LogCode_GetMaterialCount "QLR040222010"
+#define CardIssuerStoreService_LogCode_SetMaterialCount "QLR040222011"
+#define CardIssuerStoreService_LogCode_SetIssueFlag "QLR040222012"
+#define CardIssuerStoreService_LogCode_ReadEx "QLR040222013"
+#define CardIssuerStoreService_LogCode_QueryCardInfo "QLR040222014"
+#define CardIssuerStoreService_LogCode_WriteTrack "QLR040222015"
+#define CardIssuerStoreService_LogCode_GetMaterialCountEx "QLR040222016"
+#define CardIssuerStoreService_LogCode_SetMaterialCountEx "QLR040222017"
+#define CardIssuerStoreService_LogCode_SetSomeFlag "QLR040222018"
+#define CardIssuerStoreService_LogCode_GetSCIInfo "QLR040222019"
+#define CardIssuerStoreService_LogCode_IssueEx "QLR040222020"
+#define CardIssuerStoreService_LogCode_OpenSafeLock "QLR040222021"
+#define CardIssuerStoreService_LogCode_SAMICCommand "QLR040222022"
+#define CardIssuerStoreService_LogCode_QueryPrinterStatus "QLR040222023"
+#define CardIssuerStoreService_LogCode_Print "QLR040222024"
+#define CardIssuerStoreService_LogCode_QuerySCIList "QLR040222025"
+#define CardIssuerStoreService_LogCode_BindSCI "QLR040222026"
+#define CardIssuerStoreService_LogCode_PreOnlineOnStore "QLR040222027"
+#define CardIssuerStoreService_LogCode_NotifyPreonline "QLR040222028"
+#define CardIssuerStoreService_LogCode_QueryCardInfoOnStore "QLR040222029"
+#define CardIssuerStoreService_LogCode_GetAddCardInfo "QLR040222030"
+#define CardIssuerStoreService_LogCode_PrintCardImmediately "QLR040222031"
+#define CardIssuerStoreService_LogCode_QueryCIStatus "QLR040222032"
+#define CardIssuerStoreService_LogCode_GetDevInfo "QLR040222099"
+struct CardIssuerStoreService_Insert_Req
 {
 	CSimpleStringA aid;
 
@@ -128,7 +127,7 @@ struct CardIssuerService_Insert_Req
 
 };
 
-struct CardIssuerService_Insert_Ans
+struct CardIssuerStoreService_Insert_Ans
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -137,7 +136,7 @@ struct CardIssuerService_Insert_Ans
 
 };
 
-struct CardIssuerService_CancelInsert_Info
+struct CardIssuerStoreService_CancelInsert_Info
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -146,7 +145,7 @@ struct CardIssuerService_CancelInsert_Info
 
 };
 
-struct CardIssuerService_InsertWaitMore_Info
+struct CardIssuerStoreService_InsertWaitMore_Info
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -155,7 +154,7 @@ struct CardIssuerService_InsertWaitMore_Info
 
 };
 
-struct CardIssuerService_Read_Req
+struct CardIssuerStoreService_Read_Req
 {
 	CSimpleStringA aid;
 	int reserved1;
@@ -170,7 +169,7 @@ struct CardIssuerService_Read_Req
 
 };
 
-struct CardIssuerService_Read_Ans
+struct CardIssuerStoreService_Read_Ans
 {
 	CSimpleStringA track1;
 	CSimpleStringA track2;
@@ -195,7 +194,7 @@ struct CardIssuerService_Read_Ans
 
 };
 
-struct CardIssuerService_Capture_Req
+struct CardIssuerStoreService_Capture_Req
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -204,7 +203,7 @@ struct CardIssuerService_Capture_Req
 
 };
 
-struct CardIssuerService_Capture_Ans
+struct CardIssuerStoreService_Capture_Ans
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -213,7 +212,7 @@ struct CardIssuerService_Capture_Ans
 
 };
 
-struct CardIssuerService_Eject_Req
+struct CardIssuerStoreService_Eject_Req
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -222,7 +221,7 @@ struct CardIssuerService_Eject_Req
 
 };
 
-struct CardIssuerService_Eject_Ans
+struct CardIssuerStoreService_Eject_Ans
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -231,7 +230,7 @@ struct CardIssuerService_Eject_Ans
 
 };
 
-struct CardIssuerService_PreOnline_Req
+struct CardIssuerStoreService_PreOnline_Req
 {
 	CSimpleStringA businessData;
 	CSimpleStringA reserved1;
@@ -244,7 +243,7 @@ struct CardIssuerService_PreOnline_Req
 
 };
 
-struct CardIssuerService_PreOnline_Ans
+struct CardIssuerStoreService_PreOnline_Ans
 {
 	CSimpleStringA result;
 
@@ -255,7 +254,7 @@ struct CardIssuerService_PreOnline_Ans
 
 };
 
-struct CardIssuerService_PostOnline_Req
+struct CardIssuerStoreService_PostOnline_Req
 {
 	CSimpleStringA data;
 
@@ -266,7 +265,7 @@ struct CardIssuerService_PostOnline_Req
 
 };
 
-struct CardIssuerService_PostOnline_Ans
+struct CardIssuerStoreService_PostOnline_Ans
 {
 	CSimpleStringA result;
 
@@ -277,7 +276,7 @@ struct CardIssuerService_PostOnline_Ans
 
 };
 
-struct CardIssuerService_Exit_Info
+struct CardIssuerStoreService_Exit_Info
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -286,7 +285,7 @@ struct CardIssuerService_Exit_Info
 
 };
 
-struct CardIssuerService_Issue_Req
+struct CardIssuerStoreService_Issue_Req
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -295,7 +294,7 @@ struct CardIssuerService_Issue_Req
 
 };
 
-struct CardIssuerService_Issue_Ans
+struct CardIssuerStoreService_Issue_Ans
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -304,7 +303,7 @@ struct CardIssuerService_Issue_Ans
 
 };
 
-struct CardIssuerService_GetMaterialCount_Req
+struct CardIssuerStoreService_GetMaterialCount_Req
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -313,7 +312,7 @@ struct CardIssuerService_GetMaterialCount_Req
 
 };
 
-struct CardIssuerService_GetMaterialCount_Ans
+struct CardIssuerStoreService_GetMaterialCount_Ans
 {
 	int remains;
 	int captured;
@@ -327,7 +326,7 @@ struct CardIssuerService_GetMaterialCount_Ans
 
 };
 
-struct CardIssuerService_SetMaterialCount_Req
+struct CardIssuerStoreService_SetMaterialCount_Req
 {
 	int remains;
 	int captured;
@@ -345,7 +344,7 @@ struct CardIssuerService_SetMaterialCount_Req
 
 };
 
-struct CardIssuerService_SetMaterialCount_Ans
+struct CardIssuerStoreService_SetMaterialCount_Ans
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -354,7 +353,7 @@ struct CardIssuerService_SetMaterialCount_Ans
 
 };
 
-struct CardIssuerService_SetIssueFlag_Info
+struct CardIssuerStoreService_SetIssueFlag_Info
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -363,7 +362,7 @@ struct CardIssuerService_SetIssueFlag_Info
 
 };
 
-struct CardIssuerService_ReadEx_Req
+struct CardIssuerStoreService_ReadEx_Req
 {
 	CSimpleStringA aid;
 	CSimpleStringA reserved1;
@@ -376,7 +375,7 @@ struct CardIssuerService_ReadEx_Req
 
 };
 
-struct CardIssuerService_ReadEx_Ans
+struct CardIssuerStoreService_ReadEx_Ans
 {
 	CSimpleStringA track1;
 	CSimpleStringA track2;
@@ -401,7 +400,7 @@ struct CardIssuerService_ReadEx_Ans
 
 };
 
-struct CardIssuerService_QueryCardInfo_Req
+struct CardIssuerStoreService_QueryCardInfo_Req
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -410,7 +409,7 @@ struct CardIssuerService_QueryCardInfo_Req
 
 };
 
-struct CardIssuerService_QueryCardInfo_Ans
+struct CardIssuerStoreService_QueryCardInfo_Ans
 {
 	int position;
 	int reserved1;
@@ -423,7 +422,7 @@ struct CardIssuerService_QueryCardInfo_Ans
 
 };
 
-struct CardIssuerService_WriteTrack_Req
+struct CardIssuerStoreService_WriteTrack_Req
 {
 	int mode;
 	int co;
@@ -439,7 +438,7 @@ struct CardIssuerService_WriteTrack_Req
 
 };
 
-struct CardIssuerService_WriteTrack_Ans
+struct CardIssuerStoreService_WriteTrack_Ans
 {
 	int result;
 	int reserved1;
@@ -452,7 +451,7 @@ struct CardIssuerService_WriteTrack_Ans
 
 };
 
-struct CardIssuerService_GetMaterialCountEx_Req
+struct CardIssuerStoreService_GetMaterialCountEx_Req
 {
 	CAutoArray<int> GetHopper;
 	CAutoArray<int> reserved1;
@@ -465,7 +464,7 @@ struct CardIssuerService_GetMaterialCountEx_Req
 
 };
 
-struct CardIssuerService_GetMaterialCountEx_Ans
+struct CardIssuerStoreService_GetMaterialCountEx_Ans
 {
 	int captured;
 	CAutoArray<int> hasHopper;
@@ -489,7 +488,7 @@ struct CardIssuerService_GetMaterialCountEx_Ans
 
 };
 
-struct CardIssuerService_SetMaterialCountEx_Req
+struct CardIssuerStoreService_SetMaterialCountEx_Req
 {
 	CAutoArray<int> SetHopper;
 	int SetCaptured;
@@ -514,7 +513,7 @@ struct CardIssuerService_SetMaterialCountEx_Req
 
 };
 
-struct CardIssuerService_SetMaterialCountEx_Ans
+struct CardIssuerStoreService_SetMaterialCountEx_Ans
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -526,7 +525,7 @@ struct CardIssuerService_SetMaterialCountEx_Ans
 
 };
 
-struct CardIssuerService_SetSomeFlag_Req
+struct CardIssuerStoreService_SetSomeFlag_Req
 {
 	int IssueBusiness;
 	CAutoArray<int> reserved1;
@@ -539,7 +538,7 @@ struct CardIssuerService_SetSomeFlag_Req
 
 };
 
-struct CardIssuerService_SetSomeFlag_Ans
+struct CardIssuerStoreService_SetSomeFlag_Ans
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -551,7 +550,7 @@ struct CardIssuerService_SetSomeFlag_Ans
 
 };
 
-struct CardIssuerService_GetSCIInfo_Req
+struct CardIssuerStoreService_GetSCIInfo_Req
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -560,7 +559,7 @@ struct CardIssuerService_GetSCIInfo_Req
 
 };
 
-struct CardIssuerService_GetSCIInfo_Ans
+struct CardIssuerStoreService_GetSCIInfo_Ans
 {
 	int connected;
 	CSimpleStringA DevSN;
@@ -574,7 +573,7 @@ struct CardIssuerService_GetSCIInfo_Ans
 
 };
 
-struct CardIssuerService_IssueEx_Req
+struct CardIssuerStoreService_IssueEx_Req
 {
 	int hopper;
 	CAutoArray<int> reserved1;
@@ -587,7 +586,7 @@ struct CardIssuerService_IssueEx_Req
 
 };
 
-struct CardIssuerService_IssueEx_Ans
+struct CardIssuerStoreService_IssueEx_Ans
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -599,7 +598,7 @@ struct CardIssuerService_IssueEx_Ans
 
 };
 
-struct CardIssuerService_OpenSafeLock_Req
+struct CardIssuerStoreService_OpenSafeLock_Req
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -611,7 +610,7 @@ struct CardIssuerService_OpenSafeLock_Req
 
 };
 
-struct CardIssuerService_OpenSafeLock_Ans
+struct CardIssuerStoreService_OpenSafeLock_Ans
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -623,7 +622,7 @@ struct CardIssuerService_OpenSafeLock_Ans
 
 };
 
-struct CardIssuerService_SAMICCommand_Req
+struct CardIssuerStoreService_SAMICCommand_Req
 {
 	int cmdType;
 	CAutoArray<int> param1;
@@ -638,7 +637,7 @@ struct CardIssuerService_SAMICCommand_Req
 
 };
 
-struct CardIssuerService_SAMICCommand_Ans
+struct CardIssuerStoreService_SAMICCommand_Ans
 {
 	CAutoArray<int> ret1;
 	CAutoArray<CSimpleStringA> ret2;
@@ -652,7 +651,7 @@ struct CardIssuerService_SAMICCommand_Ans
 
 };
 
-struct CardIssuerService_QueryPrinterStatus_Req
+struct CardIssuerStoreService_QueryPrinterStatus_Req
 {
 	CAutoArray<int> param1;
 	CAutoArray<CSimpleStringA> param2;
@@ -666,7 +665,7 @@ struct CardIssuerService_QueryPrinterStatus_Req
 
 };
 
-struct CardIssuerService_QueryPrinterStatus_Ans
+struct CardIssuerStoreService_QueryPrinterStatus_Ans
 {
 	CAutoArray<int> ret1;
 	CAutoArray<CSimpleStringA> ret2;
@@ -680,7 +679,7 @@ struct CardIssuerService_QueryPrinterStatus_Ans
 
 };
 
-struct CardIssuerService_Print_Req
+struct CardIssuerStoreService_Print_Req
 {
 	CBlob data1;
 	CBlob data2;
@@ -698,7 +697,7 @@ struct CardIssuerService_Print_Req
 
 };
 
-struct CardIssuerService_Print_Ans
+struct CardIssuerStoreService_Print_Ans
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -710,7 +709,7 @@ struct CardIssuerService_Print_Ans
 
 };
 
-struct CardIssuerService_QuerySCIList_Req
+struct CardIssuerStoreService_QuerySCIList_Req
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -722,7 +721,7 @@ struct CardIssuerService_QuerySCIList_Req
 
 };
 
-struct CardIssuerService_QuerySCIList_Ans
+struct CardIssuerStoreService_QuerySCIList_Ans
 {
 	CAutoArray<CSimpleStringA> sciNo;
 	CAutoArray<CSimpleStringA> arrMateriel;
@@ -748,7 +747,7 @@ struct CardIssuerService_QuerySCIList_Ans
 
 };
 
-struct CardIssuerService_BindSCI_Req
+struct CardIssuerStoreService_BindSCI_Req
 {
 	int type;
 	CSimpleStringA sciNo;
@@ -762,7 +761,7 @@ struct CardIssuerService_BindSCI_Req
 
 };
 
-struct CardIssuerService_BindSCI_Ans
+struct CardIssuerStoreService_BindSCI_Ans
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<CSimpleStringA> reserved2;
@@ -774,7 +773,7 @@ struct CardIssuerService_BindSCI_Ans
 
 };
 
-struct CardIssuerService_PreOnlineOnStore_Req
+struct CardIssuerStoreService_PreOnlineOnStore_Req
 {
 	CSimpleStringA account;
 	CSimpleStringA termNo;
@@ -792,7 +791,7 @@ struct CardIssuerService_PreOnlineOnStore_Req
 
 };
 
-struct CardIssuerService_PreOnlineOnStore_Ans
+struct CardIssuerStoreService_PreOnlineOnStore_Ans
 {
 	int findCard;
 	int cardPos;
@@ -809,7 +808,7 @@ struct CardIssuerService_PreOnlineOnStore_Ans
 
 };
 
-struct CardIssuerService_NotifyPreonline_Req
+struct CardIssuerStoreService_NotifyPreonline_Req
 {
 	int findCard;
 	int cardPos;
@@ -829,7 +828,7 @@ struct CardIssuerService_NotifyPreonline_Req
 
 };
 
-struct CardIssuerService_NotifyPreonline_Ans
+struct CardIssuerStoreService_NotifyPreonline_Ans
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<int> reserved2;
@@ -843,7 +842,7 @@ struct CardIssuerService_NotifyPreonline_Ans
 
 };
 
-struct CardIssuerService_QueryCardInfoOnStore_Req
+struct CardIssuerStoreService_QueryCardInfoOnStore_Req
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<int> reserved2;
@@ -857,7 +856,7 @@ struct CardIssuerService_QueryCardInfoOnStore_Req
 
 };
 
-struct CardIssuerService_QueryCardInfoOnStore_Ans
+struct CardIssuerStoreService_QueryCardInfoOnStore_Ans
 {
 	int findCard;
 	int cardPos;
@@ -873,7 +872,7 @@ struct CardIssuerService_QueryCardInfoOnStore_Ans
 
 };
 
-struct CardIssuerService_GetAddCardInfo_Req
+struct CardIssuerStoreService_GetAddCardInfo_Req
 {
 	int isSync;
 	CAutoArray<int> reserved1;
@@ -888,7 +887,7 @@ struct CardIssuerService_GetAddCardInfo_Req
 
 };
 
-struct CardIssuerService_GetAddCardInfo_Ans
+struct CardIssuerStoreService_GetAddCardInfo_Ans
 {
 	int count;
 	CAutoArray<int> slot;
@@ -906,7 +905,7 @@ struct CardIssuerService_GetAddCardInfo_Ans
 
 };
 
-struct CardIssuerService_PrintCardImmediately_Req
+struct CardIssuerStoreService_PrintCardImmediately_Req
 {
 	CSimpleStringA formFile;
 	CSimpleStringA printData;
@@ -922,7 +921,7 @@ struct CardIssuerService_PrintCardImmediately_Req
 
 };
 
-struct CardIssuerService_PrintCardImmediately_Ans
+struct CardIssuerStoreService_PrintCardImmediately_Ans
 {
 	int ret;
 	CAutoArray<int> reserved1;
@@ -937,7 +936,7 @@ struct CardIssuerService_PrintCardImmediately_Ans
 
 };
 
-struct CardIssuerService_QueryCIStatus_Req
+struct CardIssuerStoreService_QueryCIStatus_Req
 {
 	CAutoArray<int> reserved1;
 	CAutoArray<int> reserved2;
@@ -951,7 +950,7 @@ struct CardIssuerService_QueryCIStatus_Req
 
 };
 
-struct CardIssuerService_QueryCIStatus_Ans
+struct CardIssuerStoreService_QueryCIStatus_Ans
 {
 	int retainBin;
 	CAutoArray<int> hopperNo;
@@ -968,7 +967,7 @@ struct CardIssuerService_QueryCIStatus_Ans
 
 };
 
-struct CardIssuerService_GetDevInfo_Req
+struct CardIssuerStoreService_GetDevInfo_Req
 {
 
 	void Serialize(SpBuffer &Buf)
@@ -977,7 +976,7 @@ struct CardIssuerService_GetDevInfo_Req
 
 };
 
-struct CardIssuerService_GetDevInfo_Ans
+struct CardIssuerStoreService_GetDevInfo_Ans
 {
 	CSimpleStringA type;
 	CSimpleStringA model;
@@ -994,6 +993,6 @@ struct CardIssuerService_GetDevInfo_Ans
 
 ///////////////////////////
 
-} // namespace CardIssuer
+} // namespace CardIssuerStore
 
-#endif // __CARDISSUER_DEF_G_H
+#endif // __CARDISSUERSTORE_DEF_G_H

+ 45 - 0
Module/mod_cardissuerstore/CardIssuerStore_msg_g.h

@@ -0,0 +1,45 @@
+
+#ifndef __CARDISSUERSTORE_MSG_G_H
+#define __CARDISSUERSTORE_MSG_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "SpHelper.h"
+
+namespace CardIssuerStore {
+#define eMsg_FetchCard 0
+#define eMsg_SCIConnect 1
+
+#define eMsgSig_FetchCard 1110804794
+#define eMsgSig_SCIConnect 721962700
+
+struct FetchCard
+{
+	int status;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & status;
+	}
+
+};
+
+///////////////////////////
+
+struct SCIConnect
+{
+	int status;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & status;
+	}
+
+};
+
+///////////////////////////
+
+} // namespace CardIssuerStore
+#endif // __CARDISSUERSTORE_MSG_G_H

+ 1001 - 0
Module/mod_cardissuerstore/CardIssuerStore_server_g.h

@@ -0,0 +1,1001 @@
+
+#ifndef __CARDISSUERSTORE_SERVER_G_H
+#define __CARDISSUERSTORE_SERVER_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "CardIssuerStore_def_g.h"
+
+namespace CardIssuerStore {
+class CardIssuerStoreService_ServerSessionBase : public CServerSessionBase
+{
+public:
+	CardIssuerStoreService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual ~CardIssuerStoreService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual bool IsExclusive() { return false; }
+
+	virtual bool IsSessionOverlap() { return true; }
+
+	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		case CardIssuerStoreService_Method_Insert:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_Insert) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_CancelInsert:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_CancelInsert) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_InsertWaitMore:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_InsertWaitMore) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Read:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_Read) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Capture:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_Capture) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Eject:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_Eject) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PreOnline:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_PreOnline) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PostOnline:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_PostOnline) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Exit:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_Exit) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Issue:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_Issue) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetMaterialCount:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_GetMaterialCount) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetMaterialCount:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_SetMaterialCount) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetIssueFlag:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_SetIssueFlag) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_ReadEx:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_ReadEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryCardInfo:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_QueryCardInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_WriteTrack:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_WriteTrack) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetMaterialCountEx:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_GetMaterialCountEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetMaterialCountEx:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_SetMaterialCountEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetSomeFlag:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_SetSomeFlag) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetSCIInfo:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_GetSCIInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_IssueEx:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_IssueEx) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_OpenSafeLock:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_OpenSafeLock) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SAMICCommand:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_SAMICCommand) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryPrinterStatus:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_QueryPrinterStatus) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Print:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_Print) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QuerySCIList:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_QuerySCIList) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_BindSCI:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_BindSCI) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PreOnlineOnStore:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_PreOnlineOnStore) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_NotifyPreonline:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_NotifyPreonline) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryCardInfoOnStore:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_QueryCardInfoOnStore) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetAddCardInfo:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_GetAddCardInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PrintCardImmediately:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_PrintCardImmediately) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryCIStatus:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_QueryCIStatus) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetDevInfo:
+			if (dwSignature == CardIssuerStoreService_MethodSignature_GetDevInfo) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		case CardIssuerStoreService_Method_Insert:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_Insert) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_CancelInsert:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_CancelInsert) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_InsertWaitMore:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_InsertWaitMore) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Read:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_Read) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Capture:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_Capture) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Eject:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_Eject) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PreOnline:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_PreOnline) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PostOnline:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_PostOnline) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Exit:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_Exit) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Issue:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_Issue) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetMaterialCount:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_GetMaterialCount) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetMaterialCount:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_SetMaterialCount) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetIssueFlag:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_SetIssueFlag) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_ReadEx:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_ReadEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryCardInfo:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_QueryCardInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_WriteTrack:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_WriteTrack) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetMaterialCountEx:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_GetMaterialCountEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetMaterialCountEx:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_SetMaterialCountEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SetSomeFlag:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_SetSomeFlag) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetSCIInfo:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_GetSCIInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_IssueEx:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_IssueEx) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_OpenSafeLock:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_OpenSafeLock) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_SAMICCommand:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_SAMICCommand) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryPrinterStatus:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_QueryPrinterStatus) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_Print:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_Print) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QuerySCIList:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_QuerySCIList) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_BindSCI:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_BindSCI) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PreOnlineOnStore:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_PreOnlineOnStore) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_NotifyPreonline:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_NotifyPreonline) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryCardInfoOnStore:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_QueryCardInfoOnStore) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetAddCardInfo:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_GetAddCardInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_PrintCardImmediately:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_PrintCardImmediately) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_QueryCIStatus:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_QueryCIStatus) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case CardIssuerStoreService_Method_GetDevInfo:
+			if (dwSignature != CardIssuerStoreService_MethodSignature_GetDevInfo) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	virtual void Handle_Insert(SpReqAnsContext<CardIssuerStoreService_Insert_Req, CardIssuerStoreService_Insert_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_CancelInsert(SpOnewayCallContext<CardIssuerStoreService_CancelInsert_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerStoreService_InsertWaitMore_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Read(SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Capture(SpReqAnsContext<CardIssuerStoreService_Capture_Req, CardIssuerStoreService_Capture_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Eject(SpReqAnsContext<CardIssuerStoreService_Eject_Req, CardIssuerStoreService_Eject_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PreOnline(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req, CardIssuerStoreService_PreOnline_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PostOnline(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req, CardIssuerStoreService_PostOnline_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Exit(SpOnewayCallContext<CardIssuerStoreService_Exit_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Issue(SpReqAnsContext<CardIssuerStoreService_Issue_Req, CardIssuerStoreService_Issue_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetMaterialCount(SpReqAnsContext<CardIssuerStoreService_GetMaterialCount_Req, CardIssuerStoreService_GetMaterialCount_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetMaterialCount(SpReqAnsContext<CardIssuerStoreService_SetMaterialCount_Req, CardIssuerStoreService_SetMaterialCount_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerStoreService_SetIssueFlag_Info>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_ReadEx(SpReqAnsContext<CardIssuerStoreService_ReadEx_Req, CardIssuerStoreService_ReadEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryCardInfo(SpReqAnsContext<CardIssuerStoreService_QueryCardInfo_Req, CardIssuerStoreService_QueryCardInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_WriteTrack(SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req, CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req, CardIssuerStoreService_GetMaterialCountEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req, CardIssuerStoreService_SetMaterialCountEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SetSomeFlag(SpReqAnsContext<CardIssuerStoreService_SetSomeFlag_Req, CardIssuerStoreService_SetSomeFlag_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetSCIInfo(SpReqAnsContext<CardIssuerStoreService_GetSCIInfo_Req, CardIssuerStoreService_GetSCIInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_IssueEx(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_OpenSafeLock(SpReqAnsContext<CardIssuerStoreService_OpenSafeLock_Req, CardIssuerStoreService_OpenSafeLock_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryPrinterStatus(SpReqAnsContext<CardIssuerStoreService_QueryPrinterStatus_Req, CardIssuerStoreService_QueryPrinterStatus_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_Print(SpReqAnsContext<CardIssuerStoreService_Print_Req, CardIssuerStoreService_Print_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QuerySCIList(SpReqAnsContext<CardIssuerStoreService_QuerySCIList_Req, CardIssuerStoreService_QuerySCIList_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_BindSCI(SpReqAnsContext<CardIssuerStoreService_BindSCI_Req, CardIssuerStoreService_BindSCI_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PreOnlineOnStore(SpReqAnsContext<CardIssuerStoreService_PreOnlineOnStore_Req, CardIssuerStoreService_PreOnlineOnStore_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_NotifyPreonline(SpReqAnsContext<CardIssuerStoreService_NotifyPreonline_Req, CardIssuerStoreService_NotifyPreonline_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req, CardIssuerStoreService_GetAddCardInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req, CardIssuerStoreService_QueryCIStatus_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_GetDevInfo(SpReqAnsContext<CardIssuerStoreService_GetDevInfo_Req, CardIssuerStoreService_GetDevInfo_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
+	{
+		CAutoBuffer Buf;
+		DWORD dwMessageID;
+		DWORD dwMessageSignature;
+		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
+		if (Error == Error_Succeed) {
+#ifdef DEBUG
+			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
+#else
+			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
+				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
+				return;
+			}
+#endif
+			switch (dwMessageID) {
+				case CardIssuerStoreService_Method_Insert:
+					{
+						SpReqAnsContext<CardIssuerStoreService_Insert_Req,CardIssuerStoreService_Insert_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_Insert_Req,CardIssuerStoreService_Insert_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Insert(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_CancelInsert:
+					{
+						SpOnewayCallContext<CardIssuerStoreService_CancelInsert_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStoreService_CancelInsert_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_CancelInsert(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_InsertWaitMore:
+					{
+						SpOnewayCallContext<CardIssuerStoreService_InsertWaitMore_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStoreService_InsertWaitMore_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_InsertWaitMore(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_Read:
+					{
+						SpReqAnsContext<CardIssuerStoreService_Read_Req,CardIssuerStoreService_Read_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_Read_Req,CardIssuerStoreService_Read_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Read(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_Capture:
+					{
+						SpReqAnsContext<CardIssuerStoreService_Capture_Req,CardIssuerStoreService_Capture_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_Capture_Req,CardIssuerStoreService_Capture_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Capture(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_Eject:
+					{
+						SpReqAnsContext<CardIssuerStoreService_Eject_Req,CardIssuerStoreService_Eject_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_Eject_Req,CardIssuerStoreService_Eject_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Eject(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_PreOnline:
+					{
+						SpReqAnsContext<CardIssuerStoreService_PreOnline_Req,CardIssuerStoreService_PreOnline_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_PreOnline_Req,CardIssuerStoreService_PreOnline_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PreOnline(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_PostOnline:
+					{
+						SpReqAnsContext<CardIssuerStoreService_PostOnline_Req,CardIssuerStoreService_PostOnline_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_PostOnline_Req,CardIssuerStoreService_PostOnline_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PostOnline(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_Exit:
+					{
+						SpOnewayCallContext<CardIssuerStoreService_Exit_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStoreService_Exit_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Exit(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_Issue:
+					{
+						SpReqAnsContext<CardIssuerStoreService_Issue_Req,CardIssuerStoreService_Issue_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_Issue_Req,CardIssuerStoreService_Issue_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Issue(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_GetMaterialCount:
+					{
+						SpReqAnsContext<CardIssuerStoreService_GetMaterialCount_Req,CardIssuerStoreService_GetMaterialCount_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_GetMaterialCount_Req,CardIssuerStoreService_GetMaterialCount_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetMaterialCount(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_SetMaterialCount:
+					{
+						SpReqAnsContext<CardIssuerStoreService_SetMaterialCount_Req,CardIssuerStoreService_SetMaterialCount_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_SetMaterialCount_Req,CardIssuerStoreService_SetMaterialCount_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetMaterialCount(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_SetIssueFlag:
+					{
+						SpOnewayCallContext<CardIssuerStoreService_SetIssueFlag_Info>::Pointer ctx;
+						ctx.Attach(new SpOnewayCallContext<CardIssuerStoreService_SetIssueFlag_Info>());
+						SpBuffer2Object(Buf, ctx->Info);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetIssueFlag(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_ReadEx:
+					{
+						SpReqAnsContext<CardIssuerStoreService_ReadEx_Req,CardIssuerStoreService_ReadEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_ReadEx_Req,CardIssuerStoreService_ReadEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_ReadEx(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_QueryCardInfo:
+					{
+						SpReqAnsContext<CardIssuerStoreService_QueryCardInfo_Req,CardIssuerStoreService_QueryCardInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_QueryCardInfo_Req,CardIssuerStoreService_QueryCardInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryCardInfo(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_WriteTrack:
+					{
+						SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req,CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req,CardIssuerStoreService_WriteTrack_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_WriteTrack(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_GetMaterialCountEx:
+					{
+						SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req,CardIssuerStoreService_GetMaterialCountEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req,CardIssuerStoreService_GetMaterialCountEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetMaterialCountEx(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_SetMaterialCountEx:
+					{
+						SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req,CardIssuerStoreService_SetMaterialCountEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req,CardIssuerStoreService_SetMaterialCountEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetMaterialCountEx(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_SetSomeFlag:
+					{
+						SpReqAnsContext<CardIssuerStoreService_SetSomeFlag_Req,CardIssuerStoreService_SetSomeFlag_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_SetSomeFlag_Req,CardIssuerStoreService_SetSomeFlag_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SetSomeFlag(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_GetSCIInfo:
+					{
+						SpReqAnsContext<CardIssuerStoreService_GetSCIInfo_Req,CardIssuerStoreService_GetSCIInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_GetSCIInfo_Req,CardIssuerStoreService_GetSCIInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetSCIInfo(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_IssueEx:
+					{
+						SpReqAnsContext<CardIssuerStoreService_IssueEx_Req,CardIssuerStoreService_IssueEx_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_IssueEx_Req,CardIssuerStoreService_IssueEx_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_IssueEx(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_OpenSafeLock:
+					{
+						SpReqAnsContext<CardIssuerStoreService_OpenSafeLock_Req,CardIssuerStoreService_OpenSafeLock_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_OpenSafeLock_Req,CardIssuerStoreService_OpenSafeLock_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_OpenSafeLock(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_SAMICCommand:
+					{
+						SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req,CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req,CardIssuerStoreService_SAMICCommand_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_SAMICCommand(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_QueryPrinterStatus:
+					{
+						SpReqAnsContext<CardIssuerStoreService_QueryPrinterStatus_Req,CardIssuerStoreService_QueryPrinterStatus_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_QueryPrinterStatus_Req,CardIssuerStoreService_QueryPrinterStatus_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryPrinterStatus(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_Print:
+					{
+						SpReqAnsContext<CardIssuerStoreService_Print_Req,CardIssuerStoreService_Print_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_Print_Req,CardIssuerStoreService_Print_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_Print(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_QuerySCIList:
+					{
+						SpReqAnsContext<CardIssuerStoreService_QuerySCIList_Req,CardIssuerStoreService_QuerySCIList_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_QuerySCIList_Req,CardIssuerStoreService_QuerySCIList_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QuerySCIList(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_BindSCI:
+					{
+						SpReqAnsContext<CardIssuerStoreService_BindSCI_Req,CardIssuerStoreService_BindSCI_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_BindSCI_Req,CardIssuerStoreService_BindSCI_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_BindSCI(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_PreOnlineOnStore:
+					{
+						SpReqAnsContext<CardIssuerStoreService_PreOnlineOnStore_Req,CardIssuerStoreService_PreOnlineOnStore_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_PreOnlineOnStore_Req,CardIssuerStoreService_PreOnlineOnStore_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PreOnlineOnStore(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_NotifyPreonline:
+					{
+						SpReqAnsContext<CardIssuerStoreService_NotifyPreonline_Req,CardIssuerStoreService_NotifyPreonline_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_NotifyPreonline_Req,CardIssuerStoreService_NotifyPreonline_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_NotifyPreonline(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_QueryCardInfoOnStore:
+					{
+						SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req,CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req,CardIssuerStoreService_QueryCardInfoOnStore_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryCardInfoOnStore(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_GetAddCardInfo:
+					{
+						SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req,CardIssuerStoreService_GetAddCardInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req,CardIssuerStoreService_GetAddCardInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetAddCardInfo(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_PrintCardImmediately:
+					{
+						SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req,CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req,CardIssuerStoreService_PrintCardImmediately_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_PrintCardImmediately(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_QueryCIStatus:
+					{
+						SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req,CardIssuerStoreService_QueryCIStatus_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req,CardIssuerStoreService_QueryCIStatus_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_QueryCIStatus(ctx);
+					}
+					break;
+				case CardIssuerStoreService_Method_GetDevInfo:
+					{
+						SpReqAnsContext<CardIssuerStoreService_GetDevInfo_Req,CardIssuerStoreService_GetDevInfo_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<CardIssuerStoreService_GetDevInfo_Req,CardIssuerStoreService_GetDevInfo_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_GetDevInfo(ctx);
+					}
+					break;
+				default:
+					assert(0);
+					break;
+			}
+			
+		} else {
+			pTransactionContext->SendAnswer(Error);
+		}
+	}
+
+};
+
+
+///////////////////////////
+
+} // namespace CardIssuerStore
+#endif // __CARDISSUERSTORE_SERVER_G_H

+ 26 - 22
Module/mod_cardissuerstore/mod_cardissuer.cpp

@@ -10,7 +10,7 @@
 
 #include "CardIssuerClass.h"
 
-void CardIssuerServerSession::Handle_Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_Read(SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx)
 {	//卡库暂时读卡功能不使用
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
@@ -18,7 +18,7 @@ void CardIssuerServerSession::Handle_Read(SpReqAnsContext<CardIssuerService_Read
 	m_pEntity->Read(ctx);
 }
 
-void CardIssuerServerSession::Handle_Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_Capture(SpReqAnsContext<CardIssuerStoreService_Capture_Req, CardIssuerStoreService_Capture_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
@@ -26,119 +26,119 @@ void CardIssuerServerSession::Handle_Capture(SpReqAnsContext<CardIssuerService_C
 	m_pEntity->Capture(ctx);
 }
 
-void CardIssuerServerSession::Handle_Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_Eject(SpReqAnsContext<CardIssuerStoreService_Eject_Req, CardIssuerStoreService_Eject_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke Eject");
 	m_pEntity->Eject(ctx);
 }
-void CardIssuerServerSession::Handle_PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_PreOnline(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req, CardIssuerStoreService_PreOnline_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PreOnline");
 	m_pEntity->PreOnline(ctx);
 }
-void CardIssuerServerSession::Handle_PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_PostOnline(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req, CardIssuerStoreService_PostOnline_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PostOnline");
 	m_pEntity->PostOnline(ctx);
 }
-void CardIssuerServerSession::Handle_Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_Exit(SpOnewayCallContext<CardIssuerStoreService_Exit_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Exit");
 	m_pEntity->Exit(ctx);
 }
- void CardIssuerServerSession::Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx)
+ void CardIssuerStoreServerSession::Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerStoreService_SetIssueFlag_Info>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetIssueFlag");
 	m_pEntity->SetIssueFlag(ctx);
 }
-void CardIssuerServerSession::Handle_QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_QueryCardInfo(SpReqAnsContext<CardIssuerStoreService_QueryCardInfo_Req, CardIssuerStoreService_QueryCardInfo_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCardInfo");
 	m_pEntity->QueryCardInfo(ctx);
 }
-void CardIssuerServerSession::Handle_WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_WriteTrack(SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req, CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("WriteTrack");
 	m_pEntity->WriteTrack(ctx);
 }
-void CardIssuerServerSession::Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req, CardIssuerStoreService_GetMaterialCountEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("GetMaterialCountEx");
 	m_pEntity->GetMaterialCountEx(ctx);
 }
-void CardIssuerServerSession::Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req, CardIssuerStoreService_SetMaterialCountEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetMaterialCountEx");
 	m_pEntity->SetMaterialCountEx(ctx);
 }
-void CardIssuerServerSession::Handle_SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_SetSomeFlag(SpReqAnsContext<CardIssuerStoreService_SetSomeFlag_Req, CardIssuerStoreService_SetSomeFlag_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetSomeFlag,Req.IssueBusiness:%d", ctx->Req.IssueBusiness);
 	m_pEntity->SetSomeFlag(ctx);
 }
-void CardIssuerServerSession::Handle_IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_IssueEx(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("IssueEx,req.hopper:%d", ctx->Req.hopper);
 	m_pEntity->IssueEx(ctx);
 }
-void CardIssuerServerSession::Handle_SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_SAMICCommand(SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx)
 {
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SAMICCommand");
 	m_pEntity->SAMICCommand(ctx);
 }
 
-void CardIssuerServerSession::Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCardInfoOnStore");
 	m_pEntity->QueryCardInfoOnStore(ctx);
 }
-void CardIssuerServerSession::Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerService_GetAddCardInfo_Req, CardIssuerService_GetAddCardInfo_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req, CardIssuerStoreService_GetAddCardInfo_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("GetAddCardInfo");
 	m_pEntity->GetAddCardInfo(ctx);
 }
-void CardIssuerServerSession::Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PrintCardImmediately");
 	m_pEntity->PrintCardImmediately(ctx);
 }
-void CardIssuerServerSession::Handle_QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req, CardIssuerStoreService_QueryCIStatus_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
 	DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCIStatus");
 	m_pEntity->QueryCIStatus(ctx);
 }
-void CardIssuerServerSession::Handle_GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx)
+void CardIssuerStoreServerSession::Handle_GetDevInfo(SpReqAnsContext<CardIssuerStoreService_GetDevInfo_Req, CardIssuerStoreService_GetDevInfo_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	DbgToBeidou(ctx->link, __FUNCTION__)();
@@ -149,12 +149,16 @@ void CCardIssuerEntity::OnSysVarEvent(const char* pszKey, const char* pszValue,
 {
 	if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
 	{
-		if (_strnicmp(pszValue, "M", strlen("M")) == 0)
+		if (_strnicmp(pszValue, "M", strlen("M")) == 0) {
 			m_fsm.SetInWhatPage(PageType_MainPage);
-		else if (_strnicmp(pszValue, "U", strlen("U")) == 0)
+			m_fsm.SetEnterMainPage();//设置进入首页
+		}
+		else if (_strnicmp(pszValue, "U", strlen("U")) == 0) {
 			m_fsm.SetInWhatPage(PageType_UserDesktop);
-		else
+		}
+		else {
 			m_fsm.SetInWhatPage(PageType_Other);
+		}
 	}
 }
 

+ 52 - 52
Module/mod_cardissuerstore/mod_cardissuer.h

@@ -1,35 +1,35 @@
-#include "CardIssuer_server_g.h"
-#include "CardIssuer_def_g.h"
+#include "CardIssuerStore_server_g.h"
+#include "CardIssuerStore_def_g.h"
 #include "CardIssuerFSM.h"
 #include "DevEntityCommBase.hpp"
-using namespace CardIssuer;
+using namespace CardIssuerStore;
 
 class CCardIssuerEntity;
 
-class CardIssuerServerSession : public CardIssuerService_ServerSessionBase
+class CardIssuerStoreServerSession : public CardIssuerStoreService_ServerSessionBase
 {
 public:
-	CardIssuerServerSession(CCardIssuerEntity* pEntity):m_pEntity(pEntity){}
-	virtual ~CardIssuerServerSession(){}
-	virtual void Handle_Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx);
-	virtual void Handle_Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx);
-	virtual void Handle_Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx);
-	virtual void Handle_PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx);
-	virtual void Handle_PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx);
-	virtual void Handle_Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx);	
-	virtual void Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx);
-	virtual void Handle_QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx);
-	virtual void Handle_WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx);
-	virtual void Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx);
-	virtual void Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx);
-	virtual void Handle_SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx);
-	virtual void Handle_IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx);
-	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx);
-	virtual void Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx);
-	virtual void Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerService_GetAddCardInfo_Req, CardIssuerService_GetAddCardInfo_Ans>::Pointer ctx);
-	virtual void Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx);
-	virtual void Handle_QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx);
-	virtual void Handle_GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx);
+	CardIssuerStoreServerSession(CCardIssuerEntity* pEntity):m_pEntity(pEntity){}
+	virtual ~CardIssuerStoreServerSession(){}
+	virtual void Handle_Read(SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx);
+	virtual void Handle_Capture(SpReqAnsContext<CardIssuerStoreService_Capture_Req, CardIssuerStoreService_Capture_Ans>::Pointer ctx);
+	virtual void Handle_Eject(SpReqAnsContext<CardIssuerStoreService_Eject_Req, CardIssuerStoreService_Eject_Ans>::Pointer ctx);
+	virtual void Handle_PreOnline(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req, CardIssuerStoreService_PreOnline_Ans>::Pointer ctx);
+	virtual void Handle_PostOnline(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req, CardIssuerStoreService_PostOnline_Ans>::Pointer ctx);
+	virtual void Handle_Exit(SpOnewayCallContext<CardIssuerStoreService_Exit_Info>::Pointer ctx);	
+	virtual void Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerStoreService_SetIssueFlag_Info>::Pointer ctx);
+	virtual void Handle_QueryCardInfo(SpReqAnsContext<CardIssuerStoreService_QueryCardInfo_Req, CardIssuerStoreService_QueryCardInfo_Ans>::Pointer ctx);
+	virtual void Handle_WriteTrack(SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req, CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx);
+	virtual void Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req, CardIssuerStoreService_GetMaterialCountEx_Ans>::Pointer ctx);
+	virtual void Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req, CardIssuerStoreService_SetMaterialCountEx_Ans>::Pointer ctx);
+	virtual void Handle_SetSomeFlag(SpReqAnsContext<CardIssuerStoreService_SetSomeFlag_Req, CardIssuerStoreService_SetSomeFlag_Ans>::Pointer ctx);
+	virtual void Handle_IssueEx(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx);
+	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx);
+	virtual void Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx);
+	virtual void Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req, CardIssuerStoreService_GetAddCardInfo_Ans>::Pointer ctx);
+	virtual void Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx);
+	virtual void Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req, CardIssuerStoreService_QueryCIStatus_Ans>::Pointer ctx);
+	virtual void Handle_GetDevInfo(SpReqAnsContext<CardIssuerStoreService_GetDevInfo_Req, CardIssuerStoreService_GetDevInfo_Ans>::Pointer ctx);
 private:
 	CCardIssuerEntity* m_pEntity;
 };
@@ -41,7 +41,7 @@ public:
 	{
 	}
 	virtual ~CCardIssuerEntity(){}
-	virtual const char *GetEntityName() const { return "CardIssuer"; }
+	virtual const char *GetEntityName() const { return "CardIssuerStore"; }
 	virtual void OnPreStart(CAutoArray<CSimpleStringA> strArgs,CSmartPointer<ITransactionContext> pTransactionContext) 
 	{ 
 		LOG_FUNCTION();
@@ -84,17 +84,17 @@ public:
 	{
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("A new connecting request arrived.");
 		m_bNewSessionInit = true;
-		return new CardIssuerServerSession(this);
+		return new CardIssuerStoreServerSession(this);
 	}
 
-	void Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
+	void Read(SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		CardReadEvent* e = new CardReadEvent();
 		e->ctx = ctx;
 		m_fsm.PostEventFIFO(e);
 	}
-	void Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx)
+	void Capture(SpReqAnsContext<CardIssuerStoreService_Capture_Req, CardIssuerStoreService_Capture_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		CardCaptureEvent* e = new CardCaptureEvent();
@@ -102,18 +102,18 @@ public:
 		m_fsm.PostEventFIFO(e);
 	}
 
-	void Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx)
+	void Eject(SpReqAnsContext<CardIssuerStoreService_Eject_Req, CardIssuerStoreService_Eject_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		CardEjectEvent* e = new CardEjectEvent();
 		e->ctx = ctx;
 		m_fsm.PostEventFIFO(e);
 	}
-	void PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
+	void PreOnline(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req, CardIssuerStoreService_PreOnline_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		if (!m_fsm.GetDevInitFlag()) {
-			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);
+			ctx->Answer(Error_DevNotAvailable, CardIssuerStore_UserErrorCode_DevOpen_Failed);
 		}
 		else {
 			if (ctx->Req.reserved1.GetLength() > 0 && strnicmp("kaku#", (const char*)ctx->Req.reserved1, 5) == 0)
@@ -121,12 +121,12 @@ public:
 				int state = m_fsm.GetFSMState();
 				if (state == 9)
 				{
-					ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_EntityInFailState);
+					ctx->Answer(Error_DevNotAvailable, CardIssuerStore_UserErrorCode_EntityInFailState);
 					return;
 				}
 				else if (state != 2 || m_fsm.CheckIsCrossPreOnline())//借用跨机标识来识别是否跨机中
 				{
-					ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_CardActive_CardStore_Issuing);
+					ctx->Answer(Error_InvalidState, CardIssuerStore_UserErrorCode_CardActive_CardStore_Issuing);
 					return;
 				}
 			}
@@ -135,21 +135,21 @@ public:
 			m_fsm.PostEventFIFO(e);
 		}
 	}
-	void PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
+	void PostOnline(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req, CardIssuerStoreService_PostOnline_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		PostOnlineEvent* e = new PostOnlineEvent();
 		e->ctx = ctx;
 		m_fsm.PostEventFIFO(e);
 	}
-	void Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx)
+	void Exit(SpOnewayCallContext<CardIssuerStoreService_Exit_Info>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		m_bNewSessionInit = false;
 		FSMEvent *evt = new FSMEvent(USER_EVT_EXIT);
 		m_fsm.PostEventFIFO(evt);
 	}
-	void QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx)
+	void QueryCardInfo(SpReqAnsContext<CardIssuerStoreService_QueryCardInfo_Req, CardIssuerStoreService_QueryCardInfo_Ans>::Pointer ctx)
 	{
 		if (m_bNewSessionInit)
 		{
@@ -164,28 +164,28 @@ public:
 			ctx->Answer(Error_Succeed);
 		}
 	}
-	void WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx)
+	void WriteTrack(SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req, CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx)
 	{
 		CardWriteEvent *pEvt = new CardWriteEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx){ m_fsm.FrontSetIssueFlag(true); }
-	void GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx)
+	void SetIssueFlag(SpOnewayCallContext<CardIssuerStoreService_SetIssueFlag_Info>::Pointer ctx){ m_fsm.FrontSetIssueFlag(true); }
+	void GetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req, CardIssuerStoreService_GetMaterialCountEx_Ans>::Pointer ctx)
 	{
 		m_bNewSessionInit = false;
 		GetMaterialExEvent *pEvt = new GetMaterialExEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx)
+	void SetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req, CardIssuerStoreService_SetMaterialCountEx_Ans>::Pointer ctx)
 	{
 		m_bNewSessionInit = false;
 		SetMaterialExEvent *pEvt = new SetMaterialExEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx)
+	void SetSomeFlag(SpReqAnsContext<CardIssuerStoreService_SetSomeFlag_Req, CardIssuerStoreService_SetSomeFlag_Ans>::Pointer ctx)
 	{
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("set issue flag to %d", ctx->Req.IssueBusiness);
 		if (ctx->Req.IssueBusiness == 1)
@@ -219,11 +219,11 @@ public:
 		ctx->Answer(Error_Succeed);
 
 	}
-	void IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx)
+	void IssueEx(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		if (!m_fsm.GetDevInitFlag()) {
-			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);
+			ctx->Answer(Error_DevNotAvailable, CardIssuerStore_UserErrorCode_DevOpen_Failed);
 		}
 		else {
 			m_bNewSessionInit = false;
@@ -232,17 +232,17 @@ public:
 			m_fsm.PostEventFIFO(pEvt);
 		}
 	}
-	void SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx)
+	void SAMICCommand(SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		SAMICCommandEvent *pEvt = new SAMICCommandEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void QueryCardInfoOnStore(SpReqAnsContext<CardIssuerService_QueryCardInfoOnStore_Req, CardIssuerService_QueryCardInfoOnStore_Ans>::Pointer ctx)
+	void QueryCardInfoOnStore(SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx)
 	{
 		if (!m_fsm.GetDevInitFlag()) {
-			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);
+			ctx->Answer(Error_DevNotAvailable, CardIssuerStore_UserErrorCode_DevOpen_Failed);
 		}
 		else
 		{
@@ -251,24 +251,24 @@ public:
 			m_fsm.PostEventFIFO(pEvt);
 		}
 	}
-	void GetAddCardInfo(SpReqAnsContext<CardIssuerService_GetAddCardInfo_Req, CardIssuerService_GetAddCardInfo_Ans>::Pointer ctx)
+	void GetAddCardInfo(SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req, CardIssuerStoreService_GetAddCardInfo_Ans>::Pointer ctx)
 	{
 		if (!m_fsm.GetDevInitFlag()) {
-			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);
+			ctx->Answer(Error_DevNotAvailable, CardIssuerStore_UserErrorCode_DevOpen_Failed);
 		}
 		else
 		{
 			m_fsm.GetAddCardInfo(ctx);
 		}
 	}
-	void PrintCardImmediately(SpReqAnsContext<CardIssuerService_PrintCardImmediately_Req, CardIssuerService_PrintCardImmediately_Ans>::Pointer ctx)
+	void PrintCardImmediately(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
 		PrintCardImEvent* pEvt = new PrintCardImEvent();
 		pEvt->ctx = ctx;
 		m_fsm.PostEventFIFO(pEvt);
 	}
-	void GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx)
+	void GetDevInfo(SpReqAnsContext<CardIssuerStoreService_GetDevInfo_Req, CardIssuerStoreService_GetDevInfo_Ans>::Pointer ctx)
 	{
 		ctx->Ans.state = m_fsm.GetDevState();
 		//设备未正常打开时,直接报state=0;
@@ -279,7 +279,7 @@ public:
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("GetDevInfo state=%d",ctx->Ans.state);
 		ctx->Answer(Error_Succeed);
 	}
-	void QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx)
+	void QueryCIStatus(SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req, CardIssuerStoreService_QueryCIStatus_Ans>::Pointer ctx)
 	{
 		m_fsm.QueryCIStatus(ctx);
 	}

+ 3 - 2
Module/mod_gpio/mod_gpio.cpp

@@ -185,15 +185,16 @@ struct GpioInitTask : public ITaskSp {
 			m_entity->GetStatus(PHONEPICKUP, NULL);
 
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("subscribelog...");
+            //oiltmp the subscribelog should distinct machine type?
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidHealth, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "HealthManager");
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidIDC, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "IDCertificate");
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidFP, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "FingerPrint");
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidKB, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "PinPad");
-			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCR, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CardIssuer");
+			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCR, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CardIssuerStand");
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCA, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CustomerAware");
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCC, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "ContactlessCard");
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidDD, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "DeviceControl");
-			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCS, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CardSwiper");
+			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCS, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CardIssuerStore");
 			m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidHSPscanner, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "HSPScanner");
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("sub ok...");
 

+ 1 - 0
Module/mod_guiconsole/CMakeLists.txt

@@ -35,6 +35,7 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${MODULE_BASE_DIR}/mod_accessauth
 	${MODULE_BASE_DIR}/mod_UpgradeMgr
 	${MODULE_BASE_DIR}/mod_CardIssuerStand
+	${MODULE_BASE_DIR}/mod_cardissuerstore
 	${CONAN_INCLUDE_DIRS_JSONCPP}
 	${OTHER_LIB_BASE_DIR}/libRestfulFunc
 	${OTHER_LIB_BASE_DIR}/libpublicFun

+ 8 - 8
Module/mod_guiconsole/mainfrm.cpp

@@ -14,8 +14,8 @@ using namespace AccessAuthorization;
 #include "UpgradeManager_client_g.h"
 using namespace UpgradeManager;
 
-#include "CardIssuer_client_g.h"
-using namespace CardIssuer;
+#include "CardIssuerStand_client_g.h"
+using namespace CardIssuerStand;
 
 #include "MaterialMgrCnn.h"
 #include "mod_GuiConsole.h"
@@ -1834,12 +1834,12 @@ void CControlView::OnSelectChanged(UINT uNotifyCode, int nID, CWindow wndCtl)
 		// 查询发卡器发卡计数\吞卡计数
 		GetDlgItem(IDC_EDIT4).SetWindowTextA("0");
 
-		CardIssuerService_ClientBase *pClient = new CardIssuerService_ClientBase(pEntity);
+		CardIssuerStandService_ClientBase *pClient = new CardIssuerStandService_ClientBase(pEntity);
 		auto rc = pClient->Connect();
 		if (rc == Error_Succeed)
 		{
-			CardIssuerService_GetMaterialCount_Req req = {};
-			CardIssuerService_GetMaterialCount_Ans ret = {};
+			CardIssuerStandService_GetMaterialCount_Req req = {};
+			CardIssuerStandService_GetMaterialCount_Ans ret = {};
 			rc = (*pClient)(EntityResource::getLink().upgradeLink())->GetMaterialCount(req, ret, 10000);
 			if (rc == Error_Succeed)
 			{
@@ -1975,11 +1975,11 @@ void CControlView::OnCommitResult(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*w
 	ErrorCodeEnum rc = Error_Succeed;
 	if (strMaterialCode == "DebitCard" || strMaterialCode == "RetainCard")
 	{
-		CardIssuerService_ClientBase *pClient = new CardIssuerService_ClientBase(pEntity);
+		CardIssuerStandService_ClientBase *pClient = new CardIssuerStandService_ClientBase(pEntity);
 		rc = pClient->Connect();
 		if (rc == Error_Succeed)
 		{
-			CardIssuerService_SetMaterialCount_Req req = {};
+			CardIssuerStandService_SetMaterialCount_Req req = {};
 			if (strMaterialCode == "DebitCard")
 			{
 				req.bRemains = true;
@@ -2001,7 +2001,7 @@ void CControlView::OnCommitResult(UINT /*uNotifyCode*/, int /*nID*/, CWindow /*w
 				req.bMixed = false;
 			}
 
-			CardIssuerService_SetMaterialCount_Ans ret = {};
+			CardIssuerStandService_SetMaterialCount_Ans ret = {};
 			rc = (*pClient)(EntityResource::getLink().upgradeLink())->SetMaterialCount(req, ret, 10000);
 			pClient->GetFunction()->CloseSession();
 		}

+ 80 - 31
Module/mod_guiconsole/mod_guiconsole.cpp

@@ -3,10 +3,12 @@
 #include "guitask.h"
 #include "EventCode.h"
 #include "MaterialMgrCnn.h"
-#include "CardIssuer_client_g.h"
+#include "CardIssuerStand_client_g.h"
+#include "CardIssuerStore_client_g.h"
 #include "tokenDefine.h"
 #include "publicFunExport.h"
-using namespace CardIssuer;
+using namespace CardIssuerStand;
+using namespace CardIssuerStore;
 
 #include "fileutil.h"
 #include <SpIni.h>
@@ -465,42 +467,89 @@ ErrorCodeEnum CGUIConsoleEntity::ResetMaterialCounter(const char* pszMaterial, u
 	// 重置硬件计数
 	ErrorCodeEnum rc = Error_Succeed;
 	CSimpleStringA strMaterialCode = pszMaterial;
+	CSystemStaticInfo sysInfo;
+	rc = GetFunction()->GetSystemStaticInfo(sysInfo);
+	if (rc != Error_Succeed)
+	{
+		LogWarn(Severity_Middle, rc, 0, CSimpleStringA::Format("Reset teminal material counter failed,GetSystemStaticInfo ret=%s", SpStrError(rc)));
+		return rc;
+	}
+
 	if (strMaterialCode == "DebitCard" || strMaterialCode == "RetainCard")
 	{
-		CardIssuerService_ClientBase* pClient = new CardIssuerService_ClientBase(this);
-		rc = pClient->Connect();
-		if (rc == Error_Succeed)
-		{
-			CardIssuerService_SetMaterialCount_Req req = {};
-			if (strMaterialCode == "DebitCard")
+		if (sysInfo.strMachineType.Compare("RVC.CardStore") == 0 || sysInfo.strMachineType.Compare("RVC.CardPrinter") == 0) {
+			CardIssuerStoreService_ClientBase* pClient = new CardIssuerStoreService_ClientBase(this);
+			rc = pClient->Connect();
+			if (rc == Error_Succeed)
 			{
-				req.bRemains = true;
-				req.remains = dwResetCapacity;
-				req.bIssued = true;
-				req.issued = 0;
-				req.bMixed = true;
-				req.mixed = 0;
-
-				req.bCaptured = false;
+				CardIssuerStoreService_SetMaterialCount_Req req = {};
+				if (strMaterialCode == "DebitCard")
+				{
+					req.bRemains = true;
+					req.remains = dwResetCapacity;
+					req.bIssued = true;
+					req.issued = 0;
+					req.bMixed = true;
+					req.mixed = 0;
+
+					req.bCaptured = false;
+				}
+				else if (strMaterialCode == "RetainCard")
+				{
+					req.bCaptured = true;
+					req.captured = 0;
+
+					req.bRemains = false;
+					req.bIssued = false;
+					req.bMixed = false;
+				}
+
+				CardIssuerStoreService_SetMaterialCount_Ans ret = {};
+				rc = (*pClient)(EntityResource::getLink().upgradeLink())->SetMaterialCount(req, ret, 10000);
+				pClient->GetFunction()->CloseSession();
 			}
-			else if (strMaterialCode == "RetainCard")
+			else
 			{
-				req.bCaptured = true;
-				req.captured = 0;
-
-				req.bRemains = false;
-				req.bIssued = false;
-				req.bMixed = false;
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("连接CardIssuerStore失败");
+				pClient->SafeDelete();
 			}
-
-			CardIssuerService_SetMaterialCount_Ans ret = {};
-			rc = (*pClient)(EntityResource::getLink().upgradeLink())->SetMaterialCount(req, ret, 10000);
-			pClient->GetFunction()->CloseSession();
 		}
-		else
-		{
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("连接CardIssuer失败");
-			pClient->SafeDelete();
+		else {
+			CardIssuerStandService_ClientBase* pClient = new CardIssuerStandService_ClientBase(this);
+			rc = pClient->Connect();
+			if (rc == Error_Succeed)
+			{
+				CardIssuerStandService_SetMaterialCount_Req req = {};
+				if (strMaterialCode == "DebitCard")
+				{
+					req.bRemains = true;
+					req.remains = dwResetCapacity;
+					req.bIssued = true;
+					req.issued = 0;
+					req.bMixed = true;
+					req.mixed = 0;
+
+					req.bCaptured = false;
+				}
+				else if (strMaterialCode == "RetainCard")
+				{
+					req.bCaptured = true;
+					req.captured = 0;
+
+					req.bRemains = false;
+					req.bIssued = false;
+					req.bMixed = false;
+				}
+
+				CardIssuerStandService_SetMaterialCount_Ans ret = {};
+				rc = (*pClient)(EntityResource::getLink().upgradeLink())->SetMaterialCount(req, ret, 10000);
+				pClient->GetFunction()->CloseSession();
+			}
+			else
+			{
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("连接CardIssuer失败");
+				pClient->SafeDelete();
+			}
 		}
 	}
 	else

+ 10 - 1
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -1906,7 +1906,16 @@ ErrorCodeEnum CHealthManagerEntity::CheckEntity(const char* pszEntityName, Entit
 	CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
 	CSmartPointer<IAsynWaitSp> spWait;
 	ErrorCodeEnum errCode;
-	errCode = pFuncPrivilege->TestEntity(pszEntityName, eTestType, spWait);
+	//oiltmp@20240415 to be delete after x months
+	if (_strnicmp("CardIssuer", pszEntityName, strlen("CardIssuer")) == 0)
+	{
+		if (m_sysStaticInfo.strMachineType.Compare("RVC.CardStore") == 0 || m_sysStaticInfo.strMachineType.Compare("RVC.CardPrinter") == 0)
+			errCode = pFuncPrivilege->TestEntity("CardIssuerStore", eTestType, spWait);
+		else
+			errCode = pFuncPrivilege->TestEntity("CardIssuerStand", eTestType, spWait);
+	}
+	else
+		errCode = pFuncPrivilege->TestEntity(pszEntityName, eTestType, spWait);
 
 	if (errCode == Error_Succeed)
 	{

+ 80 - 0
Module/mod_livenessdetection/LivenessDetection.xml

@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="gb2312" ?>
+<entity name="LivenessDetection">	
+	<!-- 活体检测服务 -->
+	<class name="LivenessDetectionService" overlap="true"  exclusive="false">
+		<!-- 启动检测接口 -->
+		<twoway name="StartLivenessDetection" overlap="true">
+			<req>
+				<!-- 活体检测ActionID 16位 -->
+				<param name="ActionID" type="wstring"/>
+				<!-- 是否为主动检测(默认false,被动) -->
+				<param name="IsActive" type="bool"/>
+				<!-- 保留参数 -->
+				<param name="Reserved" type="wstring"/>
+			</req>
+			<res>
+			</res>
+		</twoway>
+		<!-- 停止检测接口(被动检测用到返回结果) -->
+		<twoway name="StopLivenessDetection" overlap="true">
+			<req>
+				<!-- 活体检测ActionID 16位 -->
+				<param name="ActionID" type="wstring"/>
+			</req>
+			<res>
+				<!-- 活体检测ActionID 16位 -->
+				<param name="ActionID" type="wstring"/>
+				<!-- 活体判别结果 Y(活体) N(非活体) X(不确定) -->
+				<param name="VerifyResult" type="wstring"/>
+				<!-- 活体照片数据(可能多张) -->
+				<param name="LivePhotosData" type="blob"/>
+				<!-- 活体照片长度列表,以'|'分隔 -->
+				<param name="LivePhotosLength" type="wstring"/>
+			</res>
+		</twoway>
+	</class>
+	<!-- 主动检测完成消息 -->
+	<message name="ActiveDetectionDone">
+		<!-- 活体检测ActionID 16位 -->
+		<param name="ActionID" type="wstring"/>
+		<!-- 主动活体判别结果 Y(活体) N(非活体) X(不确定) -->
+		<param name="VerifyResult" type="wstring"/>
+		<!-- 自动抓拍照片数据 -->
+		<param name="SnapShotPhotoData" type="blob"/>
+		<!-- 自动抓拍照片长度 -->
+		<param name="SnapShotPhotoLength" type="int"/>
+	</message>	
+	<!-- 自动抓拍提示消息 -->
+	<message name="AutoSnapshotRemind">
+		<!-- 活体检测ActionID 16位 -->
+		<param name="ActionID" type="wstring"/>
+		<!-- 提示信息 -->
+		<param name="RemindInfo" type="wstring"/>
+	</message>	
+	<!-- 检测非正常结束消息 -->
+	<message name="DetectionStopUnExpected">
+		<!-- 活体检测ActionID 16位 -->
+		<param name="ActionID" type="wstring"/>
+		<!-- 是否为主动检测(默认false,被动) -->
+		<param name="IsActive" type="bool"/>
+		<!-- 错误码 -->
+		<param name="ErrorCode" type="wstring"/>
+		<!-- 错误消息:超时、启动检测失败... -->
+		<param name="ErrorMsg" type="wstring"/>
+	</message>
+	<!-- 活体检测心跳消息(可选) -->
+	<message name="LivenessDetectionHeartBeat">
+		<!-- 状态:0:正常 1:故障... -->
+		<param name="Status" type="int"/>
+	</message>	
+	<!-- 主动活体启动消息 -->
+	<message name="ActiveDetectionStarted">
+		<!-- 启动参数(回显窗口用) -->
+		<param name="Param" type="string"/>
+	</message>	
+	<!-- 主动活体停止消息 -->
+	<message name="ActiveDetectionStopped">
+		<!-- 停止参数(回显窗口用) -->
+		<param name="Param" type="string"/>
+	</message>	
+</entity>

+ 179 - 0
Module/mod_livenessdetection/LivenessDetection_client_g.h

@@ -0,0 +1,179 @@
+
+#ifndef __LIVENESSDETECTION_CLIENT_G_H
+#define __LIVENESSDETECTION_CLIENT_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "LivenessDetection_def_g.h"
+
+namespace LivenessDetection {
+class LivenessDetectionService_ClientBase : public CClientSessionBase {
+public:
+	explicit LivenessDetectionService_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
+
+	LivenessDetectionService_ClientBase* operator () (const linkContext &curLink) 
+	{
+		m_context = curLink;
+		return this;
+	}
+
+protected:
+	virtual ~LivenessDetectionService_ClientBase()
+	{
+		/// override by user
+	}
+public:
+
+	void OnConnectSucceed()
+	{
+		bSessionClosed = false;
+	}
+	void OnClose(ErrorCodeEnum)
+	{
+		Dbg("session closed.");
+		bSessionClosed = true;
+	}
+	bool QuerySessionClosed()
+	{
+		return bSessionClosed;
+	}
+	ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
+	{
+		CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
+		ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "LivenessDetection", "LivenessDetectionService", spAsyncWait);
+		if (Error == Error_Succeed) {
+			m_bSysManaged = true;
+			bSessionClosed = false;
+		}
+		return Error;
+	}
+	ErrorCodeEnum Connect()
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Connect(spAsyncWait);
+		if (Error == Error_Succeed) {
+			Error = spAsyncWait->WaitAnswer();
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum StartLivenessDetection(LivenessDetectionService_StartLivenessDetection_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(LivenessDetectionService_Method_StartLivenessDetection, LivenessDetectionService_MethodSignature_StartLivenessDetection, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum StartLivenessDetection(LivenessDetectionService_StartLivenessDetection_Req &Req, LivenessDetectionService_StartLivenessDetection_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StartLivenessDetection(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StartLivenessDetection(LivenessDetectionService_StartLivenessDetection_Req &Req, LivenessDetectionService_StartLivenessDetection_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StartLivenessDetection(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StartLivenessDetection(LivenessDetectionService_StartLivenessDetection_Req &Req, LivenessDetectionService_StartLivenessDetection_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StartLivenessDetection(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum StopLivenessDetection(LivenessDetectionService_StopLivenessDetection_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		if (m_context.checkEmpty())
+		{
+			m_context.AutoGenerate();
+			DbgToBeidou(m_context, m_pEntityBase != NULL ? m_pEntityBase->GetEntityName() : "")();
+			m_context = m_context.upgradeLink();
+		}
+		auto ret = pFunc->AsyncRequest(LivenessDetectionService_Method_StopLivenessDetection, LivenessDetectionService_MethodSignature_StopLivenessDetection, Buf, spAsyncWait, m_context, dwTimeout);
+		m_context.clear();
+		return ret;
+	}
+	ErrorCodeEnum StopLivenessDetection(LivenessDetectionService_StopLivenessDetection_Req &Req, LivenessDetectionService_StopLivenessDetection_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopLivenessDetection(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StopLivenessDetection(LivenessDetectionService_StopLivenessDetection_Req &Req, LivenessDetectionService_StopLivenessDetection_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError, CSimpleString &str)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopLivenessDetection(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StopLivenessDetection(LivenessDetectionService_StopLivenessDetection_Req &Req, LivenessDetectionService_StopLivenessDetection_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopLivenessDetection(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			CSimpleString str;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, str, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+
+	bool SafeDelete()
+	{
+		if (!m_bSysManaged) {
+			delete this;
+		}
+		return m_bSysManaged;
+	}
+
+protected:
+	bool m_bSysManaged;
+	CEntityBase *m_pEntityBase;
+	linkContext m_context;
+	bool bSessionClosed;
+};
+
+///////////////////////////
+
+} // namespace LivenessDetection
+#endif // __LIVENESSDETECTION_CLIENT_G_H

+ 76 - 0
Module/mod_livenessdetection/LivenessDetection_def_g.h

@@ -0,0 +1,76 @@
+#ifndef __LIVENESSDETECTION_DEF_G_H
+#define __LIVENESSDETECTION_DEF_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "SpHelper.h"
+
+namespace LivenessDetection {
+//
+// const goes here
+//
+
+#define LivenessDetectionService_Method_StartLivenessDetection 0
+#define LivenessDetectionService_Method_StopLivenessDetection 1
+
+#define LivenessDetectionService_MethodSignature_StartLivenessDetection 1875899628
+#define LivenessDetectionService_MethodSignature_StopLivenessDetection -698442534
+
+#define LivenessDetectionService_LogCode_StartLivenessDetection "QLR040231400"
+#define LivenessDetectionService_LogCode_StopLivenessDetection "QLR040231401"
+
+struct LivenessDetectionService_StartLivenessDetection_Req
+{
+	CSimpleStringW ActionID;
+	bool IsActive;
+	CSimpleStringW Reserved;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ActionID & IsActive & Reserved;
+	}
+
+};
+
+struct LivenessDetectionService_StartLivenessDetection_Ans
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct LivenessDetectionService_StopLivenessDetection_Req
+{
+	CSimpleStringW ActionID;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ActionID;
+	}
+
+};
+
+struct LivenessDetectionService_StopLivenessDetection_Ans
+{
+	CSimpleStringW ActionID;
+	CSimpleStringW VerifyResult;
+	CBlob LivePhotosData;
+	CSimpleStringW LivePhotosLength;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ActionID & VerifyResult & LivePhotosData & LivePhotosLength;
+	}
+
+};
+
+
+///////////////////////////
+
+} // namespace LivenessDetection
+
+#endif // __LIVENESSDETECTION_DEF_G_H

+ 112 - 0
Module/mod_livenessdetection/LivenessDetection_msg_g.h

@@ -0,0 +1,112 @@
+
+#ifndef __LIVENESSDETECTION_MSG_G_H
+#define __LIVENESSDETECTION_MSG_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "SpHelper.h"
+
+namespace LivenessDetection {
+#define eMsg_ActiveDetectionDone 0
+#define eMsg_AutoSnapshotRemind 1
+#define eMsg_DetectionStopUnExpected 2
+#define eMsg_LivenessDetectionHeartBeat 3
+#define eMsg_ActiveDetectionStarted 4
+#define eMsg_ActiveDetectionStopped 5
+
+#define eMsgSig_ActiveDetectionDone 1663036101
+#define eMsgSig_AutoSnapshotRemind -1204333518
+#define eMsgSig_DetectionStopUnExpected 135483694
+#define eMsgSig_LivenessDetectionHeartBeat -835179092
+#define eMsgSig_ActiveDetectionStarted -390712849
+#define eMsgSig_ActiveDetectionStopped 576206235
+
+struct ActiveDetectionDone
+{
+	CSimpleStringW ActionID;
+	CSimpleStringW VerifyResult;
+	CBlob SnapShotPhotoData;
+	int SnapShotPhotoLength;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ActionID & VerifyResult & SnapShotPhotoData & SnapShotPhotoLength;
+	}
+
+};
+
+///////////////////////////
+
+struct AutoSnapshotRemind
+{
+	CSimpleStringW ActionID;
+	CSimpleStringW RemindInfo;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ActionID & RemindInfo;
+	}
+
+};
+
+///////////////////////////
+
+struct DetectionStopUnExpected
+{
+	CSimpleStringW ActionID;
+	bool IsActive;
+	CSimpleStringW ErrorCode;
+	CSimpleStringW ErrorMsg;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ActionID & IsActive & ErrorCode & ErrorMsg;
+	}
+
+};
+
+///////////////////////////
+
+struct LivenessDetectionHeartBeat
+{
+	int Status;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & Status;
+	}
+
+};
+
+///////////////////////////
+
+struct ActiveDetectionStarted
+{
+	CSimpleStringA Param;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & Param;
+	}
+
+};
+
+///////////////////////////
+
+struct ActiveDetectionStopped
+{
+	CSimpleStringA Param;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & Param;
+	}
+
+};
+
+///////////////////////////
+
+} // namespace LivenessDetection
+#endif // __LIVENESSDETECTION_MSG_G_H

+ 137 - 0
Module/mod_livenessdetection/LivenessDetection_server_g.h

@@ -0,0 +1,137 @@
+
+#ifndef __LIVENESSDETECTION_SERVER_G_H
+#define __LIVENESSDETECTION_SERVER_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "LivenessDetection_def_g.h"
+
+namespace LivenessDetection {
+class LivenessDetectionService_ServerSessionBase : public CServerSessionBase
+{
+public:
+	LivenessDetectionService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual ~LivenessDetectionService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual bool IsExclusive() { return false; }
+
+	virtual bool IsSessionOverlap() { return true; }
+
+	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		case LivenessDetectionService_Method_StartLivenessDetection:
+			if (dwSignature == LivenessDetectionService_MethodSignature_StartLivenessDetection) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case LivenessDetectionService_Method_StopLivenessDetection:
+			if (dwSignature == LivenessDetectionService_MethodSignature_StopLivenessDetection) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		case LivenessDetectionService_Method_StartLivenessDetection:
+			if (dwSignature != LivenessDetectionService_MethodSignature_StartLivenessDetection) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case LivenessDetectionService_Method_StopLivenessDetection:
+			if (dwSignature != LivenessDetectionService_MethodSignature_StopLivenessDetection) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	virtual void Handle_StartLivenessDetection(SpReqAnsContext<LivenessDetectionService_StartLivenessDetection_Req, LivenessDetectionService_StartLivenessDetection_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_StopLivenessDetection(SpReqAnsContext<LivenessDetectionService_StopLivenessDetection_Req, LivenessDetectionService_StopLivenessDetection_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
+	{
+		CAutoBuffer Buf;
+		DWORD dwMessageID;
+		DWORD dwMessageSignature;
+		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
+		if (Error == Error_Succeed) {
+#ifdef DEBUG
+			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
+#else
+			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
+				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
+				return;
+			}
+#endif
+			switch (dwMessageID) {
+				case LivenessDetectionService_Method_StartLivenessDetection:
+					{
+						SpReqAnsContext<LivenessDetectionService_StartLivenessDetection_Req,LivenessDetectionService_StartLivenessDetection_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<LivenessDetectionService_StartLivenessDetection_Req,LivenessDetectionService_StartLivenessDetection_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_StartLivenessDetection(ctx);
+					}
+					break;
+				case LivenessDetectionService_Method_StopLivenessDetection:
+					{
+						SpReqAnsContext<LivenessDetectionService_StopLivenessDetection_Req,LivenessDetectionService_StopLivenessDetection_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<LivenessDetectionService_StopLivenessDetection_Req,LivenessDetectionService_StopLivenessDetection_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
+						Handle_StopLivenessDetection(ctx);
+					}
+					break;
+				default:
+					assert(0);
+					break;
+			}
+			
+		} else {
+			pTransactionContext->SendAnswer(Error);
+		}
+	}
+
+};
+
+
+///////////////////////////
+
+} // namespace LivenessDetection
+#endif // __LIVENESSDETECTION_SERVER_G_H

+ 22 - 0
Module/mod_livenessdetection/mod_livenessdetection.h

@@ -14,6 +14,10 @@
 #include "mod_mediacontroller/Event.h"
 #include "mod_facetracking/sysvar.h"
 
+#include "LivenessDetection_def_g.h"
+#include "LivenessDetection_msg_g.h"
+#include "LivenessDetection_server_g.h"
+
 #include <assert.h>
 #include "EventCode.h"
 
@@ -23,6 +27,18 @@
 
 using namespace LivenessDetection;
 
+class CLivenessDetectionEntity;
+
+class LivenessDetectionServerSession : public LivenessDetectionService_ServerSessionBase
+{
+public:
+	LivenessDetectionServerSession(CLivenessDetectionEntity* pEntity) : m_pEntity(pEntity) {}
+	virtual ~LivenessDetectionServerSession() {}
+
+private:
+	CLivenessDetectionEntity* m_pEntity;
+};
+
 class CLivenessDetectionEntity : public CEntityBase, public ILogListener, public ISysVarListener
 {
 public:
@@ -48,6 +64,12 @@ public:
 	virtual bool IsService() const { return true; }
 	virtual bool IsMultiThread() const { return false; }
 
+	// 实体服务化
+	virtual CServerSessionBase* OnNewSession(const char*, const char*)
+	{
+		return new LivenessDetectionServerSession(this);
+	}
+
 	DeviceTypeEnum GetDeviceType() const { return m_eDeviceType; }
 
 	int on_get_videodata(eVideoType eType, eCameraType ecameraid, int* width, int* height, unsigned char* bmpdata, int isize);

+ 60 - 6
Module/mod_vtmloader/VtmLoaderFSM.cpp

@@ -16,7 +16,8 @@
 #endif //RVC_OS_WIN
 #include "../mod_healthmanager/HealthManager_client_g.h"
 #include "../mod_pinpad/PinPad_client_g.h"
-#include "../mod_CardIssuerStand/CardIssuer_client_g.h"
+#include "../mod_CardIssuerStand/CardIssuerStand_client_g.h"
+#include "../mod_cardissuerstore/CardIssuerStore_client_g.h"
 #include "../mod_IDCertificate/IDCertificate_client_g.h"
 #include "../mod_HSPScanner/HSPScanner_client_g.h"
 #include "../mod_ContactlessCard/ContactlessCard_client_g.h"
@@ -25,7 +26,8 @@
 
 using namespace HealthManager;
 using namespace PinPad;
-using namespace CardIssuer;
+using namespace CardIssuerStand;
+using namespace CardIssuerStore;
 using namespace IDCertificate;
 using namespace HSPScanner;
 using namespace ContactlessCard;
@@ -674,7 +676,16 @@ void CVtmLoaderFSM::s3_on_entry()
 		{
 		case LOADOPT_IGNORE:
 		{
-			pFuncPrivilege->StartEntity(it->first, NULL, spWait);
+			//oiltmp@20240415 to be delete after x months
+			if (_strnicmp("CardIssuer", it->first, strlen("CardIssuer")) == 0)
+			{
+				if (m_sysInfo.strMachineType.Compare("RVC.CardStore") == 0 || m_sysInfo.strMachineType.Compare("RVC.CardPrinter") == 0)
+					pFuncPrivilege->StartEntity("CardIssuerStore", NULL, spWait);
+				else
+					pFuncPrivilege->StartEntity("CardIssuerStand", NULL, spWait);
+			}
+			else
+				pFuncPrivilege->StartEntity(it->first, NULL, spWait);
 			if (spWait != NULL)
 				spWait->WaitAnswer(MAX_IGNORE_TIMEOUT);
 			it->second.eResult = LOADING_SUCCEED;
@@ -2148,7 +2159,7 @@ void CVtmLoaderFSM::CheckDeviceBaseEntity(SpReqAnsContext<VtmLoaderService_Check
 	break;
 	case 0x203: //CardIssuer
 	{
-		CardIssuerService_ClientBase* pClient = new CardIssuerService_ClientBase(this->m_pEntity);
+		CardIssuerStandService_ClientBase* pClient = new CardIssuerStandService_ClientBase(this->m_pEntity);
 		if (pClient != NULL)
 		{
 			eErrCode = pClient->Connect();
@@ -2156,8 +2167,8 @@ void CVtmLoaderFSM::CheckDeviceBaseEntity(SpReqAnsContext<VtmLoaderService_Check
 			{
 				int retryTimes = maxRetryTimes;
 				do {
-					CardIssuerService_GetDevInfo_Req reqQ;
-					CardIssuerService_GetDevInfo_Ans ansQ;
+					CardIssuerStandService_GetDevInfo_Req reqQ;
+					CardIssuerStandService_GetDevInfo_Ans ansQ;
 					eErrCode = (*pClient)(EntityResource::getLink().upgradeLink())->GetDevInfo(reqQ, ansQ, 5000);
 					if (eErrCode == Error_Succeed && ansQ.state == 1)// 1 for "DEVICE_STATUS_NORMAL" defined in  DeviceBaseClass.h
 					{
@@ -2275,6 +2286,49 @@ void CVtmLoaderFSM::CheckDeviceBaseEntity(SpReqAnsContext<VtmLoaderService_Check
 		}
 	}
 	break;
+	case 0x220: //CardIssuerStore
+	{
+		CardIssuerStoreService_ClientBase* pClient = new CardIssuerStoreService_ClientBase(this->m_pEntity);
+		if (pClient != NULL)
+		{
+			eErrCode = pClient->Connect();
+			if (eErrCode == Error_Succeed)
+			{
+				int retryTimes = maxRetryTimes;
+				do {
+					CardIssuerStoreService_GetDevInfo_Req reqQ;
+					CardIssuerStoreService_GetDevInfo_Ans ansQ;
+					eErrCode = (*pClient)(EntityResource::getLink().upgradeLink())->GetDevInfo(reqQ, ansQ, 5000);
+					if (eErrCode == Error_Succeed && ansQ.state == 1)// 1 for "DEVICE_STATUS_NORMAL" defined in  DeviceBaseClass.h
+					{
+						DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("return to caller");
+						ctx->Answer(Error_Succeed);
+						break;
+					}
+					Sleep(retryGetDevInfoInterval);
+					retryTimes--;
+				} while (retryTimes > 0);
+				if (retryTimes == 0)
+				{
+					DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setLogCode(VtmLoaderService_LogCode_CheckDeviceEntity).setResultCode("RTA1F23")
+						("after have tried x times");
+					ctx->Answer(Error_Unexpect, VtmLoader_EntityNotInNormal);
+				}
+			}
+			else {
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setLogCode(VtmLoaderService_LogCode_CheckDeviceEntity).setResultCode("RTA1F22")
+					("connect to %s failed.error code:%d", ctx->Req.entityName.GetData(), eErrCode);
+				ctx->Answer(Error_Unexpect, VtmLoader_FailToConnectEntity);
+			}
+		}
+		else
+		{
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setLogCode(VtmLoaderService_LogCode_CheckDeviceEntity).setResultCode("RTA1F22")
+				("new client failed.");
+			ctx->Answer(Error_Unexpect, VtmLoader_FailToConnectEntity);
+		}
+	}
+	break;
 	default:
 		break;
 	}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác