From 7771cfa2ee187ea9777d5725b75c58e3b49b791c Mon Sep 17 00:00:00 2001 From: Administrator <3174665893@qq.com> Date: 星期二, 05 十一月 2024 15:04:39 +0800 Subject: [PATCH] Merge branch 'master' of ssh://115.28.86.8:29418/~admin/昆仑_1025 --- Client/朱航/log/朱航1103.doc | 0 Client/黎弘霖/log/设备管理_黎弘霖_1104.doc | 0 Server/马渝杭/code/versionmanage.cpp | 251 +++++++++++ Client/李宵增/log/历史查询_李宵增_1102.doc | 0 Server/马渝杭/code/type.h.autosave | 69 +++ 表.docx | 0 Server/李转转/log/配置管理_李转转_1105.doc | 0 Client/宋昊昳/log/日志_宋昊昳_1104.doc | 0 Client/王鑫鑫/log/日志_王鑫鑫_1105.doc | 0 Server/马渝杭/log/日志_马渝杭_20241104.doc | 0 Client/郑凯文/log/郑凯文1104.doc | 0 Server/陈楚丹/log/日志_陈楚丹_1102.doc | 0 Server/马渝杭/code/versionmanage.ui | 24 + Server/马渝杭/code/versionmanage_main.cpp | 9 Client/申烜/log/~WRL0001.tmp | 0 Client/王鑫鑫/log/日志_王鑫鑫_1104.doc | 0 Server/马渝杭/code/versionmanage.h | 60 ++ Client/黎弘霖/log/设备管理_黎弘霖_1102.doc | 0 Client/龚启祥/log/日志模板_龚启祥_1104.doc | 0 kunlun110401.sql | 200 +++++++++ Client/刘子航/log/日志_刘子航_1105.doc | 0 Client/郑凯文/log/郑凯文1105.doc | 0 Client/姜可庚/log/姜可庚_1104.doc | 0 Client/刘子航/log/日志_刘子航_1104.doc | 0 Server/王琨元/log/日志模板_王琨元_1103 .doc | 0 Client/申烜/log/日志_申烜_1104.doc | 0 Client/刘子航/document/昆仑_警报管理.docx | 0 Server/陈楚丹/log/日志_陈楚丹_1104.doc | 0 Server/马渝杭/code/server_version.pro | 29 + Server/马渝杭/code/common.h | 277 +++++++----- Server/马渝杭/log/20241104昆仑日报.doc | 0 /dev/null | 0 Client/宋昊昳/log/日志_宋昊昳_1101.doc | 0 Server/马渝杭/code/server_version.pro.user | 318 ++++++++++++++ Client/冀浩昶/log/日志_冀浩昶_1104.doc | 0 Client/宋昊昳/log/日志_宋昊昳_1105.doc | 0 Server/李转转/log/配置管理_李转转_1104.doc | 0 common.h | 33 + 38 files changed, 1,139 insertions(+), 131 deletions(-) diff --git "a/Client/\345\206\200\346\265\251\346\230\266/log/\346\227\245\345\277\227_\345\206\200\346\265\251\346\230\266_1104.doc" "b/Client/\345\206\200\346\265\251\346\230\266/log/\346\227\245\345\277\227_\345\206\200\346\265\251\346\230\266_1104.doc" new file mode 100644 index 0000000..3ea0cc8 --- /dev/null +++ "b/Client/\345\206\200\346\265\251\346\230\266/log/\346\227\245\345\277\227_\345\206\200\346\265\251\346\230\266_1104.doc" Binary files differ diff --git "a/Client/\345\210\230\345\255\220\350\210\252/document/\346\230\206\344\273\221_\350\255\246\346\212\245\347\256\241\347\220\206.docx" "b/Client/\345\210\230\345\255\220\350\210\252/document/\346\230\206\344\273\221_\350\255\246\346\212\245\347\256\241\347\220\206.docx" index a8e3721..d18bcbb 100644 --- "a/Client/\345\210\230\345\255\220\350\210\252/document/\346\230\206\344\273\221_\350\255\246\346\212\245\347\256\241\347\220\206.docx" +++ "b/Client/\345\210\230\345\255\220\350\210\252/document/\346\230\206\344\273\221_\350\255\246\346\212\245\347\256\241\347\220\206.docx" Binary files differ diff --git "a/Client/\345\210\230\345\255\220\350\210\252/log/\346\227\245\345\277\227_\345\210\230\345\255\220\350\210\252_1104.doc" "b/Client/\345\210\230\345\255\220\350\210\252/log/\346\227\245\345\277\227_\345\210\230\345\255\220\350\210\252_1104.doc" new file mode 100644 index 0000000..de344e6 --- /dev/null +++ "b/Client/\345\210\230\345\255\220\350\210\252/log/\346\227\245\345\277\227_\345\210\230\345\255\220\350\210\252_1104.doc" Binary files differ diff --git "a/Client/\345\210\230\345\255\220\350\210\252/log/\346\227\245\345\277\227_\345\210\230\345\255\220\350\210\252_1105.doc" "b/Client/\345\210\230\345\255\220\350\210\252/log/\346\227\245\345\277\227_\345\210\230\345\255\220\350\210\252_1105.doc" new file mode 100644 index 0000000..fe64693 --- /dev/null +++ "b/Client/\345\210\230\345\255\220\350\210\252/log/\346\227\245\345\277\227_\345\210\230\345\255\220\350\210\252_1105.doc" Binary files differ diff --git "a/Client/\345\247\234\345\217\257\345\272\232/log/\345\247\234\345\217\257\345\272\232_1104.doc" "b/Client/\345\247\234\345\217\257\345\272\232/log/\345\247\234\345\217\257\345\272\232_1104.doc" new file mode 100644 index 0000000..5e2f2f6 --- /dev/null +++ "b/Client/\345\247\234\345\217\257\345\272\232/log/\345\247\234\345\217\257\345\272\232_1104.doc" Binary files differ diff --git "a/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1101.doc" "b/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1101.doc" index b906225..8353c3b 100644 --- "a/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1101.doc" +++ "b/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1101.doc" Binary files differ diff --git "a/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1104.doc" "b/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1104.doc" new file mode 100644 index 0000000..0698228 --- /dev/null +++ "b/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1104.doc" Binary files differ diff --git "a/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1105.doc" "b/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1105.doc" new file mode 100644 index 0000000..40827ce --- /dev/null +++ "b/Client/\345\256\213\346\230\212\346\230\263/log/\346\227\245\345\277\227_\345\256\213\346\230\212\346\230\263_1105.doc" Binary files differ diff --git "a/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521103.doc" "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521103.doc" new file mode 100644 index 0000000..6c74468 --- /dev/null +++ "b/Client/\346\234\261\350\210\252/log/\346\234\261\350\210\2521103.doc" Binary files differ diff --git "a/Client/\346\235\216\345\256\265\345\242\236/log/\345\216\206\345\217\262\346\237\245\350\257\242_\346\235\216\345\256\265\345\242\236_1102.doc" "b/Client/\346\235\216\345\256\265\345\242\236/log/\345\216\206\345\217\262\346\237\245\350\257\242_\346\235\216\345\256\265\345\242\236_1102.doc" new file mode 100644 index 0000000..096b020 --- /dev/null +++ "b/Client/\346\235\216\345\256\265\345\242\236/log/\345\216\206\345\217\262\346\237\245\350\257\242_\346\235\216\345\256\265\345\242\236_1102.doc" Binary files differ diff --git "a/Client/\347\216\213\351\221\253\351\221\253/log/\346\227\245\345\277\227_\347\216\213\351\221\253\351\221\253_1104.doc" "b/Client/\347\216\213\351\221\253\351\221\253/log/\346\227\245\345\277\227_\347\216\213\351\221\253\351\221\253_1104.doc" new file mode 100644 index 0000000..ce5e71e --- /dev/null +++ "b/Client/\347\216\213\351\221\253\351\221\253/log/\346\227\245\345\277\227_\347\216\213\351\221\253\351\221\253_1104.doc" Binary files differ diff --git "a/Client/\347\216\213\351\221\253\351\221\253/log/\346\227\245\345\277\227_\347\216\213\351\221\253\351\221\253_1105.doc" "b/Client/\347\216\213\351\221\253\351\221\253/log/\346\227\245\345\277\227_\347\216\213\351\221\253\351\221\253_1105.doc" new file mode 100644 index 0000000..fd849a0 --- /dev/null +++ "b/Client/\347\216\213\351\221\253\351\221\253/log/\346\227\245\345\277\227_\347\216\213\351\221\253\351\221\253_1105.doc" Binary files differ diff --git "a/Client/\347\224\263\347\203\234/log/~WRL0001.tmp" "b/Client/\347\224\263\347\203\234/log/~WRL0001.tmp" new file mode 100644 index 0000000..ce06492 --- /dev/null +++ "b/Client/\347\224\263\347\203\234/log/~WRL0001.tmp" Binary files differ diff --git "a/Client/\347\224\263\347\203\234/log/\346\227\245\345\277\227_\347\224\263\347\203\234_1104.doc" "b/Client/\347\224\263\347\203\234/log/\346\227\245\345\277\227_\347\224\263\347\203\234_1104.doc" new file mode 100644 index 0000000..113cf38 --- /dev/null +++ "b/Client/\347\224\263\347\203\234/log/\346\227\245\345\277\227_\347\224\263\347\203\234_1104.doc" Binary files differ diff --git "a/Client/\351\203\221\345\207\257\346\226\207/log/\351\203\221\345\207\257\346\226\2071104.doc" "b/Client/\351\203\221\345\207\257\346\226\207/log/\351\203\221\345\207\257\346\226\2071104.doc" new file mode 100644 index 0000000..5c4a25e --- /dev/null +++ "b/Client/\351\203\221\345\207\257\346\226\207/log/\351\203\221\345\207\257\346\226\2071104.doc" Binary files differ diff --git "a/Client/\351\203\221\345\207\257\346\226\207/log/\351\203\221\345\207\257\346\226\2071105.doc" "b/Client/\351\203\221\345\207\257\346\226\207/log/\351\203\221\345\207\257\346\226\2071105.doc" new file mode 100644 index 0000000..6888c5d --- /dev/null +++ "b/Client/\351\203\221\345\207\257\346\226\207/log/\351\203\221\345\207\257\346\226\2071105.doc" Binary files differ diff --git "a/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1102.doc" "b/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1102.doc" index a5753d6..7d469e3 100644 --- "a/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1102.doc" +++ "b/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1102.doc" Binary files differ diff --git "a/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1104.doc" "b/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1104.doc" new file mode 100644 index 0000000..5f518a9 --- /dev/null +++ "b/Client/\351\273\216\345\274\230\351\234\226/log/\350\256\276\345\244\207\347\256\241\347\220\206_\351\273\216\345\274\230\351\234\226_1104.doc" Binary files differ diff --git "a/Client/\351\276\232\345\220\257\347\245\245/log/\346\227\245\345\277\227\346\250\241\346\235\277_\351\276\232\345\220\257\347\245\245_1104.doc" "b/Client/\351\276\232\345\220\257\347\245\245/log/\346\227\245\345\277\227\346\250\241\346\235\277_\351\276\232\345\220\257\347\245\245_1104.doc" new file mode 100644 index 0000000..975c519 --- /dev/null +++ "b/Client/\351\276\232\345\220\257\347\245\245/log/\346\227\245\345\277\227\346\250\241\346\235\277_\351\276\232\345\220\257\347\245\245_1104.doc" Binary files differ diff --git "a/Server/\346\235\216\350\275\254\350\275\254/log/\351\205\215\347\275\256\347\256\241\347\220\206_\346\235\216\350\275\254\350\275\254_1104.doc" "b/Server/\346\235\216\350\275\254\350\275\254/log/\351\205\215\347\275\256\347\256\241\347\220\206_\346\235\216\350\275\254\350\275\254_1104.doc" new file mode 100644 index 0000000..28b9858 --- /dev/null +++ "b/Server/\346\235\216\350\275\254\350\275\254/log/\351\205\215\347\275\256\347\256\241\347\220\206_\346\235\216\350\275\254\350\275\254_1104.doc" Binary files differ diff --git "a/Server/\346\235\216\350\275\254\350\275\254/log/\351\205\215\347\275\256\347\256\241\347\220\206_\346\235\216\350\275\254\350\275\254_1105.doc" "b/Server/\346\235\216\350\275\254\350\275\254/log/\351\205\215\347\275\256\347\256\241\347\220\206_\346\235\216\350\275\254\350\275\254_1105.doc" new file mode 100644 index 0000000..7eb435b --- /dev/null +++ "b/Server/\346\235\216\350\275\254\350\275\254/log/\351\205\215\347\275\256\347\256\241\347\220\206_\346\235\216\350\275\254\350\275\254_1105.doc" Binary files differ diff --git "a/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250\0501\051.docx" "b/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250\0501\051.docx" deleted file mode 100644 index 289d78b..0000000 --- "a/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250\0501\051.docx" +++ /dev/null Binary files differ diff --git "a/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250.docx" "b/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250.docx" deleted file mode 100644 index 2768b80..0000000 --- "a/Server/\347\216\213\347\220\250\345\205\203/document/\350\241\250.docx" +++ /dev/null Binary files differ diff --git "a/Server/\347\216\213\347\220\250\345\205\203/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\216\213\347\220\250\345\205\203_1103 .doc" "b/Server/\347\216\213\347\220\250\345\205\203/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\216\213\347\220\250\345\205\203_1103 .doc" new file mode 100644 index 0000000..9461d22 --- /dev/null +++ "b/Server/\347\216\213\347\220\250\345\205\203/log/\346\227\245\345\277\227\346\250\241\346\235\277_\347\216\213\347\220\250\345\205\203_1103 .doc" Binary files differ diff --git "a/Server/\351\231\210\346\245\232\344\270\271/log/\346\227\245\345\277\227_\351\231\210\346\245\232\344\270\271_1102.doc" "b/Server/\351\231\210\346\245\232\344\270\271/log/\346\227\245\345\277\227_\351\231\210\346\245\232\344\270\271_1102.doc" new file mode 100644 index 0000000..e41c22c --- /dev/null +++ "b/Server/\351\231\210\346\245\232\344\270\271/log/\346\227\245\345\277\227_\351\231\210\346\245\232\344\270\271_1102.doc" Binary files differ diff --git "a/Server/\351\231\210\346\245\232\344\270\271/log/\346\227\245\345\277\227_\351\231\210\346\245\232\344\270\271_1104.doc" "b/Server/\351\231\210\346\245\232\344\270\271/log/\346\227\245\345\277\227_\351\231\210\346\245\232\344\270\271_1104.doc" new file mode 100644 index 0000000..6ab23ea --- /dev/null +++ "b/Server/\351\231\210\346\245\232\344\270\271/log/\346\227\245\345\277\227_\351\231\210\346\245\232\344\270\271_1104.doc" Binary files differ diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/common.h" "b/Server/\351\251\254\346\270\235\346\235\255/code/common.h" index b6c770d..0b1523a 100644 --- "a/Server/\351\251\254\346\270\235\346\235\255/code/common.h" +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/common.h" @@ -1,162 +1,195 @@ #ifndef COMMON_H #define COMMON_H -#include <string.h> -//绉佹湁鍗忚灏佽 -//璇锋眰鍝嶅簲缁撴瀯浣撴湁鏁版嵁澶�+鏁版嵁浣� - -//浣跨敤鏋氫妇鏉ョ粺涓�鍚勭鍔熻兘绫诲瀷銆� +#include <string.h> enum TypeInfo{ - LOGIN_REQ, //鐧诲綍璇锋眰 - LOGIN_RES, - VERSIONUPDATA_REQ, // 鐗堟湰鏇存柊璇锋眰 - VERSIONUPDATA_RES, - VERSIONNUM_REQ, //鐗堟湰鍙疯姹� - VERSIONNUM_RES, - UPLOAD_FILE_REQ, - UPLOAD_FILE_RES, - VERSIONINFOENTRY_REQ, //鐗堟湰淇℃伅鏉$洰 - VERSIONINFOENTRY_RES + + //鑷姩鍗囩骇 + VERSION_NUM_REQ, // 鐗堟湰鍙疯姹� + VERSION_NUM_RES, // 鐗堟湰鍙峰搷搴� + UPLOAD_FILE_REQ, // 涓婁紶鏂囦欢鐨勮姹� + UPLOAD_FILE_RES, // 涓婁紶鏂囦欢鐨勫搷搴� + VERSION_INFOENTRY_REQ, // 鐗堟湰淇℃伅褰曞叆璇锋眰 + VERSION_INFOENTRY_RES, //鐗堟湰淇℃伅褰曞叆鍝嶅簲 + VERSION_UPDATE_REQ, // 鐗堟湰鏇存柊璇锋眰 + VERSION_UPDATE_RES, // 鐗堟湰鏇存柊鍝嶅簲 + FILE_DOWNLOADS_REQ, // 鐗堟湰鏇存柊鏂囦欢涓嬭浇璇锋眰 + FILE_DOWNLOADS_RES, // 鐗堟湰鏇存柊鏂囦欢涓嬭浇鍝嶅簲 + DOWNLOAD_SUCCESSFULLY_RES, // 鏇存柊鏂囦欢涓嬭浇鎴愬姛鐨勫搷搴� + + }; -struct Head -{ - int type; // 鍔熻兘绫诲瀷锛岃В鍐虫瘡涓寘鐨勫叿浣撲綔鐢紝鍖哄垎涓氬姟 - int len; //灏佸寘闀垮害 - -}; -// 鐧诲綍涓氬姟 -// 鐧诲綍璇锋眰 -struct LoginReq -{ - Head head; - - char user_name[32]; - char password[32]; - LoginReq(){ - head.type=LOGIN_REQ; - head.len=sizeof(LoginReq); - } -}; -//鐧诲綍鏉冮檺缁撴瀯浣� -struct PermissionInfo -{ - int admin; //绠$悊鍛� - int history; //鍘嗗彶鏌ョ湅 - int version_manager;//鐗堟湰绠$悊 - int log_search; //鏃ュ織鏌ョ湅 - int flaw_mark ; //缂洪櫡鏍囪 - +struct Head{ + int type; + int len; }; -//鐧诲綍鍝嶅簲 -struct LoginRes +//鑷姩鍗囩骇 +struct VersionNumReq // 鐗堟湰鍙疯姹� { Head head; - char user_name[32]; - int state; // 鐧诲綍鐘舵�� - PermissionInfo per; - LoginRes(){ - head.type=LOGIN_RES; - head.len=sizeof(LoginRes); + VersionNumReq() { + head.type = VERSION_NUM_REQ; + head.len = sizeof(VersionNumReq); } }; -struct VersionUpdataReq //鐗堟湰鏇存柊璇锋眰鐨勭粨鏋勪綋 + +struct VersionNumRes // 鐗堟湰鍙峰搷搴� { Head head; - VersionUpdataReq(){ - head.type=VERSIONUPDATA_REQ; - head.len=sizeof(VersionUpdataReq); + char versionId[64]; // 鐗堟湰鍙� + VersionNumRes() { + head.type = VERSION_NUM_RES; + head.len = sizeof(VersionNumRes); } }; -struct VersionUpdataRes //鐗堟湰鏇存柊鍝嶅簲鐨勭粨鏋勪綋 -{ - Head head; - char version_id[64]; // 鐗堟湰鍙� - char update_date[32]; //鏇存柊鏃堕棿 - char file_path[128]; //鏈嶅姟绔彁渚涙渶鏂扮増鏈殑鏈湴璺緞 - VersionUpdataRes(){ - head.type=VERSIONUPDATA_REQ; - head.len=sizeof(VersionUpdataReq); - } -}; -struct VersionNumReq //鐗堟湰鍙疯姹� -{ - Head head; - VersionNumReq(){ - head.type=VERSIONNUM_REQ; - head.len=sizeof(VersionNumReq); - } -}; -struct VersionNumRes -{ - Head head; - char version_id[64]; - VersionNumRes(){ - head.type=VERSIONNUM_RES; - head.len=sizeof(VersionNumRes); - } -}; -//鏂囦欢浼犺緭鍔熻兘 + +// 鏂囦欢浼犺緭 struct FileInfo { - char file_name[256]; - long long file_size; - char s_filepath[32]; - char content[0]; //鏌旀�ф暟缁勭粨鏋勪綋 + char fileName[256]; + long long fileSize; + char s_filepath[128]; + char content[0]; }; -struct UploadFileReq + +struct UploadFileReq // 涓婁紶鏂囦欢鐨勮姹� { Head head; FileInfo fileInfo; - UploadFileReq(){ - head.type=UPLOAD_FILE_REQ; - head.len=sizeof(UploadFileReq); + UploadFileReq() { + head.type = UPLOAD_FILE_REQ; + head.len = sizeof(UploadFileReq); } }; -struct UploadFileRes -{ - Head head; - int status; - long long file_size; //鎬诲ぇ灏� - long long file_cuesize; //鏂囦欢宸蹭紶澶у皬 - UploadFileRes(){ - head.type=UPLOAD_FILE_RES; - head.len=sizeof(UploadFileRes); - } -}; -//鐗堟湰淇℃伅褰曞叆---鐗堟湰淇℃伅鏉$洰 -struct VersionInfoEntryReq -{ - Head head; - char version_id[64]; - char version_id_old[64]; - char s_filepath[32]; //鏈嶅姟鍣ㄦ斁鏈�鏂扮増鏈殑璺緞 - char version_description[256]; //鏇存柊鎻忚堪 - char version_creattime[32]; //鏇存柊鏃堕棿 - char filename[16][128]; //鏀寔澶氭枃浠朵笂浼� - long long filesize[16]; //鏂囦欢缁勭殑澶у皬 - char c_filepath[16][128]; //瀹㈡埛绔殑瀹夎璺緞 - int filenum; //涓�娆$増鏈洿鏂版墍闇�鏂囦欢涓暟 - VersionInfoEntryReq(){ - head.type=VERSIONINFOENTRY_REQ; - head.len=sizeof(VersionInfoEntryReq); +struct UploadFileRes { // 涓婁紶鏂囦欢鐨勫搷搴� + Head head; + bool state = false; + char fileName[256]; + long long file_size; + UploadFileRes() + { + head.type = UPLOAD_FILE_RES; + head.len = sizeof(UploadFileRes); } }; -//鍝嶅簲 + +// 鐗堟湰淇℃伅褰曞叆 +// 璇锋眰 +//struct VersionInfoEntryReq { +// Head head; +// char version_id[64]; // 鐗堟湰鍙� +// char version_id_old[64]; // 涓婁竴涓増鏈彿 +// char s_filepath[32]; //鏈嶅姟鍣ㄦ斁鏈�鏂扮増鏈殑璺緞 +// char version_description[256]; //鏇存柊鍐呭 +// char version_creattime[32]; // 鏇存柊鏃堕棿 +// char filename[16][128]; +// long long filesize[16]; +// char c_filepath[16][128]; +// int fileNum; + +// VersionInfoEntryReq() +// { +// head.type = VERSIONINFOENTRY_REQ; +// head.len = sizeof(VersionInfoEntryReq); +// } +//}; + +struct VersionInfoEntryReq { + Head head; + char versionId[64]; // 鐗堟湰鍙� + char versionIdOld[64]; // 涓婁竴涓増鏈彿 + int fileNum; + char context[0]; //鍖呭惈涓嬭浇鏂囦欢淇℃伅 + + VersionInfoEntryReq() + { + head.type = VERSION_INFOENTRY_REQ; + head.len = sizeof(VersionInfoEntryReq); + } +}; + +// 鐗堟湰淇℃伅褰曞叆鍝嶅簲 struct VersionInfoEntryRes { Head head; - char version_id_old[64]; // 鐗堟湰鍙� + bool state = false; VersionInfoEntryRes() { - head.type = VERSIONINFOENTRY_RES; + head.type = VERSION_INFOENTRY_RES; head.len = sizeof(VersionInfoEntryRes); } }; +// 鐗堟湰鏇存柊璇锋眰 +struct VersionUpdateReq { + Head head; + char curVersionId[64]; // 鐗堟湰鍙� + VersionUpdateReq() + { + head.type = VERSION_UPDATE_REQ; + head.len = sizeof(VersionUpdateReq); + } +}; + +// 鐗堟湰鏇存柊鍝嶅簲 +struct VersionUpdateRes { + Head head; + bool state = false; + char versionId[64]; // 鐗堟湰鍙� + char updateDate[32]; // 鏇存柊鏃堕棿 + char versionDescription[1024]; //鏇存柊鎻忚堪 + + VersionUpdateRes() + { + head.type = VERSION_UPDATE_RES; + head.len = sizeof(VersionUpdateRes); + } +}; + +// 鐗堟湰鏇存柊鏂囦欢涓嬭浇璇锋眰 +struct FileDownloadsReq { + Head head; + char versionId[64]; // 鐗堟湰鍙� + FileDownloadsReq() + { + head.type = FILE_DOWNLOADS_REQ; + head.len = sizeof(FileDownloadsReq); + } +}; + +// 鐗堟湰鏇存柊鏂囦欢涓嬭浇鍝嶅簲 +struct FileDownloadsRes { + Head head; + char versionId[64]; // 鐗堟湰鍙� + char filename[128]; //鏂囦欢鍚� + long long filesize; //鏂囦欢澶у皬 + char c_filepath[128]; //瀹㈡埛绔斁鏈�鏂扮増鏈殑鏈湴璺緞 + int fileNum; // 鏂囦欢鏁伴噺 + long long allFileSize; // 鏂囦欢鎬诲ぇ灏� + char content[0]; + FileDownloadsRes() + { + head.type = FILE_DOWNLOADS_RES; + head.len = sizeof(FileDownloadsRes); + } +}; + +// 鏇存柊鏂囦欢涓嬭浇鎴愬姛鐨勫搷搴� +struct DownloadSuccessfullyRes { + Head head; + bool state = false; + char fileName[256]; + long long fileSize; + DownloadSuccessfullyRes() + { + head.type = DOWNLOAD_SUCCESSFULLY_RES; + head.len = sizeof(DownloadSuccessfullyRes); + } +}; diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/server_version.pro" "b/Server/\351\251\254\346\270\235\346\235\255/code/server_version.pro" new file mode 100644 index 0000000..9c996af --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/server_version.pro" @@ -0,0 +1,29 @@ + + +QT += core gui +QT += network + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++17 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +HEADERS += \ + versionmanage.h \ + common.h \ + +SOURCES += \ + versionmanage_main.cpp \ + versionmanage.cpp \ + +FORMS += \ + versionmanage.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +DISTFILES += diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/server_version.pro.user" "b/Server/\351\251\254\346\270\235\346\235\255/code/server_version.pro.user" new file mode 100644 index 0000000..e262b77 --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/server_version.pro.user" @@ -0,0 +1,318 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE QtCreatorProject> +<!-- Written by QtCreator 4.5.0, 2024-11-02T23:00:40. --> +<qtcreator> + <data> + <variable>EnvironmentId</variable> + <value type="QByteArray">{7612f2ce-8739-48f9-bb70-81cdc706b9e5}</value> + </data> + <data> + <variable>ProjectExplorer.Project.ActiveTarget</variable> + <value type="int">0</value> + </data> + <data> + <variable>ProjectExplorer.Project.EditorSettings</variable> + <valuemap type="QVariantMap"> + <value type="bool" key="EditorConfiguration.AutoIndent">true</value> + <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> + <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> + <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> + <value type="QString" key="language">Cpp</value> + <valuemap type="QVariantMap" key="value"> + <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> + </valuemap> + </valuemap> + <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> + <value type="QString" key="language">QmlJS</value> + <valuemap type="QVariantMap" key="value"> + <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> + </valuemap> + </valuemap> + <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> + <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> + <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> + <value type="int" key="EditorConfiguration.IndentSize">4</value> + <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> + <value type="int" key="EditorConfiguration.MarginColumn">80</value> + <value type="bool" key="EditorConfiguration.MouseHiding">true</value> + <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> + <value type="int" key="EditorConfiguration.PaddingMode">1</value> + <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> + <value type="bool" key="EditorConfiguration.ShowMargin">false</value> + <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> + <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value> + <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> + <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> + <value type="int" key="EditorConfiguration.TabSize">8</value> + <value type="bool" key="EditorConfiguration.UseGlobal">true</value> + <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> + <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> + <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> + <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> + <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> + </valuemap> + </data> + <data> + <variable>ProjectExplorer.Project.PluginSettings</variable> + <valuemap type="QVariantMap"/> + </data> + <data> + <variable>ProjectExplorer.Project.Target.0</variable> + <valuemap type="QVariantMap"> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.9.4 MinGW 32bit</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.9.4 MinGW 32bit</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.594.win32_mingw53_kit</value> + <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> + <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> + <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/QtProject/build-server_version-Desktop_Qt_5_9_4_MinGW_32bit-Debug</value> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value> + <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">鏋勫缓</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">娓呯悊</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> + <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> + <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/QtProject/build-server_version-Desktop_Qt_5_9_4_MinGW_32bit-Release</value> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> + <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">鏋勫缓</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">娓呯悊</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> + <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> + <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2"> + <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/QtProject/build-server_version-Desktop_Qt_5_9_4_MinGW_32bit-Profile</value> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value> + <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value> + <value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">鏋勫缓</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> + </valuemap> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> + <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> + <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> + <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> + <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">娓呯悊</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> + <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> + <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> + <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> + <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> + </valuemap> + <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> + <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> + <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">閮ㄧ讲</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> + </valuemap> + <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">鍦ㄦ湰鍦伴儴缃�</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> + </valuemap> + <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> + <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> + <value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value> + <value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value> + <value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value> + <value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value> + <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> + <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> + <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> + <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> + <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> + <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> + <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> + <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> + <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> + <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> + <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> + <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> + <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> + <value type="int">0</value> + <value type="int">1</value> + <value type="int">2</value> + <value type="int">3</value> + <value type="int">4</value> + <value type="int">5</value> + <value type="int">6</value> + <value type="int">7</value> + <value type="int">8</value> + <value type="int">9</value> + <value type="int">10</value> + <value type="int">11</value> + <value type="int">12</value> + <value type="int">13</value> + <value type="int">14</value> + </valuelist> + <value type="int" key="PE.EnvironmentAspect.Base">2</value> + <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">server_version</value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> + <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/QtProject/server_version/server_version.pro</value> + <value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value> + <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> + <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">server_version.pro</value> + <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> + <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> + <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">D:/QtProject/build-server_version-Desktop_Qt_5_9_4_MinGW_32bit-Debug</value> + <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> + <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> + <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> + <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> + <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> + <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> + </valuemap> + <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> + </valuemap> + </data> + <data> + <variable>ProjectExplorer.Project.TargetCount</variable> + <value type="int">1</value> + </data> + <data> + <variable>ProjectExplorer.Project.Updater.FileVersion</variable> + <value type="int">18</value> + </data> + <data> + <variable>Version</variable> + <value type="int">18</value> + </data> +</qtcreator> diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/type.h.autosave" "b/Server/\351\251\254\346\270\235\346\235\255/code/type.h.autosave" new file mode 100644 index 0000000..fe9d89b --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/type.h.autosave" @@ -0,0 +1,69 @@ +#ifndef TYPE_H +#define TYPE_H +#include <string.h> +//绉佹湁鍗忚灏佽 + +//璇锋眰鍝嶅簲缁撴瀯浣撴湁鏁版嵁澶�+鏁版嵁浣� + +//浣跨敤鏋氫妇鏉ョ粺涓�鍚勭鍔熻兘绫诲瀷銆� + +enum TypeInfo{ + LOGIN_REQ, //鐧诲綍璇锋眰 + LOGIN_RES, + VERSIONUPDATA_REQ, // 鐗堟湰鏇存柊璇锋眰 + VERSIONUPDATA_RES, + VEESIONNUM_REQ, //鐗堟湰鍙疯姹� + VERSIONNUM_RES, + UPLOAD_FILE_REQ, + UPLOAD_FILE_RES, + VERSIONINFOENTRY_REQ, //鐗堟湰淇℃伅鏉$洰 + VERSIONINFOENTRY_RES +}; + +struct Head +{ + int type; // 鍔熻兘绫诲瀷锛岃В鍐虫瘡涓寘鐨勫叿浣撲綔鐢紝鍖哄垎涓氬姟 + int len; //灏佸寘闀垮害 + +}; +// 鐧诲綍涓氬姟 +// 鐧诲綍璇锋眰 +struct LoginReq +{ + Head head; + + char user_name[32]; + char password[32]; + LoginReq(){ + head.type=LOGIN_REQ; + head.len=sizeof(LoginReq); + } +}; +//鐧诲綍鏉冮檺缁撴瀯浣� +struct PermissionInfo +{ + int admin; //绠$悊鍛� + int history; //鍘嗗彶鏌ョ湅 + int version_manager;//鐗堟湰绠$悊 + int log_search; //鏃ュ織鏌ョ湅 + int flaw_mark ; //缂洪櫡鏍囪 + +}; + +//鐧诲綍鍝嶅簲 +struct LoginRes +{ + Head head; + char user_name[32]; + int state; // 鐧诲綍鐘舵�� + PermissionInfo per; + LoginRes(){ + head.type= + } +}; + + + + + +#endif // TYPE_H diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.cpp" "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.cpp" new file mode 100644 index 0000000..9c90563 --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.cpp" @@ -0,0 +1,251 @@ +#include "versionmanage.h" +#include "ui_versionmanage.h" +#include<QDateTime> +#include<QThread> + +VersionManage::VersionManage(QWidget *parent) + :QMainWindow(parent) +{ + //Tcp閾炬帴 + m_client=new QTcpSocket(this); + m_client->connectToHost("127.0.0.1",16888); + if(m_client->waitForConnected()){ + qDebug()<<"conn ok!"; + connect(m_client,SIGNAL(readyRead()),this,SLOT(myRead())); + + }else{ + qDebug()<<"conn fail or waiting for conn"; + } + + //鍚戝鎴风鍙戦�佺増鏈彿璇锋眰 + sendVersionNumReq(); + + /*鍒涘缓涓�涓腑澶獥鍙i儴浠� centralWidget锛屽苟灏嗗叾浣滀负褰撳墠绐楀彛鐨勫瓙鎺т欢銆� + 璁剧疆涓�涓瀭鐩村竷灞� layout 鍒� centralWidget 涓婏紝 + 浣垮緱浠讳綍娣诲姞鍒� layout 鐨勫瓙鎺т欢閮戒細鍦� centralWidget 涓粠涓婂埌涓嬫帓鍒椼��*/ + QWidget *centralWidget=new QWidget(this); + QVBoxLayout *layout=new QVBoxLayout(centralWidget); + + //鑾峰彇褰撳墠宸ヤ綔鐩綍 + QString currentPath=QDir::currentPath(); + qDebug()<<"褰撳墠宸ヤ綔璺緞锛�"<<currentPath; + + //鏂囦欢瀵煎叆鎸夐挳鍜屾枃浠跺悕鏍囩鍒涘缓 + QPushButton *importButton=new QPushButton(tr("瀵煎叆鏂囦欢"),this); + connect(importButton,&QPushButton::clicked,this,&VersionManage::importFile); + fileNameLabel=new QLabel(tr("鏈�夋嫨鏂囦欢"),this); + orignalPathLabel=new QLabel(tr("鏈�夋嫨鏂囦欢璺緞"),this); + + //鐗堟湰鍙峰拰璺緞缂栬緫妗嗗垵濮嬪寲 + currVersionEdit=new QLineEdit(this); + clientPathEdit=new QLineEdit(this); + serverPathEdit=new QLineEdit(this); + versionDescriptionEdit = new QTextEdit(this); + //prevVersionEdit=new QLineEdit(this); + + //鑰佺増鏈粍鍚堜笅鎷夋,鍚勭鍗犱綅绗﹁璁� + prevVersionComboBox=new QComboBox(this); + prevVersionComboBox->addItem(tr("涓婁竴涓増鏈彿")); + + //prevVersionEdit->setPlaceholderText(tr("涓婁竴涓増鏈彿")); + currVersionEdit->setPlaceholderText(tr("褰撳墠鐗堟湰鍙�")); + clientPathEdit->setPlaceholderText(tr("瀹㈡埛绔矾鍔�")); + serverPathEdit->setPlaceholderText(tr("鏈嶅姟鍣ㄨ矾寰�")); + versionDescriptionEdit->setPlaceholderText(tr("璇疯緭鍏ユ柊鐗堟湰鎻忚堪")); + + //娣诲姞鐗堟湰鐨勬寜閽�,鍒拌〃鏍� + QPushButton *addButton =new QPushButton(tr("娣诲姞"),this); + connect(addButton,&QPushButton::clicked,this,&VersionManage::addFileInfo); + + //甯冨眬涓婂崐閮ㄥ垎 + layout->addWidget(prevVersionComboBox); + prevVersionComboBox->setStyleSheet("font-size: 22px;"); + layout->addWidget(currVersionEdit); + currVersionEdit->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + layout->addWidget(serverPathEdit); + serverPathEdit->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + layout->addWidget(versionDescriptionEdit); + versionDescriptionEdit->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + //鑷姩濉啓鏈嶅姟绔矾寰� + connect(currVersionEdit,&QLineEdit::textChanged, + this,[this](const QString &text){ + serverPathEdit->setText("./version/"+text); + }); + layout->addWidget(importButton); + importButton->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + layout->addWidget(fileNameLabel); + fileNameLabel->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + layout->addWidget(orignalPathLabel); + orignalPathLabel->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + layout->addWidget(clientPathEdit); + clientPathEdit->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + layout->addWidget(addButton); + addButton->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + + //涓嬪崐閮ㄥ垎琛ㄦ牸鍒涘缓 + fileTable=new QTableWidget(0,7,this); + fileTable->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); + fileTable->setHorizontalHeaderLabels({tr("鏂囦欢鍚�"), tr("鏂囦欢澶у皬"), tr("涓婁竴涓増鏈彿"), tr("褰撳墠鐗堟湰鍙�"), tr("鏂囦欢鍘熷璺緞"), tr("瀹㈡埛绔矾寰�"), tr("鏈嶅姟鍣ㄨ矾寰�")}); + QPushButton *savebutton=new QPushButton(tr("淇濆瓨鑷虫暟鎹簱"),this); + connect(savebutton,&QPushButton::clicked,this,&VersionManage::saveToDisk); + + layout->addWidget(fileTable); + fileTable->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + layout->addWidget(savebutton); + savebutton->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px;"); + + QPushButton* deleteButton=new QPushButton(tr("鍒犻櫎涓�涓枃浠�"),this); + deleteButton->setStyleSheet("font-family: 'Microsoft YaHei'; font-size: 22px"); + connect(deleteButton,&QPushButton::clicked,this,[&](){ + int currrow=fileTable->currentRow(); + if(currrow!=-1){ + fileTable->removeRow(currrow); + } + }); + layout->addWidget(deleteButton); + //绐楀彛 + resize(1500, 800); + setCentralWidget(centralWidget); + + +} + +// 鍙戦�佺増鏈彿璇锋眰 +void VersionManage::sendVersionNumReq() +{ + VersionNumReq req; + int len = m_client->write((char*)&req,req.head.len); + qDebug()<<"len:"<<len; + +} + +//瀵煎叆鏂囦欢鍔熻兘 +void VersionManage::importFile() +{ //鎵撳紑鏂囦欢瀵硅瘽妗� + importedFilePath=QFileDialog::getOpenFileName(this, + tr("閫夋嫨鏂囦欢"),"",tr("鎵�鏈夋枃浠�(*)")); + if(!importedFilePath.isEmpty()){ + QFileInfo fileInfo(importedFilePath); + fileNameLabel->setText(fileInfo.fileName()); //鏄剧ず鏂囦欢鍚�+璺緞 + orignalPathLabel->setText(importedFilePath); + clientPathEdit->setText(importedFilePath); + serverPathEdit->setText(importedFilePath); + + } +} + +void VersionManage::addFileInfo() +{ + if(importedFilePath.isEmpty()){ + return ; + } + int rowCount=fileTable->rowCount(); + fileTable->insertRow(rowCount); + + QFileInfo fileInfo(importedFilePath); + fileTable->setItem(rowCount,0,new QTableWidgetItem(fileInfo.fileName())); + qDebug()<<fileInfo.size(); + fileTable->setItem(rowCount,1,new QTableWidgetItem(QString::number(fileInfo.size()))); + fileTable->setItem(rowCount,2,new QTableWidgetItem(prevVersionComboBox->currentText()));//** + fileTable->setItem(rowCount,3,new QTableWidgetItem(currVersionEdit->text())); + fileTable->setItem(rowCount,4,new QTableWidgetItem(orignalPathLabel->text())); + fileTable->setItem(rowCount,5,new QTableWidgetItem(clientPathEdit->text())); + fileTable->setItem(rowCount,6,new QTableWidgetItem(serverPathEdit->text())); + + //娣诲姞鍒拌〃鏍硷紝娓呯┖鍐呭 + //prevVersionComboBox->clear(); + //currVersionEdit->clear(); + //serverPathEdit->clear(); + clientPathEdit->clear(); + fileNameLabel->clear(); + orignalPathLabel->clear(); + importedFilePath.clear(); +} + +//灏嗚〃鏍间腑鐨勬枃浠跺彟瀛樹负鎸囧畾鍦扮偣 +void VersionManage::saveToDisk() +{ + if(fileTable->rowCount()!=0){ + for(int row=0;row<fileTable->rowCount();++row){ + QString saveDirectory = fileTable->item(row, 6)->text();//鏈嶅姟鍣ㄥ湴鍧� + QString fileName = fileTable->item(row, 0)->text(); + QString sourceFilePath = fileTable->item(row, 4)->text(); //瀹㈡埛鏂囦欢鍘熻矾寰� +// QString destinationFilePath = saveDirectory + "/" + fileName; + + QFile fl(sourceFilePath); //鎵撳紑鏈湴鏂囦欢锛堢増鏈窡淇″彿鐨勬枃浠讹級 + qDebug()<< "鎵撳紑鍓�"; + qDebug()<< sourceFilePath; + if(fl.open(QIODevice::ReadOnly)){ + + //QFile::copy(sourceFilePath,destinationFilePath); + qDebug()<< "鎵撳紑鍓�"; + long long all_size = fl.size() + sizeof(UploadFileReq);//鎬诲ぇ灏忔妸鎺nfo浜� + UploadFileReq *req=(UploadFileReq*) (new char[all_size]); + req->head.type=UPLOAD_FILE_REQ; + req->head.len==all_size; + req->fileInfo.fileSize=fl.size(); + strcpy(req->fileInfo.s_filepath,saveDirectory.toLocal8Bit().data()); + qDebug()<<"s_filepath锛�"<< req->fileInfo.s_filepath; + strcpy(req->fileInfo.fileName,fileName.toLocal8Bit().data()); + memcpy(req->fileInfo.content,fl.readAll().data(),fl.size()); + //缁勫寘瀹屾垚锛屽彂鍖� + qDebug()<<m_client->write((char*)req,req->head.len); + m_client->flush(); //绔嬪嵆鍙戦�� + m_client->waitForBytesWritten(); //鍚屾绛夊緟鏁版嵁鍐欏叆瀹屾垚 + + delete req; + qDebug()<<"鍙戦�佹暟鎹簱鎴愬姛锛�"; + fl.close(); + + //绛夊緟鍥炲簲 + qDebug()<<"waiting for 8 seconds..."; + QThread::sleep(8); + qDebug()<<"Done waiting"; + + //鏁版嵁搴撲俊鎭綍鍏ワ紝鐗堟湰淇℃伅鏉$洰 + VersionInfoEntryReq *req_2=new VersionInfoEntryReq; + strcpy_s(req_2->versionId,currVersionEdit->text().toLocal8Bit().data()); + strcpy_s(req_2->versionIdOld,prevVersionComboBox->currentText().toLocal8Bit().data()); + req_2->fileNum=fileTable->rowCount(); + + QString str=serverPathEdit->text()+versionDescriptionEdit->toPlainText() + +QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss"); + for(int i=0;i<fileTable->rowCount();++i){ + str+=fileTable->item(i,0)->text()+fileTable->item(i,1)->text()+fileTable->item(i,5)->text(); + } + strcpy(req_2->context,str.toLocal8Bit().data());//_s 淇濇姢 + qDebug()<<"len:"<<m_client->write((char*)req_2,req_2->head.len); + + fileTable->setRowCount(0); + } + + + } + } +} + +void VersionManage::myRead() +{ + QByteArray buffer=m_client->readAll(); + qDebug()<<"buffer:"<<buffer; + //蹇冭烦妫�鏌� + //瑙e寘 + int type=((Head*)buffer.data())->type; + if(type==VERSION_NUM_RES){ + //鐗堟湰鍙风浉搴� + } + else if(type==UPLOAD_FILE_RES){} +} + + + + + + + + + + + + + diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.h" "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.h" new file mode 100644 index 0000000..9eaf94e --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.h" @@ -0,0 +1,60 @@ +#ifndef VERSIONMANAGE_H +#define VERSIONMANAGE_H + +#include<QMainWindow> +#include<QWidget> +#include<QVBoxLayout> +#include<QPushButton> +#include<QLineEdit> +#include<QTableWidget> +#include<QFileDialog> //閫夋嫨鏂囨湰鎴栫洰褰� +#include<QLabel> +#include<QFile> +#include<QTextStream> //鐢ㄤ簬鏂囨湰鏍煎紡鐨勮鍐欐搷浣�,鍐欏叆鍐呭瓨 +#include<QComboBox> +#include<QTcpSocket> +#include<qstring.h> +#include<qstringlist.h> +#include<QVector> +#include<QTextEdit> +#include "common.h" + +class VersionManage: public QMainWindow +{ + Q_OBJECT + + +public: + VersionManage(QWidget *parent = nullptr); + + void sendVersionNumReq(); + +private slots: + void importFile(); + void addFileInfo(); + void saveToDisk(); //鏂囦欢淇濆瓨鍒版暟鎹簱 + + void myRead(); //鏀跺寘妲� + +private: + QTcpSocket *m_client; + QComboBox *prevVersionComboBox; + QLineEdit *currVersionEdit; + QLineEdit *clientPathEdit; //瀹㈡埛绔矾寰勮緭鍏� + QLineEdit *serverPathEdit; + //QLineEdit *prevVersionEdit; + QLabel *fileNameLabel; //鏄剧ず鏂囦欢 + QLabel *orignalPathLabel; + QTableWidget *fileTable; + QString importedFilePath; //瀛樺偍瀵煎叆鏂囦欢璺緞 + QTextEdit *versionDescriptionEdit; + + /*鍘熷锛�/my_project/src/main.cpp + * 瀹㈡埛绔痺锛欳:\Users\Username\Documents\my_project\src\main.cpp + * 鏈嶅姟绔細/var/git/my_project.git/refs/heads/main +*/ + + +}; + +#endif // VERSIONMANAGE_H diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.ui" "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.ui" new file mode 100644 index 0000000..89920b8 --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage.ui" @@ -0,0 +1,24 @@ +<ui version="4.0"> + <author/> + <comment/> + <exportmacro/> + <class>versionmanage</class> + <widget class="QMainWindow" name="versionmanage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>600</height> + </rect> + </property> + <property name="windowTitle"> + <string>MainWindow</string> + </property> + <widget class="QMenuBar" name="menubar"/> + <widget class="QWidget" name="centralwidget"/> + <widget class="QStatusBar" name="statusbar"/> + </widget> + <pixmapfunction/> + <connections/> +</ui> diff --git "a/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage_main.cpp" "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage_main.cpp" new file mode 100644 index 0000000..f76ddf1 --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/code/versionmanage_main.cpp" @@ -0,0 +1,9 @@ +#include"versionmanage.h" +#include<QApplication> + +int main(int argc,char* argv[]){ + QApplication a(argc,argv); + VersionManage w; + w.show(); + return a.exec(); +} diff --git "a/Server/\351\251\254\346\270\235\346\235\255/log/20241104\346\230\206\344\273\221\346\227\245\346\212\245.doc" "b/Server/\351\251\254\346\270\235\346\235\255/log/20241104\346\230\206\344\273\221\346\227\245\346\212\245.doc" new file mode 100644 index 0000000..c4e8716 --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/log/20241104\346\230\206\344\273\221\346\227\245\346\212\245.doc" Binary files differ diff --git "a/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241104.doc" "b/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241104.doc" new file mode 100644 index 0000000..b7876b4 --- /dev/null +++ "b/Server/\351\251\254\346\270\235\346\235\255/log/\346\227\245\345\277\227_\351\251\254\346\270\235\346\235\255_20241104.doc" Binary files differ diff --git a/common.h b/common.h index 8c1266d..fb8ffa3 100644 --- a/common.h +++ b/common.h @@ -436,6 +436,8 @@ //鐜鏁版嵁鍝嶅簲 struct Environment { + double longitude;//缁忓害 + double latitude;//绾害 float temp;//娓╁害 float humidity;//婀垮害 float oxygen;//姘ф皵娴撳害 @@ -463,6 +465,8 @@ //璁惧鐘舵�佸搷搴� struct DeviceStatus { + double longitude;//缁忓害 + double latitude;//绾害 int deviceID;//璁惧缂栧彿 char deviceName[32];//璁惧鍚嶇О char deviceStatus[32];//璁惧鐘舵�� @@ -489,6 +493,8 @@ //鎿嶄綔鏃ュ織鍝嶅簲 struct MovementRecord { + double longitude;//缁忓害 + double latitude;//绾害 char userName;//鎿嶄綔鐢ㄦ埛鍚� char operateTime[32];//鎿嶄綔鏃堕棿 char deviceName[32];//鎿嶄綔璁惧 @@ -516,8 +522,10 @@ //璀︽姤璁板綍鍝嶅簲 struct AlarmRecord { + double longitude;//缁忓害 + double latitude;//绾害 char alarmTime[32];//璀︽姤鏃堕棿 - char alarmtype[32];//閫氱煡鏃堕棿 + char alarmtype[32];//澶勭悊鏃堕棿 char alarmContent[256];//璀︽姤鍐呭 }; struct AlarmRecordRes @@ -605,10 +613,11 @@ //鐢熶骇璁″垝绠$悊 struct PdplanInfo { - int id;//鐢熶骇璁″垝缂栧彿 - char planName[32];//鐢熶骇璁″垝鍚嶅瓧 + int planId;//璁㈠崟缂栧彿 + char planName[32];//璁㈠崟鍚嶅瓧 char startDate[32];//璧峰鏃ユ湡 - char closingDate[32];//鎴嚦鏃ユ湡 + char closingDate[32];//浜や粯鏃ユ湡 + char pdName[8];//浜у搧鍚� double plannedPd;//璁″垝鐢熶骇閲� double actualPd;//瀹為檯鐢熶骇閲� double progress;//鐢熶骇杩涘害 @@ -618,7 +627,9 @@ struct MonoutputInfo { int month;//鏈堜唤 - double output;//鏈堜骇閲� + double aOutput;//a浜у搧鏈堜骇閲� + double bOutput;//b浜у搧鏈堜骇閲� + double cOutput;//c浜у搧鏈堜骇閲� }; //娣诲姞涓�鏉$敓浜ц鍒掔殑璇锋眰缁撴瀯浣� @@ -692,12 +703,14 @@ struct QueryPdplanReq { Head head; - int id;//鐢熶骇璁″垝缂栧彿 - char planName[32];//鐢熶骇璁″垝鍚嶅瓧 + int planId;//璁㈠崟缂栧彿 + char planName[32];//璁㈠崟鍒掑悕瀛� char startDate[32];//璧峰鏃ユ湡 - char closingDate[32];//鎴嚦鏃ユ湡 + char closingDate[32];//浜や粯鏃ユ湡 + char pdName[8];//浜у搧鍚� double plannedPd;//璁″垝鐢熶骇閲� double actualPd;//瀹為檯鐢熶骇閲� + double progress;//鐢熶骇杩涘害 int finishOntime;//鏄惁鎸夋湡瀹屾垚 QueryPdplanReq() { head.type = QUERY_PDPLAN_REQ; @@ -790,7 +803,9 @@ { Head head; int month;//鏈堜唤 - double output;//鏈堜骇閲� + double aOutput;//a浜у搧鏈堜骇閲� + double bOutput;//b浜у搧鏈堜骇閲� + double cOutput;//c浜у搧鏈堜骇閲� QueryMonoutputReq() { head.type = QUERY_MONOUTPUT_REQ; head.len = sizeof(QueryMonoutputReq); diff --git a/kunlun110401.sql b/kunlun110401.sql new file mode 100644 index 0000000..816d293 --- /dev/null +++ b/kunlun110401.sql @@ -0,0 +1,200 @@ +-- -------------------------------------------------------- +-- 涓绘満: 127.0.0.1 +-- 鏈嶅姟鍣ㄧ増鏈�: 8.3.0 - MySQL Community Server - GPL +-- 鏈嶅姟鍣ㄦ搷浣滅郴缁�: Win64 +-- HeidiSQL 鐗堟湰: 12.6.0.6765 +-- -------------------------------------------------------- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + + +-- 瀵煎嚭 mayi_kunlun 鐨勬暟鎹簱缁撴瀯 +CREATE DATABASE IF NOT EXISTS `mayi_kunlun` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; +USE `mayi_kunlun`; + +-- 瀵煎嚭 琛� mayi_kunlun.data_info 缁撴瀯 +CREATE TABLE IF NOT EXISTS `data_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `device_id` int DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `data` float DEFAULT NULL, + `time` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='鏁版嵁'; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.data_info 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.devices_management 缁撴瀯 +CREATE TABLE IF NOT EXISTS `devices_management` ( + `id` int NOT NULL, + `devices_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `devices_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `devices_serial_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `devices_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `longitude` double DEFAULT NULL, + `latitude` double DEFAULT NULL, + `purchasing_time` datetime DEFAULT NULL, + `install_time` datetime DEFAULT NULL, + `manufacturer` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `mark_name` varchar(50) DEFAULT NULL, + `mark_time` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.devices_management 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.month_info 缁撴瀯 +CREATE TABLE IF NOT EXISTS `month_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `date` char(20) NOT NULL, + `A_output` double NOT NULL, + `B_output` double NOT NULL, + `C_output` double NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='浜ч噺琛�'; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.month_info 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.parsed_logs 缁撴瀯 +CREATE TABLE IF NOT EXISTS `parsed_logs` ( + `id` int NOT NULL AUTO_INCREMENT, + `time_stamp` timestamp NOT NULL DEFAULT (0), + `device_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `level` varchar(16) NOT NULL, + `content` varchar(256) NOT NULL, + `user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, + `file_name` varchar(64) NOT NULL, + `problem_line` int NOT NULL, + `function_name` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.parsed_logs 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.production_plan 缁撴瀯 +CREATE TABLE IF NOT EXISTS `production_plan` ( + `id` int NOT NULL AUTO_INCREMENT, + `plan_id` int NOT NULL, + `plan_name` varchar(50) DEFAULT NULL, + `start_date` char(20) DEFAULT NULL, + `closing_date` char(20) DEFAULT NULL, + `production_name` varchar(50) DEFAULT NULL, + `planned_production` double DEFAULT NULL, + `actual_production` double DEFAULT NULL, + `progress` double DEFAULT NULL, + `finish_ontime` int DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.production_plan 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.role_info 缁撴瀯 +CREATE TABLE IF NOT EXISTS `role_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `permission_type` varchar(100) DEFAULT NULL, + `query_history` int DEFAULT '0', + `logger_search` int DEFAULT '0', + `map_mark` int DEFAULT '0', + `dev_manage` int DEFAULT '0', + `product_plan` int DEFAULT '0', + `warning_manage` int DEFAULT '0', + `version_manage` int DEFAULT '0', + `admin` int DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.role_info 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.threshold_info 缁撴瀯 +CREATE TABLE IF NOT EXISTS `threshold_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `device_id` int DEFAULT NULL, + `min_threshold` float DEFAULT NULL, + `max_threshold` float DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `time` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='闃堝��'; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.threshold_info 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.user_info 缁撴瀯 +CREATE TABLE IF NOT EXISTS `user_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `department` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `password` varchar(32) DEFAULT NULL, + `user_no` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, + `age` int DEFAULT NULL, + `sex` varchar(10) DEFAULT NULL, + `role_id` int DEFAULT NULL, + `email` varchar(32) DEFAULT NULL, + `telephone` varchar(32) DEFAULT NULL, + `status` int DEFAULT NULL, + `login_time` datetime DEFAULT NULL, + `register_time` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.user_info 鐨勬暟鎹細~0 rows (澶х害) + +-- 瀵煎嚭 琛� mayi_kunlun.version_file 缁撴瀯 +CREATE TABLE IF NOT EXISTS `version_file` ( + `id` int NOT NULL AUTO_INCREMENT, + `version_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', + `filename` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', + `fliesize` bigint NOT NULL DEFAULT (0), + `s_filepath` varchar(256) NOT NULL, + `c_filepath` varchar(256) NOT NULL, + `uploader` char(64) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.version_file 鐨勬暟鎹細~3 rows (澶х害) +INSERT INTO `version_file` (`id`, `version_id`, `filename`, `fliesize`, `s_filepath`, `c_filepath`, `uploader`) VALUES + (1, '1.3', '1.jpd', 12555, './versoin', './2', ''), + (2, '1.4', '2.jpd', 1255, './', './2', ''), + (3, '1.5', '3.jpd', 122, './', './2', ''); + +-- 瀵煎嚭 琛� mayi_kunlun.version_info 缁撴瀯 +CREATE TABLE IF NOT EXISTS `version_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `version_id` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', + `version_id_old` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', + `version_description` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', + `version_creatime` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.version_info 鐨勬暟鎹細~3 rows (澶х害) +INSERT INTO `version_info` (`id`, `version_id`, `version_id_old`, `version_description`, `version_creatime`) VALUES + (1, '1.3', '1.3', '225', '2024-10-29 15:47:00'), + (2, '1.4', '1.4', '226', '2024-10-30 02:47:30'), + (3, '1.5', '1.5', '227', '2024-11-01 15:48:18'); + +-- 瀵煎嚭 琛� mayi_kunlun.warningdata_info 缁撴瀯 +CREATE TABLE IF NOT EXISTS `warningdata_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `device_id` int NOT NULL, + `des` varchar(50) NOT NULL, + `time` datetime NOT NULL, + `warningdata` float NOT NULL, + `type` varchar(50) NOT NULL, + `status` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='璀︽姤鏁版嵁'; + +-- 姝e湪瀵煎嚭琛� mayi_kunlun.warningdata_info 鐨勬暟鎹細~0 rows (澶х害) + +/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */; +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */; diff --git "a/\350\241\250.docx" "b/\350\241\250.docx" new file mode 100644 index 0000000..50f24ec --- /dev/null +++ "b/\350\241\250.docx" Binary files differ -- Gitblit v1.8.0