From a4170bd5a193943ad71bcc35f9e35344dbfaba96 Mon Sep 17 00:00:00 2001
From: lhl <1281544429@qq.com>
Date: 星期二, 05 十一月 2024 21:54:19 +0800
Subject: [PATCH] 修改common的设备管理结构体

---
 common.h |   64 ++++++++++++++++++--------------
 1 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/common.h b/common.h
index 525f1f0..e6d913b 100644
--- a/common.h
+++ b/common.h
@@ -276,22 +276,22 @@
 //璁惧绠$悊
 struct DevicesInfo
 {
-	int deviceID;
 	char deviceName[32];//璁惧鍚嶇О
 	char deviceStatus[32];//璁惧鐘舵��
+    char area[32]; // 鍦板尯
+    double longitude;//缁忓害
+    double latitude;//绾害
+    char purchasingTime[15];//璐拱鏃堕棿
+    char installTime[15];//瀹夎鏃堕棿
 	char manufacturer[100];//鍘傚
+    char devicesSerialNumber[32];//璁惧缂栫爜
 	char devicesType[32];//璁惧绫诲瀷
-	double longitude;//缁忓害
-	double latitude;//绾害
-	char purchasingTime[15];//璐拱鏃堕棿
-	char installTime[15];//瀹夎鏃堕棿
-	char devicesSerialNumber[32];//璁惧缂栫爜
 };
 //娣诲姞璁惧
 struct ADReq//娣诲姞璇锋眰
 {
 	Head head;
-	char deviceName[32];
+	DevicesInfo devInfo[0];
 	ADReq() {
 		head.type = AD_REQ;
 		head.len = sizeof(ADReq);
@@ -302,7 +302,7 @@
 struct ADRes//娣诲姞鍝嶅簲
 {
 	Head head;
-	int type;
+	int status;
 	ADRes() {
 		head.type = AD_RES;
 		head.len = sizeof(ADRes);
@@ -310,22 +310,23 @@
 
 };
 //淇敼璁惧
-struct MDRes//淇敼璇锋眰
+struct MDReq//淇敼璇锋眰
 {
 	Head head;
-	DevicesInfo info;
-	MDRes() {
-		head.type = MD_RES;
-		head.len = sizeof(MDRes);
-	}
-};
-struct MDReq//淇敼鍝嶅簲
-{
-	Head head;
-	int type;
+	
 	MDReq() {
 		head.type = MD_REQ;
 		head.len = sizeof(MDReq);
+	}
+};
+struct MDRes//淇敼鍝嶅簲
+{
+	Head head;
+	DevicesInfo info;
+	int status;
+	MDRes() {
+		head.type = MD_RES;
+		head.len = sizeof(MDRes);
 	}
 };
 //鏌ヨ璁惧
@@ -341,7 +342,7 @@
 struct QDRes//鏌ヨ鍝嶅簲
 {
 	Head head;
-	int type;
+	int status;
 	QDRes() {
 		head.type = QD_RES;
 		head.len = sizeof(QDRes);
@@ -613,10 +614,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;//鐢熶骇杩涘害
@@ -626,7 +628,9 @@
 struct MonoutputInfo
 {
 	int month;//鏈堜唤
-	double output;//鏈堜骇閲�
+	double aOutput;//a浜у搧鏈堜骇閲�
+	double bOutput;//b浜у搧鏈堜骇閲�
+	double cOutput;//c浜у搧鏈堜骇閲�
 };
 
 //娣诲姞涓�鏉$敓浜ц鍒掔殑璇锋眰缁撴瀯浣�
@@ -700,12 +704,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;
@@ -798,7 +804,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);

--
Gitblit v1.8.0