From 5421a667b2938bba640a745a4057e8125d4e3062 Mon Sep 17 00:00:00 2001 From: unknown <3457259728@qq.com> Date: 星期四, 26 六月 2025 15:52:44 +0800 Subject: [PATCH] Merge branch 'master' of ssh://115.28.86.8:29418/~admin/智能网联_25-0305_617_v1 --- Server/汪卫军/code/ImageStorage.h | 17 +++++ Client/王国壮/log/日志_王国壮_0625.doc | 0 Client/师浩/log/日志_师浩_250626.doc | 0 智能网联_25-0305_617_v1 | 2 Server/胡重阳/log/数据模型预处理日志_胡重阳_20250625.doc | 0 Server/段延冲/log/日志_段延冲_0625.doc | 0 Server/梁博/log/~WRL0005.tmp | 0 Server/梁博/log/~$_梁博_0624.doc | 0 Client/杨高权/log/日志_杨高权_250625 .doc | 0 Server/梁博/log/日志_梁博_0624.doc | 0 Client/陈豪/log/日志_陈豪_250625.doc | 0 Server/汪卫军/log/日志_汪卫军_0625.doc | 0 Client/牛彦江/log/日志_牛彦江_250625.doc | 0 Server/林余杰/log/日志_林余杰_20250625.doc | 0 Client/于文龙/log/日志-于文龙-250625.doc | 0 Server/刘斌/log/日志_刘斌_20250624.doc | 0 Server/汪卫军/code/ImageStorage.cpp | 54 ++++++++++++++++++ Server/梁博/log/日志_梁博_0625.doc | 0 Client/徐蔓云/log/日志_徐蔓云_0626.doc | 0 Server/徐逸凡/log/日志_徐逸凡_250625.doc | 0 Server/common_type.h | 72 ++++++++++++++++++++++++ Client/杨高权/document/日志_杨高权_250625 .doc | 0 /dev/null | 0 Client/舒海林/log/日志_舒海林_0625.doc | 0 Server/刘斌/log/日志_刘斌_20250625.doc | 0 Server/王鹏哲/log/日志_王鹏哲_20250625.doc | 0 Client/寇百盛/log/日志_寇百盛_0625.doc | 0 27 files changed, 144 insertions(+), 1 deletions(-) diff --git "a/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-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-250625.doc" new file mode 100644 index 0000000..b56bc7a --- /dev/null +++ "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-250625.doc" Binary files differ diff --git "a/Client/\345\257\207\347\231\276\347\233\233/log/\346\227\245\345\277\227_\345\257\207\347\231\276\347\233\233_0625.doc" "b/Client/\345\257\207\347\231\276\347\233\233/log/\346\227\245\345\277\227_\345\257\207\347\231\276\347\233\233_0625.doc" new file mode 100644 index 0000000..9813cbd --- /dev/null +++ "b/Client/\345\257\207\347\231\276\347\233\233/log/\346\227\245\345\277\227_\345\257\207\347\231\276\347\233\233_0625.doc" Binary files differ diff --git "a/Client/\345\270\210\346\265\251/log/\346\227\245\345\277\227_\345\270\210\346\265\251_250626.doc" "b/Client/\345\270\210\346\265\251/log/\346\227\245\345\277\227_\345\270\210\346\265\251_250626.doc" new file mode 100644 index 0000000..217dcc8 --- /dev/null +++ "b/Client/\345\270\210\346\265\251/log/\346\227\245\345\277\227_\345\270\210\346\265\251_250626.doc" 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_0626.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_0626.doc" new file mode 100644 index 0000000..4aa62aa --- /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_0626.doc" Binary files differ 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/\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" new file mode 100644 index 0000000..c5c09ee --- /dev/null +++ "b/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" Binary files differ diff --git "a/Client/\346\235\250\351\253\230\346\235\203/log/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc" "b/Client/\346\235\250\351\253\230\346\235\203/log/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc" index b03727c..c5c09ee 100644 --- "a/Client/\346\235\250\351\253\230\346\235\203/log/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc" +++ "b/Client/\346\235\250\351\253\230\346\235\203/log/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc" Binary files differ diff --git "a/Client/\347\211\233\345\275\246\346\261\237/log/\346\227\245\345\277\227_\347\211\233\345\275\246\346\261\237_250625.doc" "b/Client/\347\211\233\345\275\246\346\261\237/log/\346\227\245\345\277\227_\347\211\233\345\275\246\346\261\237_250625.doc" new file mode 100644 index 0000000..f21c8c4 --- /dev/null +++ "b/Client/\347\211\233\345\275\246\346\261\237/log/\346\227\245\345\277\227_\347\211\233\345\275\246\346\261\237_250625.doc" Binary files differ 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_0625.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_0625.doc" new file mode 100644 index 0000000..a6e1165 --- /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_0625.doc" Binary files differ diff --git "a/Client/\350\210\222\346\265\267\346\236\227/log/\346\227\245\345\277\227_\350\210\222\346\265\267\346\236\227_0625.doc" "b/Client/\350\210\222\346\265\267\346\236\227/log/\346\227\245\345\277\227_\350\210\222\346\265\267\346\236\227_0625.doc" new file mode 100644 index 0000000..b0b54ff --- /dev/null +++ "b/Client/\350\210\222\346\265\267\346\236\227/log/\346\227\245\345\277\227_\350\210\222\346\265\267\346\236\227_0625.doc" Binary files differ diff --git "a/Client/\351\231\210\350\261\252/log/\346\227\245\345\277\227_\351\231\210\350\261\252_250625.doc" "b/Client/\351\231\210\350\261\252/log/\346\227\245\345\277\227_\351\231\210\350\261\252_250625.doc" new file mode 100644 index 0000000..d10695c --- /dev/null +++ "b/Client/\351\231\210\350\261\252/log/\346\227\245\345\277\227_\351\231\210\350\261\252_250625.doc" Binary files differ diff --git a/Server/common_type.h b/Server/common_type.h new file mode 100644 index 0000000..f9524ae --- /dev/null +++ b/Server/common_type.h @@ -0,0 +1,72 @@ +#ifndef TCPDATATYPE_H +#define TCPDATATYPE_H +/* */ +enum class ActionType +{ + HeartCheck = 100, + Login = 110, + Register = 120, + Msg = 200, + Download = 300 +}; +/* 慰 HTTP 应 */ +enum class ResponseCode +{ + ResponseOK = 200, // 晒 + BadRequest = 400, // 突 螅 薹 + Unauthorized = 401, // 要 没 证 + Forbidden = 403, // 突 说 螅 蔷芫 执 写 + NotFound = 404, // 薹 业 源 + MethodNotAllowed = 405 // 突 械姆 止 + +}; +/* 息 */ +struct Head +{ + ActionType type; + int len; + int version; + Head(ActionType ptype, int plen, int pversion) + { + len = plen; + type = ptype; + version = pversion; + } +}; +struct HeartCheckReq // +{ + ActionType type; + int len; + HeartCheckReq() + { + type = ActionType::HeartCheck; + len = sizeof(HeartCheckReq); + } +}; + +struct HeartCheckRes // 应 +{ + ActionType type; + int len; + HeartCheckRes() + { + type = ActionType::HeartCheck; + len = sizeof(HeartCheckRes); + } +}; +struct RegisterRequest +{ + Head head; + char name[64]; + char password[64]; + char email[32]; + char phone[32]; +}; +struct LoginRequest +{ + + Head head; + char name[64]; + char password[64]; +}; +#endif diff --git "a/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250624.doc" "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250624.doc" new file mode 100644 index 0000000..8e19a42 --- /dev/null +++ "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250624.doc" Binary files differ diff --git "a/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250625.doc" "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250625.doc" new file mode 100644 index 0000000..ca18304 --- /dev/null +++ "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250625.doc" Binary files differ diff --git "a/Server/\345\276\220\351\200\270\345\207\241/log/\346\227\245\345\277\227_\345\276\220\351\200\270\345\207\241_250625.doc" "b/Server/\345\276\220\351\200\270\345\207\241/log/\346\227\245\345\277\227_\345\276\220\351\200\270\345\207\241_250625.doc" new file mode 100644 index 0000000..d63190f --- /dev/null +++ "b/Server/\345\276\220\351\200\270\345\207\241/log/\346\227\245\345\277\227_\345\276\220\351\200\270\345\207\241_250625.doc" 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_20250625.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_20250625.doc" new file mode 100644 index 0000000..27b3d6c --- /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_20250625.doc" Binary files differ diff --git "a/Server/\346\242\201\345\215\232/log/~$_\346\242\201\345\215\232_0624.doc" "b/Server/\346\242\201\345\215\232/log/~$_\346\242\201\345\215\232_0624.doc" new file mode 100644 index 0000000..7cf3296 --- /dev/null +++ "b/Server/\346\242\201\345\215\232/log/~$_\346\242\201\345\215\232_0624.doc" Binary files differ diff --git "a/Server/\346\242\201\345\215\232/log/~WRL0005.tmp" "b/Server/\346\242\201\345\215\232/log/~WRL0005.tmp" new file mode 100644 index 0000000..17190ff --- /dev/null +++ "b/Server/\346\242\201\345\215\232/log/~WRL0005.tmp" Binary files differ diff --git "a/Server/\346\242\201\345\215\232/log/\346\227\245\345\277\227_\346\242\201\345\215\232_0624.doc" "b/Server/\346\242\201\345\215\232/log/\346\227\245\345\277\227_\346\242\201\345\215\232_0624.doc" new file mode 100644 index 0000000..17190ff --- /dev/null +++ "b/Server/\346\242\201\345\215\232/log/\346\227\245\345\277\227_\346\242\201\345\215\232_0624.doc" Binary files differ diff --git "a/Server/\346\242\201\345\215\232/log/\346\227\245\345\277\227_\346\242\201\345\215\232_0625.doc" "b/Server/\346\242\201\345\215\232/log/\346\227\245\345\277\227_\346\242\201\345\215\232_0625.doc" new file mode 100644 index 0000000..1ee7837 --- /dev/null +++ "b/Server/\346\242\201\345\215\232/log/\346\227\245\345\277\227_\346\242\201\345\215\232_0625.doc" Binary files differ diff --git "a/Server/\346\256\265\345\273\266\345\206\262/log/\346\227\245\345\277\227_\346\256\265\345\273\266\345\206\262_0625.doc" "b/Server/\346\256\265\345\273\266\345\206\262/log/\346\227\245\345\277\227_\346\256\265\345\273\266\345\206\262_0625.doc" new file mode 100644 index 0000000..508b824 --- /dev/null +++ "b/Server/\346\256\265\345\273\266\345\206\262/log/\346\227\245\345\277\227_\346\256\265\345\273\266\345\206\262_0625.doc" Binary files differ diff --git "a/Server/\346\261\252\345\215\253\345\206\233/code/ImageStorage.cpp" "b/Server/\346\261\252\345\215\253\345\206\233/code/ImageStorage.cpp" new file mode 100644 index 0000000..b43bc2e --- /dev/null +++ "b/Server/\346\261\252\345\215\253\345\206\233/code/ImageStorage.cpp" @@ -0,0 +1,54 @@ +// ImageStorage.cpp - 照片存储模块实现 +#include "stdafx.h" +#include "ImageStorage.h" +#include <fstream> +#include <opencv2/opencv.hpp> + +ImageStorage::ImageStorage() {} + +ImageStorage::~ImageStorage() {} + +bool ImageStorage::SaveImage(const std::string& filePath, const unsigned char* imageData, + int width, int height) { + try { + // 创建OpenCV图像 + cv::Mat image(height, width, CV_8UC3, const_cast<unsigned char*>(imageData)); + + // 保存图像 + return cv::imwrite(filePath, image); + } + catch (const std::exception& e) { + std::cerr << "保存图像失败: " << e.what() << std::endl; + return false; + } +} + +bool ImageStorage::LoadImage(const std::string& filePath, unsigned char*& imageData, + int& width, int& height) const { + try { + // 加载图像 + cv::Mat image = cv::imread(filePath, cv::IMREAD_COLOR); + + if (image.empty()) { + return false; + } + + // 分配内存并复制数据 + width = image.cols; + height = image.rows; + size_t dataSize = width * height * 3; + + imageData = new unsigned char[dataSize]; + memcpy(imageData, image.data, dataSize); + + return true; + } + catch (const std::exception& e) { + std::cerr << "加载图像失败: " << e.what() << std::endl; + return false; + } +} + +bool ImageStorage::DeleteImage(const std::string& filePath) { + return (remove(filePath.c_str()) == 0); +} \ No newline at end of file diff --git "a/Server/\346\261\252\345\215\253\345\206\233/code/ImageStorage.h" "b/Server/\346\261\252\345\215\253\345\206\233/code/ImageStorage.h" new file mode 100644 index 0000000..3b754d6 --- /dev/null +++ "b/Server/\346\261\252\345\215\253\345\206\233/code/ImageStorage.h" @@ -0,0 +1,17 @@ +// ImageStorage.h - 照片存储模块 +#pragma once +#include <string> +#include <vector> +#include "FaceImageManager.h" + +class ImageStorage { +public: + ImageStorage(); + ~ImageStorage(); + + bool SaveImage(const std::string& filePath, const unsigned char* imageData, + int width, int height); + bool LoadImage(const std::string& filePath, unsigned char*& imageData, + int& width, int& height) const; + bool DeleteImage(const std::string& filePath); +}; \ No newline at end of file diff --git "a/Server/\346\261\252\345\215\253\345\206\233/code/\351\234\200\346\261\202\345\210\206\346\236\220\346\226\207\346\241\243.doc" "b/Server/\346\261\252\345\215\253\345\206\233/code/\351\234\200\346\261\202\345\210\206\346\236\220\346\226\207\346\241\243.doc" deleted file mode 100644 index f4b04c3..0000000 --- "a/Server/\346\261\252\345\215\253\345\206\233/code/\351\234\200\346\261\202\345\210\206\346\236\220\346\226\207\346\241\243.doc" +++ /dev/null Binary files differ diff --git "a/Server/\346\261\252\345\215\253\345\206\233/log/\346\227\245\345\277\227_\346\261\252\345\215\253\345\206\233_0625.doc" "b/Server/\346\261\252\345\215\253\345\206\233/log/\346\227\245\345\277\227_\346\261\252\345\215\253\345\206\233_0625.doc" new file mode 100644 index 0000000..bc22d97 --- /dev/null +++ "b/Server/\346\261\252\345\215\253\345\206\233/log/\346\227\245\345\277\227_\346\261\252\345\215\253\345\206\233_0625.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_20250625.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_20250625.doc" new file mode 100644 index 0000000..0f0d865 --- /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_20250625.doc" Binary files differ diff --git "a/Server/\350\203\241\351\207\215\351\230\263/log/\346\225\260\346\215\256\346\250\241\345\236\213\351\242\204\345\244\204\347\220\206\346\227\245\345\277\227_\350\203\241\351\207\215\351\230\263_20250625.doc" "b/Server/\350\203\241\351\207\215\351\230\263/log/\346\225\260\346\215\256\346\250\241\345\236\213\351\242\204\345\244\204\347\220\206\346\227\245\345\277\227_\350\203\241\351\207\215\351\230\263_20250625.doc" new file mode 100644 index 0000000..180a6d1 --- /dev/null +++ "b/Server/\350\203\241\351\207\215\351\230\263/log/\346\225\260\346\215\256\346\250\241\345\236\213\351\242\204\345\244\204\347\220\206\346\227\245\345\277\227_\350\203\241\351\207\215\351\230\263_20250625.doc" Binary files differ diff --git "a/\346\231\272\350\203\275\347\275\221\350\201\224_25-0305_617_v1" "b/\346\231\272\350\203\275\347\275\221\350\201\224_25-0305_617_v1" new file mode 160000 index 0000000..89d19ad --- /dev/null +++ "b/\346\231\272\350\203\275\347\275\221\350\201\224_25-0305_617_v1" @@ -1 +1 @@ -Subproject commit 0000000000000000000000000000000000000000 +Subproject commit 89d19ad386e768e8e54b6aa4b1d42f4617ceed03 -- Gitblit v1.8.0