Commit e3d9764a94780f00ee16017397427b68327aec7c
1 parent
a39f9aed
feat<card>:支持扣点收费
支持一个按钮同时刷园区卡银行卡,新增账户转账、王卡业务菜单
Showing
9 changed files
with
103 additions
and
61 deletions
central_clearing_system/Config/menu_res_auth_cfg.json
1 | 1 | [ |
2 | - {"res_id":1, "auth_id":1000, "icon":"", "index":[0]}, | |
3 | - {"res_id":10001, "auth_id":100001, "icon":"trade.ico", "index":[0, 0]}, | |
2 | + {"res_id":1, "auth_id":1000, "icon":"", "index":[0]}, | |
3 | + {"res_id":10001, "auth_id":100001, "icon":"trade.ico", "index":[0, 0]}, | |
4 | 4 | {"res_id":10002, "auth_id":100002, "icon":"place_an_order.ico", "index":[0, 1]}, |
5 | - {"res_id":10003, "auth_id":100003, "icon":"statement_manage.ico", "index":[0, 2]}, | |
6 | - {"res_id":2, "auth_id":1010, "icon":"", "index":[1]}, | |
5 | + {"res_id":10003, "auth_id":100003, "icon":"statement_manage.ico", "index":[0, 2]}, | |
6 | + {"res_id":2, "auth_id":1010, "icon":"", "index":[1]}, | |
7 | 7 | {"res_id":20001, "auth_id":101001, "icon":"user_manage.ico", "index":[1, 0]}, |
8 | 8 | {"res_id":20002, "auth_id":101002, "icon":"role_manage.ico", "index":[1, 1]}, |
9 | - {"res_id":20003, "auth_id":101002, "icon":"role_manage.ico", "index":[1, 1]}, | |
9 | + {"res_id":20003, "auth_id":101003, "icon":"role_manage.ico", "index":[1, 2]}, | |
10 | 10 | {"res_id":30001, "auth_id":103001, "icon":"role_manage.ico", "index":[2]}, |
11 | - {"res_id":4, "auth_id":1020, "icon":"", "index":[3]}, | |
11 | + {"res_id":4, "auth_id":1020, "icon":"", "index":[3]}, | |
12 | 12 | {"res_id":40001, "auth_id":102001, "icon":"user_manage.ico", "index":[3, 0]}, |
13 | 13 | {"res_id":40002, "auth_id":102002, "icon":"user_manage.ico", "index":[3, 1]}, |
14 | 14 | {"res_id":40003, "auth_id":102003, "icon":"user_manage.ico", "index":[3, 2]}, |
15 | 15 | {"res_id":40004, "auth_id":102004, "icon":"user_manage.ico", "index":[3, 3]}, |
16 | 16 | {"res_id":40005, "auth_id":102005, "icon":"user_manage.ico", "index":[3, 4]}, |
17 | - {"res_id":5, "auth_id":1040, "icon":"", "index":[4]}, | |
17 | + {"res_id":5, "auth_id":1040, "icon":"", "index":[4]}, | |
18 | 18 | {"res_id":50001, "auth_id":104001, "icon":"user_manage.ico", "index":[4, 0]}, |
19 | 19 | {"res_id":50002, "auth_id":104002, "icon":"user_manage.ico", "index":[4, 1]}, |
20 | 20 | {"res_id":50003, "auth_id":104003, "icon":"user_manage.ico", "index":[4, 2]}, |
21 | 21 | {"res_id":50004, "auth_id":104004, "icon":"user_manage.ico", "index":[4, 3]}, |
22 | - {"res_id":11001, "auth_id":0, "icon":"exit.ico", "index":[]}, | |
23 | - {"res_id":11002, "auth_id":0, "icon":"modify_account_pwd.ico", "index":[]} | |
22 | + {"res_id":11001, "auth_id":0, "icon":"exit.ico", "index":[]}, | |
23 | + {"res_id":11002, "auth_id":0, "icon":"modify_account_pwd.ico","index":[]} | |
24 | 24 | ] |
25 | 25 | \ No newline at end of file | ... | ... |
central_clearing_system/ETradeClient/hardware/dili_card_device.cpp
... | ... | @@ -417,23 +417,6 @@ namespace DILICard |
417 | 417 | //------Private Implementations---------------- |
418 | 418 | void RWDevice::Init() |
419 | 419 | { |
420 | - //const std::wstring kDLLFile = L"./dyn.dll"; | |
421 | - //HINSTANCE dll_handle = LoadLibrary(kDLLFile.c_str()); | |
422 | - //if (NULL != dll_handle) | |
423 | - //{ | |
424 | - // m_fn_open = (OpenFn)GetProcAddress(dll_handle, "open"); | |
425 | - // m_fn_beep = (BeepFn)GetProcAddress(dll_handle, "beep"); | |
426 | - // m_fn_close = (CloseFn)GetProcAddress(dll_handle, "close"); | |
427 | - // m_fn_find_card = (FindCardFn)GetProcAddress(dll_handle, "findCard"); | |
428 | - // m_fn_write_bin_data = (WriteBinaryDataFn)GetProcAddress(dll_handle, "write_bin_file"); | |
429 | - // m_fn_get_value = (GetValueFn)GetProcAddress(dll_handle, "get_value_char"); // Don't use "get_value" version!!! | |
430 | - // m_fn_ch_dir = (ChangeDirFn)GetProcAddress(dll_handle, "chang_dir"); | |
431 | - // m_fn_read_bin_data = (ReadBinaryDataFn)GetProcAddress(dll_handle, "read_bin_file"); | |
432 | - // m_fn_ex_auth = (ExternalAuthFn)GetProcAddress(dll_handle, "External_Authentication"); | |
433 | - // m_fn_install_key = (InstallKeyFn)GetProcAddress(dll_handle, "InstallKey"); | |
434 | - //} | |
435 | - //else | |
436 | - // throw std::exception(("Fail to load the DILI card device DLL from path : " + wstr_2_str(kDLLFile)).c_str()); | |
437 | 420 | } |
438 | 421 | |
439 | 422 | std::string RWDevice::GetValue() const | ... | ... |
central_clearing_system/ETradeClient/mfc_ui/ETradeClient.cpp
... | ... | @@ -18,9 +18,7 @@ |
18 | 18 | #include "./ExLib/mfc/dbghelp.h" |
19 | 19 | #include "./ETradeClient/utility/win_msg_define.h" |
20 | 20 | |
21 | -//for test | |
22 | -#include "place_order_dlg.h" | |
23 | -// | |
21 | + | |
24 | 22 | |
25 | 23 | #ifdef _DEBUG |
26 | 24 | #define new DEBUG_NEW |
... | ... | @@ -191,14 +189,6 @@ BOOL CETradeClientApp::InitInstance() |
191 | 189 | // such as the name of your company or organization |
192 | 190 | SetRegistryKey(APP_ID); |
193 | 191 | |
194 | - //for test | |
195 | - //PlaceOrderDlg dlg; | |
196 | - /*if (dlg.DoModal()) | |
197 | - { | |
198 | - return FALSE; | |
199 | - }*/ | |
200 | - // | |
201 | - | |
202 | 192 | // First, do login job. |
203 | 193 | if (!CLoginDialog(L"欢迎使用综合业务系统!").Launch()) |
204 | 194 | { | ... | ... |
etrade_card_client/Config/menu_res_auth_cfg.json
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | {"res_id":50150, "auth_id":5508, "icon":"cash_withdraw.ico", "index":[3, 1]}, |
24 | 24 | {"res_id":50160, "auth_id":5512, "icon":"fee_payment.ico", "index":[3, 2]}, |
25 | 25 | {"res_id":50170, "auth_id":5516, "icon":"settle_accounts_apply.ico", "index":[3, 3]}, |
26 | + {"res_id":50190, "auth_id":5517, "icon":"about.ico", "index":[3, 4]}, | |
26 | 27 | {"res_id":4, "auth_id":60, "icon":"", "index":[4]}, |
27 | 28 | {"res_id":50180, "auth_id":6004, "icon":"customer_query.ico", "index":[4, 0]}, |
28 | 29 | {"res_id":50190, "auth_id":6008, "icon":"oper_log_query.ico", "index":[4, 1]}, |
... | ... | @@ -30,6 +31,7 @@ |
30 | 31 | {"res_id":5, "auth_id":70, "icon":"", "index":[5]}, |
31 | 32 | {"res_id":50182, "auth_id":7002, "icon":"about.ico", "index":[5, 0]}, |
32 | 33 | {"res_id":50183, "auth_id":7004, "icon":"about.ico", "index":[5, 1]}, |
34 | + {"res_id":50184, "auth_id":7005, "icon":"about.ico", "index":[5, 2]}, | |
33 | 35 | {"res_id":6, "auth_id":0, "icon":"", "index":[6]}, |
34 | 36 | {"res_id":32807, "auth_id":0, "icon":"modify_cfg.ico", "index":[6, 0]}, |
35 | 37 | {"res_id":32782, "auth_id":0, "icon":"exit.ico", "index":[]}, | ... | ... |
etrade_card_client/ETradeClient.rc
... | ... | @@ -117,17 +117,19 @@ BEGIN |
117 | 117 | MENUITEM "提现", ID_CASH_WITHDRAW |
118 | 118 | MENUITEM "缴费", ID_FEE_PAYMENT |
119 | 119 | MENUITEM "结账申请", ID_SETTLE_ACCOUNTS_APPLY |
120 | + MENUITEM "账户转账", ID_ACCOUNT_TRANSFER | |
120 | 121 | END |
121 | 122 | POPUP "查询业务(&C)" |
122 | 123 | BEGIN |
123 | 124 | MENUITEM "客户查询", ID_CUSTOMER_QUERY |
124 | - MENUITEM "操作记录", ID_OPER_LOG_QUERY | |
125 | + MENUITEM "操作记录", ID_ACCOUNT_TRANSFER | |
125 | 126 | MENUITEM "客户管理", ID_CUS_MANAGE |
126 | 127 | END |
127 | 128 | POPUP "市场业务(&F)" |
128 | 129 | BEGIN |
129 | 130 | MENUITEM "ETC业务查询", ID_ETC_QUERY |
130 | 131 | MENUITEM "ETC业务办理", ID_ETC_SERVICE |
132 | + MENUITEM "王卡业务", ID_KING_CARD | |
131 | 133 | END |
132 | 134 | POPUP "设置(&S)" |
133 | 135 | BEGIN |
... | ... | @@ -243,8 +245,8 @@ END |
243 | 245 | // |
244 | 246 | |
245 | 247 | VS_VERSION_INFO VERSIONINFO |
246 | - FILEVERSION 1,0,0,2 | |
247 | - PRODUCTVERSION 1,0,0,2 | |
248 | + FILEVERSION 1,0,0,3 | |
249 | + PRODUCTVERSION 1,0,0,3 | |
248 | 250 | FILEFLAGSMASK 0x3fL |
249 | 251 | #ifdef _DEBUG |
250 | 252 | FILEFLAGS 0x1L |
... | ... | @@ -261,12 +263,12 @@ BEGIN |
261 | 263 | BEGIN |
262 | 264 | VALUE "CompanyName", "地利集团【DILI GROUP】" |
263 | 265 | VALUE "FileDescription", "电子交易结算柜员系统【ETradeClient】" |
264 | - VALUE "FileVersion", "1.0.0.2" | |
266 | + VALUE "FileVersion", "1.0.0.3" | |
265 | 267 | VALUE "InternalName", "ETradeClient.exe" |
266 | 268 | VALUE "LegalCopyright", "(C) 地利集团。 保留所有权利。" |
267 | 269 | VALUE "OriginalFilename", "ETradeClient.exe" |
268 | 270 | VALUE "ProductName", "电子交易结算柜员系统" |
269 | - VALUE "ProductVersion", "1.0.1.180808_Beta" | |
271 | + VALUE "ProductVersion", "1.0.1.181015_Release" | |
270 | 272 | END |
271 | 273 | END |
272 | 274 | BLOCK "VarFileInfo" | ... | ... |
etrade_card_client/ETradeClient/hardware/dili_card_device.cpp
... | ... | @@ -417,23 +417,6 @@ namespace DILICard |
417 | 417 | //------Private Implementations---------------- |
418 | 418 | void RWDevice::Init() |
419 | 419 | { |
420 | - //const std::wstring kDLLFile = L"./dyn.dll"; | |
421 | - //HINSTANCE dll_handle = LoadLibrary(kDLLFile.c_str()); | |
422 | - //if (NULL != dll_handle) | |
423 | - //{ | |
424 | - // m_fn_open = (OpenFn)GetProcAddress(dll_handle, "open"); | |
425 | - // m_fn_beep = (BeepFn)GetProcAddress(dll_handle, "beep"); | |
426 | - // m_fn_close = (CloseFn)GetProcAddress(dll_handle, "close"); | |
427 | - // m_fn_find_card = (FindCardFn)GetProcAddress(dll_handle, "findCard"); | |
428 | - // m_fn_write_bin_data = (WriteBinaryDataFn)GetProcAddress(dll_handle, "write_bin_file"); | |
429 | - // m_fn_get_value = (GetValueFn)GetProcAddress(dll_handle, "get_value_char"); // Don't use "get_value" version!!! | |
430 | - // m_fn_ch_dir = (ChangeDirFn)GetProcAddress(dll_handle, "chang_dir"); | |
431 | - // m_fn_read_bin_data = (ReadBinaryDataFn)GetProcAddress(dll_handle, "read_bin_file"); | |
432 | - // m_fn_ex_auth = (ExternalAuthFn)GetProcAddress(dll_handle, "External_Authentication"); | |
433 | - // m_fn_install_key = (InstallKeyFn)GetProcAddress(dll_handle, "InstallKey"); | |
434 | - //} | |
435 | - //else | |
436 | - // throw std::exception(("Fail to load the DILI card device DLL from path : " + wstr_2_str(kDLLFile)).c_str()); | |
437 | 420 | } |
438 | 421 | |
439 | 422 | std::string RWDevice::GetValue() const | ... | ... |
etrade_card_client/ETradeClient/hardware/hardware_cmd.cpp
... | ... | @@ -1182,3 +1182,75 @@ ReadPINPadCmd::Reply ReadBankCardNumCmd::Execute(const std::string& input) |
1182 | 1182 | reply.data.put("chipNo", bank_card_no); |
1183 | 1183 | return reply; |
1184 | 1184 | } |
1185 | + | |
1186 | +ReadPINPadCmd::Reply ReadDILIAndBankCardNumCmd::Execute(const std::string& input) | |
1187 | +{ | |
1188 | + LOG_TRACE(L"读取园区卡或银行卡。"); | |
1189 | + Reply reply; | |
1190 | + auto& dili_card_device = DILICardRWDevice(); | |
1191 | + DILICard::BasicInfo card_basic_info; | |
1192 | + std::string sCardNum; | |
1193 | + do | |
1194 | + { | |
1195 | + try | |
1196 | + { | |
1197 | + dili_card_device.Connect(); | |
1198 | + } | |
1199 | + catch (std::exception& ex) | |
1200 | + { | |
1201 | + LOG_FATAL(L"连接读卡器失败,错误信息: " + str_2_wstr(ex.what())); | |
1202 | + reply.error_code = StatusCode::CPU_CARD_DEVICE_CONNECT_FAILED; | |
1203 | + break; | |
1204 | + } | |
1205 | + try | |
1206 | + { | |
1207 | + dili_card_device.FindCard(); | |
1208 | + } | |
1209 | + catch (std::exception& ex) | |
1210 | + { | |
1211 | + LOG_FATAL(L"寻卡失败,错误信息: " + str_2_wstr(ex.what())); | |
1212 | + reply.error_code = StatusCode::CPU_CARD_DEVICE_CANNOT_FIND_CARD; | |
1213 | + break; | |
1214 | + } | |
1215 | + | |
1216 | + try | |
1217 | + { | |
1218 | + card_basic_info = dili_card_device.ReadCardBasicInfo(); | |
1219 | + sCardNum = card_basic_info.chip_num; | |
1220 | + } | |
1221 | + catch (std::exception& ex) | |
1222 | + { | |
1223 | + LOG_FATAL(L"读取园区卡卡片基本信息失败,错误信息: " + str_2_wstr(ex.what())); | |
1224 | + try | |
1225 | + { | |
1226 | + LOG_TRACE(L"读取银行卡号。"); | |
1227 | + auto& bank_card_reader = BankCardReader_(); | |
1228 | + if (!bank_card_reader.Connect()) | |
1229 | + { | |
1230 | + LOG_ERROR(L"连接银行卡读卡器失败。"); | |
1231 | + reply.error_code = StatusCode::CPU_CARD_DEVICE_CONNECT_FAILED; | |
1232 | + break; | |
1233 | + } | |
1234 | + sCardNum = bank_card_reader.ReadBankCardNum(); | |
1235 | + } | |
1236 | + catch (std::exception& ex) | |
1237 | + { | |
1238 | + LOG_FATAL(L"读取银行卡号失败,错误信息: " + str_2_wstr(ex.what())); | |
1239 | + reply.error_code = StatusCode::BANK_CARD_READ_CARD_NUM_FAILED; | |
1240 | + break; | |
1241 | + } | |
1242 | + | |
1243 | + } | |
1244 | + } while (0); | |
1245 | + dili_card_device.Disconnect(); | |
1246 | + if (boost::iequals(reply.error_code, StatusCode::OK)) | |
1247 | + LOG_TRACE(L"读取卡片基本信息成功。"); | |
1248 | + | |
1249 | + reply.data.put("chipNo", sCardNum); | |
1250 | + reply.data.put("deviceId", card_basic_info.device_id); | |
1251 | + reply.data.put("type", card_basic_info.type_code); | |
1252 | + reply.data.put("issuerCode", card_basic_info.issuer_code); | |
1253 | + reply.data.put("verifyCode", card_basic_info.verify_code); | |
1254 | + | |
1255 | + return reply; | |
1256 | +} | |
1185 | 1257 | \ No newline at end of file | ... | ... |
etrade_card_client/ETradeClient/hardware/hardware_cmd.h
... | ... | @@ -86,4 +86,12 @@ class ReadBankCardNumCmd : public HardwareCmd |
86 | 86 | public: |
87 | 87 | virtual Reply Execute(const std::string& input) override; |
88 | 88 | }; |
89 | + | |
90 | +//中央结算特殊需求,一个接口先刷园区卡再刷银行卡 | |
91 | +class ReadDILIAndBankCardNumCmd : public HardwareCmd | |
92 | +{ | |
93 | +public: | |
94 | + virtual Reply Execute(const std::string& input) override; | |
95 | +}; | |
96 | +// | |
89 | 97 | #endif // ETRADECLIENT_HARDWARE_HARDWARE_CMD_H_INCLUDED | ... | ... |
etrade_card_client/resource.h
... | ... | @@ -58,11 +58,13 @@ |
58 | 58 | #define ID_CASH_WITHDRAW 50150 |
59 | 59 | #define ID_FEE_PAYMENT 50160 |
60 | 60 | #define ID_SETTLE_ACCOUNTS_APPLY 50170 |
61 | +#define ID_ACCOUNT_TRANSFER 50190 | |
61 | 62 | #define ID_CUSTOMER_QUERY 50180 |
62 | 63 | #define ID_CUS_MANAGE 50181 |
63 | -#define ID_OPER_LOG_QUERY 50190 | |
64 | 64 | #define ID_ETC_QUERY 50182 |
65 | 65 | #define ID_ETC_SERVICE 50183 |
66 | +#define ID_KING_CARD 50184 | |
67 | +#define ID_OPER_LOG_QUERY 50190 | |
66 | 68 | #define ID_INDICATOR_TIME 59142 |
67 | 69 | |
68 | 70 | // Next default values for new objects |
... | ... | @@ -70,7 +72,7 @@ |
70 | 72 | #ifdef APSTUDIO_INVOKED |
71 | 73 | #ifndef APSTUDIO_READONLY_SYMBOLS |
72 | 74 | #define _APS_NEXT_RESOURCE_VALUE 326 |
73 | -#define _APS_NEXT_COMMAND_VALUE 32835 | |
75 | +#define _APS_NEXT_COMMAND_VALUE 32840 | |
74 | 76 | #define _APS_NEXT_CONTROL_VALUE 1018 |
75 | 77 | #define _APS_NEXT_SYMED_VALUE 311 |
76 | 78 | #endif | ... | ... |