Переглянути джерело

2024/02/02 管理节点通过配置文件切换贵阳厦门的配置

wk 9 місяців тому
батько
коміт
69cb5c85b6

+ 4 - 4
mytool/db_helper/db_operation.py

@@ -193,19 +193,19 @@ class DBOperation:
 
     # 查询一段时间内停车次数
     def query_park_count_in_time(self, in_date, out_date):
-        sql = "select * from record where in_time_start >= %s and in_time_start <= %s"
+        sql = "select count(*) from record where in_time_start >= %s and in_time_start <= %s"
         return self._db.query_all_sql(sql, (in_date, out_date))
 
     def query_pick_count_out_time(self, in_date, out_date):
-        sql = "select * from record where out_time_start >= %s and out_time_start <= %s"
+        sql = "select count(*) from record where out_time_start >= %s and out_time_start <= %s"
         return self._db.query_all_sql(sql, (in_date, out_date))
 
     def query_park_count_in_time_and_unit(self, in_date, out_date, unit):
-        sql = "select * from record where (in_time_start >= %s and in_time_start <= %s) and unit_id=%s"
+        sql = "select count(*) from record where (in_time_start >= %s and in_time_start <= %s) and unit_id=%s"
         return self._db.query_all_sql(sql, (in_date, out_date, unit))
 
     def query_pick_count_out_time_and_unit(self, in_date, out_date, unit):
-        sql = "select * from record where (out_time_start >= %s and out_time_start <= %s) and unit_id=%s"
+        sql = "select count(*) from record where (out_time_start >= %s and out_time_start <= %s) and unit_id=%s"
         return self._db.query_all_sql(sql, (in_date, out_date, unit))
 
     # 查询一段时间内停车车数

+ 4 - 4
出口引导节点/mytool/db_helper/db_operation.py

@@ -193,19 +193,19 @@ class DBOperation:
 
     # 查询一段时间内停车次数
     def query_park_count_in_time(self, in_date, out_date):
-        sql = "select * from record where in_time_start >= %s and in_time_start <= %s"
+        sql = "select count(*) from record where in_time_start >= %s and in_time_start <= %s"
         return self._db.query_all_sql(sql, (in_date, out_date))
 
     def query_pick_count_out_time(self, in_date, out_date):
-        sql = "select * from record where out_time_start >= %s and out_time_start <= %s"
+        sql = "select count(*) from record where out_time_start >= %s and out_time_start <= %s"
         return self._db.query_all_sql(sql, (in_date, out_date))
 
     def query_park_count_in_time_and_unit(self, in_date, out_date, unit):
-        sql = "select * from record where (in_time_start >= %s and in_time_start <= %s) and unit_id=%s"
+        sql = "select count(*) from record where (in_time_start >= %s and in_time_start <= %s) and unit_id=%s"
         return self._db.query_all_sql(sql, (in_date, out_date, unit))
 
     def query_pick_count_out_time_and_unit(self, in_date, out_date, unit):
-        sql = "select * from record where (out_time_start >= %s and out_time_start <= %s) and unit_id=%s"
+        sql = "select count(*) from record where (out_time_start >= %s and out_time_start <= %s) and unit_id=%s"
         return self._db.query_all_sql(sql, (in_date, out_date, unit))
 
     # 查询一段时间内停车车数

+ 28 - 15
管理节点/config.json

