林豪 左 2 years ago
parent
commit
b8191d0eb5
1 changed files with 2 additions and 6 deletions
  1. 2 6
      Projects/永冠/WCS.Service/Works/Robots/RobotWork.cs

+ 2 - 6
Projects/永冠/WCS.Service/Works/Robots/RobotWork.cs

@@ -95,13 +95,9 @@ namespace WCS.Service.Works.Robots
             var workShop = C2153.Data.GOODSEND;
 
             var target = dev.Entity.ROUTES.Where(v => v.NEXT.ProductLine() == workShop).Select(v => v.NEXT.Device<IStation521, IStation520, IRobotStation>()).FirstOrDefault();
-            if (target == null)
-                throw new Exception("机器人目标位置" + workShop + "不存在");
+            if (target == null) throw new Exception("机器人目标位置" + workShop + "不存在");
 
-            if (target == null)
-
-                if (Ltc.Do(target, target => target.Data.PH_STATUS == false))
-                    throw new Exception($"目标位置[{target}]无光电信号");
+            if (Ltc.Do(target, target => target.Data.PH_STATUS == false)) throw new Exception($"目标位置[{target}]无光电信号");
 
             if (Ltc.Do(target, C2153, (target, C2153) => target.Data.GOODSCODE != C2153.Data.GOODSCODE)) //单号不符
             {