Procházet zdrojové kódy

!10878 同步最新的分支代码
Merge pull request !10878 from 80174520/feature_heartbeat_standby

刘文涛80174520 před 1 měsícem
rodič
revize
0729925a63

+ 5 - 36
Module/mod_CardIssuerStand/CardIssuerStand.xml

@@ -79,21 +79,6 @@
 				<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"/>
@@ -162,21 +147,6 @@
 				<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="PreOnlineOnStore" overlap="true" method_id="27">
 			<req>
 				<param name="account" type="string"/>
@@ -269,12 +239,11 @@
 		
 		<!--读卡接口 -->
 		<!--卡机打开失败, rtaCode为RTA2311-->
-		<!--发卡时,上电失败,rtaCode为RTA230V-->
-		<!--发卡时,上电失败(非接),rtaCode为RTA2327-->
-		<!--上电失败,rtaCode为RTA230M-->
-		<!--上电失败(非接)),rtaCode为RTA2326-->
-		<!--读卡失败,读取IC数据失败,rtaCode为RTA2302-->
-		<!--读卡失败,读取IC数据失败(非接),rtaCode为RTA23C9-->
+    <!--为了把读卡情况完整的反馈,返回规则如下:-->
+    <!--1、对于单路(只读磁或只读芯)的请求,失败则返回报错-->
+    <!--2、对于双路的请求,一律返回成功,增加magMsg、icMsg字段,分别在对应通路异常时填充“[RTAxxxx]描述信息”-->
+    <!--相关的报错信息如下:发卡时,上电失败,rtaCode为RTA230V;发卡时,上电失败(非接),rtaCode为RTA2327;上电失败,rtaCode为RTA230M;上电失败(非接)),rtaCode为RTA2326;
+				读卡失败,读取IC数据失败,rtaCode为RTA2302;读卡失败,读取IC数据失败(非接),rtaCode为RTA23C9-->
 		<twoway name="ReadJS" overlap="true" method_id="40" jsflag="true">
 			<req>
 				<!--读取模式:1 读磁、2 读芯,接触优先、3 读芯,非接优先、4 读芯,只走非接、5 读磁读芯,接触优先、6 读磁读芯非接优先、7 读磁读芯,只走非接-->

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 80 - 695
Module/mod_CardIssuerStand/CardIssuerStandFSM.cpp


+ 2 - 35
Module/mod_CardIssuerStand/CardIssuerStandFSM.h

@@ -67,24 +67,6 @@ enum EvtType
 	USER_EVT_JS_EXIT_MIAN_PAGE,
 	USER_EVT_CHECK_CARD_FINISHED
 };
-enum SAMICCommandType
-{
-	//SAM
-	SAMICCommand_SAM_Select = 0,
-	SAMICCommand_SAM_Active,
-	SAMICCommand_SAM_Deactivate,
-	SAMICCommand_SAM_WarmReset,
-	SAMICCommand_SAM_QueryStatus,
-	SAMICCommand_SAM_Command,
-	//IC
-	SAMICCommand_IC_Active = 100,
-	SAMICCommand_IC_Deactivate,
-	SAMICCommand_IC_WarmReset,
-	SAMICCommand_IC_Command,
-	SAMICCommand_RFIC_Active,
-	SAMICCommand_RFIC_Deactivate,
-	SAMICCommand_RFIC_Command,
-};
 enum ReadMode
 { 
 	//<!--读取模式:1 读磁、2 接触IC优先、3 非接IC优先、4 非接IC、5 读磁+接触IC优先、6 读磁+非接IC优先、7 读磁+非接IC-->
@@ -127,11 +109,6 @@ struct CMBBin
 	bool bIC;//IC:true or mag:false
 	bool bDC;//debit:true,credit:false
 };
