From 9a07a9c23b406077bb782b50d403bf8f02c99e52 Mon Sep 17 00:00:00 2001
From: jiangkegeng <jiangkegeng>
Date: 星期六, 09 十一月 2024 16:22:31 +0800
Subject: [PATCH] s

---
 common.h |  138 +++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 123 insertions(+), 15 deletions(-)

diff --git a/common.h b/common.h
index 808271f..022d89f 100644
--- a/common.h
+++ b/common.h
@@ -83,9 +83,9 @@
 
 	//历史查询
 	HISTORY_DEV_REQ,        //历史查询硬件请求
-    HISTORY_DEV_RES,     //历史查询硬件响应
-    HISTORY_PRODUCE_REQ, //历史查询生产请求
-    HISTORY_PRODUCE_RES, //历史查询生产响应
+    HISTORY_DEV_RES,        //历史查询硬件响应
+    HISTORY_PRODUCE_REQ,    //历史查询生产请求
+    HISTORY_PRODUCE_RES,    //历史查询生产响应
     HISTORY_ENV_REQ,    //历史查询环境请求
     HISTORY_ENV_RES,    //历史查询环境响应
     HISTORY_MON_REQ,    //历史查询月产量请求
@@ -98,6 +98,14 @@
 	FILE_DOWNLOADS_REQ, // 版本更新文件下载请求
 	FILE_DOWNLOADS_RES, // 版本更新文件下载响应
 	DOWNLOAD_SUCCESSFULLY_RES,       // 更新文件下载成功的响应
+	
+	//版本管理
+	VERSION_NUM_REQ,  // 版本号请求
+	VERSION_NUM_RES,   // 版本号响应
+	UPLOAD_FILE_REQ, // 上传文件的请求
+	UPLOAD_FILE_RES, // 上传文件的响应
+	VERSION_INFOENTRY_REQ,       // 版本信息录入请求
+	VERSION_INFOENTRY_RES,       //版本信息录入响应
 
 	//日志
 	LOGSEARCH_REQ,//日志查询请求
@@ -292,16 +300,17 @@
 //设备管理
 struct DevicesInfo
 {
-	char deviceName[32];//设备名称
-	char deviceStatus[32];//设备状态
-	char area[32];//地区
-	double longitude;//经度
-	double latitude;//纬度
-	char purchasingTime[15];//购买时间
-	char installTime[15];//安装时间
-	char manufacturer[100];//厂家
-    char deviceSerialNumber[32];//设备编码
+    int id;//设备ID
+    char deviceName[32];//设备名称
     char deviceType[32];//设备类型
+    char deviceSerialNumber[32];//设备编码
+    char deviceStatus[32];//设备状态
+    char area[100];//地区
+    double longitude;//经度
+    double latitude;//纬度
+    char purchasingTime[15];//购买时间
+    char installTime[15];//安装时间
+    char manufacturer[100];//厂家
 };
 //添加设备
 struct ADReq//添加请求
