Commit 93bbdaab4f9fb1e99499fb4698daa0971c15ee78
1 parent
10f68606
feat<central_clearing_system>优化综合业务系统和底层操作模块
利用代码分析器检查若干可能出现的问题,并进行修复
Showing
9 changed files
with
27 additions
and
24 deletions
central_clearing_system/Config/url_cfg.json
central_clearing_system/ETradeClient.rc
... | ... | @@ -277,8 +277,8 @@ END |
277 | 277 | // |
278 | 278 | |
279 | 279 | VS_VERSION_INFO VERSIONINFO |
280 | - FILEVERSION 2,0,0,1 | |
281 | - PRODUCTVERSION 2,0,0,1 | |
280 | + FILEVERSION 2,0,0,2 | |
281 | + PRODUCTVERSION 2,0,0,2 | |
282 | 282 | FILEFLAGSMASK 0x3fL |
283 | 283 | #ifdef _DEBUG |
284 | 284 | FILEFLAGS 0x1L |
... | ... | @@ -295,12 +295,12 @@ BEGIN |
295 | 295 | BEGIN |
296 | 296 | VALUE "CompanyName", "地利集团【DILI GROUP】" |
297 | 297 | VALUE "FileDescription", "电子交易结算综合业务系统" |
298 | - VALUE "FileVersion", "2.0.0.1" | |
299 | - VALUE "InternalName", "ETradeClient.exe" | |
298 | + VALUE "FileVersion", "2.0.0.2" | |
299 | + VALUE "InternalName", "Central-Clearing-System_2.0.1.181024_beta" | |
300 | 300 | VALUE "LegalCopyright", "(C) 地利集团。 保留所有权利。" |
301 | - VALUE "OriginalFilename", "ETradeClient.exe" | |
302 | - VALUE "ProductName", "Central-Clearing-System_2.0.1.181019_beta" | |
303 | - VALUE "ProductVersion", "2.0.0.1" | |
301 | + VALUE "OriginalFilename", "Central-Clearing-System_2.0.1.181024_beta" | |
302 | + VALUE "ProductName", "Central-Clearing-System_2.0.1.181024_beta" | |
303 | + VALUE "ProductVersion", "2.0.0.2" | |
304 | 304 | END |
305 | 305 | END |
306 | 306 | BLOCK "VarFileInfo" |
... | ... | @@ -341,14 +341,12 @@ BEGIN |
341 | 341 | |
342 | 342 | IDD_DIALOG_PLACE_ORDER, DIALOG |
343 | 343 | BEGIN |
344 | - MOCKUP, 1, 50, -25, -30, "C:\Users\WangGY\Desktop\TIM图片20180918183513.png" | |
345 | 344 | RIGHTMARGIN, 337 |
346 | 345 | HORZGUIDE, 67 |
347 | 346 | END |
348 | 347 | |
349 | 348 | IDD_DIALOG_PAY, DIALOG |
350 | 349 | BEGIN |
351 | - MOCKUP, 1, 50, -5, -34, "C:\Users\WangGY\Desktop\无标题.png" | |
352 | 350 | LEFTMARGIN, 7 |
353 | 351 | RIGHTMARGIN, 222 |
354 | 352 | TOPMARGIN, 7 | ... | ... |
central_clearing_system/ETradeClient/hardware/hardware_cmd.cpp
... | ... | @@ -54,6 +54,7 @@ namespace StatusCode |
54 | 54 | static const std::string BANK_CARD_READ_CARD_NUM_FAILED = "501"; // 读取银行卡卡号失败. |
55 | 55 | |
56 | 56 | static const std::string PRINT_PARSE_DATA_FAILED = "1001"; //解析打印数据失败 |
57 | + static const std::string PRINT_GET_MACHINE_DATA_FAILED = "1002"; //获取打印机参数失败 | |
57 | 58 | } |
58 | 59 | |
59 | 60 | namespace EncryptTools |
... | ... | @@ -1290,14 +1291,14 @@ StylusPrinterCmd::Reply StylusPrinterCmd::Execute(const std::string& input) |
1290 | 1291 | { |
1291 | 1292 | break; |
1292 | 1293 | } |
1293 | - Print(comm_vector); | |
1294 | + reply.error_code = Print(comm_vector); | |
1294 | 1295 | } while (0); |
1295 | 1296 | |
1296 | 1297 | |
1297 | 1298 | return reply; |
1298 | 1299 | } |
1299 | 1300 | |
1300 | -int StylusPrinterCmd::Print(std::vector<OrderInfo> &order_vector) | |
1301 | +std::string StylusPrinterCmd::Print(std::vector<OrderInfo> &order_vector) | |
1301 | 1302 | { |
1302 | 1303 | HDC print_dc; |
1303 | 1304 | DOCINFO docin; |
... | ... | @@ -1310,6 +1311,10 @@ int StylusPrinterCmd::Print(std::vector<OrderInfo> &order_vector) |
1310 | 1311 | PRINTDLG *print_dlg_info = &print_dialog.m_pd; |
1311 | 1312 | AfxGetApp()->GetPrinterDeviceDefaults(print_dlg_info); |
1312 | 1313 | DEVMODE* lpDevMode = (DEVMODE*)::GlobalLock(print_dlg_info->hDevMode); |
1314 | + if (!lpDevMode) | |
1315 | + { | |
1316 | + return StatusCode::PRINT_GET_MACHINE_DATA_FAILED; | |
1317 | + } | |
1313 | 1318 | ::GlobalUnlock(print_dlg_info->hDevMode); |
1314 | 1319 | lpDevMode->dmFields |= -1; |
1315 | 1320 | lpDevMode->dmPaperLength = 1397; //设定纸长为 139.7mm |
... | ... | @@ -1504,7 +1509,7 @@ int StylusPrinterCmd::Print(std::vector<OrderInfo> &order_vector) |
1504 | 1509 | DeleteDC(print_dc); |
1505 | 1510 | delete dc; |
1506 | 1511 | |
1507 | - return true; | |
1512 | + return StatusCode::OK; | |
1508 | 1513 | } |
1509 | 1514 | |
1510 | 1515 | ... | ... |
central_clearing_system/ETradeClient/hardware/hardware_cmd.h
... | ... | @@ -124,7 +124,7 @@ public: |
124 | 124 | |
125 | 125 | private: |
126 | 126 | std::string ParseInput(std::string &input, std::vector<OrderInfo> &order_vector); |
127 | - int Print(std::vector<OrderInfo> &order_vector); | |
127 | + std::string Print(std::vector<OrderInfo> &order_vector); | |
128 | 128 | }; |
129 | 129 | // |
130 | 130 | ... | ... |
central_clearing_system/ETradeClient/hardware/id_card_reader.cpp
... | ... | @@ -137,7 +137,7 @@ void IDCardReader::GetPortraitPath(std::wstring& portrait_path) const |
137 | 137 | wchar_t exe_path[MAX_PATH]; |
138 | 138 | HMODULE h_module = GetModuleHandle(NULL); |
139 | 139 | if (NULL != h_module) |
140 | - GetModuleFileName(h_module, exe_path, sizeof(exe_path)); | |
140 | + GetModuleFileName(h_module, exe_path, MAX_PATH); | |
141 | 141 | else |
142 | 142 | throw std::exception("Calling windows API to get exe path failed."); |
143 | 143 | ... | ... |
central_clearing_system/ETradeClient/mfc_ui/pay_dlg.cpp
... | ... | @@ -57,9 +57,9 @@ BEGIN_MESSAGE_MAP(PayDlg, CDialogEx) |
57 | 57 | ON_BN_CLICKED(IDC_PAY_BUTTON_PAY, &PayDlg::OnBnClickedPayButtonPay) |
58 | 58 | ON_WM_CTLCOLOR() |
59 | 59 | ON_BN_CLICKED(IDC_PAY_BUTTON_PASSWORD, &PayDlg::OnBnClickedPayButtonPassword) |
60 | - ON_COMMAND(ID_ACCELERATOR_A, &PayDlg::OnBnClickedPayButtonPassword) | |
60 | + ON_COMMAND(ID_ACCELERATOR_X, &PayDlg::OnBnClickedPayButtonPassword) | |
61 | 61 | ON_COMMAND(ID_ACCELERATOR_F, &PayDlg::OnBnClickedPayButtonPay) |
62 | - ON_COMMAND(ID_ACCELERATOR_X, &PayDlg::OnBnClickedPayButtonClose) | |
62 | + ON_COMMAND(ID_ACCELERATOR_S, &PayDlg::OnBnClickedPayButtonClose) | |
63 | 63 | ON_MESSAGE(WM_CEF_SESSION_EXPIRED, &PayDlg::OnSessionExpired) |
64 | 64 | END_MESSAGE_MAP() |
65 | 65 | ... | ... |
central_clearing_system/ETradeClient/mfc_ui/place_order_dlg.cpp
... | ... | @@ -149,8 +149,8 @@ void PlaceOrderDlg::SetCtrlPos() |
149 | 149 | ctrl_rect.right += EditWidth; |
150 | 150 | buyer_card_edit_.MoveWindow(&ctrl_rect); |
151 | 151 | |
152 | - line_point_[3].x = ctrl_rect.right + 3; | |
153 | - line_point_[3].y = ctrl_rect.bottom - EditHeigth / 2 - 3; | |
152 | + line_point_[2].x = ctrl_rect.right + 3; | |
153 | + line_point_[2].y = ctrl_rect.bottom - EditHeigth / 2 - 3; | |
154 | 154 | |
155 | 155 | ctrl_rect.left = ctrl_rect.right + 30; |
156 | 156 | ctrl_rect.right = ctrl_rect.left + EditWidth; |
... | ... | @@ -333,8 +333,8 @@ void PlaceOrderDlg::OnPaint() |
333 | 333 | dc.MoveTo(line_point_[1]); |
334 | 334 | dc.LineTo(line_point_[1].x + 24, line_point_[1].y); |
335 | 335 | |
336 | - dc.MoveTo(line_point_[3]); | |
337 | - dc.LineTo(line_point_[3].x + 24, line_point_[3].y); | |
336 | + dc.MoveTo(line_point_[2]); | |
337 | + dc.LineTo(line_point_[2].x + 24, line_point_[2].y); | |
338 | 338 | |
339 | 339 | dc.SelectObject(old_pen); |
340 | 340 | ... | ... |
central_clearing_system/out/Win32/综合业务系统.zip
0 → 100644
No preview for this file type
dlcm/dlcm/DLCCard.cc
... | ... | @@ -751,7 +751,7 @@ int DLCCard::CreatCardFile(const unsigned char* parent_dir, const unsigned char* |
751 | 751 | } |
752 | 752 | |
753 | 753 | } |
754 | - else if (card_mf = kCardHDZB) | |
754 | + else if (card_mf == kCardHDZB) | |
755 | 755 | { |
756 | 756 | if (file_type == kFTDDF) |
757 | 757 | { |
... | ... | @@ -779,7 +779,7 @@ int DLCCard::CreatCardFile(const unsigned char* parent_dir, const unsigned char* |
779 | 779 | create_file_cmd[15] = 0x00; |
780 | 780 | create_file_cmd[16] = 0x01; |
781 | 781 | create_file_cmd[17] = 0x03; |
782 | - memcpy(&create_file_cmd[18], kDF10FileAID, 8); | |
782 | + memcpy(&create_file_cmd[18], kDF10FileAID, 7); | |
783 | 783 | |
784 | 784 | unsigned char recv_data[kHalfBlock], recv_data_len = 0; |
785 | 785 | result = DLCDevice::Instance().SendCommand(create_file_cmd, 15, recv_data, recv_data_len); | ... | ... |