mod_cardissuer.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. // mod_cardissuer.cpp : Defines the exported functions for the DLL application.
  2. //
  3. #include "stdafx.h"
  4. #pragma once
  5. #include "SpBase.h"
  6. #include "mod_cardissuer.h"
  7. #include "CardIssuerClass.h"
  8. void CardIssuerStoreServerSession::Handle_Read(SpReqAnsContext<CardIssuerStoreService_Read_Req, CardIssuerStoreService_Read_Ans>::Pointer ctx)
  9. { //卡库暂时读卡功能不使用
  10. LOG_FUNCTION();
  11. DbgToBeidou(ctx->link, __FUNCTION__)();
  12. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Read");
  13. m_pEntity->Read(ctx);
  14. }
  15. void CardIssuerStoreServerSession::Handle_Capture(SpReqAnsContext<CardIssuerStoreService_Capture_Req, CardIssuerStoreService_Capture_Ans>::Pointer ctx)
  16. {
  17. LOG_FUNCTION();
  18. DbgToBeidou(ctx->link, __FUNCTION__)();
  19. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Capture");
  20. m_pEntity->Capture(ctx);
  21. }
  22. void CardIssuerStoreServerSession::Handle_Eject(SpReqAnsContext<CardIssuerStoreService_Eject_Req, CardIssuerStoreService_Eject_Ans>::Pointer ctx)
  23. {
  24. LOG_FUNCTION();
  25. DbgToBeidou(ctx->link, __FUNCTION__)();
  26. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke Eject");
  27. m_pEntity->Eject(ctx);
  28. }
  29. void CardIssuerStoreServerSession::Handle_PreOnline(SpReqAnsContext<CardIssuerStoreService_PreOnline_Req, CardIssuerStoreService_PreOnline_Ans>::Pointer ctx)
  30. {
  31. LOG_FUNCTION();
  32. DbgToBeidou(ctx->link, __FUNCTION__)();
  33. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PreOnline");
  34. m_pEntity->PreOnline(ctx);
  35. }
  36. void CardIssuerStoreServerSession::Handle_PostOnline(SpReqAnsContext<CardIssuerStoreService_PostOnline_Req, CardIssuerStoreService_PostOnline_Ans>::Pointer ctx)
  37. {
  38. LOG_FUNCTION();
  39. DbgToBeidou(ctx->link, __FUNCTION__)();
  40. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PostOnline");
  41. m_pEntity->PostOnline(ctx);
  42. }
  43. void CardIssuerStoreServerSession::Handle_Exit(SpOnewayCallContext<CardIssuerStoreService_Exit_Info>::Pointer ctx)
  44. {
  45. LOG_FUNCTION();
  46. DbgToBeidou(ctx->link, __FUNCTION__)();
  47. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Exit");
  48. m_pEntity->Exit(ctx);
  49. }
  50. void CardIssuerStoreServerSession::Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerStoreService_SetIssueFlag_Info>::Pointer ctx)
  51. {
  52. LOG_FUNCTION();
  53. DbgToBeidou(ctx->link, __FUNCTION__)();
  54. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetIssueFlag");
  55. m_pEntity->SetIssueFlag(ctx);
  56. }
  57. void CardIssuerStoreServerSession::Handle_QueryCardInfo(SpReqAnsContext<CardIssuerStoreService_QueryCardInfo_Req, CardIssuerStoreService_QueryCardInfo_Ans>::Pointer ctx)
  58. {
  59. LOG_FUNCTION();
  60. DbgToBeidou(ctx->link, __FUNCTION__)();
  61. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCardInfo");
  62. m_pEntity->QueryCardInfo(ctx);
  63. }
  64. void CardIssuerStoreServerSession::Handle_WriteTrack(SpReqAnsContext<CardIssuerStoreService_WriteTrack_Req, CardIssuerStoreService_WriteTrack_Ans>::Pointer ctx)
  65. {
  66. LOG_FUNCTION();
  67. DbgToBeidou(ctx->link, __FUNCTION__)();
  68. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("WriteTrack");
  69. m_pEntity->WriteTrack(ctx);
  70. }
  71. void CardIssuerStoreServerSession::Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_GetMaterialCountEx_Req, CardIssuerStoreService_GetMaterialCountEx_Ans>::Pointer ctx)
  72. {
  73. LOG_FUNCTION();
  74. DbgToBeidou(ctx->link, __FUNCTION__)();
  75. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("GetMaterialCountEx");
  76. m_pEntity->GetMaterialCountEx(ctx);
  77. }
  78. void CardIssuerStoreServerSession::Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerStoreService_SetMaterialCountEx_Req, CardIssuerStoreService_SetMaterialCountEx_Ans>::Pointer ctx)
  79. {
  80. LOG_FUNCTION();
  81. DbgToBeidou(ctx->link, __FUNCTION__)();
  82. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetMaterialCountEx");
  83. m_pEntity->SetMaterialCountEx(ctx);
  84. }
  85. void CardIssuerStoreServerSession::Handle_SetSomeFlag(SpReqAnsContext<CardIssuerStoreService_SetSomeFlag_Req, CardIssuerStoreService_SetSomeFlag_Ans>::Pointer ctx)
  86. {
  87. LOG_FUNCTION();
  88. DbgToBeidou(ctx->link, __FUNCTION__)();
  89. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SetSomeFlag,Req.IssueBusiness:%d", ctx->Req.IssueBusiness);
  90. m_pEntity->SetSomeFlag(ctx);
  91. }
  92. void CardIssuerStoreServerSession::Handle_IssueEx(SpReqAnsContext<CardIssuerStoreService_IssueEx_Req, CardIssuerStoreService_IssueEx_Ans>::Pointer ctx)
  93. {
  94. LOG_FUNCTION();
  95. DbgToBeidou(ctx->link, __FUNCTION__)();
  96. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("IssueEx,req.hopper:%d", ctx->Req.hopper);
  97. m_pEntity->IssueEx(ctx);
  98. }
  99. void CardIssuerStoreServerSession::Handle_SAMICCommand(SpReqAnsContext<CardIssuerStoreService_SAMICCommand_Req, CardIssuerStoreService_SAMICCommand_Ans>::Pointer ctx)
  100. {
  101. DbgToBeidou(ctx->link, __FUNCTION__)();
  102. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("SAMICCommand");
  103. m_pEntity->SAMICCommand(ctx);
  104. }
  105. void CardIssuerStoreServerSession::Handle_QueryCardInfoOnStore(SpReqAnsContext<CardIssuerStoreService_QueryCardInfoOnStore_Req, CardIssuerStoreService_QueryCardInfoOnStore_Ans>::Pointer ctx)
  106. {
  107. LOG_FUNCTION();
  108. DbgToBeidou(ctx->link, __FUNCTION__)();
  109. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCardInfoOnStore");
  110. m_pEntity->QueryCardInfoOnStore(ctx);
  111. }
  112. void CardIssuerStoreServerSession::Handle_GetAddCardInfo(SpReqAnsContext<CardIssuerStoreService_GetAddCardInfo_Req, CardIssuerStoreService_GetAddCardInfo_Ans>::Pointer ctx)
  113. {
  114. LOG_FUNCTION();
  115. DbgToBeidou(ctx->link, __FUNCTION__)();
  116. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("GetAddCardInfo");
  117. m_pEntity->GetAddCardInfo(ctx);
  118. }
  119. void CardIssuerStoreServerSession::Handle_PrintCardImmediately(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediately_Req, CardIssuerStoreService_PrintCardImmediately_Ans>::Pointer ctx)
  120. {
  121. LOG_FUNCTION();
  122. DbgToBeidou(ctx->link, __FUNCTION__)();
  123. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("PrintCardImmediately");
  124. m_pEntity->PrintCardImmediately(ctx);
  125. }
  126. void CardIssuerStoreServerSession::Handle_QueryCIStatus(SpReqAnsContext<CardIssuerStoreService_QueryCIStatus_Req, CardIssuerStoreService_QueryCIStatus_Ans>::Pointer ctx)
  127. {
  128. LOG_FUNCTION();
  129. DbgToBeidou(ctx->link, __FUNCTION__)();
  130. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("QueryCIStatus");
  131. m_pEntity->QueryCIStatus(ctx);
  132. }
  133. void CardIssuerStoreServerSession::Handle_GetDevInfo(SpReqAnsContext<CardIssuerStoreService_GetDevInfo_Req, CardIssuerStoreService_GetDevInfo_Ans>::Pointer ctx)
  134. {
  135. LOG_FUNCTION();
  136. DbgToBeidou(ctx->link, __FUNCTION__)();
  137. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("GetDevInfo");
  138. m_pEntity->GetDevInfo(ctx);
  139. }
  140. #pragma region JS接口实现
  141. //吐卡
  142. void CardIssuerStoreServerSession::Handle_EjectJS(SpReqAnsContext<CardIssuerStoreService_EjectJS_Req, CardIssuerStoreService_EjectJS_Ans>::Pointer ctx)
  143. {
  144. LOG_FUNCTION();
  145. DbgToBeidou(ctx->link, __FUNCTION__)();
  146. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke EjectJS");
  147. m_pEntity->EjectJS(ctx);
  148. }
  149. //吞卡
  150. void CardIssuerStoreServerSession::Handle_CaptureJS(SpReqAnsContext<CardIssuerStoreService_CaptureJS_Req, CardIssuerStoreService_CaptureJS_Ans>::Pointer ctx)
  151. {
  152. LOG_FUNCTION();
  153. DbgToBeidou(ctx->link, __FUNCTION__)();
  154. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CaptureJS");
  155. m_pEntity->CaptureJS(ctx);
  156. }
  157. //区间盘库
  158. void CardIssuerStoreServerSession::Handle_ReadBatchCardInfoInRangeJS(SpReqAnsContext<CardIssuerStoreService_ReadBatchCardInfoInRangeJS_Req, CardIssuerStoreService_ReadBatchCardInfoInRangeJS_Ans>::Pointer ctx)
  159. {
  160. LOG_FUNCTION();
  161. DbgToBeidou(ctx->link, __FUNCTION__)();
  162. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke ReadBatchCardInfoInRangeJS");
  163. m_pEntity->ReadBatchCardInfoInRangeJS(ctx);
  164. }
  165. //卡库容量和卡槽状态
  166. void CardIssuerStoreServerSession::Handle_GetCardInStoreJS(SpReqAnsContext<CardIssuerStoreService_GetCardInStoreJS_Req, CardIssuerStoreService_GetCardInStoreJS_Ans>::Pointer ctx)
  167. {
  168. LOG_FUNCTION();
  169. DbgToBeidou(ctx->link, __FUNCTION__)();
  170. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetCardInStoreJS");
  171. m_pEntity->GetCardInStoreJS(ctx);
  172. }
  173. //加卡
  174. void CardIssuerStoreServerSession::Handle_AddAndReadCardFromBoxJS(SpReqAnsContext<CardIssuerStoreService_AddAndReadCardFromBoxJS_Req, CardIssuerStoreService_AddAndReadCardFromBoxJS_Ans>::Pointer ctx)
  175. {
  176. LOG_FUNCTION();
  177. DbgToBeidou(ctx->link, __FUNCTION__)();
  178. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke AddAndReadCardFromBoxJS");
  179. m_pEntity->AddAndReadCardFromBoxJS(ctx);
  180. }
  181. //移卡读卡
  182. void CardIssuerStoreServerSession::Handle_MoveAndReadCardFromSlotJS(SpReqAnsContext<CardIssuerStoreService_MoveAndReadCardFromSlotJS_Req, CardIssuerStoreService_MoveAndReadCardFromSlotJS_Ans>::Pointer ctx)
  183. {
  184. LOG_FUNCTION();
  185. DbgToBeidou(ctx->link, __FUNCTION__)();
  186. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke MoveAndReadCardFromSlotJS");
  187. m_pEntity->MoveAndReadCardFromSlotJS(ctx);
  188. }
  189. //移回卡槽
  190. void CardIssuerStoreServerSession::Handle_MoveBacktoSlotJS(SpReqAnsContext<CardIssuerStoreService_MoveBacktoSlotJS_Req, CardIssuerStoreService_MoveBacktoSlotJS_Ans>::Pointer ctx)
  191. {
  192. LOG_FUNCTION();
  193. DbgToBeidou(ctx->link, __FUNCTION__)();
  194. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke MoveBacktoSlotJS");
  195. m_pEntity->MoveBacktoSlotJS(ctx);
  196. }
  197. //卡库领卡
  198. //void CardIssuerStoreServerSession::Handle_IssueFromSlotJS(SpReqAnsContext<CardIssuerStoreService_IssueFromSlotJS_Req, CardIssuerStoreService_IssueFromSlotJS_Ans>::Pointer ctx)
  199. //{
  200. // LOG_FUNCTION();
  201. // DbgToBeidou(ctx->link, __FUNCTION__)();
  202. // DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke IssueFromSlotJS");
  203. // m_pEntity->IssueFromSlotJS(ctx);
  204. //}
  205. //查询卡机内部中是否有卡
  206. //void CardIssuerStoreServerSession::Handle_QueryInternalHasCardJS(SpReqAnsContext<CardIssuerStoreService_QueryInternalHasCardJS_Req, CardIssuerStoreService_QueryInternalHasCardJS_Ans>::Pointer ctx)
  207. //{
  208. // LOG_FUNCTION();
  209. // DbgToBeidou(ctx->link, __FUNCTION__)();
  210. // DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke QueryInternalHasCardJS");
  211. // m_pEntity->QueryInternalHasCardJS(ctx);
  212. //}
  213. //查询卡机内部中是否有卡
  214. void CardIssuerStoreServerSession::Handle_QueryHasCardJS(SpReqAnsContext<CardIssuerStoreService_QueryHasCardJS_Req, CardIssuerStoreService_QueryHasCardJS_Ans>::Pointer ctx)
  215. {
  216. LOG_FUNCTION();
  217. DbgToBeidou(ctx->link, __FUNCTION__)();
  218. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke QueryHasCardJS");
  219. m_pEntity->QueryHasCardJS(ctx);
  220. }
  221. //写卡
  222. void CardIssuerStoreServerSession::Handle_WriteTrackJS(SpReqAnsContext<CardIssuerStoreService_WriteTrackJS_Req, CardIssuerStoreService_WriteTrackJS_Ans>::Pointer ctx)
  223. {
  224. LOG_FUNCTION();
  225. DbgToBeidou(ctx->link, __FUNCTION__)();
  226. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke WriteTrackJS");
  227. m_pEntity->WriteTrackJS(ctx);
  228. }
  229. //打印
  230. void CardIssuerStoreServerSession::Handle_PrintCardImmediatelyJS(SpReqAnsContext<CardIssuerStoreService_PrintCardImmediatelyJS_Req, CardIssuerStoreService_PrintCardImmediatelyJS_Ans>::Pointer ctx)
  231. {
  232. LOG_FUNCTION();
  233. DbgToBeidou(ctx->link, __FUNCTION__)();
  234. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke PrintCardImmediatelyJS");
  235. m_pEntity->PrintCardImmediatelyJS(ctx);
  236. }
  237. //IC交互
  238. //void CardIssuerStoreServerSession::Handle_SAMICCommandJS(SpReqAnsContext<CardIssuerStoreService_SAMICCommandJS_Req, CardIssuerStoreService_SAMICCommandJS_Ans>::Pointer ctx)
  239. //{
  240. // LOG_FUNCTION();
  241. // DbgToBeidou(ctx->link, __FUNCTION__)();
  242. // DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke SAMICCommandJS");
  243. // m_pEntity->SAMICCommandJS(ctx);
  244. //}
  245. //IC交互
  246. void CardIssuerStoreServerSession::Handle_ICCommandJS(SpReqAnsContext<CardIssuerStoreService_ICCommandJS_Req, CardIssuerStoreService_ICCommandJS_Ans>::Pointer ctx)
  247. {
  248. LOG_FUNCTION();
  249. DbgToBeidou(ctx->link, __FUNCTION__)();
  250. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke ICCommandJS");
  251. m_pEntity->ICCommandJS(ctx);
  252. }
  253. //联机后处理
  254. void CardIssuerStoreServerSession::Handle_PostOnlineJS(SpReqAnsContext<CardIssuerStoreService_PostOnlineJS_Req, CardIssuerStoreService_PostOnlineJS_Ans>::Pointer ctx)
  255. {
  256. LOG_FUNCTION();
  257. DbgToBeidou(ctx->link, __FUNCTION__)();
  258. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke PostOnlineJS");
  259. m_pEntity->PostOnlineJS(ctx);
  260. }
  261. //卡箱发卡
  262. void CardIssuerStoreServerSession::Handle_IssueFromBoxJS(SpReqAnsContext<CardIssuerStoreService_IssueFromBoxJS_Req, CardIssuerStoreService_IssueFromBoxJS_Ans>::Pointer ctx)
  263. {
  264. LOG_FUNCTION();
  265. DbgToBeidou(ctx->link, __FUNCTION__)();
  266. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke IssueFromBoxJS");
  267. m_pEntity->IssueFromBoxJS(ctx);
  268. }
  269. //跨机激活
  270. void CardIssuerStoreServerSession::Handle_PreOnlineCrossJS(SpReqAnsContext<CardIssuerStoreService_PreOnlineCrossJS_Req, CardIssuerStoreService_PreOnlineCrossJS_Ans>::Pointer ctx)
  271. {
  272. LOG_FUNCTION();
  273. DbgToBeidou(ctx->link, __FUNCTION__)();
  274. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke PreOnlineCrossJS");
  275. m_pEntity->PreOnlineCrossJS(ctx);
  276. }
  277. //读卡
  278. void CardIssuerStoreServerSession::Handle_ReadJS(SpReqAnsContext<CardIssuerStoreService_ReadJS_Req, CardIssuerStoreService_ReadJS_Ans>::Pointer ctx)
  279. {
  280. LOG_FUNCTION();
  281. DbgToBeidou(ctx->link, __FUNCTION__)();
  282. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke ReadJS");
  283. m_pEntity->ReadJS(ctx);
  284. }
  285. //加卡箱移卡
  286. void CardIssuerStoreServerSession::Handle_AddCardFromBoxJS(SpReqAnsContext<CardIssuerStoreService_AddCardFromBoxJS_Req, CardIssuerStoreService_AddCardFromBoxJS_Ans>::Pointer ctx)
  287. {
  288. LOG_FUNCTION();
  289. DbgToBeidou(ctx->link, __FUNCTION__)();
  290. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke AddCardFromBoxJS");
  291. m_pEntity->AddCardFromBoxJS(ctx);
  292. }
  293. //卡槽移卡
  294. void CardIssuerStoreServerSession::Handle_MoveCardFromSlotJS(SpReqAnsContext<CardIssuerStoreService_MoveCardFromSlotJS_Req, CardIssuerStoreService_MoveCardFromSlotJS_Ans>::Pointer ctx)
  295. {
  296. LOG_FUNCTION();
  297. DbgToBeidou(ctx->link, __FUNCTION__)();
  298. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke MoveCardFromSlotJS");
  299. m_pEntity->MoveCardFromSlotJS(ctx);
  300. }
  301. #pragma endregion JS接口实现
  302. void CCardIssuerEntity::OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName)
  303. {
  304. if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
  305. {
  306. m_fsm.OnUIState4SetWhatPage(pszValue);
  307. if (_strnicmp(pszValue, "M", strlen("M")) == 0) {
  308. m_fsm.SetEnterMainPage();//设置进入首页
  309. }
  310. }
  311. }
  312. SP_BEGIN_ENTITY_MAP()
  313. SP_ENTITY(CCardIssuerEntity)
  314. SP_END_ENTITY_MAP()