Browse Source

齐套选择料箱出库

huhao@jgai.com 3 weeks ago
parent
commit
354aa892c2

+ 4 - 4
entry/oh-package-lock.json5

@@ -4,7 +4,7 @@
   "specifiers": {
     "@ohos/axios@2.2.1-rc.0": "@ohos/axios@2.2.1-rc.0",
     "@mcui/mccharts@^1.0.2": "@mcui/mccharts@1.0.2",
-    "@ohos/mqtt@^2.0.6": "@ohos/mqtt@2.0.21"
+    "@ohos/mqtt@2.0.6": "@ohos/mqtt@2.0.6"
   },
   "packages": {
     "@ohos/axios@2.2.1-rc.0": {
@@ -17,9 +17,9 @@
       "integrity": "sha512-44hGTwZcsfFnny7nT/zMpWKFqXbaVmdlDbyeJIOlJwbglS/S3ypqhBdzbpj3aJrcMSd5FLFO0FrZGntph9HSIw==",
       "registryType": "ohpm"
     },
-    "@ohos/mqtt@2.0.21": {
-      "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/mqtt/-/mqtt-2.0.21.har",
-      "integrity": "sha512-Z04WQ+Z5OTL4jnDFWFwBUNgjvU42+g+z3kmiuq3/D9feMsQt0FMxaCwzyo/dl2TaDixbJ8eBh5aQTgmt+1pztw==",
+    "@ohos/mqtt@2.0.6": {
+      "resolved": "https://repo.harmonyos.com/ohpm/@ohos/mqtt/-/mqtt-2.0.6.har",
+      "integrity": "sha512-2uZKhjM2JWo/eqAPjKIHK3zEa6J8Zp2qz89soY2i34podtcPm23DvP3VLI1HNa+0Tc8Y04RwSz3Gmedqe/OWsw==",
       "dependencies": {
         "libmqttasync.so": "file:./src/main/cpp/types/libmqttasync"
       },

+ 1 - 1
entry/oh-package.json5

@@ -8,7 +8,7 @@
   "dependencies": {
     "@mcui/mccharts": "^1.0.2",
     "@ohos/axios": "2.2.1-rc.0",
-    "@ohos/mqtt": "^2.0.6"
+    "@ohos/mqtt": "2.0.6"
   }
 }
 

+ 0 - 1
entry/src/main/ets/common/util/request/WmsRequest.ets

@@ -44,7 +44,6 @@ WmsRequest.interceptors.request.use((config: InternalAxiosRequestConfig) => {
 
 // 添加响应拦截器
 WmsRequest.interceptors.response.use((response: AxiosResponse) => {
-  console.log("hhtest", "---------------------------")
   // 对响应数据做点什么
   printResponse(response)
   let res = handleRes(response)

+ 26 - 2
entry/src/main/ets/pages/Menu.ets

@@ -8,6 +8,10 @@ import PageRes from "../viewmodel/wms/InBoundOrderInfo"
 import router from '@ohos.router';
 import MqttManager from '../common/util/mqtt';
 import { MqttClientOptions, MqttConnectOptions } from '@ohos/mqtt';
+import CommonConstants from '../common/constants/CommonConstants'
+import DictInfo from '../viewmodel/DictInfo'
+import connection from '@ohos.net.connection';
+
 const TAG: string = 'MENU'
 @Entry
 @Component
@@ -63,8 +67,28 @@ struct menu {
     this.loadOrders(1, this.inBoundOrders)
     this.loadOrders(2, this.outBoundOrders)
     this.connectMQTT();
-  }
 
+    // 查询数据字典放到CommonConstants的DICT_DATA变量中
+    let res: DictInfo[] = await WmsRequest.post('/api/v1/sys/dictData/all',)
+    if (res && res.length > 0) {
+      for (const dict of res) {
+        CommonConstants.DICT_DATA.set(dict.dictCode, dict.list)
+      }
+    }
+    try {
+      const netHandle = connection.getDefaultNetSync();
+      if (netHandle) {
+        let connectionProperties = await connection.getConnectionProperties(netHandle)
+        if (connectionProperties && connectionProperties.linkAddresses) {
+          connectionProperties.linkAddresses.forEach((address: connection.LinkAddress, index: number) => {
+            console.info('hhtest', "get address info: " + JSON.stringify(address));
+          })
+        }
+      }
+    } catch (err) {
+      console.log('hhtest', err);
+    }
+  }
 
   build() {
     Row() {
@@ -198,7 +222,7 @@ struct menu {
             .backgroundImageSize(ImageSize.Cover)
             .onClick(()=>{
               router.pushUrl({
-                url: 'pages/ProcessMaterialKit'
+                url: 'pages/OperationMaterialKit'
               })
             })
             Column() {

+ 19 - 4
entry/src/main/ets/pages/ProcessMaterialKit.ets

@@ -4,16 +4,23 @@
 import { TimeAndTitle } from '../component/TimeAndTitle'
 import router from '@ohos.router'
 import { NavigationBar } from '../component/NavigationBar'
-import { ProcessMaterialKitOneStep } from '../view/wms/ProcessMaterialKitOneStep'
+import { OperationMaterialKitOneStep } from '../view/wms/OperationMaterialKitOneStep'
 import WorkOrderInfo from '../viewmodel/wms/WorkOrderInfo'
+import { OperationMaterialKitTwoStep } from '../view/wms/OperationMaterialKitTwoStep'
+import OperationInfo from '../viewmodel/wms/OperationInfo'
+import OperationItem from '../viewmodel/wms/OperationItem'
 
 @Entry
 @Component
-struct ProcessMaterialKit {
+struct OperationMaterialKit {
 
   @State step: number = 1
   // 选中的工单
   @State workOrder: WorkOrderInfo = {}
+  // 选中的工序
+  @State selectOperations: OperationInfo[] = []
+  // 选中工序需求的物料
+  @State operationItems: OperationItem[] = []
 
   build() {
     Column() {
@@ -122,8 +129,16 @@ struct ProcessMaterialKit {
 
       Column() {
         if (this.step === 1) {
-          ProcessMaterialKitOneStep({
-            workOrder: this.workOrder
+          OperationMaterialKitOneStep({
+            workOrder: this.workOrder,
+            selectOperations: this.selectOperations,
+            operationItems: this.operationItems,
+          })
+        } else if (this.step === 2) {
+          OperationMaterialKitTwoStep({
+            workOrder: this.workOrder,
+            selectOperations: this.selectOperations,
+            operationItems: this.operationItems,
           })
         }
       }

+ 133 - 134
entry/src/main/ets/view/wms/ProcessMaterialKitOneStep.ets

@@ -4,100 +4,31 @@ import StationOperationInfo from '../../viewmodel/wms/StationOperationInfo'
 import OperationInfo from '../../viewmodel/wms/OperationInfo'
 import RequestParamModel from '../../viewmodel/wms/RequestParamModel'
 import WorkOrderInfo from '../../viewmodel/wms/WorkOrderInfo'
+import OperationMaterial from '../../viewmodel/wms/OperationMaterial'
+import OperationItem from '../../viewmodel/wms/OperationItem'
+import HashMap from '@ohos.util.HashMap'
+import DictInfo from '../../viewmodel/DictInfo'
 
 @Component
-export struct ProcessMaterialKitOneStep {
+export struct OperationMaterialKitOneStep {
 
   @Link workOrder: WorkOrderInfo
-
+  @Link selectOperations: OperationInfo[]
+  @Link operationItems: OperationItem[]
+  
   @State workOrderArray: WorkOrderInfo[] = []
-  @State operationArray: StationOperationInfo[] = [
-    {
-      operationVO: [
-        {
-          id: '588',
-          operationCode: 'XFOP-0052',
-          operationName: '领料',
-          operationOp: '',
-          stanType: '10'
-        }
-      ],
-      stanType: '10',
-      stanTypeName: 'tes'
-    },
-    {
-      operationVO: [
-        {
-          id: '536',
-          operationCode: 'XFOP-0015',
-          operationName: '装配',
-          operationOp: '',
-          stanType: '13',
-        }
-      ],
-      stanType: '13'
-    },
-    {
-      operationVO: [
-        {
-          id: '537',
-          operationName: '调试',
-          operationOp: '',
-          stanType: '7',
-        }
-      ],
-      stanType: '7'
-    },
-    {
-      operationVO: [
-        {
-          id: '538',
-          operationCode: 'XFOP-0017',
-          operationName: '装配',
-          operationOp: '',
-          stanType: '13',
-        }
-      ],
-      stanType: '13'
-    },
-    {
-      operationVO: [
-        {
-          id: '540',
-          operationCode: 'XFOP-0019',
-          operationName: '检测',
-          operationOp: '',
-          stanType: '9',
-        },
-        {
-          id: '539',
-          operationCode: 'XFOP-0018',
-          operationName: '调试',
-          operationOp: '',
-          stanType: '9',
-        }
-      ],
-      stanType: '9'
-    },
-    {
-      operationVO: [
-        {
-          id: '541',
-          operationCode: 'XFOP-0020',
-          operationName: '试验',
-          stanType: '7',
-        }
-      ],
-      stanType: '7'
-    }
-  ]
-
+  @State operationArray: StationOperationInfo[] = []
+  @State operationMaterialArray: OperationMaterial[] = []
 
   @State selectWorkOrder: number = 0
-  @State selectOperations: string[] = []
+  @State selectOperationIds: string[] = []
 
+  fixed38px: number = 22.8
+  fixed52px: number = 31.2
+  fixed100px: number = 60
 
-  stationType: string = 'station_type'
+  stationTypeDictType: string = 'station_type'
+  stationTypeDictMap: HashMap<string, string> = new HashMap<string, string>()
 
   async aboutToAppear() {
     this.workOrderArray = await WmsRequest.post('/api/v1/wms/workOrder/list', {
@@ -107,42 +38,34 @@ export struct ProcessMaterialKitOneStep {
     if (this.workOrderArray && this.workOrderArray.length > 0) {
       this.workOrder = this.workOrderArray[0]
       this.selectWorkOrder = 0
-      console.log('hhtest', '----------' + JSON.stringify(this.workOrderArray[0]))
       this.operationArray = await WmsRequest.post('/api/v1/wms/operation/list', {
         //查询未完成的工单
         processRouteId: this.workOrderArray[0]?.processRouteId,
       } as RequestParamModel) as StationOperationInfo[]
     }
-
-    if (this.operationArray && this.operationArray.length > 0) {
-      // 获取不合格原因的数据字典
-      let dictArray = CommonConstants.DICT_DATA.get(this.stationType);
-      if (!dictArray || dictArray.length <= 0) {
-        dictArray = await WmsRequest.get('/api/v1/sys/dictData/queryByType/' + this.stationType as string, {})
-      }
-      if (!dictArray) {
-        return
-      }
-      for (const element of this.operationArray) {
-        for (const dict of dictArray) {
-          if (element.stanType === dict.dictValue) {
-            element.stanTypeName = dict.dictLabel
+    if (!CommonConstants.DICT_DATA || CommonConstants.DICT_DATA.length <= 0) {
+      let res: DictInfo[] = await WmsRequest.post('/api/v1/sys/dictData/all',)
+      if (res && res.length > 0) {
+        for (const dict of res) {
+          CommonConstants.DICT_DATA.set(dict.dictCode, dict.list)
+          if (this.stationTypeDictType === dict.dictCode) {
+            for (const element of dict?.list!) {
+              this.stationTypeDictMap.set(element.dictValue, element.dictLabel);
+            }
           }
         }
       }
+    } else {
+      let dictList = CommonConstants.DICT_DATA.get(this.stationTypeDictType);
+      for (const element of dictList) {
+        this.stationTypeDictMap.set(element.dictValue, element.dictLabel);
+      }
     }
-    console.log('hhtest', '---------------')
-    console.log('hhtest', '---------------')
-    console.log('hhtest', '---------------')
-    console.log('hhtest', '---------------')
-    console.log('hhtest', JSON.stringify(this.operationArray))
-    console.log('hhtest', '---------------')
-    console.log('hhtest', '---------------')
-    console.log('hhtest', '---------------')
   }
 
   build() {
     Row() {
+      // 选择工单
       Column() {
         Row() {
           Text('选择工单')
@@ -198,6 +121,17 @@ export struct ProcessMaterialKitOneStep {
               .borderRadius($r('app.float.virtualSize_6_4'))
               .justifyContent(FlexAlign.Start)
               .backgroundColor(this.selectWorkOrder === index ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
+              .onClick(async ()=>{
+                if (this.selectWorkOrder === index) {
+                  return
+                }
+                this.operationArray = await WmsRequest.post('/api/v1/wms/operation/list', {
+                  //查询未完成的工单
+                  processRouteId: this.workOrderArray[index]?.processRouteId,
+                } as RequestParamModel) as StationOperationInfo[]
+                this.selectWorkOrder = index
+                this.workOrder = this.workOrderArray[this.selectWorkOrder]
+              })
             }
           })
         }
@@ -210,7 +144,7 @@ export struct ProcessMaterialKitOneStep {
       .borderRadius($r('app.float.virtualSize_6_4'))
       .justifyContent(FlexAlign.Center)
       .backgroundColor($r('app.color.10FFFFFF'))
-
+      // 选择工序
       Column() {
         Row() {
           Text('选择工序')
@@ -228,7 +162,7 @@ export struct ProcessMaterialKitOneStep {
               Column() {
                 Row() {
                   Row() {
-                    Text(item.stanTypeName ? item.stanTypeName : (item.stanType ? item.stanType : ''))
+                    Text(this.stationTypeDictMap.get(item.stanType!) ? this.stationTypeDictMap.get(item.stanType!) : item.stanType!)
                       .fontSize($r('app.float.fontSize_6_4'))
                       .fontWeight(FontWeight.Lighter)
                       .fontColor($r('app.color.FFFFFF'))
@@ -244,21 +178,32 @@ export struct ProcessMaterialKitOneStep {
                         Row().height(6)
                         Row({space: 5}) {
                           Checkbox()
-                            .select(this.selectOperations.indexOf(operation.id) > -1 ? true : false)
+                            .select(this.selectOperationIds.indexOf(operation.id) > -1 ? true : false)
                             .selectedColor($r('app.color.30D158'))
                             .width($r('app.float.virtualSize_8'))
                             .height($r('app.float.virtualSize_8'))
-                            .onChange((value: boolean) => {
+                            .onChange(async (value: boolean) => {
                               if (value) {
-                                if (!this.selectOperations.includes(operation.id)) {
-                                  this.selectOperations.push(operation.id)
+                                if (!this.selectOperationIds.includes(operation.id)) {
+                                  this.selectOperationIds.push(operation.id)
+                                  this.selectOperations.push(operation)
                                 }
                               } else {
-                                if (this.selectOperations.includes(operation.id)) {
-                                  this.selectOperations = this.selectOperations.splice(this.selectOperations.indexOf(operation.id), 1)
+                                if (this.selectOperationIds.includes(operation.id)) {
+                                  this.selectOperationIds.splice(this.selectOperationIds.indexOf(operation.id), 1)
+                                  this.selectOperations.splice(this.selectOperations.indexOf(operation), 1)
+                                }
+                              }
+                              this.operationMaterialArray = await WmsRequest.post('/api/v1/wms/operationMaterial/list', {
+                                //查询工序需求的物料
+                                operationIds: this.selectOperationIds,
+                              } as RequestParamModel) as OperationMaterial[]
+                              this.operationItems = []
+                              if (this.operationMaterialArray) {
+                                for (const element of this.operationMaterialArray) {
+                                  this.operationItems = this.operationItems.concat(element.itemList);
                                 }
                               }
-                              console.log('hhtest', '---' + JSON.stringify(this.selectOperations))
                             })
                           Text(operation.operationName ? operation.operationName : '')
                             .fontSize($r('app.float.fontSize_9_6'))
@@ -268,15 +213,26 @@ export struct ProcessMaterialKitOneStep {
                         .width('100%')
                         .height(48)
                         .padding({left: '6%'})
-                        .backgroundColor(this.selectOperations.indexOf(operation.id) > -1 ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
+                        .backgroundColor(this.selectOperationIds.indexOf(operation.id) > -1 ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
                         .borderRadius($r('app.float.virtualSize_6_4'))
-                        .onClick(()=>{
-                          if (this.selectOperations.includes(operation.id)) {
-                            this.selectOperations.splice(this.selectOperations.indexOf(operation.id), 1)
+                        .onClick(async ()=>{
+                          if (this.selectOperationIds.includes(operation.id)) {
+                            this.selectOperationIds.splice(this.selectOperationIds.indexOf(operation.id), 1)
+                            this.selectOperations.splice(this.selectOperations.indexOf(operation), 1)
                           } else {
-                            this.selectOperations.push(operation.id)
+                            this.selectOperationIds.push(operation.id)
+                            this.selectOperations.push(operation)
+                          }
+                          this.operationMaterialArray = await WmsRequest.post('/api/v1/wms/operationMaterial/list', {
+                            //查询工序需求的物料
+                            operationIds: this.selectOperationIds,
+                          } as RequestParamModel) as OperationMaterial[]
+                          this.operationItems = []
+                          if (this.operationMaterialArray) {
+                            for (const element of this.operationMaterialArray) {
+                              this.operationItems = this.operationItems.concat(element.itemList);
+                            }
                           }
-                          console.log('hhtest', '---' + JSON.stringify(this.selectOperations))
                         })
                         Row().height(6)
                       }
@@ -292,7 +248,7 @@ export struct ProcessMaterialKitOneStep {
                   .width('100%')
               }
               .width('92.6%')
-              .height(item.operationVO?.length! * 60)
+              .height(item.operationVO?.length! * this.fixed100px)
             }
           })
         }
@@ -305,7 +261,7 @@ export struct ProcessMaterialKitOneStep {
       .borderRadius($r('app.float.virtualSize_6_4'))
       .justifyContent(FlexAlign.Center)
       .backgroundColor($r('app.color.10FFFFFF'))
-
+      // 工序所需物料
       Column() {
         Row() {
           Text('需求物料')
@@ -318,30 +274,73 @@ export struct ProcessMaterialKitOneStep {
         .justifyContent(FlexAlign.Center)
 
         List() {
-          ForEach(this.operationArray, (item: StationOperationInfo, index: number) => {
+          ForEach(this.operationMaterialArray, (item: OperationMaterial, index: number) => {
             ListItem() {
-              Row() {
-                Row() {
-                  Text(item.stanTypeName ? item.stanTypeName : (item.stanType ? item.stanType : ''))
+              Column() {
+                Row({space: 5}) {
+                  Circle()
+                    .width($r('app.float.virtualSize_2'))  // 设置圆点直径
+                    .height($r('app.float.virtualSize_2'))
+                    .fill($r('app.color.FFFFFF'))
+                  Text(item.operationName ? item.operationName : '')
                     .fontSize($r('app.float.fontSize_9_6'))
                     .fontWeight(FontWeight.Medium)
                     .fontColor($r('app.color.FFFFFF'))
                     .maxLines(1)
                 }
-                .height('100%')
-                .width('91%')
-                .alignItems(VerticalAlign.Bottom)
+                .height(this.fixed52px)
+                .width('100%')
+                .alignItems(VerticalAlign.Center)
+                ForEach(item.itemList, (material: OperationItem)=>{
+                  Column({space: 5}) {
+                    Row() {
+                      Text(material.itemName! + '-' + material.itemCode!)
+                        .fontSize($r('app.float.fontSize_6_4'))
+                        .fontWeight(FontWeight.Bold)
+                        .fontColor($r('app.color.FFFFFF'))
+                        .maxLines(1)
 
+                      Text((material.kitNum? material.kitNum : 0) + '/' + (material.storageNum? material.storageNum : 0))
+                        .fontSize($r('app.float.fontSize_6_4'))
+                        .fontWeight(FontWeight.Bold)
+                        .fontColor($r('app.color.FFFFFF'))
+                        .maxLines(1)
+                    }
+                    .width('100%')
+                    .justifyContent(FlexAlign.SpaceBetween)
+                    Row() {
+                      Text('型号:' + (material.itemModel ? material.itemModel : ''))
+                        .fontSize($r('app.float.fontSize_4_8'))
+                        .fontWeight(FontWeight.Lighter)
+                        .fontColor($r('app.color.FFFFFF'))
+                        .maxLines(1)
+                      Text('齐套/入库数量')
+                        .fontSize($r('app.float.fontSize_4_8'))
+                        .fontWeight(FontWeight.Lighter)
+                        .fontColor($r('app.color.60FFFFFF'))
+                    }
+                    .width('100%')
+                    .justifyContent(FlexAlign.SpaceBetween)
+
+                    Divider().vertical(false)
+                      .color($r('app.color.10FFFFFF'))
+                      .width('100%')
+                  }
+                  .width('100%')
+                  .height(this.fixed52px)
+                  .justifyContent(FlexAlign.End)
+                })
+                Row().height(this.fixed38px)
               }
-              .height(item.operationVO?.length! * 14.5 + '%')
+              .height((item.itemList?.length! + 1) * this.fixed52px + this.fixed38px)
               .width('92.6%')
               .justifyContent(FlexAlign.Start)
-              .backgroundColor(this.selectWorkOrder === index ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
             }
           })
         }
         .width('100%')
         .height('90%')
+        .alignListItem(ListItemAlign.Center)
       }
       .height('100%')
       .width('29.6%')

+ 373 - 0
entry/src/main/ets/view/wms/OperationMaterialKitTwoStep.ets

@@ -0,0 +1,373 @@
+import OperationInfo from '../../viewmodel/wms/OperationInfo'
+import WorkOrderInfo from '../../viewmodel/wms/WorkOrderInfo'
+import OperationItem from '../../viewmodel/wms/OperationItem'
+import WmsRequest from '../../common/util/request/WmsRequest'
+import RequestParamModel from '../../viewmodel/wms/RequestParamModel'
+import HouseStock from '../../viewmodel/wms/HouseStock'
+import CommonConstants from '../../common/constants/CommonConstants'
+import DictInfo from '../../viewmodel/DictInfo'
+import HashMap from '@ohos.util.HashMap'
+import { isAxiosError } from '@ohos/axios'
+import VehicleInfo from '../../viewmodel/wms/VehicleInfo'
+import StorageRequest from '../../common/util/request/RobotErrorHandleRequest'
+
+@Component
+export struct OperationMaterialKitTwoStep {
+
+  @Link workOrder: WorkOrderInfo
+  @Link selectOperations: OperationInfo[]
+  @Link operationItems: OperationItem[]
+
+  @State operationNames: string = ''
+  @State selectVehicleCode: string = ''
+  @State houseStocks: HouseStock[] = []
+  stationType: string = 'station_type'
+
+  houseStockDialogController: CustomDialogController = new CustomDialogController({
+    builder: houseStockDialog({
+      houseStocks: this.houseStocks,
+      selectVehicleCode: this.selectVehicleCode,
+      confirm: async () => {
+        if (!this.selectVehicleCode || !this.houseStocks || this.houseStocks.length <= 0) {
+          return
+        }
+        let houseNo = ''
+        for (const element of this.houseStocks) {
+          if (this.selectVehicleCode === element.vehicleCode) {
+            houseNo = element.houseNo
+          }
+        }
+        let res: VehicleInfo = await StorageRequest.post("/api/v1/wmsOrder/outBox", {
+          houseNo: houseNo,
+          vehicleNo:this.selectVehicleCode,
+        }as RequestParamModel)
+      }
+    }),
+    autoCancel: true, // 点击遮罩关闭
+    customStyle: true,
+  })
+
+  async aboutToAppear() {
+    if (this.selectOperations) {
+      this.selectOperations.sort((a: OperationInfo, b: OperationInfo) => {
+        if (a.operationSort === null) return 1;
+        if (b.operationSort === null) return -1;
+        return a.operationSort! - b.operationSort!;
+      })
+      for (let i = 0; i < this.selectOperations.length; i++) {
+        this.operationNames += this.selectOperations[i].operationName
+        if (i < this.selectOperations.length - 1) {
+          this.operationNames += '、'
+        }
+      }
+      console.log('hhtest', JSON.stringify(this.selectOperations));
+      console.log('hhtest', '--------------' + JSON.stringify(this.operationItems));
+    }
+  }
+
+  build() {
+    Row() {
+      // 调取料箱
+      Column() {
+        Row() {
+          Text('调取料箱')
+            .fontSize($r('app.float.fontSize_12'))
+            .fontColor($r('app.color.FFFFFF'))
+            .fontWeight(FontWeight.Medium)
+        }
+        .height('10%')
+        .width('100%')
+        .justifyContent(FlexAlign.Center)
+
+        Column() {
+          Text(this.workOrder?.orderName!)
+            .fontSize($r('app.float.fontSize_4_8'))
+            .fontColor($r('app.color.FFFFFF'))
+            .fontWeight(FontWeight.Lighter)
+          Text(this.operationNames)
+            .fontSize($r('app.float.fontSize_4_8'))
+            .fontColor($r('app.color.FFFFFF'))
+            .fontWeight(FontWeight.Lighter)
+        }
+        .height('6.5%')
+
+        List({space: 5}) {
+          ForEach(this.operationItems, (item: OperationItem, index: number) => {
+            ListItem() {
+              Column() {
+                Row() {
+                  Text(item.itemName! + '-' + item.itemCode)
+                    .fontSize($r('app.float.fontSize_9_6'))
+                    .fontWeight(FontWeight.Medium)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .maxLines(1)
+                }
+                .height('38%')
+                .width('91%')
+                .alignItems(VerticalAlign.Bottom)
+
+                Column({space: 5}) {
+                  Text('型号:' +item.itemModel!)
+                    .fontSize($r('app.float.fontSize_6_4'))
+                    .fontWeight(FontWeight.Lighter)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .maxLines(1)
+
+                  Text('已齐套/需求:' + item.kitNum! + '/' + item.num!)
+                    .fontSize($r('app.float.fontSize_6_4'))
+                    .fontWeight(FontWeight.Lighter)
+                    .fontColor($r('app.color.FFFFFF'))
+                    .maxLines(1)
+                }
+                .height('48.3%')
+                .width('91%')
+                .justifyContent(FlexAlign.Center)
+                .alignItems(HorizontalAlign.Start)
+              }
+              .height('15.4%')
+              .width('92.6%')
+              .borderRadius($r('app.float.virtualSize_6_4'))
+              .justifyContent(FlexAlign.Start)
+              .backgroundColor($r('app.color.20FFFFFF'))
+              .opacity(item.storageNum! > 0 ? 1 : 0.3)
+              .onClick(async ()=>{
+                this.houseStocks = await WmsRequest.post('/api/v1/process/vehicleOperation/stockMaterials', {
+                  label: item.itemCode
+                } as RequestParamModel) as HouseStock[]
+                if (this.houseStocks) {
+                  for (const element of this.houseStocks) {
+                    if (element.coordinate && element.coordinate.length > 0 && element.coordinate.indexOf('-') > 0) {
+                      let coors = element.coordinate.split('-');
+                      element.x = parseInt(coors[0])
+                      element.y = parseInt(coors[1])
+                    }
+                  }
+                }
+                this.houseStockDialogController.open()
+              })
+            }
+          })
+        }
+        .width('100%')
+        .height('90%')
+        .alignListItem(ListItemAlign.Center)
+      }
+      .height('100%')
+      .width('29.6%')
+      .borderRadius($r('app.float.virtualSize_6_4'))
+      .justifyContent(FlexAlign.Center)
+      .backgroundColor($r('app.color.10FFFFFF'))
+      .onClick(async ()=>{
+        if (this.houseStocks) {
+          for (const element of this.houseStocks) {
+            if (element.coordinate && element.coordinate.length > 0 && element.coordinate.indexOf('-') > 0) {
+              let coors = element.coordinate.split('-');
+              element.x = parseInt(coors[0])
+              element.y = parseInt(coors[1])
+            }
+          }
+        }
+        this.houseStockDialogController.open()
+      })
+
+      Column() {
+        Row() {
+          Text('出入库料口操作')
+            .fontSize($r('app.float.fontSize_12'))
+            .fontColor($r('app.color.FFFFFF'))
+            .fontWeight(FontWeight.Medium)
+        }
+        .height('10%')
+        .width('100%')
+        .justifyContent(FlexAlign.Center)
+
+
+      }
+      .height('100%')
+      .width('29.6%')
+      .borderRadius($r('app.float.virtualSize_6_4'))
+      .justifyContent(FlexAlign.Center)
+      .backgroundColor($r('app.color.10FFFFFF'))
+
+      Column() {
+        Row() {
+          Text('拣选工作台')
+            .fontSize($r('app.float.fontSize_12'))
+            .fontColor($r('app.color.FFFFFF'))
+            .fontWeight(FontWeight.Medium)
+        }
+        .height('10%')
+        .width('100%')
+        .justifyContent(FlexAlign.Center)
+
+      }
+      .height('100%')
+      .width('29.6%')
+      .borderRadius($r('app.float.virtualSize_6_4'))
+      .justifyContent(FlexAlign.Center)
+      .backgroundColor($r('app.color.10FFFFFF'))
+    }
+    .width('100%')
+    .height('100%')
+    .justifyContent(FlexAlign.SpaceBetween)
+  }
+}
+
+
+// 库存信息弹窗(选择料箱)
+@CustomDialog
+struct houseStockDialog {
+
+  // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在最后
+  controller?: CustomDialogController
+  cancel?: () => void = () => {
+  }
+  confirm: () => void = () => {
+  }
+  vehicleTypeDictType: string = 'vehicle_type'
+  vehicleTypeDictMap: HashMap<string, string> = new HashMap<string, string>()
+  houseStocks: HouseStock[] = []
+  scroller: Scroller = new Scroller()
+  @Link selectVehicleCode: string
+
+  async aboutToAppear() {
+    if (!CommonConstants.DICT_DATA || CommonConstants.DICT_DATA.length <= 0) {
+      let res: DictInfo[] = await WmsRequest.post('/api/v1/sys/dictData/all',)
+      if (res && res.length > 0) {
+        for (const dict of res) {
+          CommonConstants.DICT_DATA.set(dict.dictCode, dict.list)
+          if (this.vehicleTypeDictType === dict.dictCode) {
+            for (const element of dict?.list!) {
+              this.vehicleTypeDictMap.set(element.dictValue, element.dictLabel);
+            }
+          }
+        }
+      }
+    } else {
+      let dictList = CommonConstants.DICT_DATA.get(this.vehicleTypeDictType);
+      for (const element of dictList) {
+        this.vehicleTypeDictMap.set(element.dictValue, element.dictLabel);
+      }
+    }
+  }
+
+  build() {
+    Column() {
+      Row() {
+        Text('选择料箱')
+          .fontWeight(FontWeight.Medium)
+          .fontSize($r('app.float.fontSize_12'))
+          .fontColor($r('app.color.FFFFFF'))
+          .fontWeight(FontWeight.Medium)
+      }
+      .height('10%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+
+      // 动态排列容器
+      Scroll() {
+        Flex({ wrap: FlexWrap.Wrap, justifyContent: FlexAlign.Start }) {
+          ForEach(this.houseStocks, (item: HouseStock, index: number) => {
+            Column({ space: 5 }) {
+              Row() {
+                Text(item.materials?.[0]?.materialName! + '-' + item.materials?.[0]?.materialNo!)
+                  .fontSize($r('app.float.fontSize_9_6'))
+                  .fontWeight(FontWeight.Medium)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .maxLines(1)
+              }
+              .height('28.5%')
+              .width('87.4%')
+              .alignItems(VerticalAlign.Bottom)
+
+              Column() {
+                Text('料箱编号:' + item.vehicleCode!)
+                  .fontSize($r('app.float.fontSize_6_4'))
+                  .fontWeight(FontWeight.Lighter)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .maxLines(1)
+                Text('料箱类型:' + (this.vehicleTypeDictMap.get(item.vehicleCategory!) ? this.vehicleTypeDictMap.get(item.vehicleCategory!) : item.vehicleCategory!))
+                  .fontSize($r('app.float.fontSize_6_4'))
+                  .fontWeight(FontWeight.Lighter)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .maxLines(1)
+                Text('所属订单:')
+                  .fontSize($r('app.float.fontSize_6_4'))
+                  .fontWeight(FontWeight.Lighter)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .maxLines(1)
+                Text('数量:' + item.materials?.[0]?.num!)
+                  .fontSize($r('app.float.fontSize_6_4'))
+                  .fontWeight(FontWeight.Lighter)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .maxLines(1)
+                Text('位置:X-' + item.x! + ' Y-' + item.y!)
+                  .fontSize($r('app.float.fontSize_6_4'))
+                  .fontWeight(FontWeight.Lighter)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .maxLines(1)
+              }
+              .height('48.3%')
+              .width('87.4%')
+              .justifyContent(FlexAlign.Center)
+              .alignItems(HorizontalAlign.Start)
+            }
+            .width('32.8%')
+            .height('25%')
+            .borderRadius($r('app.float.virtualSize_6_4'))
+            .backgroundColor(this.selectVehicleCode === item.vehicleCode ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
+            .borderWidth(1)
+            .borderColor(this.selectVehicleCode === item.vehicleCode ? $r('app.color.30D158') : $r('app.color.20FFFFFF'))
+            .margin({ top: index > 2 ? '1%' : '0%', left: (index % 3) === 0 ? '0%' : '0.8%' })
+            .onClick(()=>{
+              this.selectVehicleCode = item.vehicleCode!
+            })
+          })
+        }
+      }
+      .scrollable(ScrollDirection.Vertical) // 垂直滚动
+      .scrollBar(BarState.Auto)
+      .width('96.6%')
+      .height('82.7%')
+
+      Divider().vertical(false).color($r('app.color.FFFFFF'))
+        .width('100%')
+        .opacity(0.15)
+
+      Row() {
+        Row() {
+          Text('关闭')
+            .fontColor($r('app.color.60FFFFFF'))
+            .fontSize($r('app.float.fontSize_6_4'))
+            .fontWeight(FontWeight.Medium)
+        }
+        .width('50%')
+        .justifyContent(FlexAlign.Center)
+        Divider().vertical(true).color($r('app.color.FFFFFF'))
+          .height('100%')
+          .opacity(0.15)
+        Row() {
+          Text('料箱出库')
+            .fontColor($r('app.color.007AFF'))
+            .fontSize($r('app.float.fontSize_6_4'))
+            .fontWeight(FontWeight.Medium)
+        }
+        .width('50%')
+        .justifyContent(FlexAlign.Center)
+      }
+      .width('100%')
+      .height('7.3%')
+      .justifyContent(FlexAlign.Center)
+      .onClick(()=>{
+        if (this.controller != undefined) {
+          this.controller.close()
+        }
+      })
+    }
+    .width('61.5%')
+    .height('71%')
+    .justifyContent(FlexAlign.Start)
+    .backgroundColor($r('app.color.2A2A2A'))
+    .borderRadius($r('app.float.virtualSize_6_4'))
+  }
+}

+ 0 - 216
entry/src/main/ets/view/wms/ProcessMaterialKitTwoStep.ets

@@ -1,216 +0,0 @@
-import CommonConstants from '../../common/constants/CommonConstants'
-import WmsRequest from '../../common/util/request/WmsRequest'
-import OperationInfo from '../../viewmodel/wms/StationOperationInfo'
-import RequestParamModel from '../../viewmodel/wms/RequestParamModel'
-import WorkOrderInfo from '../../viewmodel/wms/WorkOrderInfo'
-
-@Component
-export struct ProcessMaterialKitOneStep {
-
-  @Link workOrder: WorkOrderInfo
-
-  @State workOrderArray: WorkOrderInfo[] = []
-  @State operationArray: OperationInfo[] = []
-
-  @State selectWorkOrder: number = 0
-
-  stationType: string = 'station_type'
-
-  async aboutToAppear() {
-    this.workOrderArray = await WmsRequest.post('/api/v1/plan/workOrder/list', {
-      //查询未完成的工单
-      queryComplete: 0,
-    } as RequestParamModel) as WorkOrderInfo[]
-    if (this.workOrderArray && this.workOrderArray.length > 0) {
-      this.workOrder = this.workOrderArray[0]
-      this.selectWorkOrder = 0
-
-      this.operationArray = await WmsRequest.post('/api/v1/plan/operation/list', {
-        //查询未完成的工单
-        processRouteId: this.workOrderArray[0]?.processRouteId,
-      } as RequestParamModel) as OperationInfo[]
-    }
-
-    if (this.operationArray && this.operationArray.length > 0) {
-      // 获取不合格原因的数据字典
-      let dictArray = CommonConstants.DICT_DATA.get(this.stationType);
-      if (!dictArray || dictArray.length <= 0) {
-        dictArray = await WmsRequest.get('/api/v1/sys/dictData/queryByType/' + this.stationType as string, {})
-      }
-      if (!dictArray) {
-        return
-      }
-      for (const element of this.operationArray) {
-        for (const dict of dictArray) {
-          if (element.stanType === dict.dictValue) {
-            element.stanTypeName = dict.dictLabel
-          }
-        }
-      }
-    }
-  }
-
-  build() {
-    Row() {
-      Row() {
-        Row() {
-          Text('调取料箱')
-            .fontSize($r('app.float.fontSize_12'))
-            .fontColor($r('app.color.FFFFFF'))
-            .fontWeight(FontWeight.Medium)
-        }
-        .height('10%')
-        .width('100%')
-        .justifyContent(FlexAlign.Center)
-
-        List() {
-          ForEach(this.workOrderArray, (item: WorkOrderInfo, index: number) => {
-            ListItem() {
-              Column() {
-                Row() {
-                  Text((item.orderName ? item.orderName : '') + (item.orderCode ? item.orderCode : ''))
-                    .fontSize($r('app.float.fontSize_9_6'))
-                    .fontWeight(FontWeight.Medium)
-                    .fontColor($r('app.color.FFFFFF'))
-                    .maxLines(1)
-                }
-                .height('38%')
-                .width('91%')
-                .alignItems(VerticalAlign.Bottom)
-
-                Column() {
-                  Text('工单编号:' + (item.workOrderCode ? item.workOrderCode : ''))
-                    .fontSize($r('app.float.fontSize_9_6'))
-                    .fontWeight(FontWeight.Medium)
-                    .fontColor($r('app.color.FFFFFF'))
-                    .maxLines(1)
-
-                  Text('工单编号:' + (item.workOrderCode ? item.workOrderCode : ''))
-                    .fontSize($r('app.float.fontSize_6_4'))
-                    .fontWeight(FontWeight.Lighter)
-                    .fontColor($r('app.color.FFFFFF'))
-                    .maxLines(1)
-
-                  Text('下发时间:' + item.updated)
-                    .fontSize($r('app.float.fontSize_6_4'))
-                    .fontWeight(FontWeight.Lighter)
-                    .fontColor($r('app.color.FFFFFF'))
-                    .maxLines(1)
-
-                  Text('齐套进度:' + item.kitCompleteProgress)
-                    .fontSize($r('app.float.fontSize_6_4'))
-                    .fontWeight(FontWeight.Lighter)
-                    .fontColor($r('app.color.FFFFFF'))
-                    .maxLines(1)
-                }
-                .height('48.3%')
-                .width('91%')
-                .justifyContent(FlexAlign.SpaceBetween)
-              }
-              .height('15.4%')
-              .width('92.6%')
-              .justifyContent(FlexAlign.Start)
-              .backgroundColor(this.selectWorkOrder === index ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
-            }
-          })
-        }
-        .width('100%')
-        .height('90%')
-      }
-      .height('100%')
-      .width('29.6%')
-      .borderRadius($r('app.float.virtualSize_6_4'))
-      .justifyContent(FlexAlign.Center)
-      .backgroundColor($r('app.color.10FFFFFF'))
-
-      Row() {
-        Row() {
-          Text('出入库料口操作')
-            .fontSize($r('app.float.fontSize_12'))
-            .fontColor($r('app.color.FFFFFF'))
-            .fontWeight(FontWeight.Medium)
-        }
-        .height('10%')
-        .width('100%')
-        .justifyContent(FlexAlign.Center)
-
-        List() {
-          ForEach(this.operationArray, (item: OperationInfo, index: number) => {
-            ListItem() {
-              Row() {
-                Row() {
-                  Text(item.stanTypeName ? item.stanTypeName : (item.stanType ? item.stanType : ''))
-                    .fontSize($r('app.float.fontSize_9_6'))
-                    .fontWeight(FontWeight.Medium)
-                    .fontColor($r('app.color.FFFFFF'))
-                    .maxLines(1)
-                }
-                .height('100%')
-                .width('91%')
-                .alignItems(VerticalAlign.Bottom)
-
-              }
-              .height(item.operationVO?.length! * 14.5 + '%')
-              .width('92.6%')
-              .justifyContent(FlexAlign.Start)
-              .backgroundColor(this.selectWorkOrder === index ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
-            }
-          })
-        }
-        .width('100%')
-        .height('90%')
-      }
-      .height('100%')
-      .width('29.6%')
-      .borderRadius($r('app.float.virtualSize_6_4'))
-      .justifyContent(FlexAlign.Center)
-      .backgroundColor($r('app.color.10FFFFFF'))
-
-      Row() {
-        Row() {
-          Text('拣选工作台')
-            .fontSize($r('app.float.fontSize_12'))
-            .fontColor($r('app.color.FFFFFF'))
-            .fontWeight(FontWeight.Medium)
-        }
-        .height('10%')
-        .width('100%')
-        .justifyContent(FlexAlign.Center)
-
-        List() {
-          ForEach(this.operationArray, (item: OperationInfo, index: number) => {
-            ListItem() {
-              Row() {
-                Row() {
-                  Text(item.stanTypeName ? item.stanTypeName : (item.stanType ? item.stanType : ''))
-                    .fontSize($r('app.float.fontSize_9_6'))
-                    .fontWeight(FontWeight.Medium)
-                    .fontColor($r('app.color.FFFFFF'))
-                    .maxLines(1)
-                }
-                .height('100%')
-                .width('91%')
-                .alignItems(VerticalAlign.Bottom)
-
-              }
-              .height(item.operationVO?.length! * 14.5 + '%')
-              .width('92.6%')
-              .justifyContent(FlexAlign.Start)
-              .backgroundColor(this.selectWorkOrder === index ? $r('app.color.2030D158') : $r('app.color.20FFFFFF'))
-            }
-          })
-        }
-        .width('100%')
-        .height('90%')
-      }
-      .height('100%')
-      .width('29.6%')
-      .borderRadius($r('app.float.virtualSize_6_4'))
-      .justifyContent(FlexAlign.Center)
-      .backgroundColor($r('app.color.10FFFFFF'))
-    }
-    .width('100%')
-    .height('100%')
-    .justifyContent(FlexAlign.SpaceBetween)
-  }
-}

+ 44 - 0
entry/src/main/ets/viewmodel/wms/HouseStock.ets

@@ -0,0 +1,44 @@
+import HouseStockMaterial from './HouseStockMaterial';
+// 库存物料信息
+export default class HouseStock {
+  // 入库单号
+  taskNo?: string;
+  // 计划单号
+  planNo?: string;
+  // 储位编号
+  locationNo?: string;
+  // 储位坐标
+  coordinate?: string;
+  // 载具编号
+  vehicleCode?: string;
+  // 载具类别
+  vehicleCategory?: string;
+  // 载具类别名称
+  vehicleCategoryName?: string;
+  // 位置
+  position?: number;
+  // 库存物料信息
+  materials?: HouseStockMaterial[];
+  // 仓库类型
+  houseType?: string;
+  // 仓库编号
+  houseNo?: string;
+  // 仓库编号
+  x?: number;
+  // 仓库编号
+  y?: number;
+  // 序列号
+  seqNo?: string;
+  // 批次号
+  batchCode?: string;
+  // 物料编号
+  materialNo?: string;
+  // 物料名称
+  materialName?: string;
+  // 物料规格
+  spec?: string;
+  // 出入库数量
+  num?: number;
+  // 单位
+  unit?: string;
+}

+ 13 - 0
entry/src/main/ets/viewmodel/wms/HouseStockMaterial.ets

@@ -0,0 +1,13 @@
+// 库存物料信息
+export default class HouseStockMaterial {
+  // 物料编号
+  materialNo?: string;
+  // 物料名称
+  materialName?: string;
+  // 物料型号
+  spec?: string;
+  // 出入库数量
+  num?: number;
+  // 单位
+  unit?: string;
+}

+ 2 - 0
entry/src/main/ets/viewmodel/wms/OperationInfo.ets

@@ -9,4 +9,6 @@ export default class OperationInfo {
   operationOp?: string
   // 工位类型
   stanType?: string
+  // 当前工序排序号
+  operationSort?: number
 }

+ 19 - 0
entry/src/main/ets/viewmodel/wms/OperationItem.ets

@@ -0,0 +1,19 @@
+// 工序物料信息
+export default class OperationItem {
+  // 工序id
+  operationId?: string;
+  // 物料编码
+  itemCode?: string;
+  // 物料名称
+  itemName?: string;
+  // 物料规格
+  itemModel?: string;
+  // 所需数量
+  num?: number;
+  // 单位
+  unit?: string;
+  // 齐套数量
+  kitNum?: number;
+  // 入库数量
+  storageNum?: number;
+}

+ 13 - 0
entry/src/main/ets/viewmodel/wms/OperationMaterial.ets

@@ -0,0 +1,13 @@
+// 工序需要的物料
+import OperationItem from './OperationItem'
+
+export default class OperationMaterial {
+  // 工序id
+  operationId?: string
+  // 基础工序名称
+  operationName?: string
+  // 工序编码
+  operationCode?: string
+  //工序需要的物料列表
+  itemList?: OperationItem[]
+}

+ 4 - 0
entry/src/main/ets/viewmodel/wms/RequestParamModel.ets

@@ -18,4 +18,8 @@ export default class RequestParamModel {
   vehicleNo?:string
   // 工艺路线id
   processRouteId?: number
+  // 物料标签
+  label?: string
+  // 工序id数组
+  operationIds?: string[]
 }

+ 19 - 0
entry/src/main/ets/viewmodel/wms/VehicleInfo.ets

@@ -0,0 +1,19 @@
+// 料箱信息
+import HouseStock from './HouseStock';
+
+export default class VehicleInfo {
+  // 料箱编号
+  vehicleNo?: string;
+  // 料箱名称
+  vehicleName?: string;
+  // 料箱ID
+  vehicleId?: string;
+  // 仓库编号
+  houseNo?: string;
+  // 储位编号
+  locationNo?: string;
+  // 坐标
+  coordinate?: string;
+  // 库存物料信息集合
+  list?: HouseStock[]
+}

+ 3 - 0
entry/src/main/module.json5

@@ -36,6 +36,9 @@
     "requestPermissions":[
       {
         "name": "ohos.permission.INTERNET"
+      },
+      {
+        "name": "ohos.permission.GET_NETWORK_INFO"
       }
     ]
   }

+ 1 - 1
entry/src/main/resources/base/profile/main_pages.json

@@ -3,7 +3,7 @@
     "pages/LoginPage",
     "pages/EmptyBoxStorage",
     "pages/OrderMaterialsStorage",
-    "pages/ProcessMaterialKit",
+    "pages/OperationMaterialKit",
     "pages/Menu",
     "pages/LittleMaterialsStorage",
     "pages/LittleMaterialOutBound",

+ 4 - 4
oh-package-lock.json5

@@ -3,7 +3,7 @@
   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
   "specifiers": {
     "@ohos/hypium@1.0.13": "@ohos/hypium@1.0.13",
-    "@ohos/mqtt@^2.0.6": "@ohos/mqtt@2.0.21"
+    "@ohos/mqtt@2.0.6": "@ohos/mqtt@2.0.6"
   },
   "packages": {
     "@ohos/hypium@1.0.13": {
@@ -12,9 +12,9 @@
       "registryType": "ohpm",
       "shasum": "88d8dda420097efb98d770bf59616faef4682f06"
     },
-    "@ohos/mqtt@2.0.21": {
-      "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/mqtt/-/mqtt-2.0.21.har",
-      "integrity": "sha512-Z04WQ+Z5OTL4jnDFWFwBUNgjvU42+g+z3kmiuq3/D9feMsQt0FMxaCwzyo/dl2TaDixbJ8eBh5aQTgmt+1pztw==",
+    "@ohos/mqtt@2.0.6": {
+      "resolved": "https://repo.harmonyos.com/ohpm/@ohos/mqtt/-/mqtt-2.0.6.har",
+      "integrity": "sha512-2uZKhjM2JWo/eqAPjKIHK3zEa6J8Zp2qz89soY2i34podtcPm23DvP3VLI1HNa+0Tc8Y04RwSz3Gmedqe/OWsw==",
       "dependencies": {
         "libmqttasync.so": "file:./src/main/cpp/types/libmqttasync"
       },

+ 1 - 1
oh-package.json5

@@ -6,7 +6,7 @@
   "author": "",
   "license": "",
   "dependencies": {
-    "@ohos/mqtt": "^2.0.6"
+    "@ohos/mqtt": "2.0.6"
   },
   "devDependencies": {
     "@ohos/hypium": "1.0.13"