@@ -38,43 +38,56 @@
   //  车库配置
   "parking_config":{
                       //窗口名称
-//                      "window_title" : "贵阳万寿竹路智能立体停车库 车位管理系统-V1.0",
-//                      "process_title" : "贵阳万寿竹路智能停车库停取排队信息",
-                      "window_title" : "厦门上古街智能立体停车库 车位管理系统-V1.0",
-                      "process_title" : "上古街智能停车库停取排队信息",
+                      "window_title" : "贵阳万寿竹路智能立体停车库 车位管理系统-V1.0",
+                      "process_title" : "贵阳万寿竹路智能停车库停取排队信息",
+//                      "window_title" : "厦门上古街智能立体停车库 车位管理系统-V1.0",
+//                      "process_title" : "上古街智能停车库停取排队信息",
                       // 车高分级 三级分别限高多少
                       "grade1" : 1,
                       "grade2" : 2,
                       "grade3" : 3,
                       "grade4" : 4,
-                      //行(厦门15行,贵阳10)
-                      "row" : 15 ,
-                      //列(厦门6列,贵阳12)
-                      "column" : 6,
-
                       //出入口和控制室占用车位
-                      //              单元号:占用数量贵阳参数
+                      //贵阳参数
+//                      //各个单元入口,出口,控制室占用车位数
 //                      "in_occupy_space":{"11":3,"21":3},
 //                      "out_occupy_space":{"11":3,"21":3},
 //                      "controlroom_occupy_space":{"11":0,"21":3},
+//                      //车位页面,流程页面,历史记录查询页面所显示单元文本,对应单元号
 //                      "parking_unit_list" : { "A": 11,"B":21},
 //                      "process_unit_list" : { "A": [11], "B":[21],"所有":[11,21]},
 //                      "db_unit_list" : { "A": [11], "B": [21],"所有":[11,21]},
-//
+//                      //车位页面,流程页面,历史记录查询页面打开时默认单元
+//                      "init_parking_unit" : "A",
+//                      "init_process_unit" : "A",
+//                      "init_db_unit_list" : "A",
+//                      //行(厦门15行,贵阳10)
+//                      "row" : 10 ,
+//                      //列(厦门6列,贵阳12)
+//                      "column" : 12,
+//                      //层高显示减值
+//                      "floor_minus" : 0,
+
                       // 厦门参数
-                      "in_occupy_space":{"11":2,"12":3,"13":3,"14":3,"21":3,"22":3,"23":3,"24":3,"25":2,"31": 3,"32":3},
-                      "out_occupy_space":{"11":2,"12":3,"13":3,"14":3,"21":3,"22":3,"23":3,"24":3,"25":2,"31": 3,"32":3},
+                      //各个单元入口,出口,控制室占用车位数
+                      "in_occupy_space":{"11":2,"12":3,"13":3,"14":3,"21":3,"22":3,"23":3,"24":3,"25":2,"31": 3,"32":2},
+                      "out_occupy_space":{"11":2,"12":3,"13":3,"14":3,"21":3,"22":3,"23":3,"24":3,"25":2,"31": 3,"32":2},
                       "controlroom_occupy_space":{"11":0,"12":0,"13":0,"14":0,"21":0,"22":0,"23":0,"24":0,"25":0,"31": 0,"32":0},
-
+                      //车位页面,流程页面,历史记录查询页面所显示单元文本,对应单元号
                       "parking_unit_list" : { "A1": 11,"A2": 12,"A3": 13,"A4": 14, "B1":21, "B2":22, "B3":23, "B4":24, "B5":25, "C1":31, "C2":32},
                       "process_unit_list" : { "A": [11,12,13,14], "B":[21,22,23,24,25],"C": [31,32]},
                       "db_unit_list" : { "A1": 11,"A2": 12,"A3": 13,"A4": 14, "B1":21, "B2":22, "B3":23, "B4":24, "B5":25, "C1":31, "C2":32,"A": [11,12,13,14], "B":[21,22,23,24,25],"C": [31,32],"所有":[11,12,13,14,21,22,23,24,25,31,32]},
-
+                      //车位页面,流程页面,历史记录查询页面打开时默认单元
                       "init_parking_unit" : "C2",
                       "init_process_unit" : "C",
                       "init_db_unit_list" : "C",
+                      //行(厦门15行,贵阳10)
+                      "row" : 15 ,
+                      //列(厦门6列,贵阳12)
+                      "column" : 6,
                       //层高显示减值
                       "floor_minus" : 2,
+
                       //密码
                       "passwd" : "",
                       "record_title": [

+ 4 - 4
管理节点/mytool/db_helper/db_operation.py

@@ -193,19 +193,19 @@ class DBOperation:
 
     # 查询一段时间内停车次数
     def query_park_count_in_time(self, in_date, out_date):
-        sql = "select * from record where in_time_start >= %s and in_time_start <= %s"
+        sql = "select count(*) from record where in_time_start >= %s and in_time_start <= %s"
         return self._db.query_all_sql(sql, (in_date, out_date))
 
     def query_pick_count_out_time(self, in_date, out_date):
-        sql = "select * from record where out_time_start >= %s and out_time_start <= %s"
+        sql = "select count(*) from record where out_time_start >= %s and out_time_start <= %s"
         return self._db.query_all_sql(sql, (in_date, out_date))
 
     def query_park_count_in_time_and_unit(self, in_date, out_date, unit):
-        sql = "select * from record where (in_time_start >= %s and in_time_start <= %s) and unit_id=%s"
+        sql = "select count(*) from record where (in_time_start >= %s and in_time_start <= %s) and unit_id=%s"
         return self._db.query_all_sql(sql, (in_date, out_date, unit))
 
     def query_pick_count_out_time_and_unit(self, in_date, out_date, unit):
-        sql = "select * from record where (out_time_start >= %s and out_time_start <= %s) and unit_id=%s"
+        sql = "select count(*) from record where (out_time_start >= %s and out_time_start <= %s) and unit_id=%s"
         return self._db.query_all_sql(sql, (in_date, out_date, unit))
 
     # 查询一段时间内停车车数

+ 378 - 63
管理节点/ui/spaceUi.py

@@ -168,6 +168,180 @@ class Ui_MainWindow(object):
         self.groupBox.setObjectName("groupBox")
         self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox)
         self.gridLayout_2.setObjectName("gridLayout_2")
+        self.pushButton_6 = QtWidgets.QPushButton(self.groupBox)
+        font = QtGui.QFont()
+        font.setPointSize(20)
+        self.pushButton_6.setFont(font)
+        self.pushButton_6.setStyleSheet("background-color:rgb(140,100,220);")
+        self.pushButton_6.setObjectName("pushButton_6")
+        self.gridLayout_2.addWidget(self.pushButton_6, 1, 0, 1, 2)
+        self.pushButton_grade3 = QtWidgets.QPushButton(self.groupBox)
+        font = QtGui.QFont()
+        font.setFamily("宋体")
+        font.setPointSize(9)
+        self.pushButton_grade3.setFont(font)
+        self.pushButton_grade3.setLayoutDirection(QtCore.Qt.LeftToRight)
+        self.pushButton_grade3.setStyleSheet("text-align:left;")
+        icon = QtGui.QIcon()
+        icon.addPixmap(QtGui.QPixmap("../images/2050.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.pushButton_grade3.setIcon(icon)
+        self.pushButton_grade3.setIconSize(QtCore.QSize(35, 35))
+        self.pushButton_grade3.setObjectName("pushButton_grade3")
+        self.gridLayout_2.addWidget(self.pushButton_grade3, 4, 3, 1, 1)
+        self.pushButton_8 = QtWidgets.QPushButton(self.groupBox)
+        palette = QtGui.QPalette()
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 221, 163))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 196, 109))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
+        brush = QtGui.QBrush(QtGui.QColor(160, 115, 37))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 213, 155))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 221, 163))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 196, 109))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
+        brush = QtGui.QBrush(QtGui.QColor(160, 115, 37))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 213, 155))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 221, 163))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 196, 109))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
+        brush = QtGui.QBrush(QtGui.QColor(160, 115, 37))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 100, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
+        brush = QtGui.QBrush(QtGui.QColor(240, 172, 55))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush)
+        self.pushButton_8.setPalette(palette)
+        font = QtGui.QFont()
+        font.setFamily("新宋体")
+        font.setPointSize(20)
+        self.pushButton_8.setFont(font)
+        self.pushButton_8.setStyleSheet("background-color:rgb(0,100,255);")
+        self.pushButton_8.setObjectName("pushButton_8")
+        self.gridLayout_2.addWidget(self.pushButton_8, 3, 0, 1, 2)
         self.pushButton_3 = QtWidgets.QPushButton(self.groupBox)
         font = QtGui.QFont()
         font.setFamily("新宋体")
