// mod_cardissuer.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #pragma once #include "SpBase.h" #include "mod_cardissuerStand.h" #include "CardIssuerClass.h" void CardIssuerServerSession::Handle_Insert(SpReqAnsContext::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::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Read"); m_pEntity->Read(ctx); } void CardIssuerServerSession::Handle_Capture(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Capture"); m_pEntity->Capture(ctx); } void CardIssuerServerSession::Handle_Eject(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Eject"); m_pEntity->Eject(ctx); } void CardIssuerServerSession::Handle_CancelInsert(SpOnewayCallContext::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::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::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PreOnline , req.businessData[%s], req.reserved1:[%s]", ctx->Req.businessData.GetData(), ctx->Req.reserved1.GetData()); m_pEntity->PreOnline(ctx); } void CardIssuerServerSession::Handle_PostOnline(SpReqAnsContext::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::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_QueryCardInfo(SpReqAnsContext::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_GetMaterialCountEx(SpReqAnsContext::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::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::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetSomeFlag , IssueBusiness=%d", ctx->Req.IssueBusiness); m_pEntity->SetSomeFlag(ctx); } void CardIssuerServerSession::Handle_IssueEx(SpReqAnsContext::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_QueryCIStatus(SpReqAnsContext::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::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("GetDevInfo"); m_pEntity->GetDevInfo(ctx); } //JS½Ó¿ÚʵÏÖ void CardIssuerServerSession::Handle_ReadJS(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke ReadJS req.mode=%d, req.business=%s", ctx->Req.mode, ctx->Req.businessData.GetData()); m_pEntity->ReadJS(ctx); } void CardIssuerServerSession::Handle_PostOnlineJS(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke PostOnlineJS"); m_pEntity->PostOnlineJS(ctx); } void CardIssuerServerSession::Handle_EjectJS(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke EjectJS"); m_pEntity->EjectJS(ctx); } void CardIssuerServerSession::Handle_CaptureJS(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CaptureJS"); m_pEntity->CaptureJS(ctx); } void CardIssuerServerSession::Handle_QueryHasCardJS(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke QueryHasCardJS"); m_pEntity->QueryHasCardJS(ctx); } void CardIssuerServerSession::Handle_IssueFromBoxJS(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke IssueFromBoxJS Req.hopper=%d", ctx->Req.hopper); m_pEntity->IssueFromBoxJS(ctx); } void CardIssuerServerSession::Handle_InsertJS(SpReqAnsContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke InsertJS"); m_pEntity->InsertJS(ctx); } void CardIssuerServerSession::Handle_CancelInsertJS(SpOnewayCallContext::Pointer ctx) { LOG_FUNCTION(); DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CancelInsertJS"); m_pEntity->CancelInsertJS(ctx); } void CCardIssuerEntity::OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName) { if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0)) { m_fsm.OnUIState4SetWhatPage(pszValue); } } SP_BEGIN_ENTITY_MAP() SP_ENTITY(CCardIssuerEntity) SP_END_ENTITY_MAP()