-struct SCIRecord
-{
-	CSimpleStringA name;
-	CSimpleStringA remoteMac;
-};
 
 class CardInitFinishedEvent : public FSMEvent
 {
@@ -523,7 +500,6 @@ public:
 		FSM_RULE_ENTRY(s4, s8, EVT_MAINPAGE_DISPLAY, 1)
 		FSM_RULE_ENTRY(s5, s4, USER_EVT_READ_FINISHED, 0)
 		FSM_RULE_ENTRY(s5, s9, USER_EVT_READ_FINISHED, 1)
-		FSM_RULE_ENTRY(s5, s4, USER_EVT_READ_FINISHED, 2)
 		FSM_RULE_ENTRY(s5, FSM_STATE_EXIT, USER_EVT_QUIT, 0)
 		FSM_RULE_ENTRY(s5, s4, USER_EVT_PREONLINEFINISHED, 0)
 		FSM_RULE_ENTRY(s5, s4, USER_EVT_POSTONLINEFINISHED, 0)
@@ -626,7 +602,6 @@ public:
 
 	ErrorCodeEnum OpenDevice(BYTE btOpenType, const char* pDevSN);
 	int Initial();
-	bool GetDevStatus(bool bPrint = true);
 	int CheckIfHasCardOnCase(CheckCardCase eCase);
 	int CaptureCard(SpReqAnsContext<CardIssuerStandService_Capture_Req, CardIssuerStandService_Capture_Ans>::Pointer ctx);
 	int EjectCard(SpReqAnsContext<CardIssuerStandService_Eject_Req, CardIssuerStandService_Eject_Ans>::Pointer ctx);
@@ -634,16 +609,15 @@ public:
 	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 ReadCard_Contact(SpReqAnsContext<CardIssuerStandService_Read_Req, CardIssuerStandService_Read_Ans>::Pointer ctx, bool bContinue);
 	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 InternalAcceptCard();
+	int InternalAcceptCard(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx);
 	int AcceptCard(SpReqAnsContext<CardIssuerStandService_Insert_Req, CardIssuerStandService_Insert_Ans>::Pointer ctx);
 	int IssueCard(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; }
@@ -673,11 +647,6 @@ public:
 	int UpdateLocalRunCfg(CAutoArray<int> hopperArr);
 	int SyncDataToDB(bool bMaintain[12], bool bSetCaptured = true);//同步物料计数
 	void SetHopperNum(int hopperNum);
-	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);
-
 	void DecodeTracksData(const char* track2, DWORD dwT2size, const char* track3, DWORD dwT3size, char*& magData, bool bT2OK = true, bool bT3OK = true);
 
 	void GetCardInfo(int& findCard, int& cardPos)
@@ -734,7 +703,6 @@ private:
 	bool JustReadCardNo();
 	bool IsValidCardNo(const char*, int);
 	void GetVendorDllName(CSimpleStringA& dllName);
-	bool AccountExchange(const char* origAcc, CSimpleStringA& acc, int dir = 1);
 	bool LoadCMBPrint(CSimpleStringA csBinPath);
 	DevCategoryInfo m_devCat;
 	bool ToRegistCaptureCardInfo();
@@ -769,7 +737,6 @@ public:
 	void GetCardProcessLastErr(ErrorCodeEnum& eErrCode, CSimpleStringA& lastApiName, CSimpleStringA& alarmMsg, CSimpleStringA& csErrMsgWithReturnCode);
 
 	void SetDoExitFlag(bool bFlag) { m_bDoExit = bFlag; }