@@ -177,7 +351,20 @@ class Ui_MainWindow(object):
         icon = QtGui.QIcon.fromTheme("./images/1480.png")
         self.pushButton_3.setIcon(icon)
         self.pushButton_3.setObjectName("pushButton_3")
-        self.gridLayout_2.addWidget(self.pushButton_3, 0, 0, 1, 2)
+        self.gridLayout_2.addWidget(self.pushButton_3, 3, 2, 1, 2)
+        self.pushButton_grade1 = QtWidgets.QPushButton(self.groupBox)
+        font = QtGui.QFont()
+        font.setFamily("宋体")
+        font.setPointSize(9)
+        self.pushButton_grade1.setFont(font)
+        self.pushButton_grade1.setLayoutDirection(QtCore.Qt.LeftToRight)
+        self.pushButton_grade1.setStyleSheet("text-align:left;")
+        icon1 = QtGui.QIcon()
+        icon1.addPixmap(QtGui.QPixmap("../images/1480.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.pushButton_grade1.setIcon(icon1)
+        self.pushButton_grade1.setIconSize(QtCore.QSize(35, 35))
+        self.pushButton_grade1.setObjectName("pushButton_grade1")
+        self.gridLayout_2.addWidget(self.pushButton_grade1, 4, 0, 1, 1)
         self.pushButton_4 = QtWidgets.QPushButton(self.groupBox)
         font = QtGui.QFont()
         font.setFamily("新宋体")
@@ -188,6 +375,175 @@ class Ui_MainWindow(object):
         self.pushButton_4.setIcon(icon)
         self.pushButton_4.setObjectName("pushButton_4")
         self.gridLayout_2.addWidget(self.pushButton_4, 0, 2, 1, 2)
+        self.pushButton_7 = QtWidgets.QPushButton(self.groupBox)
+        palette = QtGui.QPalette()
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 221, 163))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 196, 109))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush)
+        brush = QtGui.QBrush(QtGui.QColor(160, 115, 37))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Shadow, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 213, 155))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.AlternateBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 221, 163))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 196, 109))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Dark, brush)
+        brush = QtGui.QBrush(QtGui.QColor(160, 115, 37))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Mid, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Shadow, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 213, 155))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.AlternateBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 221, 163))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
+        brush = QtGui.QBrush(QtGui.QColor(247, 196, 109))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Dark, brush)
+        brush = QtGui.QBrush(QtGui.QColor(160, 115, 37))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Mid, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(120, 86, 27))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 255, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Shadow, brush)
+        brush = QtGui.QBrush(QtGui.QColor(240, 172, 55))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.AlternateBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(255, 255, 220))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipBase, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
+        brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
+        brush.setStyle(QtCore.Qt.SolidPattern)
+        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush)
+        self.pushButton_7.setPalette(palette)
+        font = QtGui.QFont()
+        font.setFamily("新宋体")
+        font.setPointSize(20)
+        self.pushButton_7.setFont(font)
+        self.pushButton_7.setStyleSheet("background-color:rgb(0,255,0);")
+        self.pushButton_7.setObjectName("pushButton_7")
+        self.gridLayout_2.addWidget(self.pushButton_7, 2, 0, 1, 2)
+        self.pushButton_grade2 = QtWidgets.QPushButton(self.groupBox)
+        font = QtGui.QFont()
+        font.setFamily("宋体")
+        font.setPointSize(9)
+        font.setBold(False)
+        font.setWeight(50)
+        self.pushButton_grade2.setFont(font)
+        self.pushButton_grade2.setLayoutDirection(QtCore.Qt.LeftToRight)
+        self.pushButton_grade2.setStyleSheet("text-align:left;")
+        icon2 = QtGui.QIcon()
+        icon2.addPixmap(QtGui.QPixmap("../images/1500.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.pushButton_grade2.setIcon(icon2)
+        self.pushButton_grade2.setIconSize(QtCore.QSize(35, 35))
+        self.pushButton_grade2.setObjectName("pushButton_grade2")
+        self.gridLayout_2.addWidget(self.pushButton_grade2, 4, 1, 1, 2)
         self.pushButton_5 = QtWidgets.QPushButton(self.groupBox)
         palette = QtGui.QPalette()
         brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
@@ -341,7 +697,7 @@ class Ui_MainWindow(object):
         self.pushButton_5.setFont(font)
         self.pushButton_5.setStyleSheet("background-color:rgb(102,255,255);")
         self.pushButton_5.setObjectName("pushButton_5")
-        self.gridLayout_2.addWidget(self.pushButton_5, 1, 0, 1, 2)
+        self.gridLayout_2.addWidget(self.pushButton_5, 0, 0, 1, 2)
         self.pushButton_2 = QtWidgets.QPushButton(self.groupBox)
         font = QtGui.QFont()
         font.setFamily("新宋体")
@@ -352,13 +708,6 @@ class Ui_MainWindow(object):
         self.pushButton_2.setIcon(icon)
         self.pushButton_2.setObjectName("pushButton_2")
         self.gridLayout_2.addWidget(self.pushButton_2, 1, 2, 1, 2)
-        self.pushButton_6 = QtWidgets.QPushButton(self.groupBox)
-        font = QtGui.QFont()
-        font.setPointSize(20)
-        self.pushButton_6.setFont(font)
-        self.pushButton_6.setStyleSheet("background-color:rgb(140,100,220);")
-        self.pushButton_6.setObjectName("pushButton_6")
-        self.gridLayout_2.addWidget(self.pushButton_6, 2, 0, 1, 2)
         self.pushButton = QtWidgets.QPushButton(self.groupBox)
         font = QtGui.QFont()
         font.setFamily("新宋体")
@@ -369,55 +718,8 @@ class Ui_MainWindow(object):
         self.pushButton.setIcon(icon)
         self.pushButton.setObjectName("pushButton")
         self.gridLayout_2.addWidget(self.pushButton, 2, 2, 1, 2)
-        self.pushButton_grade1 = QtWidgets.QPushButton(self.groupBox)
-        font = QtGui.QFont()
-        font.setPointSize(9)
-        self.pushButton_grade1.setFont(font)
-        self.pushButton_grade1.setLayoutDirection(QtCore.Qt.LeftToRight)
-        self.pushButton_grade1.setStyleSheet("text-align:left;")
-        icon = QtGui.QIcon()
-        icon.addPixmap(QtGui.QPixmap("../images/1480.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
-        self.pushButton_grade1.setIcon(icon)
-        self.pushButton_grade1.setIconSize(QtCore.QSize(35, 35))
-        self.pushButton_grade1.setObjectName("pushButton_grade1")
-        self.gridLayout_2.addWidget(self.pushButton_grade1, 3, 0, 1, 1)
-        self.pushButton_grade2 = QtWidgets.QPushButton(self.groupBox)
-        font = QtGui.QFont()
-        font.setPointSize(9)
-        self.pushButton_grade2.setFont(font)
-        self.pushButton_grade2.setLayoutDirection(QtCore.Qt.LeftToRight)
-        self.pushButton_grade2.setStyleSheet("text-align:left;")
-        icon1 = QtGui.QIcon()
-        icon1.addPixmap(QtGui.QPixmap("../images/1500.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
-        self.pushButton_grade2.setIcon(icon1)
-        self.pushButton_grade2.setIconSize(QtCore.QSize(35, 35))
-        self.pushButton_grade2.setObjectName("pushButton_grade2")
-        self.gridLayout_2.addWidget(self.pushButton_grade2, 3, 1, 1, 2)
-        self.pushButton_grade3 = QtWidgets.QPushButton(self.groupBox)
-        font = QtGui.QFont()
-        font.setPointSize(9)
-        self.pushButton_grade3.setFont(font)
-        self.pushButton_grade3.setLayoutDirection(QtCore.Qt.LeftToRight)
-        self.pushButton_grade3.setStyleSheet("text-align:left;")
-        icon2 = QtGui.QIcon()
-        icon2.addPixmap(QtGui.QPixmap("../images/2050.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
-        self.pushButton_grade3.setIcon(icon2)
-        self.pushButton_grade3.setIconSize(QtCore.QSize(35, 35))
-        self.pushButton_grade3.setObjectName("pushButton_grade3")
-        self.gridLayout_2.addWidget(self.pushButton_grade3, 3, 3, 1, 1)
         self.verticalLayout.addWidget(self.groupBox)
         self.horizontalLayout_9.addLayout(self.verticalLayout)
-        self.plate_clip_image_box = QtWidgets.QGroupBox(self.parkingspace)
-        self.plate_clip_image_box.setObjectName("plate_clip_image_box")
-        self.horizontalLayout = QtWidgets.QHBoxLayout(self.plate_clip_image_box)
-        self.horizontalLayout.setObjectName("horizontalLayout")
-        self.plate_clip_image_label = QtWidgets.QLabel(self.plate_clip_image_box)
-        self.plate_clip_image_label.setText("")
-        self.plate_clip_image_label.setScaledContents(True)
-        self.plate_clip_image_label.setAlignment(QtCore.Qt.AlignCenter)
-        self.plate_clip_image_label.setObjectName("plate_clip_image_label")
-        self.horizontalLayout.addWidget(self.plate_clip_image_label)
-        self.horizontalLayout_9.addWidget(self.plate_clip_image_box)
         self.plate_full_image_box = QtWidgets.QGroupBox(self.parkingspace)
         self.plate_full_image_box.setObjectName("plate_full_image_box")
         self.horizontalLayout_18 = QtWidgets.QHBoxLayout(self.plate_full_image_box)
@@ -429,9 +731,20 @@ class Ui_MainWindow(object):
         self.plate_full_image_label.setObjectName("plate_full_image_label")
         self.horizontalLayout_18.addWidget(self.plate_full_image_label)
         self.horizontalLayout_9.addWidget(self.plate_full_image_box)
+        self.plate_clip_image_box = QtWidgets.QGroupBox(self.parkingspace)
+        self.plate_clip_image_box.setObjectName("plate_clip_image_box")
+        self.horizontalLayout = QtWidgets.QHBoxLayout(self.plate_clip_image_box)
+        self.horizontalLayout.setObjectName("horizontalLayout")
+        self.plate_clip_image_label = QtWidgets.QLabel(self.plate_clip_image_box)
+        self.plate_clip_image_label.setText("")
+        self.plate_clip_image_label.setScaledContents(True)
+        self.plate_clip_image_label.setAlignment(QtCore.Qt.AlignCenter)
+        self.plate_clip_image_label.setObjectName("plate_clip_image_label")
+        self.horizontalLayout.addWidget(self.plate_clip_image_label)
+        self.horizontalLayout_9.addWidget(self.plate_clip_image_box)
         self.horizontalLayout_9.setStretch(0, 1)
-        self.horizontalLayout_9.setStretch(1, 2)
-        self.horizontalLayout_9.setStretch(2, 2)
+        self.horizontalLayout_9.setStretch(1, 4)
+        self.horizontalLayout_9.setStretch(2, 3)
         self.verticalLayout_4.addLayout(self.horizontalLayout_9)
         self.widget = QtWidgets.QWidget(self.parkingspace)
         self.widget.setObjectName("widget")
@@ -794,17 +1107,19 @@ class Ui_MainWindow(object):
         self.groupBox_3.setTitle(_translate("MainWindow", "库位号"))
         self.unit_label.setText(_translate("MainWindow", "A-1"))
         self.groupBox.setTitle(_translate("MainWindow", "车位说明"))
+        self.pushButton_6.setText(_translate("MainWindow", "存车中"))
+        self.pushButton_grade3.setText(_translate("MainWindow", "限高2.05"))
+        self.pushButton_8.setText(_translate("MainWindow", "已锁定"))
         self.pushButton_3.setText(_translate("MainWindow", "出入口"))
+        self.pushButton_grade1.setText(_translate("MainWindow", "限高1.48"))
         self.pushButton_4.setText(_translate("MainWindow", "空闲车位"))
+        self.pushButton_7.setText(_translate("MainWindow", "已预约"))
+        self.pushButton_grade2.setText(_translate("MainWindow", "限高1.50"))
         self.pushButton_5.setText(_translate("MainWindow", "取车中"))
         self.pushButton_2.setText(_translate("MainWindow", "占用车位"))
-        self.pushButton_6.setText(_translate("MainWindow", "存车中"))
         self.pushButton.setText(_translate("MainWindow", "故障车位"))
-        self.pushButton_grade1.setText(_translate("MainWindow", "限高1.48"))
-        self.pushButton_grade2.setText(_translate("MainWindow", "限高1.50"))
-        self.pushButton_grade3.setText(_translate("MainWindow", "限高2.05"))
-        self.plate_clip_image_box.setTitle(_translate("MainWindow", "车牌特写图"))
         self.plate_full_image_box.setTitle(_translate("MainWindow", "车辆全景图"))
+        self.plate_clip_image_box.setTitle(_translate("MainWindow", "车牌特写图"))
         self.tabWidget.setTabText(self.tabWidget.indexOf(self.parkingspace), _translate("MainWindow", "车位管理"))
         self.label.setText(_translate("MainWindow", "上古街智能立体停车库停取车排队信息"))
         self.groupBox_2.setTitle(_translate("MainWindow", "显示单元"))

Різницю між файлами не показано, бо вона завелика
+ 1045 - 124
管理节点/ui/spaceUi.ui


+ 11 - 5
管理节点/window_controller/main_window.py

@@ -413,17 +413,17 @@ class MainWindow(QMainWindow, sui.Ui_MainWindow):
                 self.db_unit_park_dict), copy.deepcopy(self.db_unit_pick_dict), copy.deepcopy(
                 self.record_total_unit_park_dict), copy.deepcopy(self.record_total_unit_pick_dict)
         unit_park_count = unit_pick_count = 0
-        all_park_count, all_pick_count = len(record_all_unit_park_dict), len(record_all_unit_pick_dict)
+        all_park_count, all_pick_count = record_all_unit_park_dict[0]['count(*)'], record_all_unit_pick_dict[0]['count(*)']
 
         # 当前选中时间内指定总单元记录数据
         if len(self.db_unit) == 1:
             for unit in self.db_unit_list[self.db_unit]:
-                unit_park_count = unit_park_count + len(record_total_unit_park_dict[unit])
-                unit_pick_count = unit_pick_count + len(record_total_unit_pick_dict[unit])
+                unit_park_count = unit_park_count + record_total_unit_park_dict[unit][0]['count(*)']
+                unit_pick_count = unit_pick_count + record_total_unit_pick_dict[unit][0]['count(*)']
 
         # 当前选中时间内指定单元记录数据
-        elif len(self.db_unit) != 1 and self.db_unit_list[self.db_unit] is not None:
-            unit_park_count, unit_pick_count = len(db_unit_park_dict), len(db_unit_pick_dict)
+        elif len(self.db_unit) != 1 and isinstance(self.db_unit_list[self.db_unit],list) is False:
+            unit_park_count, unit_pick_count = db_unit_park_dict[0]['count(*)'], db_unit_pick_dict[0]['count(*)']
         else:
             unit_park_count, unit_pick_count = all_park_count, all_pick_count
 
@@ -811,9 +811,15 @@ class MainWindow(QMainWindow, sui.Ui_MainWindow):
         # 占用
         elif park["statu"] == 2:
             background_color = "background-color:rgb(248,239,71);"
+        # 已锁定
+        elif park["statu"] == 3:
+            background_color = "background-color:rgb(0,100,255);"
         # 取车中
         elif park["statu"] == 4:
             background_color = "background-color:rgb(102,255,255);"
+        # 已预约
+        elif park["statu"] == 5:
+            background_color = "background-color:rgb(0,255,0);"
         # 出入口
         elif park["statu"] == 6 or park["statu"] == 7 or park["statu"] == 8:
             background_color = "background-color:rgb(0,162,232);"