Procházet zdrojové kódy

Z991239-5993 #comment feat: js新增接口和优化接口方法定义修改

Signed-Off-By: commit-hook
刘文涛80174520 před 8 měsíci
rodič
revize
9ba3cd8eb2
1 změnil soubory, kde provedl 158 přidání a 65 odebrání
  1. 158 65
      Module/mod_cardissuerstore/CardIssuerFSM.h

+ 158 - 65
Module/mod_cardissuerstore/CardIssuerFSM.h

@@ -88,6 +88,11 @@ enum EvtType
 	USER_EVT_QUICK_SELF_CHECK_FINISHED,
 	USER_EVT_JS_READ,
 	USER_EVT_JS_READ_FINISHED,
+	USER_EVT_JS_ADD_CRAD_FROMBOX,
+	USER_EVT_JS_ADD_CRAD_FROMBOX_FINISHED,
+	USER_EVT_JS_MOVE_CARD_FROMSLOT,
+	USER_EVT_JS_MOVE_CARD_FROMSLOT_FINISHED,
+	USER_EVT_EXIT_MIAN_PAGE,
 };
 enum SAMICCommandType
 {
@@ -754,8 +759,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("EjectJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -770,8 +775,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("CaptureJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -786,8 +791,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("ReadBatchCardInfoInRangeJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -802,8 +807,24 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("AddAndReadCardFromBoxJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+		}
+	}
+};
+
+class AddCardFromBoxJSEvent : public FSMEvent
+{
+public:
+	AddCardFromBoxJSEvent() : FSMEvent(USER_EVT_JS_ADD_CRAD_FROMBOX) {}
+	~AddCardFromBoxJSEvent() {}
+	SpReqAnsContext<CardIssuerStoreService_AddCardFromBoxJS_Req, CardIssuerStoreService_AddCardFromBoxJS_Ans>::Pointer ctx;
+	virtual void OnUnhandled()
+	{
+		if (ctx != NULL)
+		{
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("AddCardFromBoxJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -818,56 +839,73 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("MoveAndReadCardFromSlotJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
 
-class MoveBacktoSlotJSEvent : public FSMEvent
+class MoveCardFromSlotJSEvent : public FSMEvent
 {
 public:
-	MoveBacktoSlotJSEvent() : FSMEvent(USER_EVT_JS_MOVEBACK_TO_SLOT) {}
-	~MoveBacktoSlotJSEvent() {}
-	SpReqAnsContext<CardIssuerStoreService_MoveBacktoSlotJS_Req, CardIssuerStoreService_MoveBacktoSlotJS_Ans>::Pointer ctx;
+	MoveCardFromSlotJSEvent() : FSMEvent(USER_EVT_JS_MOVE_CARD_FROMSLOT) {}
+	~MoveCardFromSlotJSEvent() {}
+	SpReqAnsContext<CardIssuerStoreService_MoveCardFromSlotJS_Req, CardIssuerStoreService_MoveCardFromSlotJS_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("MoveCardFromSlotJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
 
-class IssueFromSlotJSEvent : public FSMEvent
+
+class MoveBacktoSlotJSEvent : public FSMEvent
 {
 public:
-	IssueFromSlotJSEvent() : FSMEvent(USER_EVT_JS_ISSUE_FROM_SLOT) {}
-	~IssueFromSlotJSEvent() {}
-	SpReqAnsContext<CardIssuerStoreService_IssueFromSlotJS_Req, CardIssuerStoreService_IssueFromSlotJS_Ans>::Pointer ctx;
+	MoveBacktoSlotJSEvent() : FSMEvent(USER_EVT_JS_MOVEBACK_TO_SLOT) {}
+	~MoveBacktoSlotJSEvent() {}
+	SpReqAnsContext<CardIssuerStoreService_MoveBacktoSlotJS_Req, CardIssuerStoreService_MoveBacktoSlotJS_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("MoveBacktoSlotJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
 
-class SAMICCommandJSEvent : public FSMEvent
+//class IssueFromSlotJSEvent : public FSMEvent
+//{
+//public:
+//	IssueFromSlotJSEvent() : FSMEvent(USER_EVT_JS_ISSUE_FROM_SLOT) {}
+//	~IssueFromSlotJSEvent() {}
+//	SpReqAnsContext<CardIssuerStoreService_IssueFromSlotJS_Req, CardIssuerStoreService_IssueFromSlotJS_Ans>::Pointer ctx;
+//	virtual void OnUnhandled()
+//	{
+//		if (ctx != NULL)
+//		{
+//			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
+//			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+//		}
+//	}
+//};
+
+class ICCommandJSEvent : public FSMEvent
 {
 public:
-	SAMICCommandJSEvent() : FSMEvent(USER_EVT_JS_SAM_IC_COMMAND) {}
-	~SAMICCommandJSEvent() {}
-	SpReqAnsContext<CardIssuerStoreService_SAMICCommandJS_Req, CardIssuerStoreService_SAMICCommandJS_Ans>::Pointer ctx;
+	ICCommandJSEvent() : FSMEvent(USER_EVT_JS_SAM_IC_COMMAND) {}
+	~ICCommandJSEvent() {}
+	SpReqAnsContext<CardIssuerStoreService_ICCommandJS_Req, CardIssuerStoreService_ICCommandJS_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("ICCommandJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -882,8 +920,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("WriteTrackJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -898,8 +936,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("PrintCardImmediatelyJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -914,8 +952,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("PostOnlineJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -930,8 +968,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("IssueFromBoxJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -946,8 +984,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("PreOnlineCrossJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -971,8 +1009,8 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Operate unhandled");
-			ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("ReadJS Operate unhandled");
+			//ctx->Answer(Error_Unexpect, CardIssuerStore_UserErrorCode_EntityInStateCannotProcess);
 		}
 	}
 };
@@ -1121,7 +1159,7 @@ public:
 			, m_iInWhatPage(PageType_Init), m_EacQueryHost(""),m_eacQueryFlag(0), m_bUseCardnoMismatch(false), m_ICRetryTimes(1)
 			, 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("")
-		, m_quickSelfcheck(false), m_SelfcheckSleepTime(0)
+		, m_quickSelfcheck(false), m_SelfcheckSleepTime(0), m_bDoExitTask(false)
 		{
 			HARDWARE_ENTITY_RESET_ENTITYID(m_entCode, 0x220);
 			cmdDecodeMag2 = NULL;
@@ -1399,22 +1437,28 @@ public:
 
 	int AddAndReadCardFromBoxJS(SpReqAnsContext<CardIssuerStoreService_AddAndReadCardFromBoxJS_Req, CardIssuerStoreService_AddAndReadCardFromBoxJS_Ans>::Pointer ctx);
 
+	int AddCardFromBoxJS(SpReqAnsContext<CardIssuerStoreService_AddCardFromBoxJS_Req, CardIssuerStoreService_AddCardFromBoxJS_Ans>::Pointer ctx);
+
 	int MoveAndReadCardFromSlotJS(SpReqAnsContext<CardIssuerStoreService_MoveAndReadCardFromSlotJS_Req, CardIssuerStoreService_MoveAndReadCardFromSlotJS_Ans>::Pointer ctx);
 
+	int MoveCardFromSlotJS(SpReqAnsContext<CardIssuerStoreService_MoveCardFromSlotJS_Req, CardIssuerStoreService_MoveCardFromSlotJS_Ans>::Pointer ctx);
+
 	int MoveBacktoSlotJS(SpReqAnsContext<CardIssuerStoreService_MoveBacktoSlotJS_Req, CardIssuerStoreService_MoveBacktoSlotJS_Ans>::Pointer ctx);
 
 	bool OperateNewCardStore(int slot, CSimpleStringA& addCardNo, CSimpleStringA& addCardSerial, int& status);
 
-	int IssueFromSlotJS(SpReqAnsContext<CardIssuerStoreService_IssueFromSlotJS_Req, CardIssuerStoreService_IssueFromSlotJS_Ans>::Pointer ctx);
-
-	void QueryInternalHasCardJS(SpReqAnsContext<CardIssuerStoreService_QueryInternalHasCardJS_Req, CardIssuerStoreService_QueryInternalHasCardJS_Ans>::Pointer ctx);
+	//int IssueFromSlotJS(SpReqAnsContext<CardIssuerStoreService_IssueFromSlotJS_Req, CardIssuerStoreService_IssueFromSlotJS_Ans>::Pointer ctx);
 
+	//void QueryInternalHasCardJS(SpReqAnsContext<CardIssuerStoreService_QueryInternalHasCardJS_Req, CardIssuerStoreService_QueryInternalHasCardJS_Ans>::Pointer ctx);
+	void QueryHasCardJS(SpReqAnsContext<CardIssuerStoreService_QueryHasCardJS_Req, CardIssuerStoreService_QueryHasCardJS_Ans>::Pointer ctx);
 
 	int WriteTrackJS(SpReqAnsContext<CardIssuerStoreService_WriteTrackJS_Req, CardIssuerStoreService_WriteTrackJS_Ans>::Pointer ctx);
 
 	int PrintCardImmediatelyJS(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediatelyJS_Req, CardIssuerStoreService_PrintCardImmediatelyJS_Ans>::Pointer ctx);
 
-	int SAMICCommandJS(SpReqAnsContext<CardIssuerStoreService_SAMICCommandJS_Req, CardIssuerStoreService_SAMICCommandJS_Ans>::Pointer ctx);
+	//int SAMICCommandJS(SpReqAnsContext<CardIssuerStoreService_SAMICCommandJS_Req, CardIssuerStoreService_SAMICCommandJS_Ans>::Pointer ctx);
+
+	int ICCommandJS(SpReqAnsContext<CardIssuerStoreService_ICCommandJS_Req, CardIssuerStoreService_ICCommandJS_Ans>::Pointer ctx);
 
 	int PostOnlineJS(SpReqAnsContext<CardIssuerStoreService_PostOnlineJS_Req, CardIssuerStoreService_PostOnlineJS_Ans>::Pointer ctx);
 
@@ -1423,6 +1467,8 @@ public:
 	int PreOnlineCrossJS(SpReqAnsContext<CardIssuerStoreService_PreOnlineCrossJS_Req, CardIssuerStoreService_PreOnlineCrossJS_Ans>::Pointer ctx);
 
 	int ReadJS(SpReqAnsContext<CardIssuerStoreService_ReadJS_Req, CardIssuerStoreService_ReadJS_Ans>::Pointer ctx);
+
+	int ExitToMainPage();
 #pragma endregion JS接口具体实现方法
 
 #pragma region JS新增接口
@@ -1431,7 +1477,7 @@ public:
 	int PostOnlineJS_Contact(SpReqAnsContext<CardIssuerStoreService_PostOnlineJS_Req, CardIssuerStoreService_PostOnlineJS_Ans>::Pointer ctx, bool& bICOK);
 	int PostOnlineJS_RF(SpReqAnsContext<CardIssuerStoreService_PostOnlineJS_Req, CardIssuerStoreService_PostOnlineJS_Ans>::Pointer ctx);
 
-	int ReadMag(SpReqAnsContext<CardIssuerStoreService_ReadJS_Req, CardIssuerStoreService_ReadJS_Ans>::Pointer ctx,bool& bReadCardInfo,bool& bReadMag);
+	int ReadMag(SpReqAnsContext<CardIssuerStoreService_ReadJS_Req, CardIssuerStoreService_ReadJS_Ans>::Pointer ctx,bool& bReadCardInfo,bool& bReadMag,CSimpleStringA& t2Account);
 	int CheckCardType(CSimpleStringA cardNo,bool bReadMag, int& ICtype);
 	int PreOnlineJS_Contact(SpReqAnsContext<CardIssuerStoreService_ReadJS_Req, CardIssuerStoreService_ReadJS_Ans>::Pointer ctx, bool& bICOK, bool& bContinue);
 	int PreOnlineJS_RF(SpReqAnsContext<CardIssuerStoreService_ReadJS_Req, CardIssuerStoreService_ReadJS_Ans>::Pointer ctx);
@@ -1445,11 +1491,13 @@ public:
 		m_quickSelfcheck = true;
 	}
 	bool SetCardCapturedJS(const int num, bool bNewClear = false);
+	void SetDoExitTaskFlag(bool bFlag) { m_bDoExitTask = bFlag; }
 #pragma endregion JS新增接口
 
 #pragma region JS新增字段
 private:
 	bool m_quickSelfcheck;
+	bool m_bDoExitTask;
 public:
 	int  m_SelfcheckSleepTime;
 #pragma endregion JS新增字段
@@ -1611,6 +1659,7 @@ struct DoExitWhenIdleTask : public ITaskSp
 	void Process()
 	{
 		fsm->DoExitWhenIdle();
+		fsm->SetDoExitTaskFlag(false);
 	}
 };
 struct SAMICCommandTask : public ITaskSp
@@ -1707,7 +1756,7 @@ struct ReadBatchCardInfoInRangeJSTask : public ITaskSp
 		fsm->PostEventFIFO(e);
 	}
 };
-//加卡
+//加卡读卡
 struct AddAndReadCardFromBoxJSTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
@@ -1720,7 +1769,21 @@ struct AddAndReadCardFromBoxJSTask : public ITaskSp
 		fsm->PostEventFIFO(e);
 	}
 };
-//移卡读卡
+//加卡箱移卡
+struct AddCardFromBoxJSTask : public ITaskSp
+{
+	CCardIssuerFSM* fsm;
+	SpReqAnsContext<CardIssuerStoreService_AddCardFromBoxJS_Req, CardIssuerStoreService_AddCardFromBoxJS_Ans>::Pointer ctx;
+	AddCardFromBoxJSTask(CCardIssuerFSM* f) : fsm(f) {}
+	void Process()
+	{
+		FSMEvent* e = new FSMEvent(USER_EVT_JS_ADD_CRAD_FROMBOX_FINISHED);
+		e->param1 = fsm->AddCardFromBoxJS(ctx);
+		fsm->PostEventFIFO(e);
+	}
+};
+
+//卡槽移卡读卡
 struct MoveAndReadCardFromSlotJSTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
@@ -1733,32 +1796,47 @@ struct MoveAndReadCardFromSlotJSTask : public ITaskSp
 		fsm->PostEventFIFO(e);
 	}
 };
-//移回卡槽
-struct MoveBacktoSlotJSTask : public ITaskSp
+
+//卡槽移卡
+struct MoveCardFromSlotJSTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerStoreService_MoveBacktoSlotJS_Req, CardIssuerStoreService_MoveBacktoSlotJS_Ans>::Pointer ctx;
-	MoveBacktoSlotJSTask(CCardIssuerFSM* f) : fsm(f) {}
+	SpReqAnsContext<CardIssuerStoreService_MoveCardFromSlotJS_Req, CardIssuerStoreService_MoveCardFromSlotJS_Ans>::Pointer ctx;
+	MoveCardFromSlotJSTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
-		FSMEvent* e = new FSMEvent(USER_EVT_JS_MOVEBACK_TO_SLOT_FINISHED);
-		e->param1 = fsm->MoveBacktoSlotJS(ctx);
+		FSMEvent* e = new FSMEvent(USER_EVT_JS_MOVE_CARD_FROMSLOT_FINISHED);
+		e->param1 = fsm->MoveCardFromSlotJS(ctx);
 		fsm->PostEventFIFO(e);
 	}
 };
