Administrator 2 年之前
父节点
当前提交
6b8a9a0af5

二进制
DLL/PLC.Siemens.dll


+ 1 - 0
Projects/永冠/WCS.Service/Helpers/GeneralHelper.cs

@@ -23,6 +23,7 @@ namespace WCS.Service.Helpers
             DB.Do(db =>
             {
                 var t = db.Default.Set<WCS_TASK>().Find(device.Data.TASKNUM);
+                if (t == null) return;
                 if (t != null && needUnBind)
                 {
                     t.ADDRTO = "2202";

+ 12 - 0
Projects/永冠/WCS.Service/WebApi/WMS/WMS.cs

@@ -109,6 +109,10 @@ namespace WCS.Service
                             var station_2195 = Device.Find("2195").Device<IStation521, IStation520>();
                             if (station_2195.Data.PH_STATUS && station_2195.Data.PH_STATUS2)
                                 WMS.GetProductInfo(barcode, dev, true);
+                            else
+                            {
+                                throw new Exception(res.ResMessage);
+                            }
                         }
                         else if (tpType == "2")//2198   2192
                         {
@@ -117,6 +121,10 @@ namespace WCS.Service
                             {
                                 WMS.GetProductInfo(barcode, dev, true);
                             }
+                            else
+                            {
+                                throw new Exception(res.ResMessage);
+                            }
                         }
                         else if (tpType == "3")//2201 
                         {
@@ -124,6 +132,10 @@ namespace WCS.Service
                             if (station_2201.Data.PH_STATUS && station_2201.Data.PH_STATUS2)
                                 WMS.GetProductInfo(barcode, dev, true);
                         }
+                        else
+                        {
+                            throw new Exception(res.ResMessage);
+                        }
                     }
                     else 
                     {

+ 1 - 0
Projects/永冠/WCS.Service/Works/Robots/RobotWork.cs

@@ -125,6 +125,7 @@ namespace WCS.Service.Works.Robots
 
             if (Ltc.Do(target, C2153, (target, C2153) => target.Data.GOODSCODE != C2153.Data.GOODSCODE) && target.Data3.Qty != target.Data.GOODSSIZE) //单号不符
             {
+       
                 if (Ltc.Do(target, target => target.Data2.CONFIRM == true)) return;
                 if (Ltc.Do(target, target => target.Data.GOODSEND == 2202)) return;
                 if ((Ltc.Do(target, C2153, (target, C2153) => target.Data.GOODSTYPE != 0 && C2153.Data.GOODSTYPE != 0 && target.Data.GOODSTYPE != C2153.Data.GOODSTYPE && target.Data3.Qty!=0))) //托盘类型不符

+ 2 - 0
Projects/永冠/WCS.Service/Works/SC/SCWork.cs

@@ -585,6 +585,8 @@ namespace WCS.Service.Works
                 DB.Do(db =>
                 {
                     var task = db.Default.Set<WCS_TASK>().Find(st.Data.TASKNUM);
+                    if (task != null && task.STATUS > TaskStatus.执行中) 
+                        throw new Exception($"任务[{task.ID}]已执行,请检查实际情况]");
                     var loc = WMS.GetLocalIn(task.WMSTASK, t, st.Entity.CODE);
                     var locno = string.Format("{0}-{1}-{2}", loc.Row, loc.Colomn, loc.Layer);