Commit fa36e38f358ee1e5097c37dfb373a9939cc71793
1 parent
8ca804f7
fix<card_client>:修复时间控件占用cpu的问题
之前时间控件更新时间逻辑错误,导致cpu占有率过高,现使用定时器每秒钟更新一次时间。
Showing
12 changed files
with
22 additions
and
35 deletions
doc/北京意诚信通智能卡股份有限公司/00-个人化.txt
0 → 100644
doc/北京意诚信通智能卡股份有限公司/02-权限测试.txt
0 → 100644
doc/北京意诚信通智能卡股份有限公司/Card_Spec_v2.1.1v0303.pdf
0 → 100644
No preview for this file type
doc/北京意诚信通智能卡股份有限公司/交通部一卡通个人化指南.pdf
0 → 100644
No preview for this file type
doc/北京意诚信通智能卡股份有限公司/微信图片_20180807153406.jpg
0 → 100644
772 KB
doc/卡片情况.xlsx
No preview for this file type
doc/智信融创/智信融创替换秘钥方法.txt
@@ -5,9 +5,9 @@ | @@ -5,9 +5,9 @@ | ||
5 | 3.84D4010124 + 密文 + mac | 5 | 3.84D4010124 + 密文 + mac |
6 | 6 | ||
7 | DCMK id:01 | 7 | DCMK id:01 |
8 | -主控秘钥:84D4010124 | 8 | +主控秘钥: 84D4010124 |
9 | 非主控秘钥:84D4000124 | 9 | 非主控秘钥:84D4000124 |
10 | -K_DCCK_CMD_HEAD = 18000000003300FF10 | 10 | +K_DCCK_CMD_HEAD = 18000000003300FF10 |
11 | K_F0015_DACK_CMD_HEAD = 18000000006600FF10 | 11 | K_F0015_DACK_CMD_HEAD = 18000000006600FF10 |
12 | K_F0015_DEAK_CMD_HEAD = 180D01000066002210 | 12 | K_F0015_DEAK_CMD_HEAD = 180D01000066002210 |
13 | K_F0015_DAMK1_CMD_HEAD = 184801000066002210 | 13 | K_F0015_DAMK1_CMD_HEAD = 184801000066002210 |
14 | \ No newline at end of file | 14 | \ No newline at end of file |
doc/硬件卡片总体需求/卡片基本信息字段和初始秘钥说明.docx
No preview for this file type
etrade_card_client/Config/application_config.json
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | "client_cert_subject": "*.diligrp.com", | 9 | "client_cert_subject": "*.diligrp.com", |
10 | "client_cert_filename": "", | 10 | "client_cert_filename": "", |
11 | "client_cert_password": "", | 11 | "client_cert_password": "", |
12 | - "security_level": 0, | ||
13 | - "encrypt_type": 1, | 12 | + "security_level": 1, |
13 | + "encrypt_type": 0, | ||
14 | "id_reader": 1 | 14 | "id_reader": 1 |
15 | } | 15 | } |
16 | \ No newline at end of file | 16 | \ No newline at end of file |
etrade_card_client/Config/menu_res_auth_cfg.json
@@ -27,9 +27,9 @@ | @@ -27,9 +27,9 @@ | ||
27 | {"res_id":50180, "auth_id":6004, "icon":"customer_query.ico", "index":[4, 0]}, | 27 | {"res_id":50180, "auth_id":6004, "icon":"customer_query.ico", "index":[4, 0]}, |
28 | {"res_id":50190, "auth_id":6008, "icon":"oper_log_query.ico", "index":[4, 1]}, | 28 | {"res_id":50190, "auth_id":6008, "icon":"oper_log_query.ico", "index":[4, 1]}, |
29 | {"res_id":50181, "auth_id":6009, "icon":"about.ico", "index":[4, 2]}, | 29 | {"res_id":50181, "auth_id":6009, "icon":"about.ico", "index":[4, 2]}, |
30 | - {"res_id":5, "auth_id":65, "icon":"about.ico", "index":[5]}, | ||
31 | - {"res_id":50182, "auth_id":6502, "icon":"about.ico", "index":[5, 0]}, | ||
32 | - {"res_id":50183, "auth_id":6504, "icon":"about.ico", "index":[5, 1]}, | 30 | + {"res_id":5, "auth_id":70, "icon":"", "index":[5]}, |
31 | + {"res_id":50182, "auth_id":7002, "icon":"about.ico", "index":[5, 0]}, | ||
32 | + {"res_id":50183, "auth_id":7004, "icon":"about.ico", "index":[5, 1]}, | ||
33 | {"res_id":6, "auth_id":0, "icon":"", "index":[6]}, | 33 | {"res_id":6, "auth_id":0, "icon":"", "index":[6]}, |
34 | {"res_id":32807, "auth_id":0, "icon":"modify_cfg.ico", "index":[6, 0]}, | 34 | {"res_id":32807, "auth_id":0, "icon":"modify_cfg.ico", "index":[6, 0]}, |
35 | {"res_id":32782, "auth_id":0, "icon":"exit.ico", "index":[]}, | 35 | {"res_id":32782, "auth_id":0, "icon":"exit.ico", "index":[]}, |
etrade_card_client/ETradeClient.rc
@@ -243,8 +243,8 @@ END | @@ -243,8 +243,8 @@ END | ||
243 | // | 243 | // |
244 | 244 | ||
245 | VS_VERSION_INFO VERSIONINFO | 245 | VS_VERSION_INFO VERSIONINFO |
246 | - FILEVERSION 1,0,0,1 | ||
247 | - PRODUCTVERSION 1,0,0,1 | 246 | + FILEVERSION 1,0,0,2 |
247 | + PRODUCTVERSION 1,0,0,2 | ||
248 | FILEFLAGSMASK 0x3fL | 248 | FILEFLAGSMASK 0x3fL |
249 | #ifdef _DEBUG | 249 | #ifdef _DEBUG |
250 | FILEFLAGS 0x1L | 250 | FILEFLAGS 0x1L |
@@ -261,12 +261,12 @@ BEGIN | @@ -261,12 +261,12 @@ BEGIN | ||
261 | BEGIN | 261 | BEGIN |
262 | VALUE "CompanyName", "地利集团【DILI GROUP】" | 262 | VALUE "CompanyName", "地利集团【DILI GROUP】" |
263 | VALUE "FileDescription", "电子交易结算柜员系统【ETradeClient】" | 263 | VALUE "FileDescription", "电子交易结算柜员系统【ETradeClient】" |
264 | - VALUE "FileVersion", "1.0.0.1" | 264 | + VALUE "FileVersion", "1.0.0.2" |
265 | VALUE "InternalName", "ETradeClient.exe" | 265 | VALUE "InternalName", "ETradeClient.exe" |
266 | VALUE "LegalCopyright", "(C) 地利集团。 保留所有权利。" | 266 | VALUE "LegalCopyright", "(C) 地利集团。 保留所有权利。" |
267 | VALUE "OriginalFilename", "ETradeClient.exe" | 267 | VALUE "OriginalFilename", "ETradeClient.exe" |
268 | VALUE "ProductName", "电子交易结算柜员系统" | 268 | VALUE "ProductName", "电子交易结算柜员系统" |
269 | - VALUE "ProductVersion", "1.0.0.1" | 269 | + VALUE "ProductVersion", "1.0.1.180808_Beta" |
270 | END | 270 | END |
271 | END | 271 | END |
272 | BLOCK "VarFileInfo" | 272 | BLOCK "VarFileInfo" |
etrade_card_client/ETradeClient/mfc_ui/MainFrm.cpp
@@ -97,7 +97,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) | @@ -97,7 +97,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) | ||
97 | 97 | ||
98 | ON_WM_TIMER() | 98 | ON_WM_TIMER() |
99 | 99 | ||
100 | - ON_MESSAGE(WM_TIME_TICK, UpdateTime) | 100 | + //ON_MESSAGE(WM_TIME_TICK, UpdateTime) |
101 | END_MESSAGE_MAP() | 101 | END_MESSAGE_MAP() |
102 | 102 | ||
103 | static UINT indicators[] = | 103 | static UINT indicators[] = |
@@ -180,24 +180,6 @@ void CMainFrame::Dump(CDumpContext& dc) const | @@ -180,24 +180,6 @@ void CMainFrame::Dump(CDumpContext& dc) const | ||
180 | 180 | ||
181 | // CMainFrame message handlers | 181 | // CMainFrame message handlers |
182 | 182 | ||
183 | -UINT TimeTick(LPVOID lParam) | ||
184 | -{ | ||
185 | - CMainFrame* pDlg = (CMainFrame*)lParam; | ||
186 | - DWORD dwStart, dwStop; | ||
187 | - dwStop = timeGetTime();// 起始值和终止值 | ||
188 | - while (TRUE) | ||
189 | - { | ||
190 | - dwStart = dwStop;// 上一次的终止值变成新的起始值 | ||
191 | - ::SendMessage(pDlg->m_hWnd, WM_TIME_TICK, 0, 0);//发送消息通知对话框该更新时间了 | ||
192 | - do | ||
193 | - { | ||
194 | - dwStop = timeGetTime(); | ||
195 | - } while (dwStop - 1000 < dwStart); | ||
196 | - } | ||
197 | - return 0; | ||
198 | -} | ||
199 | - | ||
200 | - | ||
201 | int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) | 183 | int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) |
202 | { | 184 | { |
203 | do | 185 | do |
@@ -213,11 +195,12 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) | @@ -213,11 +195,12 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) | ||
213 | if (!CreateMainFrmUI()) | 195 | if (!CreateMainFrmUI()) |
214 | break; | 196 | break; |
215 | 197 | ||
216 | - AfxBeginThread(TimeTick, this);//这个级别高一点,用来更新时间 | ||
217 | SetTimer(1, 60000, NULL);//这个级别低一点,用来从服务器获取时间 | 198 | SetTimer(1, 60000, NULL);//这个级别低一点,用来从服务器获取时间 |
199 | + SetTimer(2, 1000, NULL);//每分钟更新一次时间 | ||
218 | 200 | ||
219 | - UINT nIndex = m_status_bar.CommandToIndex(ID_INDICATOR_TIME);//获取时间指示器索引 | ||
220 | - m_status_bar.SetPaneText(nIndex, m_cTimeManager.GetServerTime()); | 201 | + UINT nIndex = m_status_bar.CommandToIndex(ID_INDICATOR_TIME);//获取时间指示器索引 |
202 | + CString sTime = m_cTimeManager.GetServerTime(); | ||
203 | + m_status_bar.SetPaneText(nIndex, sTime); | ||
221 | 204 | ||
222 | 205 | ||
223 | return 0; // Return 0 if all succeed. | 206 | return 0; // Return 0 if all succeed. |
@@ -821,12 +804,16 @@ LRESULT CMainFrame::OnCrashClose(WPARAM wParam, LPARAM lParam) | @@ -821,12 +804,16 @@ LRESULT CMainFrame::OnCrashClose(WPARAM wParam, LPARAM lParam) | ||
821 | void CMainFrame::OnTimer(UINT_PTR nIDEvent) | 804 | void CMainFrame::OnTimer(UINT_PTR nIDEvent) |
822 | { | 805 | { |
823 | CString sTime; | 806 | CString sTime; |
807 | + UINT nIndex = m_status_bar.CommandToIndex(ID_INDICATOR_TIME);//获取时间指示器索引 | ||
824 | if (nIDEvent == 1) | 808 | if (nIDEvent == 1) |
825 | { | 809 | { |
826 | sTime = m_cTimeManager.GetServerTime(); | 810 | sTime = m_cTimeManager.GetServerTime(); |
827 | - UINT nIndex = m_status_bar.CommandToIndex(ID_INDICATOR_TIME);//获取时间指示器索引 | ||
828 | - m_status_bar.SetPaneText(nIndex, sTime); | ||
829 | } | 811 | } |
812 | + else if (nIDEvent == 2) | ||
813 | + { | ||
814 | + sTime = m_cTimeManager.UpdateTime(); | ||
815 | + } | ||
816 | + m_status_bar.SetPaneText(nIndex, sTime); | ||
830 | 817 | ||
831 | CFrameWnd::OnTimer(nIDEvent); | 818 | CFrameWnd::OnTimer(nIDEvent); |
832 | } | 819 | } |