-//卡库领卡
-struct IssueFromSlotJSTask : public ITaskSp
+
+//移回卡槽
+struct MoveBacktoSlotJSTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerStoreService_IssueFromSlotJS_Req, CardIssuerStoreService_IssueFromSlotJS_Ans>::Pointer ctx;
-	IssueFromSlotJSTask(CCardIssuerFSM* f) : fsm(f) {}
+	SpReqAnsContext<CardIssuerStoreService_MoveBacktoSlotJS_Req, CardIssuerStoreService_MoveBacktoSlotJS_Ans>::Pointer ctx;
+	MoveBacktoSlotJSTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
-		FSMEvent* e = new FSMEvent(USER_EVT_JS_ISSUE_FROM_SLOT_FINISHED);
-		e->param1 = fsm->IssueFromSlotJS(ctx);
+		FSMEvent* e = new FSMEvent(USER_EVT_JS_MOVEBACK_TO_SLOT_FINISHED);
+		e->param1 = fsm->MoveBacktoSlotJS(ctx);
 		fsm->PostEventFIFO(e);
 	}
 };
+//卡库领卡
+//struct IssueFromSlotJSTask : public ITaskSp
+//{
+//	CCardIssuerFSM* fsm;
+//	SpReqAnsContext<CardIssuerStoreService_IssueFromSlotJS_Req, CardIssuerStoreService_IssueFromSlotJS_Ans>::Pointer ctx;
+//	IssueFromSlotJSTask(CCardIssuerFSM* f) : fsm(f) {}
+//	void Process()
+//	{
+//		FSMEvent* e = new FSMEvent(USER_EVT_JS_ISSUE_FROM_SLOT_FINISHED);
+//		e->param1 = fsm->IssueFromSlotJS(ctx);
+//		fsm->PostEventFIFO(e);
+//	}
+//};
 
 //写卡
 struct WriteTrackJSTask : public ITaskSp
