Quellcode durchsuchen

首页对接,设备控制修改

huhao@jgai.com vor 2 Tagen
Ursprung
Commit
2cb6227fad

+ 1 - 0
.gitignore

@@ -1,5 +1,6 @@
 *.iml
 build/
+.preview/*
 /.idea
 /.gradle
 local.properties

+ 6 - 3
product/phone/src/main/ets/common/constants/BusinessConstant.ets

@@ -2,15 +2,18 @@ import HashMap from '@ohos.util.HashMap';
 
 export default class BusinessConstant {
 
-  static readonly mqttSubscribeTopic: string = 'station13/data/devices';
-  static readonly mqttPublishTopic: string = 'station13/cmd/devices';
+  static readonly mqttSubscribeTopic: string = 'station11/data/devices';
+  static readonly mqttPublishTopic: string = 'station11/cmd/devices';
   static readonly mqttUrl: string = 'tcp://192.168.1.3';
   // 每个clientId不重复
-  static readonly mqttClientId: string = 'station13' + Date.now().toString(36);
+  static readonly mqttClientId: string = 'station11' + Date.now().toString(36);
   static readonly mqttUserName: string = '';
   static readonly mqttPassword: string = '';
+  // 电烙铁允许最大、最小温度
   static readonly ironTempMin: number = 150
   static readonly ironTempMax: number = 450
+  // 最大储位
+  static readonly maxStorageLocation: number = 23 * 7
 
   static readonly stationName: string = '装配工位001'
 

+ 2 - 5
product/phone/src/main/ets/pages/EntryView.ets

@@ -37,8 +37,7 @@ import { HomeView } from '../view/HomeView';
 import { WorkbenchView } from '../view/WorkbenchView';
 import { ApplicationView } from '../view/ApplicationView';
 import { DeviceView } from '../view/DeviceView';
-import ElectricScrewdriverPresetModel from '../model/ElectricScrewdriverPresetModel';
-import ElectricSolderingIronPresetModel from '../model/ElectricSolderingIronPresetModel';
+
 import common from '@ohos.app.ability.common';
 import { WorkshopView } from '../view/WorkshopView';
 
@@ -80,7 +79,7 @@ struct EntryView {
     Log.showInfo(TAG, 'onPageHide');
   }
 
-  async aboutToAppear() {
+  aboutToAppear(): void {
     Log.showInfo(TAG, 'aboutToAppear');
     this.mStage.onCreate();
     this.navigationBarStatus = SettingsModel.getInstance().getValue();
@@ -90,8 +89,6 @@ struct EntryView {
     this.registerPageDesktopNavigatorStatusChangeEvent(this.mLocalEventListener);
     //register orientation listener
     this.mOrientationListener.on('change', this.onPortrait);
-    ElectricScrewdriverPresetModel.initTaskDB(getContext())
-    ElectricSolderingIronPresetModel.initTaskDB(getContext())
   }
 
   registerPageDesktopNavigatorStatusChangeEvent(listener: LocalEventListener): void {

+ 25 - 24
product/phone/src/main/ets/view/DeviceView.ets

@@ -308,10 +308,6 @@ export struct DeviceView {
                       .fontColor(this.lighting?.lighting! === 1 ? $r("app.color.60000000") : $r("app.color.60FFFFFF"))
                       .fontWeight(FontWeight.Medium)
                       .opacity(0.9)
-                    Image($r('app.media.device_controller'))
-                      .width($r('app.float.virtualSize_9_6'))
-                      .height($r('app.float.virtualSize_9_6'))
-                      .objectFit(ImageFit.Cover)
                   }
                 }
                 .height('18.5%')
@@ -390,16 +386,21 @@ export struct DeviceView {
                 Row() {
                   Text(BusinessConstant.stationName)
                     .fontSize($r('app.float.fontSize_6_4'))
-                    .fontColor(this.cardReader?.OnlineStatus! === 1 ? $r('app.color.000000') : $r('app.color.FFFFFF'))
+                    .fontColor(this.cardReader?.OnlineStatus! === 1 ? $r("app.color.99000000") : $r("app.color.60FFFFFF"))
                     .fontWeight(FontWeight.Lighter)
                     .opacity(0.6)
                 }
                 .height('6.6%')
-
                 Blank()
                 Image($r("app.media.device_card_reader"))
                   .width($r('app.float.virtualSize_48'))
                   .height($r('app.float.virtualSize_48'))
+                if (this.cardReader?.RfidCardNum1 && this.cardReader?.RfidCardNum2) {
+                  Text(this.cardReader.RfidCardNum1 + this.cardReader.RfidCardNum2)
+                    .fontSize($r('app.float.fontSize_6_4'))
+                    .fontColor($r("app.color.FFFFFF"))
+                    .fontWeight(FontWeight.Lighter)
+                }
                 Blank()
                 Row() {
                   Text(this.cardReader?.OnlineStatus! === 1 ? '在线' : '离线')
@@ -449,16 +450,21 @@ export struct DeviceView {
                 Row() {
                   Text(BusinessConstant.stationName)
                     .fontSize($r('app.float.fontSize_6_4'))
-                    .fontColor(this.solderingIron?.OnlineStatus! === 1 ? $r('app.color.000000') : $r('app.color.FFFFFF'))
+                    .fontColor(this.solderingIron?.OnlineStatus! === 1 ? $r("app.color.99000000") : $r("app.color.60FFFFFF"))
                     .fontWeight(FontWeight.Lighter)
                     .opacity(0.6)
                 }
                 .height('6.6%')
-
                 Blank()
                 Image($r('app.media.device_electric_soldering_iron'))
                   .width($r('app.float.virtualSize_48'))
                   .height($r('app.float.virtualSize_48'))
+                if (this.solderingIron?.SolderingCurrTemp) {
+                  Text('当前温度:' + this.solderingIron.SolderingCurrTemp + '℃')
+                    .fontSize($r('app.float.fontSize_6_4'))
+                    .fontColor($r("app.color.FFFFFF"))
+                    .fontWeight(FontWeight.Lighter)
+                }
                 Blank()
                 Row() {
                   Text(this.solderingIron?.OnlineStatus! === 1 ? '在线' : '离线')
@@ -562,7 +568,7 @@ export struct DeviceView {
                 Row() {
                   Text(BusinessConstant.stationName)
                     .fontSize($r('app.float.fontSize_6_4'))
-                    .fontColor(this.screwdriver?.OnlineStatus! === 1 ? $r('app.color.000000') : $r('app.color.FFFFFF'))
+                    .fontColor(this.screwdriver?.OnlineStatus! === 1 ? $r("app.color.99000000") : $r("app.color.60FFFFFF"))
                     .fontWeight(FontWeight.Lighter)
                     .opacity(0.6)
                 }
@@ -572,6 +578,12 @@ export struct DeviceView {
                 Image($r('app.media.device_electric_screwdriver'))
                   .width($r('app.float.virtualSize_48'))
                   .height($r('app.float.virtualSize_48'))
+                if (this.screwdriver?.TightenTorqueTarget || this.screwdriver?.TorqueHoldTime) {
+                  Text((this.screwdriver?.TightenTorqueTarget! ? this.screwdriver.TightenTorqueTarget + ' Kgf.cm ' : '') + (this.screwdriver?.TorqueHoldTime! ? this.screwdriver.TorqueHoldTime + ' ms' : ''))
+                    .fontSize($r('app.float.fontSize_6_4'))
+                    .fontColor($r("app.color.FFFFFF"))
+                    .fontWeight(FontWeight.Lighter)
+                }
                 Blank()
                 Row() {
                   Text(this.screwdriver?.OnlineStatus! === 1 ? '在线' : '离线')
@@ -668,7 +680,7 @@ export struct DeviceView {
                 Row() {
                   Text(BusinessConstant.stationName)
                     .fontSize($r('app.float.fontSize_6_4'))
-                    .fontColor(this.threeColourLight?.OnlineStatus! === 1 ? $r('app.color.000000') : $r('app.color.FFFFFF'))
+                    .fontColor(this.threeColourLight?.OnlineStatus! === 1 ? $r("app.color.99000000") : $r("app.color.60FFFFFF"))
                     .fontWeight(FontWeight.Lighter)
                     .opacity(0.6)
                 }
@@ -731,17 +743,6 @@ export struct DeviceView {
               .height('100%')
               .borderRadius($r('app.float.virtualSize_6_4'))
               .backgroundColor($r('app.color.10FFFFFF'))
-              // .onClick(()=> {
-              //   const dataItem: MqttDataItem = {
-              //     tag: "LedRed",
-              //     value: 1
-              //   }
-              //   const data:MqttCmdData = {
-              //     w:[dataItem]
-              //   }
-              //   this.payload = JSON.stringify(data)
-              //   this.publish()
-              // })
 
               // 防静电手环
               Column() {
@@ -760,7 +761,7 @@ export struct DeviceView {
                 Row() {
                   Text(BusinessConstant.stationName)
                     .fontSize($r('app.float.fontSize_6_4'))
-                    .fontColor(this.screwdriver?.OnlineStatus! === 1 ? $r('app.color.000000') : $r('app.color.FFFFFF'))
+                    .fontColor(this.screwdriver?.OnlineStatus! === 1 ? $r("app.color.99000000") : $r("app.color.60FFFFFF"))
                     .fontWeight(FontWeight.Lighter)
                     .opacity(0.6)
                 }
@@ -866,8 +867,8 @@ export struct DeviceView {
           clientId: this.clientId,
           persistenceType: 1,
         });
-        num++
       }
+      num++
     }
     if (!this.mqttAsyncClient) {
       console.log("hhtest", '创建失败');
@@ -922,7 +923,6 @@ export struct DeviceView {
       qos: 1,
       payload: this.payload
     }
-    console.log('hhtest', 'publish msg:----------' + JSON.stringify(this.payload))
     console.log('hhtest', 'publish msg:----------' + JSON.stringify(publishOption))
     if (this.mqttAsyncClient == null) {
       return;
@@ -1019,6 +1019,7 @@ export struct DeviceView {
                   || device0.LedGreen! === 1 || device0.Buzzer! === 1) {
                   device0.OpenStatus = 1
                 }
+                device0.OnlineStatus = 1
                 break;
               case DeviceType.WeldFumeExtractor:
                 collectFlag[1] = true

+ 248 - 120
product/phone/src/main/ets/view/HomeView.ets

@@ -13,6 +13,8 @@ import {
 } from '@ohos/mqtt';
 import MqttUploadData from '../viewmodel/mqtt/MqttUploadData'
 import TempHumiditySensor from '../viewmodel/device/TempHumiditySensor'
+import ElectricScrewdriverPresetModel from '../model/ElectricScrewdriverPresetModel';
+import ElectricSolderingIronPresetModel from '../model/ElectricSolderingIronPresetModel';
 
 @Component
 export struct HomeView {
@@ -39,17 +41,22 @@ export struct HomeView {
   @State onlineDeviceNum: number = 0
   @State userStatistics: UserStatistics = {}
   @State outsourceStatistics: OutsourceStatistics = {}
+  @State vehicleStatistics: VehicleStatistics = {}
+  @State processStatistics: ProductProcessStatistics = {}
 
   private swiperController: SwiperController = new SwiperController()
 
   async aboutToAppear() {
+    ElectricScrewdriverPresetModel.initTaskDB(getContext())
+    ElectricSolderingIronPresetModel.initTaskDB(getContext())
     await this.createClient();
     await this.connect();
     await this.subscribe();
     this.planFinish = await MesAioRequest.post("/api/v1/process/census/task/count", {} as RequestParamModel)
     this.userStatistics = await MesAioRequest.post("/api/v1/wms/common/userStatistics", {} as RequestParamModel)
     this.outsourceStatistics = await MesAioRequest.post("/api/v1/wms/common/outsourceStatistics", {} as RequestParamModel)
-
+    this.vehicleStatistics = await MesAioRequest.post("/api/v1/wms/common/vehicleStatistics", {} as RequestParamModel)
+    this.processStatistics = await MesAioRequest.post("/api/v1/wms/common/productProcessStatistics", {} as RequestParamModel)
   }
 
   build() {
@@ -251,7 +258,7 @@ export struct HomeView {
               .height('100%')
               .borderRadius($r('app.float.virtualSize_6_4'))
               .backgroundImage($r("app.media.home_bg_process_task"))
-              .backgroundImageSize(ImageSize.Auto)
+              .backgroundImageSize(ImageSize.Contain)
 
               //温湿度
               Column() {
@@ -619,30 +626,32 @@ export struct HomeView {
                 .alignItems(VerticalAlign.Bottom)
                 .justifyContent(FlexAlign.Center)
 
-                Row() {}.height('12%')
-
-                Stack() {
-                  Progress({ value: 75, total: 100, type: ProgressType.Ring})
-                    .width($r('app.float.virtualSize_58'))
-                    .height($r('app.float.virtualSize_58'))
-                    .style({strokeWidth: $r('app.float.virtualSize_6_4')})
-                    .color(new LinearGradient([{ color: $r('app.color.73C3FF'), offset: 0.0 },
-                      { color:$r('app.color.1050FF'), offset: 1.0 }]))
-                    .backgroundColor($r('app.color.10FFFFFF'))
-
-                  Row() {
-                    Text('75')
-                      .fontSize($r('app.float.fontSize_15_2'))
-                      .fontColor($r('app.color.FFFFFF'))
-                      .fontWeight(FontWeight.Lighter)
-                    Text('%')
-                      .fontSize($r('app.float.fontSize_8'))
-                      .fontColor($r('app.color.FFFFFF'))
-                      .fontWeight(FontWeight.Lighter)
+                Row() {}.height('10%')
+                Row() {
+                  Stack() {
+                    Progress({ value: (this.vehicleStatistics?.totalNum! ? this.vehicleStatistics.totalNum : 0), total: BusinessConstant.maxStorageLocation, type: ProgressType.Ring})
+                      .width($r('app.float.virtualSize_58'))
+                      .height($r('app.float.virtualSize_58'))
+                      .style({strokeWidth: $r('app.float.virtualSize_6_4')})
+                      .color(new LinearGradient([{ color: $r('app.color.73C3FF'), offset: 0.0 },
+                        { color:$r('app.color.1050FF'), offset: 1.0 }]))
+                      .backgroundColor($r('app.color.10FFFFFF'))
+
+                    Row() {
+                      Text(this.vehicleStatistics?.totalNum! ? (this.vehicleStatistics.totalNum * 100 / BusinessConstant.maxStorageLocation).toFixed(1) : '0')
+                        .fontSize($r('app.float.fontSize_15_2'))
+                        .fontColor($r('app.color.FFFFFF'))
+                        .fontWeight(FontWeight.Lighter)
+                      Text('%')
+                        .fontSize($r('app.float.fontSize_8'))
+                        .fontColor($r('app.color.FFFFFF'))
+                        .fontWeight(FontWeight.Lighter)
+                    }
                   }
                 }
+                .height('38.5%')
                 Row() {
-                  Text('库存占用')
+                  Text('仓储占用')
                     .fontSize($r('app.float.fontSize_6_4'))
                     .fontColor($r('app.color.FFFFFF'))
                     .fontWeight(FontWeight.Lighter)
@@ -651,12 +660,12 @@ export struct HomeView {
 
                 Row() {
                   Column() {
-                    Text('215')
+                    Text(this.vehicleStatistics?.totalNum! ? this.vehicleStatistics.totalNum.toString() : '0')
                       .fontSize($r('app.float.fontSize_15_2'))
                       .fontColor($r('app.color.FFFFFF'))
                       .fontWeight(FontWeight.Lighter)
                     Row() {}.height('5%')
-                    Text('已载料箱')
+                    Text('料箱')
                       .fontSize($r('app.float.fontSize_6_4'))
                       .fontColor($r('app.color.FFFFFF'))
                       .fontWeight(FontWeight.Lighter)
@@ -670,7 +679,7 @@ export struct HomeView {
                     .height('40%')
 
                   Column() {
-                    Text('50')
+                    Text(this.vehicleStatistics?.emptyNum! ? this.vehicleStatistics.emptyNum.toString() : '0')
                       .fontSize($r('app.float.fontSize_15_2'))
                       .fontColor($r('app.color.FFFFFF'))
                       .fontWeight(FontWeight.Lighter)
@@ -685,7 +694,7 @@ export struct HomeView {
                   .height('100%')
                   .justifyContent(FlexAlign.Center)
                 }
-                .height('30%')
+                .height('25%')
                 .width('100%')
                 .justifyContent(FlexAlign.Center)
                 .alignItems(VerticalAlign.Center)
@@ -709,34 +718,79 @@ export struct HomeView {
                 .alignItems(VerticalAlign.Bottom)
                 .justifyContent(FlexAlign.Center)
 
-                Row() {}.height('18%')
+                Row() {}.height('10%')
+                Row() {
+                  Stack() {
+                    Progress({ value: (this.processStatistics?.productProcessNum! ? this.processStatistics.productProcessNum : 0), total: (this.processStatistics?.productNum! ? this.processStatistics.productNum : 100), type: ProgressType.Ring})
+                      .width($r('app.float.virtualSize_58'))
+                      .height($r('app.float.virtualSize_58'))
+                      .style({strokeWidth: $r('app.float.virtualSize_6_4')})
+                      .color(new LinearGradient([{ color: $r('app.color.73C3FF'), offset: 0.0 },
+                        { color:$r('app.color.1050FF'), offset: 1.0 }]))
+                      .backgroundColor($r('app.color.10FFFFFF'))
+
+                    Row() {
+                      Text(this.processStatistics?.productProcessNum! && this.processStatistics?.productNum! ? (this.processStatistics.productProcessNum * 100 / this.processStatistics.productNum).toFixed(1) : '0')
+                        .fontSize($r('app.float.fontSize_15_2'))
+                        .fontColor($r('app.color.FFFFFF'))
+                        .fontWeight(FontWeight.Lighter)
+                      Text('%')
+                        .fontSize($r('app.float.fontSize_8'))
+                        .fontColor($r('app.color.FFFFFF'))
+                        .fontWeight(FontWeight.Lighter)
+                    }
+                  }
+                }
+                .height('38.5%')
 
-                Column() {
-                  Text('564')
-                    .fontSize($r('app.float.fontSize_28'))
-                    .fontColor($r('app.color.FFFFFF'))
-                    .fontWeight(FontWeight.Lighter)
-                  Row() {}.height('8%')
-                  Text('物料数量')
+                Row() {
+                  Text('覆盖产品')
                     .fontSize($r('app.float.fontSize_6_4'))
                     .fontColor($r('app.color.FFFFFF'))
                     .fontWeight(FontWeight.Lighter)
                 }
-                .height('27.5%')
+                .height('8%')
 
-                Row() {}.height('11%')
+                Row() {
+                  Column() {
+                    Text(this.processStatistics?.processPublishedNum! ? this.processStatistics.processPublishedNum.toString() : '0')
+                      .fontSize($r('app.float.fontSize_15_2'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                    Row() {}.height('5%')
+                    Text('已发布')
+                      .fontSize($r('app.float.fontSize_6_4'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('38%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
+                  Divider().vertical(true)
+                    .color($r('app.color.FFFFFF'))
+                    .opacity(0.1)
+                    .height('40%')
 
-                Column({space: 5}) {
-                  Text('8')
-                    .fontSize($r('app.float.fontSize_15_2'))
-                    .fontColor($r('app.color.FFFFFF'))
-                    .fontWeight(FontWeight.Lighter)
-                  Text('工艺数量')
-                    .fontSize($r('app.float.fontSize_6_4'))
-                    .fontColor($r('app.color.FFFFFF'))
-                    .fontWeight(FontWeight.Lighter)
+                  Column() {
+                    Text(this.processStatistics?.processUnpublishedNum! ? this.processStatistics.processUnpublishedNum.toString() : '0')
+                      .fontSize($r('app.float.fontSize_15_2'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                      .textAlign(TextAlign.Start)
+                    Row() {}.height('5%')
+                    Text('未发布')
+                      .fontSize($r('app.float.fontSize_6_4'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('38%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
                 }
+                .height('25%')
+                .width('100%')
                 .justifyContent(FlexAlign.Center)
+                .alignItems(VerticalAlign.Center)
               }
               .width('16%')
               .height('100%')
@@ -744,10 +798,10 @@ export struct HomeView {
               .backgroundImage($r("app.media.home_bg_process_management"))
               .backgroundImageSize(ImageSize.Cover)
 
-              // 质量管理
+              // 质量检验
               Column(){
                 Row() {
-                  Text('质量管理')
+                  Text('质量检验')
                     .fontSize($r('app.float.fontSize_12'))
                     .fontColor($r('app.color.FFFFFF'))
                     .fontWeight(FontWeight.Medium)
@@ -756,102 +810,158 @@ export struct HomeView {
                 .width('85.5%')
                 .alignItems(VerticalAlign.Bottom)
 
-                Row() {
-                  Text('3个月内统计')
-                    .fontSize($r('app.float.fontSize_6_4'))
-                    .fontColor($r('app.color.FFFFFF'))
-                    .fontWeight(FontWeight.Lighter)
-                    .opacity(0.6)
-                }
-                .height('6.6%')
-                .width('85.5%')
-                .alignItems(VerticalAlign.Bottom)
-
-                Blank()
+                Row() {}.height('10%')
 
                 Row() {
                   Column() {
-                    Column({space: 5}) {
-                      Text('20')
-                        .fontSize($r('app.float.fontSize_19_2'))
-                        .fontColor($r('app.color.FFFFFF'))
-                        .fontWeight(FontWeight.Lighter)
-
-                      Text('设计缺陷')
+                    Stack() {
+                      Progress({ value: 1, total: 1, type: ProgressType.Ring})
+                        .width($r('app.float.virtualSize_58'))
+                        .height($r('app.float.virtualSize_58'))
+                        .style({strokeWidth: $r('app.float.virtualSize_6_4')})
+                        .color(new LinearGradient([{ color: $r('app.color.73C3FF'), offset: 0.0 },
+                          { color:$r('app.color.1050FF'), offset: 1.0 }]))
+                        .backgroundColor($r('app.color.10FFFFFF'))
+
+                      Row() {
+                        Text('100')
+                          .fontSize($r('app.float.fontSize_15_2'))
+                          .fontColor($r('app.color.FFFFFF'))
+                          .fontWeight(FontWeight.Lighter)
+                        Text('%')
+                          .fontSize($r('app.float.fontSize_8'))
+                          .fontColor($r('app.color.FFFFFF'))
+                          .fontWeight(FontWeight.Lighter)
+                      }
+                    }
+                    Row() {
+                      Text('合格率')
                         .fontSize($r('app.float.fontSize_6_4'))
                         .fontColor($r('app.color.FFFFFF'))
                         .fontWeight(FontWeight.Lighter)
                     }
-                    .height('50%')
-                    .width('50%')
-                    .justifyContent(FlexAlign.Center)
-
-                    Divider().vertical(false)
-                      .color($r('app.color.FFFFFF'))
-                      .opacity(0.2)
-
-                    Column({space: 5}) {
-                      Text('10')
-                        .fontSize($r('app.float.fontSize_19_2'))
-                        .fontColor($r('app.color.FFFFFF'))
-                        .fontWeight(FontWeight.Lighter)
+                    .height('17.2%')
+                  }
+                  .width('40%')
 
-                      Text('人为操作')
+                  Column() {
+                    Stack() {
+                      Progress({ value: 0, total: 100, type: ProgressType.Ring})
+                        .width($r('app.float.virtualSize_58'))
+                        .height($r('app.float.virtualSize_58'))
+                        .style({strokeWidth: $r('app.float.virtualSize_6_4')})
+                        .color(new LinearGradient([{ color: $r('app.color.73C3FF'), offset: 0.0 },
+                          { color:$r('app.color.1050FF'), offset: 1.0 }]))
+                        .backgroundColor($r('app.color.10FFFFFF'))
+
+                      Row() {
+                        Text('0')
+                          .fontSize($r('app.float.fontSize_15_2'))
+                          .fontColor($r('app.color.FFFFFF'))
+                          .fontWeight(FontWeight.Lighter)
+                        Text('%')
+                          .fontSize($r('app.float.fontSize_8'))
+                          .fontColor($r('app.color.FFFFFF'))
+                          .fontWeight(FontWeight.Lighter)
+                      }
+                    }
+                    Row() {
+                      Text('返工率')
                         .fontSize($r('app.float.fontSize_6_4'))
                         .fontColor($r('app.color.FFFFFF'))
                         .fontWeight(FontWeight.Lighter)
                     }
-                    .height('50%')
-                    .width('50%')
-                    .justifyContent(FlexAlign.Center)
+                    .height('17.2%')
                   }
-                  .width('50%')
-                  .height('100%')
+                  .width('40%')
+                }
+                .width('100%')
+                .height('46.5%')
+                .justifyContent(FlexAlign.Center)
 
+                Row() {
+                  Column() {
+                    Text('0')
+                      .fontSize($r('app.float.fontSize_15_2'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                    Row() {}.height('5%')
+                    Text('检验单')
+                      .fontSize($r('app.float.fontSize_6_4'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('21%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
                   Divider().vertical(true)
                     .color($r('app.color.FFFFFF'))
-                    .opacity(0.2)
+                    .opacity(0.1)
+                    .height('40%')
 
                   Column() {
-                    Column({space: 5}) {
-                      Text('15')
-                        .fontSize($r('app.float.fontSize_19_2'))
-                        .fontColor($r('app.color.FFFFFF'))
-                        .fontWeight(FontWeight.Lighter)
+                    Text('0')
+                      .fontSize($r('app.float.fontSize_15_2'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                      .textAlign(TextAlign.Start)
+                    Row() {}.height('5%')
+                    Text('不合格品审理单')
+                      .fontSize($r('app.float.fontSize_6_4'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                      .textAlign(TextAlign.Center)
+                      .maxLines(2)
+                  }
+                  .width('21%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
 
-                      Text('原材料缺陷')
-                        .fontSize($r('app.float.fontSize_6_4'))
-                        .fontColor($r('app.color.FFFFFF'))
-                        .fontWeight(FontWeight.Lighter)
-                    }
-                    .height('50%')
-                    .width('50%')
-                    .justifyContent(FlexAlign.Center)
+                  Divider().vertical(true)
+                    .color($r('app.color.FFFFFF'))
+                    .opacity(0.1)
+                    .height('40%')
 
-                    Divider().vertical(false)
-                      .color($r('app.color.FFFFFF'))
-                      .opacity(0.2)
+                  Column() {
+                    Text('10')
+                      .fontSize($r('app.float.fontSize_15_2'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                      .textAlign(TextAlign.Start)
+                    Row() {}.height('5%')
+                    Text('合格件')
+                      .fontSize($r('app.float.fontSize_6_4'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                  }
+                  .width('21%')
+                  .height('100%')
+                  .justifyContent(FlexAlign.Center)
 
-                    Column({space: 5}) {
-                      Text('5')
-                        .fontSize($r('app.float.fontSize_19_2'))
-                        .fontColor($r('app.color.FFFFFF'))
-                        .fontWeight(FontWeight.Lighter)
+                  Divider().vertical(true)
+                    .color($r('app.color.FFFFFF'))
+                    .opacity(0.1)
+                    .height('40%')
 
-                      Text('设备原因')
-                        .fontSize($r('app.float.fontSize_6_4'))
-                        .fontColor($r('app.color.FFFFFF'))
-                        .fontWeight(FontWeight.Lighter)
-                    }
-                    .height('50%')
-                    .width('50%')
-                    .justifyContent(FlexAlign.Center)
+                  Column() {
+                    Text('0')
+                      .fontSize($r('app.float.fontSize_15_2'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
+                      .textAlign(TextAlign.Start)
+                    Row() {}.height('5%')
+                    Text('返工件')
+                      .fontSize($r('app.float.fontSize_6_4'))
+                      .fontColor($r('app.color.FFFFFF'))
+                      .fontWeight(FontWeight.Lighter)
                   }
-                  .width('50%')
+                  .width('21%')
                   .height('100%')
+                  .justifyContent(FlexAlign.Center)
                 }
-                .height('71.5%')
-                .width('85%')
+                .height('25%')
+                .width('100%')
+                .justifyContent(FlexAlign.Center)
                 .alignItems(VerticalAlign.Center)
               }
               .width('32.8%')
@@ -893,8 +1003,8 @@ export struct HomeView {
           clientId: this.clientId,
           persistenceType: 1,
         });
-        num++
       }
+      num++
     }
     if (!this.mqttAsyncClient) {
       console.log("hhtest", '创建失败');
@@ -1209,4 +1319,22 @@ class OutsourceStatistics {
   weekComplete?: number
   // 订单数量
   orderNum?: number
+}
+// 载具(料箱)统计
+class VehicleStatistics {
+  // 空箱数量
+  emptyNum?: number
+  // 总料箱数量
+  totalNum?: number
+}
+// 产品工艺统计
+class ProductProcessStatistics {
+  // 产品数量
+  productNum?: number
+  // 产品工艺数量
+  productProcessNum?: number
+  // 工艺发布数量
+  processPublishedNum?: number
+  // 工艺未发布数量
+  processUnpublishedNum?: number
 }