-	int PowerOffIC(int type);//0:接触IC 1:非接
 	virtual void OnStateTrans(int iSrcState, int iDstState);
 
 	CSimpleStringA getRTACode(DWORD dwUserCode) {

+ 1 - 0
Module/mod_CardIssuerStand/CardIssuerStand_UserErrorCode.h

@@ -59,6 +59,7 @@
 
 #define CardIssuer_UserErrorCode_LoadLibraryA_CMBPrint_Failed		(CardIssuer_UserErrorCode_Start + 102)	//LoadLibraryA CMBPrint
 
+#define CardIssuer_UserErrorCode_DeviceOpening						(CardIssuer_UserErrorCode_Start + 104)	//opening device
 #define CardIssuer_UserErrorCode_DevOpen_Failed						(CardIssuer_UserErrorCode_Start + 105)	//DevOpen
 
 //物料信息

+ 0 - 98
Module/mod_CardIssuerStand/CardIssuerStand_client_g.h

@@ -444,55 +444,6 @@ public:
 		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();
@@ -689,55 +640,6 @@ public:
 		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 PreOnlineOnStore(CardIssuerStandService_PreOnlineOnStore_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
 	{
 		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();

+ 0 - 64
Module/mod_CardIssuerStand/CardIssuerStand_def_g.h

@@ -22,12 +22,10 @@ namespace CardIssuerStand {
 #define CardIssuerStandService_Method_PostOnline 7
 #define CardIssuerStandService_Method_Exit 8
 #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_IssueEx 20
-#define CardIssuerStandService_Method_SAMICCommand 22
 #define CardIssuerStandService_Method_PreOnlineOnStore 27
 #define CardIssuerStandService_Method_NotifyPreonline 28
 #define CardIssuerStandService_Method_QueryCardInfoOnStore 29
@@ -52,12 +50,10 @@ namespace CardIssuerStand {
 #define CardIssuerStandService_MethodSignature_PostOnline 923284555
 #define CardIssuerStandService_MethodSignature_Exit -1158854104
 #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_IssueEx 1390328640
-#define CardIssuerStandService_MethodSignature_SAMICCommand 406988293
 #define CardIssuerStandService_MethodSignature_PreOnlineOnStore 158325869
 #define CardIssuerStandService_MethodSignature_NotifyPreonline -808637659
 #define CardIssuerStandService_MethodSignature_QueryCardInfoOnStore 1217447214
@@ -82,12 +78,10 @@ namespace CardIssuerStand {
 #define CardIssuerStandService_LogCode_PostOnline "QLR040220307"
 #define CardIssuerStandService_LogCode_Exit "QLR040220308"
 #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_IssueEx "QLR040220320"
-#define CardIssuerStandService_LogCode_SAMICCommand "QLR040220322"
 #define CardIssuerStandService_LogCode_PreOnlineOnStore "QLR040220327"
 #define CardIssuerStandService_LogCode_NotifyPreonline "QLR040220328"
 #define CardIssuerStandService_LogCode_QueryCardInfoOnStore "QLR040220329"
@@ -293,35 +287,6 @@ struct CardIssuerStandService_QueryCardInfo_Ans
 
 };
 
-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;
@@ -446,35 +411,6 @@ struct CardIssuerStandService_IssueEx_Ans
 
 };
 
-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_PreOnlineOnStore_Req
 {
 	CSimpleStringA account;

+ 0 - 54
Module/mod_CardIssuerStand/CardIssuerStand_server_g.h

@@ -100,13 +100,6 @@ public:
 				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;
@@ -135,13 +128,6 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
-		case CardIssuerStandService_Method_SAMICCommand:
-			if (dwSignature == CardIssuerStandService_MethodSignature_SAMICCommand) {
-				bOverlap = true;
-			} else {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
 		case CardIssuerStandService_Method_PreOnlineOnStore:
 			if (dwSignature == CardIssuerStandService_MethodSignature_PreOnlineOnStore) {
 				bOverlap = true;
@@ -294,11 +280,6 @@ public:
 				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;
@@ -319,11 +300,6 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
-		case CardIssuerStandService_Method_SAMICCommand:
-			if (dwSignature != CardIssuerStandService_MethodSignature_SAMICCommand) {
-				Error = Error_MethodSignatureFailed;
-			}
-			break;
 		case CardIssuerStandService_Method_PreOnlineOnStore:
 			if (dwSignature != CardIssuerStandService_MethodSignature_PreOnlineOnStore) {
 				Error = Error_MethodSignatureFailed;
@@ -446,11 +422,6 @@ public:
 	/// 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
@@ -471,11 +442,6 @@ public:
 	/// override by user
 	}
 
-	virtual void Handle_SAMICCommand(SpReqAnsContext<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx)
-	{
-	/// override by user
-	}
-
 	virtual void Handle_PreOnlineOnStore(SpReqAnsContext<CardIssuerStandService_PreOnlineOnStore_Req, CardIssuerStandService_PreOnlineOnStore_Ans>::Pointer ctx)
 	{
 	/// override by user
@@ -657,16 +623,6 @@ public:
 						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;
@@ -707,16 +663,6 @@ public:
 						Handle_IssueEx(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_PreOnlineOnStore:
 					{
 						SpReqAnsContext<CardIssuerStandService_PreOnlineOnStore_Req,CardIssuerStandService_PreOnlineOnStore_Ans>::Pointer ctx;

+ 1 - 8
Module/mod_CardIssuerStand/mod_cardissuerStand.cpp

@@ -84,10 +84,7 @@ void CardIssuerServerSession::Handle_QueryCardInfo(SpReqAnsContext<CardIssuerSta
 	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<CardIssuerStandService_WriteTrack_Req, CardIssuerStandService_WriteTrack_Ans>::Pointer ctx)
-{
-	ctx->Answer(Error_NotImpl);
-}
+
 void CardIssuerServerSession::Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStandService_GetMaterialCountEx_Req, CardIssuerStandService_GetMaterialCountEx_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
@@ -116,10 +113,6 @@ void CardIssuerServerSession::Handle_IssueEx(SpReqAnsContext<CardIssuerStandServ
 	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<CardIssuerStandService_SAMICCommand_Req, CardIssuerStandService_SAMICCommand_Ans>::Pointer ctx)
-{
-	ctx->Answer(Error_NotImpl);
-}
 void CardIssuerServerSession::Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStandService_QueryCIStatus_Req, CardIssuerStandService_QueryCIStatus_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();

+ 8 - 2
Module/mod_CardIssuerStand/mod_cardissuerStand.h

@@ -21,12 +21,10 @@ public:
 	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_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);
 
@@ -173,6 +171,14 @@ public:
 	}
 	void QueryCardInfo(SpReqAnsContext<CardIssuerStandService_QueryCardInfo_Req, CardIssuerStandService_QueryCardInfo_Ans>::Pointer ctx)
 	{
+		if (m_fsm.GetDevInitingFlag())
+		{
+			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DeviceOpening);
+			return;
+		}else if (!m_fsm.GetDevInitFlag()) {
+			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);
+			return;
+		}
 		if (m_bNewSessionInit)
 		{
 			FSMEvent *pEvt = new FSMEvent(USER_EVT_EXIT);

+ 2 - 52
Module/mod_CardReadAdapter/CardReadAdapterFSM.cpp

@@ -1261,33 +1261,7 @@ int CCardReadAdapterFSM::WriteTrack(SpReqAnsContext<CardReadAdapterService_Write
 	LOG_FUNCTION();
 	if (IsCardIssuerSessionOK())
 	{
-		if (!IsCardIssuerStore()) {
-			CardIssuerStandService_WriteTrack_Req req;
-			CardIssuerStandService_WriteTrack_Ans ans;
-			req.co = ctx->Req.co;
-			req.mode = ctx->Req.mode;
-			req.track1 = ctx->Req.track1;
-			req.track2 = ctx->Req.track2;
-			req.track3 = ctx->Req.track3;
-			req.reserved = ctx->Req.reserved;
-			ErrorCodeEnum eErr = Error_Unexpect;
-			DWORD dwUsrErrCode = 0;
-			eErr = (*m_pCardIssuer)(EntityResource::getLink().upgradeLink())->WriteTrack(req, ans, 20000, dwUsrErrCode);
-			if (eErr != Error_Succeed)
-			{
-				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("WriteTrack failed.%d", eErr);
-				ctx->Answer(eErr, dwUsrErrCode);
-			}
-			else
-			{
-				ctx->Ans.result = ans.result;
-				ctx->Ans.reserved1 = ans.reserved1;
-				ctx->Ans.reserved2 = ans.reserved2;
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("Write tracks ok.");
-				ctx->Answer(Error_Succeed);
-			}
-		}
-		else {
+		if (IsCardIssuerStore()) {
 			CardIssuerStoreService_WriteTrack_Req req;
 			CardIssuerStoreService_WriteTrack_Ans ans;
 			req.co = ctx->Req.co;
@@ -2174,31 +2148,7 @@ int CCardReadAdapterFSM::SAMICCommand(SpReqAnsContext<CardReadAdapterService_SAM
 {
 	if (IsTheEntity(ctx->Req.module, Module_CardIssuer) && IsCardIssuerSessionOK())
 	{
-		if (!IsCardIssuerStore()) {
-			ErrorCodeEnum eErr = Error_Unexpect;
-			CardIssuerStandService_SAMICCommand_Req req;
-			CardIssuerStandService_SAMICCommand_Ans ans;
-			req.cmdType = ctx->Req.cmdType;
-			req.param1.Copy(ctx->Req.param1);
-			req.param2.Copy(ctx->Req.param2);
-			req.reserved1.Copy(ctx->Req.reserved1);
-			req.reserved2.Copy(ctx->Req.reserved2);
-			eErr = (*m_pCardIssuer)(EntityResource::getLink().upgradeLink())->SAMICCommand(req, ans, 50000);
-			if (eErr == Error_Succeed)
-			{
-				ctx->Ans.ret1.Copy(ans.ret1);
-				ctx->Ans.ret2.Copy(ans.ret2);
-				ctx->Ans.reserved1.Copy(ans.reserved1);
-				ctx->Ans.reserved2.Copy(ans.reserved2);
-			}
-			else {
-				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("SAMICCommand, CardIssuerStand SAMICCommand failed return:%d", eErr);
-
-			}
-			ctx->Answer(eErr);
-			return 0;
-		}
-		else {
+		if (IsCardIssuerStore()){
 			ErrorCodeEnum eErr = Error_Unexpect;
 			CardIssuerStoreService_SAMICCommand_Req req;
 			CardIssuerStoreService_SAMICCommand_Ans ans;

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů