From 285129506509321686aeea3e34ad255d0db7a22b Mon Sep 17 00:00:00 2001
From: unknown <3457259728@qq.com>
Date: 星期四, 03 七月 2025 17:54:57 +0800
Subject: [PATCH] Merge branch 'master' of ssh://115.28.86.8:29418/~admin/智能网联_25-0305_617_v1

---
 Client/于文龙/code/project_client_permission_management.rar |    0 
 Client/杨高权/document/项目总结_杨高权.doc                         |    0 
 Client/Qt_ZNWL_0702_Client.7z                            |    0 
 Client/王国壮/log/日志_王国壮_0701.doc                           |    0 
 Client/王国壮/document/项目总结.md                              |   33 ++++
 Server/徐逸凡/document/项目总结.doc                             |    0 
 Server/王鹏哲/log/日志_王鹏哲_20250701.doc                       |    0 
 Client/寇百盛/document/5-项目总结2.docx                         |    0 
 Client/于文龙/document/项目总结.txt                             |   21 +++
 Server/林余杰/document/项目总结.docx                            |    0 
 Server/王鹏哲/log/日志_王鹏哲_20250630.doc                       |    0 
 Client/牛彦江/document/蚂蚁智能网联项目总结.docx                      |    0 
 Server/王鹏哲/code/logger.h                                 |  334 +++++++++++++++++++++++++++++++++++++++++++++++
 Client/于文龙/log/日志-于文龙-250702.doc                         |    0 
 Server/林余杰/log/日志_林余杰_20250701.doc                       |    0 
 Server/梁博/document/项目总结.docx                             |    0 
 Server/王鹏哲/document/项目总结.docx                            |    0 
 Client/徐蔓云/log/日志_徐蔓云_0701.doc                           |    0 
 Server/王鹏哲/log/日志_王鹏哲_20250629.doc                       |    0 
 Server/段延冲/log/项目总结.docx                                 |    0 
 Server/胡重阳/document/数据模型预处理--项目总结.docx                   |    0 
 Client/陈豪/document/项目总结.txt                              |   24 +++
 22 files changed, 412 insertions(+), 0 deletions(-)

diff --git a/Client/Qt_ZNWL_0702_Client.7z b/Client/Qt_ZNWL_0702_Client.7z
new file mode 100644
index 0000000..5102ad0
--- /dev/null
+++ b/Client/Qt_ZNWL_0702_Client.7z
Binary files differ
diff --git "a/Client/\344\272\216\346\226\207\351\276\231/code/project_client_permission_management.rar" "b/Client/\344\272\216\346\226\207\351\276\231/code/project_client_permission_management.rar"
new file mode 100644
index 0000000..a011c02
--- /dev/null
+++ "b/Client/\344\272\216\346\226\207\351\276\231/code/project_client_permission_management.rar"
Binary files differ
diff --git "a/Client/\344\272\216\346\226\207\351\276\231/document/\351\241\271\347\233\256\346\200\273\347\273\223.txt" "b/Client/\344\272\216\346\226\207\351\276\231/document/\351\241\271\347\233\256\346\200\273\347\273\223.txt"
new file mode 100644
index 0000000..c7acc55
--- /dev/null
+++ "b/Client/\344\272\216\346\226\207\351\276\231/document/\351\241\271\347\233\256\346\200\273\347\273\223.txt"
@@ -0,0 +1,21 @@
+1.璐熻矗鐨勬ā鍧楀強瀹炵幇
+    鎴戞墍瀹屾垚鐨勯」鐩ā鍧椾负鏉冮檺绠$悊妯″潡鍜屽鎴风鏇存柊妯″潡锛�
+	
+	鏉冮檺绠$悊妯″潡锛氭槸瀵规暣涓櫤鑳藉伐鍦版墍鏈夌敤鎴风殑绠$悊鍛樸�佹姤琛ㄥ鍑恒�佹棩蹇楁煡璇㈢瓑9澶ф潈闄愮殑绠$悊锛涢渶瑕佺敤鍒颁袱涓暟鎹簱琛紙瑙掕壊鏉冮檺琛ㄣ�佺敤鎴锋敞鍐岃〃锛夛紝
+	鍦║i鐣岄潰涓婏紝鍒嗕负3閮ㄥ垎锛岀涓�閮ㄥ垎涓烘煡璇紝鐢ㄦ埛鍚嶃�佸伐鍙枫�佹敞鍐屾椂闂存銆侀儴闂ㄧ瓑鐩稿叧淇℃伅鍦ㄥ搴攍ineEdit涓婅緭鍏ュ畬鎴愬悗锛岀偣鍑绘煡璇㈡寜閽紝灏嗚緭鍏ョ殑鏂囨湰淇℃伅閫氳繃socket缃�
+	缁滈�氫俊鍙戦�佺粰鏈嶅姟绔紝鏈嶅姟绔�氳繃涓庣敤鎴锋敞鍐岃〃涓殑鐩稿叧鏁版嵁杩涜姣旇緝锛屽畬鎴愬悗灏嗙浉鍏虫暟鎹紙鍖呭惈瑙掕壊鏉冮檺琛ㄤ腑鐨勮鑹插搴旀潈闄愶級鎵撳寘鍙戦�佸洖瀹㈡埛绔紝瀹㈡埛绔畬鎴愯В鍖呮搷浣滐紝
+	灏嗕俊鎭湪Ui鐣岄潰鐨則ableView涓婂睍绀猴紱ui鐣岄潰鐨勭涓変釜閮ㄥ垎灏辨槸鏄叿浣撶殑鏉冮檺绠$悊閮ㄥ垎锛屼娇鐢╟heckBox閫夋嫨瀵瑰簲鐨勬潈闄愶紝鍚屾椂瑙掕壊鎷ユ湁鐨勬潈闄愬湪鏌ヨ鎴愬姛鍚庝篃浼氬搴旂殑灞�
+	绀哄嚭鏉ワ紱褰撲慨鏀规潈闄愬悗锛岀偣鍑讳繚瀛樻寜閽紝浼氬皢checkBox瀵瑰簲鐨勬瘡涓�涓潈闄愮殑鐘舵�佸彂閫佸洖鏈嶅姟绔紝灏嗙敤鎴锋潈闄愯〃杩涜鏇存柊锛屼互淇濊瘉涓嬫閲嶆柊杩涘叆鏉冮檺绠$悊妯″潡锛岀敤鎴风殑鏉冮檺鏄�
+	鏈�鏂扮殑鏉冮檺鐘舵�併��
+	瀹㈡埛绔洿鏂版ā鍧楋細鏄墦寮�鏇存柊鐣岄潰锛岀偣鍑籾i鐣岄潰璁剧疆鐨勬鏌ユ洿鏂颁細杩炴帴鍒版湇鍔$灏嗗綋鍓嶇増鏈殑鐗堟湰鍙峰彂閫佺粰鏈嶅姟绔紱鏈嶅姟绔搷搴旓紝瀵圭増鏈彿杩涜姣旇緝锛屽垽鏂槸鍚︽洿鏂帮紝濡傛灉闇�
+	瑕佹洿鏂帮紝瀹㈡埛绔脊鍑哄搴旂殑Box瀵硅瘽妗嗚鐢ㄦ埛閫夋嫨瀵瑰簲鐨勬洿鏂版柟寮忥紙鍏ㄩ噺鏇存柊銆佸閲忔洿鏂帮級锛屼娇鐢╬rocessBar杩涘害鏉″拰鏍囩锛坸x%锛夋潵鏌ョ湅鏇存柊杩涘害锛屼笅鏂圭殑TextEdit鐢ㄦ潵
+	鏌ョ湅璇︾粏鐨勬棩蹇椾俊鎭紙鏇存柊杩囩▼涓殑鎿嶄綔鍜岀姸鎬佸彉鍖栫瓑锛夛紱鍚屾牱鏈夋暟鎹簱琛紙鐗堟湰淇℃伅琛級锛岀敤鏉ュ瓨鍌ㄧ浉鍏充俊鎭紱鍏朵腑鐨勬柇鐐归噸浼犳槸鍦ㄦ瘡娆℃洿鏂板墠閮借鍏堣繘琛岀殑涓�涓鏌ワ紝鏍规嵁
+	璧峰浣嶇疆鏉ュ垽鏂杩涜鏂偣閲嶄紶杩樻槸涓嬭浇锛屽湪瀹屾垚鏂數閲嶄紶鍚庯紝瑕佸皢涔嬪墠鐨勬柇鐐硅褰曟竻妤氫互淇濊瘉涓嶅奖鍝嶅悗缁殑鏇存柊涓嬭浇
+    
+	鍦ㄨ繃绋嬮亣鍒扮殑闂锛�
+	鏉冮檺绠$悊妯″潡涓庝笌瀹㈡埛绔洿鏂版ā鍧楅兘鏈夋�庝箞鍘诲拰鏈嶅姟绔缓绔嬬綉缁滈�氫俊浠ュ畬鎴愭暟鎹殑鏀跺彂鐩稿叧鎿嶄綔锛屽皢鏁版嵁鎴栬�呯浉鍏崇殑閰嶇疆鏂囦欢瀹屾垚鍒板鎴风涓�
+	鍔熻兘鐨勭浉鍏冲疄鐜扮敱鐩稿叧澶фā鍨嬬殑甯姪锛岃兘鏋勫疄鐜扮悊瑙o紝浣嗚繕闇�浼樺寲锛屼笌甯傞潰涓婄殑鐩稿叧搴旂敤鐨勫姛鑳界粏鑺備笂宸窛寰堝ぇ
+	
+	
+	
+				
\ No newline at end of file
diff --git "a/Client/\346\235\250\351\253\230\346\235\203/document/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc" "b/Client/\344\272\216\346\226\207\351\276\231/log/\346\227\245\345\277\227-\344\272\216\346\226\207\351\276\231-250702.doc"
similarity index 68%
rename from "Client/\346\235\250\351\253\230\346\235\203/document/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc"
rename to "Client/\344\272\216\346\226\207\351\276\231/log/\346\227\245\345\277\227-\344\272\216\346\226\207\351\276\231-250702.doc"
index c5c09ee..6cc925c 100644
--- "a/Client/\346\235\250\351\253\230\346\235\203/document/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc"
+++ "b/Client/\344\272\216\346\226\207\351\276\231/log/\346\227\245\345\277\227-\344\272\216\346\226\207\351\276\231-250702.doc"
Binary files differ
diff --git "a/Client/\345\257\207\347\231\276\347\233\233/document/5-\351\241\271\347\233\256\346\200\273\347\273\2232.docx" "b/Client/\345\257\207\347\231\276\347\233\233/document/5-\351\241\271\347\233\256\346\200\273\347\273\2232.docx"
new file mode 100644
index 0000000..0e4afc3
--- /dev/null
+++ "b/Client/\345\257\207\347\231\276\347\233\233/document/5-\351\241\271\347\233\256\346\200\273\347\273\2232.docx"
Binary files differ
diff --git "a/Client/\345\276\220\350\224\223\344\272\221/log/\346\227\245\345\277\227_\345\276\220\350\224\223\344\272\221_0701.doc" "b/Client/\345\276\220\350\224\223\344\272\221/log/\346\227\245\345\277\227_\345\276\220\350\224\223\344\272\221_0701.doc"
new file mode 100644
index 0000000..4231518
--- /dev/null
+++ "b/Client/\345\276\220\350\224\223\344\272\221/log/\346\227\245\345\277\227_\345\276\220\350\224\223\344\272\221_0701.doc"
Binary files differ
diff --git "a/Client/\346\235\250\351\253\230\346\235\203/document/\351\241\271\347\233\256\346\200\273\347\273\223_\346\235\250\351\253\230\346\235\203.doc" "b/Client/\346\235\250\351\253\230\346\235\203/document/\351\241\271\347\233\256\346\200\273\347\273\223_\346\235\250\351\253\230\346\235\203.doc"
new file mode 100644
index 0000000..7894242
--- /dev/null
+++ "b/Client/\346\235\250\351\253\230\346\235\203/document/\351\241\271\347\233\256\346\200\273\347\273\223_\346\235\250\351\253\230\346\235\203.doc"
Binary files differ
diff --git "a/Client/\347\211\233\345\275\246\346\261\237/document/\350\232\202\350\232\201\346\231\272\350\203\275\347\275\221\350\201\224\351\241\271\347\233\256\346\200\273\347\273\223.docx" "b/Client/\347\211\233\345\275\246\346\261\237/document/\350\232\202\350\232\201\346\231\272\350\203\275\347\275\221\350\201\224\351\241\271\347\233\256\346\200\273\347\273\223.docx"
new file mode 100644
index 0000000..188f360
--- /dev/null
+++ "b/Client/\347\211\233\345\275\246\346\261\237/document/\350\232\202\350\232\201\346\231\272\350\203\275\347\275\221\350\201\224\351\241\271\347\233\256\346\200\273\347\273\223.docx"
Binary files differ
diff --git "a/Client/\347\216\213\345\233\275\345\243\256/document/\351\241\271\347\233\256\346\200\273\347\273\223.md" "b/Client/\347\216\213\345\233\275\345\243\256/document/\351\241\271\347\233\256\346\200\273\347\273\223.md"
new file mode 100644
index 0000000..55c581e
--- /dev/null
+++ "b/Client/\347\216\213\345\233\275\345\243\256/document/\351\241\271\347\233\256\346\200\273\347\273\223.md"
@@ -0,0 +1,33 @@
+### 1. **瀹炴椂鐜淇℃伅灞曠ず妯″潡**
+
+#### **瀹炵幇鏂瑰紡锛�**
+
+- **纭欢涓庢暟鎹敹闆嗭細** 閫氳繃鐜板満浼犳劅鍣紙濡傛俯搴︺�佹箍搴︺�佺矇灏樻祿搴︾瓑锛夊疄鏃堕噰闆嗙幆澧冩暟鎹�傝繖浜涙暟鎹紶杈撳埌鏈嶅姟鍣ㄧ锛岄�氳繃鎺ュ彛杩涜杞彂銆�
+- **澶у睆灞曠ず锛�** 鏁版嵁閫氳繃鍓嶇鐣岄潰灞曠ず鍦ㄥぇ灞忎笂锛屽尯鍩熷垝鍒嗘樉绀轰笉鍚屼俊鎭紝鍖呮嫭鐜淇℃伅銆佹柦宸ヨ繘搴︺�佸皬鍦板浘銆佽�冨嫟鎯呭喌鍜岀洃鎺ф憚鍍忓ご鐨勫姩鎬佽疆鎾��
+- **鏁版嵁浼犺緭锛�** 鏁版嵁涓婁紶鍚庨�氳繃鏈嶅姟绔浆鍙戠粰鎵�鏈夊湪绾垮鎴风锛屽疄鐜板疄鏃跺悓姝ャ��
+
+#### **瑙e喅闂锛�**
+
+- **鏁版嵁鍑嗙‘鎬э細** 鐢变簬浼犳劅鍣ㄦ湰韬殑璇樊锛屽疄鏃舵暟鎹彲鑳戒細鍑虹幇娉㈠姩锛屽鑷村睍绀轰笉绋冲畾銆傞�氳繃绠楁硶浼樺寲銆�
+
+- **寮傛鏇存柊锛�** 灏嗘暟鎹洿鏂扮殑鎿嶄綔涓庣晫闈㈡覆鏌撹В鑰︼紝閬垮厤闃诲涓荤嚎绋嬶紝纭繚澶у睆灞曠ず娴佺晠銆�
+- **MSVC2015涓嶹indows SDK鐗堟湰鍏煎闂**锛氬皬鍦板浘闇�瑕佷娇鐢╳ebenginewidgets妯″潡锛屾墍浠ュ垏鎹㈠埌MSVC2015缂栬瘧鍣紝鍙堜骇鐢熷吋瀹归棶棰橈紝 閫氳繃**浠呭崌绾t Creator**瑙e喅锛屾柊鐗圦t Creator鍙寚瀹歋DK鐗堟湰銆�
+
+------
+
+### 2. **璀︽姤绠$悊妯″潡**
+
+#### **瀹炵幇鏂瑰紡锛�**
+
+- **璀︽姤鍒ゆ柇锛�** 閽堝鐜鏁版嵁涓殑娓╁害銆佹箍搴︺�佺矇灏樻祿搴︾瓑璁剧疆闃堝�硷紝瓒呭嚭鑼冨洿鏃惰Е鍙戣鎶ャ��
+- **闃堝�肩鐞嗭細** 绯荤粺鍏佽绠$悊鍛樺姩鎬佽皟鏁撮槇鍊硷紝纭繚绯荤粺鍦ㄤ笉鍚屾儏鍐典笅浠嶈兘鏈夋晥鎶ヨ銆�
+- **璀︽姤鍝嶅簲锛�** 褰撹鎶ヨЕ鍙戞椂锛岀‖浠剁浼氬彂鍑哄0鍏夎鎶ワ紝杞欢绔細閫氳繃鏈嶅姟绔帹閫佽鎶ヤ俊鎭埌鎵�鏈夊湪绾垮鎴风銆傝嫢闂鏈В鍐筹紝鑷姩娲惧崟鍒板�肩彮瀹ゅ鐞嗐��
+- **璀︽姤鏁版嵁搴擄細** 璁剧疆鈥滈槇鍊间俊鎭〃鈥濆拰鈥滆鎶ヤ俊鎭〃鈥濓紝鍒嗗埆瀛樺偍姣忎釜璀︽姤椤圭殑闃堝�间互鍙婂彂鐢熺殑鍏蜂綋璀︽姤璁板綍銆�
+
+#### **瑙e喅闂锛�**
+
+- **瀹炴椂鎬т笌绋冲畾鎬э細** 璀︽姤闇�瑕佸湪鍙戠敓寮傚父鐨勭灛闂磋Е鍙戯紝濡傛灉绯荤粺鍝嶅簲寤惰繜鎴栧彂鐢熼敊璇紝鍙兘閿欒繃鏈�浣冲鐞嗘椂鏈恒��
+- **鐣岄潰璁捐锛�** 纭繚璀︽姤淇℃伅鑳藉瀹炴椂銆佹竻鏅板湴灞曠ず缁欑鐞嗗憳锛岄伩鍏嶄俊鎭繃杞藉拰鏄剧ず涓嶄竴鑷淬��
+
+- **骞跺彂澶勭悊锛�** 閫氳繃骞跺彂鍜屽紓姝ユ妧鏈紝淇濊瘉璀︽姤澶勭悊鍜屾暟鎹洿鏂拌兘澶熷悓鏃惰繘琛岋紝鎻愰珮鍝嶅簲閫熷害銆�
+- **鍔ㄦ�佺晫闈紭鍖栵細** 璀︽姤淇℃伅搴斿湪涓荤晫闈㈢獊鍑烘樉绀猴紝骞剁‘淇濈晫闈㈣兘澶熷揩閫熸洿鏂帮紝閬垮厤鍥犱俊鎭繃杞藉鑷寸鐞嗕汉鍛橀仐婕忛噸瑕佷俊鎭��
\ No newline at end of file
diff --git "a/Client/\347\216\213\345\233\275\345\243\256/log/\346\227\245\345\277\227_\347\216\213\345\233\275\345\243\256_0701.doc" "b/Client/\347\216\213\345\233\275\345\243\256/log/\346\227\245\345\277\227_\347\216\213\345\233\275\345\243\256_0701.doc"
new file mode 100644
index 0000000..ee1838d
--- /dev/null
+++ "b/Client/\347\216\213\345\233\275\345\243\256/log/\346\227\245\345\277\227_\347\216\213\345\233\275\345\243\256_0701.doc"
Binary files differ
diff --git "a/Client/\351\231\210\350\261\252/document/\351\241\271\347\233\256\346\200\273\347\273\223.txt" "b/Client/\351\231\210\350\261\252/document/\351\241\271\347\233\256\346\200\273\347\273\223.txt"
new file mode 100644
index 0000000..acb4447
--- /dev/null
+++ "b/Client/\351\231\210\350\261\252/document/\351\241\271\347\233\256\346\200\273\347\273\223.txt"
@@ -0,0 +1,24 @@
+涓�銆佹ā鍧楀疄鐜拌鏄�
+
+1銆佸湴鍥炬樉绀烘ā鍧�
+鍩轰簬 QWebEngineView 瀹炵幇鍦板浘鏄剧ず锛岄�氳繃鏈湴 HTML 鏂囦欢鍔犺浇鐧惧害鍦板浘 JavaScript API锛�
+浣跨敤 WebChannel 瀹炵幇 Qt 涓� JavaScript 閫氫俊锛屽疄鐜板湴鍥惧垵濮嬪寲鍜岄厤缃鐞嗐��
+
+2銆佽澶囩鐞嗘ā鍧�
+瀹氫箟 DeviceInfo 缁撴瀯浣撴潵瀛樺偍璁惧鐨勫熀鏈俊鎭紝鍖呮嫭璁惧 ID銆佸悕绉般�佺粡绾害鍜岀姸鎬佺瓑銆�
+浣跨敤 QMap 鏁版嵁缁撴瀯瀛樺偍璁惧鏁版嵁锛屾柟渚胯繘琛岃澶囩殑澧炲垹鏀规煡鎿嶄綔銆�
+閫氳繃鐘舵�佹灇涓惧璁惧鐨勪笉鍚岀姸鎬侊紙濡傚湪绾裤�佺绾裤�佹晠闅滐級杩涜绠$悊銆�
+
+3銆� 鏁版嵁鍚屾妯″潡
+鎻愪緵璁惧淇℃伅鐨勬湰鍦颁繚瀛樺姛鑳斤紝纭繚鏁版嵁鍦ㄦ湰鍦扮殑鎸佷箙鍖栧瓨鍌ㄣ��
+璁捐鏁版嵁瀵煎叆瀵煎嚭鎺ュ彛锛屾柟渚挎暟鎹殑杩佺Щ鍜屽浠姐��
+鏀寔璁惧淇℃伅鐨勫疄鏃舵洿鏂帮紝褰撴暟鎹彂鐢熷彉鏇存椂锛岀郴缁熻嚜鍔ㄥ悓姝ユ暟鎹��
+
+浜屻�侀亣鍒扮殑闂鍙婅В鍐虫柟妗�
+
+1銆佸湴鍥炬棤娉曞姞杞斤細澧炲姞椤甸潰鍔犺浇瓒呮椂鏃堕棿鐨勮缃紝鍚屾椂瀹炵幇鑷姩閲嶈瘯鏈哄埗銆備紭鍖� WebEngine 鐨勫叏灞�閰嶇疆锛�
+娣诲姞鍔犺浇鐘舵�佹彁绀猴紝璁╃敤鎴蜂簡瑙e姞杞借繘搴︺��
+
+2銆佽澶囩姸鎬佹洿鏂颁笉鍙婃椂锛屾樉绀轰笉鍑嗙‘锛氬疄鐜扮姸鎬佹洿鏂伴槦鍒楋紝纭繚鐘舵�佹寜椤哄簭鏇存柊銆�
+娣诲姞鐘舵�佸彉鏇撮獙璇佹満鍒讹紝淇濊瘉鐘舵�佺殑鍑嗙‘鎬с�備娇鐢ㄧ姸鎬佺紦瀛樻満鍒讹紝鍑忓皯棰戠箒鐨勬暟鎹氦浜掋��
+
diff --git "a/Server/\345\276\220\351\200\270\345\207\241/document/\351\241\271\347\233\256\346\200\273\347\273\223.doc" "b/Server/\345\276\220\351\200\270\345\207\241/document/\351\241\271\347\233\256\346\200\273\347\273\223.doc"
new file mode 100644
index 0000000..48a0318
--- /dev/null
+++ "b/Server/\345\276\220\351\200\270\345\207\241/document/\351\241\271\347\233\256\346\200\273\347\273\223.doc"
Binary files differ
diff --git "a/Server/\346\236\227\344\275\231\346\235\260/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx" "b/Server/\346\236\227\344\275\231\346\235\260/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
new file mode 100644
index 0000000..7631763
--- /dev/null
+++ "b/Server/\346\236\227\344\275\231\346\235\260/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
Binary files differ
diff --git "a/Server/\346\236\227\344\275\231\346\235\260/log/\346\227\245\345\277\227_\346\236\227\344\275\231\346\235\260_20250701.doc" "b/Server/\346\236\227\344\275\231\346\235\260/log/\346\227\245\345\277\227_\346\236\227\344\275\231\346\235\260_20250701.doc"
new file mode 100644
index 0000000..61a95c1
--- /dev/null
+++ "b/Server/\346\236\227\344\275\231\346\235\260/log/\346\227\245\345\277\227_\346\236\227\344\275\231\346\235\260_20250701.doc"
Binary files differ
diff --git "a/Server/\346\242\201\345\215\232/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx" "b/Server/\346\242\201\345\215\232/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
new file mode 100644
index 0000000..e0cf8c7
--- /dev/null
+++ "b/Server/\346\242\201\345\215\232/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
Binary files differ
diff --git "a/Server/\346\256\265\345\273\266\345\206\262/log/\351\241\271\347\233\256\346\200\273\347\273\223.docx" "b/Server/\346\256\265\345\273\266\345\206\262/log/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
new file mode 100644
index 0000000..aec870d
--- /dev/null
+++ "b/Server/\346\256\265\345\273\266\345\206\262/log/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/code/logger.h" "b/Server/\347\216\213\351\271\217\345\223\262/code/logger.h"
new file mode 100644
index 0000000..10cf437
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/code/logger.h"
@@ -0,0 +1,334 @@
+#pragma once
+#include "common.h"
+#include <cstring> // 用于strerror
+#include <cstdio>  // 用于std::rename, std::remove
+#include <utility> // 用于std::forward
+// 日志级别枚举
+enum class LogLevel {
+	TRACE,   // 最详细的跟踪信息
+	DEBUG,   // 调试信息
+	INFO,    // 常规信息
+	WARNING, // 警告信息
+	ERRORL,  // 错误信息
+	FATAL    // 严重错误
+};
+
+// 将日志级别转换为字符串
+inline const char* levelToString(LogLevel level) {
+	switch (level) {
+	case LogLevel::TRACE:   return "TRACE";
+	case LogLevel::DEBUG:   return "DEBUG";
+	case LogLevel::INFO:    return "INFO";
+	case LogLevel::WARNING: return "WARNING";
+	case LogLevel::ERRORL:  return "ERROR";
+	case LogLevel::FATAL:   return "FATAL";
+	default:                return "UNKNOWN";
+	}
+}
+
+// 日志配置结构
+struct LogConfig {
+	LogLevel minLevel = LogLevel::INFO; // 最小日志级别
+	bool consoleOutput = true;          // 是否输出到控制台
+	bool fileOutput = false;            // 是否输出到文件
+	std::string logFilePath = "temp.log";// 日志文件路径
+	bool includeTimestamp = true;       // 是否包含时间戳
+	bool includeThreadId = false;       // 是否包含线程ID
+	size_t maxFileSize = 10 * 1024 * 1024; // 最大文件大小 (10MB)
+	int maxBackupFiles = 5;             // 最大备份文件数
+};
+
+class Logger {
+public:
+	// 获取日志实例 
+	static Logger& instance() {
+		static Logger instance;
+		return instance;
+	}
+
+	// 配置日志系统 
+	void configure(const LogConfig& config) {
+		std::lock_guard<std::mutex> lock(configMutex_);
+		config_ = config;
+
+		// 如果启用文件输出,确保文件已打开
+		if (config.fileOutput) {
+			openLogFile();
+		}
+	}
+
+	// 记录日志 (模板方法,支持任何可流式输出的类型)
+	template<typename... Args>
+	void log(LogLevel level, Args&&... args) {
+		if (shutdown_) return;
+
+		// 复制配置以最小化锁范围
+		LogConfig currentConfig;
+		{
+			std::lock_guard<std::mutex> lock(configMutex_);
+			if (level < config_.minLevel) return;
+			currentConfig = config_;
+		}
+
+		// 构造日志消息
+		std::ostringstream oss;
+		formatLogPrefix(oss, level, currentConfig);
+
+		using expander = int[];
+		(void)expander {
+			0, (void(oss << std::forward<Args>(args)), 0)...
+		};
+
+		// 添加换行符
+		oss << '\n';
+		std::string message = oss.str();
+
+		// 直接写入日志
+		/*writeLog(message);*/
+
+		// 将日志消息加入队列
+		{
+			std::lock_guard<std::mutex> lock(queueMutex_);
+			logQueue_.push(std::move(message));
+		}
+
+		// 通知日志线程有新消息
+		queueCond_.notify_one();
+	}
+	// 便捷日志方法
+	template<typename... Args> void trace(Args&&... args) {
+		log(LogLevel::TRACE, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void debug(Args&&... args) {
+		log(LogLevel::DEBUG, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void info(Args&&... args) {
+		log(LogLevel::INFO, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void warning(Args&&... args) {
+		log(LogLevel::WARNING, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void error(Args&&... args) {
+		log(LogLevel::ERRORL, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void fatal(Args&&... args) {
+		log(LogLevel::FATAL, std::forward<Args>(args)...);
+		flush();
+		std::exit(EXIT_FAILURE);
+	}
+
+	// 刷新日志缓冲区
+	void flush() {
+		std::lock_guard<std::mutex> lock(fileMutex_);
+		if (logFile_.is_open()) {
+			logFile_.flush();
+		}
+	}
+
+	// 析构函数
+	~Logger() {
+		shutdown();
+		flush();
+	}
+	// 安全关闭日志系统
+	void shutdown() {
+		if (shutdown_) return;
+
+		shutdown_ = true;
+		queueCond_.notify_all();  // 唤醒线程以处理退出
+
+		if (workerThread_.joinable()) {
+			workerThread_.join(); // 等待线程结束
+		}
+
+		flush();  // 最终刷新
+	}
+	// 删除拷贝构造函数和赋值运算符
+	Logger(const Logger&) = delete;
+	Logger& operator=(const Logger&) = delete;
+
+private:
+	LogConfig config_;                      // 日志配置
+	std::ofstream logFile_;                 // 日志文件流
+	std::mutex configMutex_;                // 配置互斥锁
+	std::mutex fileMutex_;                  // 文件操作互斥锁
+	std::atomic<bool> shutdown_{ false };   // 关闭标志
+	// 新增线程安全队列相关成员
+	std::queue<std::string> logQueue_;      // 日志消息队列
+	std::mutex queueMutex_;                 // 队列互斥锁
+	std::condition_variable queueCond_;     // 队列条件变量
+	std::thread workerThread_;              // 日志写入线程
+
+	// 私有构造函数
+	Logger() {
+		// 启动日志写入线程
+		workerThread_ = std::thread(&Logger::processLogs, this);
+	};
+	// 日志处理线程函数
+	void processLogs() {
+		while (true) {
+			std::unique_lock<std::mutex> lock(queueMutex_);
+
+			// 等待新日志或关闭信号
+			queueCond_.wait(lock, [this] {
+				return !logQueue_.empty() || shutdown_;
+				});
+
+			// 处理关闭信号
+			if (shutdown_ && logQueue_.empty()) {
+				break;
+			}
+
+			// 取出所有待处理日志
+			std::queue<std::string> tempQueue;
+			std::swap(logQueue_, tempQueue);
+			lock.unlock();
+
+			// 处理所有取出的日志
+			while (!tempQueue.empty()) {
+				writeLog(tempQueue.front());
+				tempQueue.pop();
+			}
+		}
+	}
+
+	// 格式化日志前缀
+	void formatLogPrefix(std::ostringstream& oss, LogLevel level, const LogConfig& config) {
+		// 日志级别标签
+		oss << "[" << levelToString(level) << "] ";
+
+		// 时间戳
+		if (config.includeTimestamp) {
+			auto now = std::chrono::system_clock::now();
+			auto in_time_t = std::chrono::system_clock::to_time_t(now);
+			auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
+				now.time_since_epoch()) % 1000;
+
+			std::tm tm;
+#ifdef _WIN32
+			localtime_s(&tm, &in_time_t);
+#else
+			localtime_r(&in_time_t, &tm);
+#endif
+
+			oss << std::put_time(&tm, "%Y-%m-%d %H:%M:%S");
+			oss << '.' << std::setfill('0') << std::setw(3) << ms.count() << " ";
+		}
+
+		// 线程ID
+		if (config.includeThreadId) {
+			oss << "[Thread:" << std::this_thread::get_id() << "] ";
+		}
+	}
+
+	// 打开日志文件
+	void openLogFile() {
+		// 关闭当前文件(如果已打开)
+		if (logFile_.is_open()) {
+			logFile_.close();
+		}
+
+		// 检查文件大小,必要时轮转
+		std::ifstream in(config_.logFilePath, std::ios::binary | std::ios::ate);
+		if (in) {
+			auto size = in.tellg();
+			if (static_cast<size_t>(size) >= config_.maxFileSize) {
+				rotateLogFiles();
+			}
+		}
+		in.close();
+
+		// 打开新日志文件
+		logFile_.open(config_.logFilePath, std::ios::out | std::ios::app);
+		if (!logFile_.is_open()) {
+			std::cerr << "Failed to open log file: "
+				<< config_.logFilePath << " - "
+				<< errno << std::endl;
+		}
+	}
+
+	// 轮转日志文件
+	void rotateLogFiles() {
+		// 删除最旧的备份文件
+		if (config_.maxBackupFiles > 0) {
+			std::string oldestFile = config_.logFilePath + "." + std::to_string(config_.maxBackupFiles);
+			std::remove(oldestFile.c_str());
+
+			// 重命名现有备份文件
+			for (int i = config_.maxBackupFiles - 1; i >= 1; i--) {
+				std::string oldName = config_.logFilePath + "." + std::to_string(i);
+				std::string newName = config_.logFilePath + "." + std::to_string(i + 1);
+
+				if (fileExists(oldName)) {
+					std::rename(oldName.c_str(), newName.c_str());
+				}
+			}
+
+			// 重命名当前日志文件为备份1
+			if (fileExists(config_.logFilePath)) {
+				std::string newName = config_.logFilePath + ".1";
+				std::rename(config_.logFilePath.c_str(), newName.c_str());
+			}
+		}
+	}
+
+	// 检查文件是否存在
+	bool fileExists(const std::string& path) {
+		std::ifstream f(path);
+		return f.good();
+	}
+
+	// 实际写入日志
+	void writeLog(const std::string& message) {
+		LogConfig currentConfig;
+		{
+			std::lock_guard<std::mutex> configLock(configMutex_);
+			currentConfig = config_;
+		}
+
+		// 输出到控制台
+		if (currentConfig.consoleOutput) {
+			if (message.find("[ERROR]") != std::string::npos ||
+				message.find("[FATAL]") != std::string::npos) {
+				std::cerr << message;
+			}
+			else {
+				std::cout << message;
+			}
+		}
+
+		// 输出到文件
+		if (currentConfig.fileOutput) {
+			std::lock_guard<std::mutex> fileLock(fileMutex_);
+			if (!logFile_.is_open() || !logFile_.good()) {
+				openLogFile();
+			}
+
+			if (logFile_.good()) {
+				logFile_ << message;
+				logFile_.flush(); // 实时刷新到磁盘
+
+				// 检查文件大小
+				auto pos = logFile_.tellp();
+				if (static_cast<size_t>(pos) >= currentConfig.maxFileSize) {
+					logFile_.close();
+					rotateLogFiles();
+					logFile_.open(currentConfig.logFilePath, std::ios::out | std::ios::app);
+				}
+			}
+		}
+	}
+};
+
+// 日志宏定义 - 提供文件名和行号信息
+#define LOG_TRACE(...)   Logger::instance().trace("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_DEBUG(...)   Logger::instance().debug("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_INFO(...)    Logger::instance().info(__VA_ARGS__)
+#define LOG_WARN(...)    Logger::instance().warning("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_ERROR(...)   Logger::instance().error("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_FATAL(...)   Logger::instance().fatal("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
\ No newline at end of file
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx" "b/Server/\347\216\213\351\271\217\345\223\262/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
new file mode 100644
index 0000000..625faff
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250629.doc" "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250629.doc"
new file mode 100644
index 0000000..25b1c97
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250629.doc"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250630.doc" "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250630.doc"
new file mode 100644
index 0000000..78def34
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250630.doc"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250701.doc" "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250701.doc"
new file mode 100644
index 0000000..61462ad
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250701.doc"
Binary files differ
diff --git "a/Server/\350\203\241\351\207\215\351\230\263/document/\346\225\260\346\215\256\346\250\241\345\236\213\351\242\204\345\244\204\347\220\206--\351\241\271\347\233\256\346\200\273\347\273\223.docx" "b/Server/\350\203\241\351\207\215\351\230\263/document/\346\225\260\346\215\256\346\250\241\345\236\213\351\242\204\345\244\204\347\220\206--\351\241\271\347\233\256\346\200\273\347\273\223.docx"
new file mode 100644
index 0000000..25f3432
--- /dev/null
+++ "b/Server/\350\203\241\351\207\215\351\230\263/document/\346\225\260\346\215\256\346\250\241\345\236\213\351\242\204\345\244\204\347\220\206--\351\241\271\347\233\256\346\200\273\347\273\223.docx"
Binary files differ

--
Gitblit v1.8.0