@@ -1787,18 +1865,33 @@ struct PrintCardImmediatelyJSTask : public ITaskSp
 	}
 };
 //IC交互
-struct SAMICCommandJSTask : public ITaskSp
+//struct SAMICCommandJSTask : public ITaskSp
+//{
+//	CCardIssuerFSM* fsm;
+//	SpReqAnsContext<CardIssuerStoreService_SAMICCommandJS_Req, CardIssuerStoreService_SAMICCommandJS_Ans>::Pointer ctx;
+//	SAMICCommandJSTask(CCardIssuerFSM* f) : fsm(f) {}
+//	void Process()
+//	{
+//		FSMEvent* e = new FSMEvent(USER_EVT_JS_WRITE_TRACK_FINISHED);
+//		e->param1 = fsm->SAMICCommandJS(ctx);
+//		fsm->PostEventFIFO(e);
+//	}
+//};
+
+//IC交互
+struct ICCommandJSTask : public ITaskSp
 {
 	CCardIssuerFSM* fsm;
-	SpReqAnsContext<CardIssuerStoreService_SAMICCommandJS_Req, CardIssuerStoreService_SAMICCommandJS_Ans>::Pointer ctx;
-	SAMICCommandJSTask(CCardIssuerFSM* f) : fsm(f) {}
+	SpReqAnsContext<CardIssuerStoreService_ICCommandJS_Req, CardIssuerStoreService_ICCommandJS_Ans>::Pointer ctx;
+	ICCommandJSTask(CCardIssuerFSM* f) : fsm(f) {}
 	void Process()
 	{
-		FSMEvent* e = new FSMEvent(USER_EVT_JS_WRITE_TRACK_FINISHED);
-		e->param1 = fsm->SAMICCommandJS(ctx);
+		FSMEvent* e = new FSMEvent(USER_EVT_JS_SAM_IC_COMMAND_FINISHED);
+		e->param1 = fsm->ICCommandJS(ctx);
 		fsm->PostEventFIFO(e);
 	}
 };
+
 //联机后处理
 struct PostOnlineJSTask : public ITaskSp
 {