cjb пре 4 дана
родитељ
комит
f01d425c68

+ 2 - 22
entry/src/main/ets/pages/LittleMaterialOutBound.ets

@@ -159,17 +159,7 @@ struct LittleMaterialsOutBound {
     this.commonDialogController.open();
   }
 
-  // 判断小车状态
-  async queryRgvInfo(): Promise<boolean> {
-    let res: RgvInfo = await RobotErrorHandleRequest.get('/api/v1/wcs/rgv/rgv1', {}) as RgvInfo;
-    if (res) {
-      if (res.status != '0' || res.x != res.rx || res.y != res.ry) {
-        return false;
-      }
-      return true; // 如果条件不满足,返回 true
-    }
-    return false; // 如果 res 为 null 或 undefined,返回 false
-  }
+
 
   // 料箱出库的方法
   callBoxOutboundFunc = async () => {
@@ -181,17 +171,7 @@ struct LittleMaterialsOutBound {
       }, 2000);
       return
     }
-    //查询小车的状态
-    const rgvStatusNormal = await this.queryRgvInfo()
-    if(!rgvStatusNormal) {
-      this.reminds = '小车状态异常或位置错误,请检查后重试'
-      this.remindController.open()
-      setTimeout(() => {
-        this.remindController.close()
-      }, 2000);
-      return
-    }
-    console.info('hhtest', this.drawerPositionStatus+'as')
+
     if(this.drawerPositionStatus == 0) {
       this.reminds = '抽屉未缩回,请检查后重试'
       this.remindController.open()

+ 0 - 21
entry/src/main/ets/pages/LittleMaterialsStorage.ets

@@ -84,16 +84,6 @@ struct LittleMaterialsStorage{
     }
   }
 
-  async queryRgvInfo(): Promise<boolean> {
-    let res: RgvInfo = await RobotErrorHandleRequest.get('/api/v1/wcs/rgv/rgv1', {}) as RgvInfo;
-    if (res) {
-      if (res.status != '0' || res.x != res.rx || res.y != res.ry) {
-        return false;
-      }
-      return true; // 如果条件不满足,返回 true
-    }
-    return false; // 如果 res 为 null 或 undefined,返回 false
-  }
 
   getMaterialBoxList = async (currentMaterialNo: string) => {
     this.queryTargetMaterial = {}
@@ -392,17 +382,6 @@ struct LittleMaterialsStorage{
                   this.outBoundButtonClick = 1;
                 }, 200);
 
-                //查询小车的状态
-                const rgvStatusNormal = await this.queryRgvInfo()
-                if(!rgvStatusNormal){
-                  this.reminds = "小车状态错误"
-                  this.remindController.open()
-                  setTimeout(() => {
-                    this.remindController.close()
-                  }, 2000);
-                  return
-                }
-                console.info("ssss"+this.drawerPositionStatus+"as")
                 if(this.drawerPositionStatus == 0)
                 {
                   this.reminds = "抽屉未缩回,请检查后重试"

+ 1 - 1
entry/src/main/ets/pages/Menu.ets

@@ -119,7 +119,7 @@ struct menu {
   }
 
   async aboutToAppear() {
-    //this.connectMQTT();
+    this.connectMQTT();
     //this.loginWms();
     const checkInterval = setInterval(() => {
       if (CommonConstants.AUTH_TOKEN!='') {

+ 0 - 21
entry/src/main/ets/pages/OperationMaterialKit.ets

@@ -81,31 +81,10 @@ struct OperationMaterialKit {
     this.commonDialogController.open();
   }
 
-  // 判断小车状态
-  async queryRgvInfo(): Promise<boolean> {
-    let res: RgvInfo = await RobotErrorHandleRequest.get('/api/v1/wcs/rgv/rgv1', {}) as RgvInfo;
-    if (res) {
-      if (res.status != '0' || res.x != res.rx || res.y != res.ry) {
-        return false;
-      }
-      return true; // 如果条件不满足,返回 true
-    }
-    return false; // 如果 res 为 null 或 undefined,返回 false
-  }
 
   // 空箱出库的方法
   callEmptyBoxFun = async () => {
     // todo 拣选工作台上没有料箱才能叫空箱
-    //查询小车的状态
-    const rgvStatusNormal = await this.queryRgvInfo()
-    if(!rgvStatusNormal){
-      this.reminds = '小车状态异常或位置错误,请检查后重试'
-      this.remindController.open()
-      setTimeout(() => {
-        this.remindController.close()
-      }, 2000);
-      return
-    }
     console.info('ssss'+this.drawerPositionStatus+'as')
     if(this.drawerPositionStatus == 0)
     {

+ 0 - 21
entry/src/main/ets/view/wms/OrderMaterialStorageSecondStep.ets

@@ -127,16 +127,6 @@ export struct OrderMaterialStorageSecondStep {
     }
   }
 
-  async queryRgvInfo(): Promise<boolean> {
-    let res: RgvInfo = await RobotErrorHandleRequest.get('/api/v1/wcs/rgv/rgv1', {}) as RgvInfo;
-    if (res) {
-      if (res.status != '0' || res.x != res.rx || res.y != res.ry) {
-        return false;
-      }
-      return true;
-    }
-    return false;
-  }
 
   aboutToAppear(): void {
     this.getEmptyBox()
@@ -321,17 +311,6 @@ export struct OrderMaterialStorageSecondStep {
             this.outBoundButtonClick = 1;
           }, 200);
 
-          //查询小车的状态
-          const rgvStatusNormal = await this.queryRgvInfo()
-          if(!rgvStatusNormal){
-            this.reminds = "小车状态错误"
-            this.remindController.open()
-            setTimeout(() => {
-              this.remindController.close()
-            }, 2000);
-            return
-          }
-          console.info("ssss"+this.drawerPositionStatus+"as")
           if(this.drawerPositionStatus == 0)
           {
             this.reminds = "抽屉未缩回,请检查后重试"