@@ -330,6 +339,9 @@
 {
 	Head head;
 	DevicesInfo info;
+    char condition[32];
+    char modifiedContent[100];
+    double laOrLo;
 	MDReq() {
 		head.type = MD_REQ;
 		head.len = sizeof(MDReq);
@@ -339,6 +351,9 @@
 {
 	Head head;
 	int status;
+    char conditon[32];
+    char modifiedContent[100];
+    double laOrLo;
 	MDRes() {
 		head.type = MD_RES;
 		head.len = sizeof(MDRes);
@@ -449,6 +464,7 @@
 {
     Head head;
     char place[32];//地区
+	char nowTime[32];//当时时间
         EnvironmentReq(){
         head.type = ENVIRONMENT_REQ;
         head.len = sizeof(EnvironmentReq);
@@ -609,11 +625,12 @@
     double planPro;//计划生产量
     double actPro;//实际生产量
 };
-struct CoaMinRodReS
+struct CoaMinRodRes
 {
     Head head;
+	int status;
     CoaMinRod coaMinRod[0];
-        CoaMinRodReS(){
+        CoaMinRodRes(){
         head.type = COAL_MINE_RODER_RES;
         head.len = sizeof(CoaMinRodReS);
     }
@@ -728,10 +745,17 @@
 
 struct MonoutputInfo
 {
-	int date;//日期
+<<<<<<< HEAD
+	char month[32];//鏈堜唤
+	double aOutput;//a浜у搧鏈堜骇閲�
+	double bOutput;//b浜у搧鏈堜骇閲�
+	double cOutput;//c浜у搧鏈堜骇閲�
+=======
+	char date[32];//日期
 	double aOutput;//a产品月产量
 	double bOutput;//b产品月产量
 	double cOutput;//c产品月产量
+>>>>>>> 83817169914cd859e4a7e0b5f0685dd0c072a974
 };
 
 //添加生产计划的请求结构体
@@ -938,6 +962,7 @@
     char keyWord[32];
     HistoryDevReq() {
         // 初始化数据头
+        memset(this,0,sizeof(HistoryDevReq));
         head.type = HISTORY_DEV_REQ;
         head.len = sizeof(HISTORY_DEV_REQ);
         // 初始化查询条件字段
@@ -953,6 +978,7 @@
     char keyWord[32];
     HistoryProReq() {
         // 初始化数据头
+        memset(this,0,sizeof(HistoryProReq ));
         head.type = HISTORY_PRODUCE_REQ;
         head.len = sizeof(HistoryProReq);
         // 初始化查询条件字段
@@ -968,6 +994,7 @@
     char keyWord[32];
     HistoryMonReq() {
         // 初始化数据头
+       memset(this,0,sizeof(HistoryMonReq));
         head.type = HISTORY_MON_REQ;
         head.len = sizeof(HistoryMonReq);
         // 初始化查询条件字段
@@ -983,6 +1010,7 @@
     char keyWord[32];
     HistoryEnvReq() {
         // 初始化数据头
+        memset(this,0,sizeof(HistoryEnvReq));
         head.type = HISTORY_ENV_REQ;
         head.len = sizeof(HistoryEnvReq);
         // 初始化查询条件字段
@@ -1101,6 +1129,86 @@
 	}
 };
 
+//版本管理
+struct VersionNumReq        // 版本号请求
+{
+    Head head;
+    VersionNumReq() {
+        head.type = VERSION_NUM_REQ;
+        head.len = sizeof(VersionNumReq);
+    }
+};
+
+struct VersionNumRes        // 版本号响应
+{
+    Head head;
+    char versionId[64]; // 版本号
+    VersionNumRes() {
+        head.type = VERSION_NUM_RES;
+        head.len = sizeof(VersionNumRes);
+    }
+};
+
+// 文件传输
+struct FileInfo
+{
+    char fileName[256];
+    long long fileSize;
+    char s_filepath[128];
+};
+
+struct UploadFileReq        // 上传文件的请求
+{
+    Head head;
+    FileInfo fileInfo;
+    UploadFileReq() {
+        head.type = UPLOAD_FILE_REQ;
+        head.len = sizeof(UploadFileReq);
+    }
+};
+
+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 versionId[64]; // 版本号
+    char versionIdOld[64]; // 上一个版本号
+    int fileNum;
+    char c_filepath[32];	//服务器放最新版本的路径
+    char versionDescription[256]; //更新内容
+    char versionCreattime[32]; // 更新时间
+    FileInfo fileInfo[0] ;		//包含下载文件信息
+
+    VersionInfoEntryReq()
+    {
+        head.type = VERSION_INFOENTRY_REQ;
+        head.len = sizeof(VersionInfoEntryReq);
+    }
+};
+
+// 版本信息录入响应
+struct VersionInfoEntryRes {
+    Head head;
+    bool state = false;
+    VersionInfoEntryRes()
+    {
+        head.type = VERSION_INFOENTRY_RES;
+        head.len = sizeof(VersionInfoEntryRes);
+    }
+};
+
 //日志
 struct ParsedLog {
 	char timeStamp[64]; // 时间戳

--
Gitblit v1.8.0