Administrator 3 سال پیش
والد
کامیت
dc45b3ef4f

+ 4 - 4
Projects/永冠OPP/WCS.Service/Extensions/DeviceExtension.cs

@@ -478,7 +478,7 @@ namespace WCS.Service.Extensions
         public StationDeviceGroup BeforeStation()
         {
             var a = LocationList.Where(v => v.Entity.Is(DF.涂布RGV取货设备组) || v.Entity.Is(DF.BOPPRGV取货设备组));
-            return LocationList.Where(v => v.Entity.Is(DF.涂布RGV取货设备组) || v.Entity.Is(DF.BOPPRGV取货设备组)).OrderBy(v => Distance(v)).FirstOrDefault();
+            return LocationList.Where(v => v.Entity.Is(DF.涂布RGV取货设备组) || v.Entity.Is(DF.BOPPRGV取货设备组) && v.Entity.CODE != this.CurrentStation().Entity.CODE).OrderBy(v => Distance(v)).FirstOrDefault();
         }
 
         /// <summary>
@@ -1015,9 +1015,9 @@ namespace WCS.Service.Extensions
                 new StationLocation("G14",879930,"RGV1",3719290),
                 new StationLocation("G15",936310,"RGV1",3719290),
                 new StationLocation("G16",988000,"RGV1",3719290),
-                new StationLocation("G17",2335849,"RGV1",3719290),
-                new StationLocation("G18",2410000,"RGV1",3719290),
-                new StationLocation("G19",2495849,"RGV1",3719290),
+                new StationLocation("G17",2285849,"RGV1",3719290),
+                new StationLocation("G18",2335849,"RGV1",3719290),
+                new StationLocation("G19",2410000,"RGV1",3719290),
                 new StationLocation("G20",2548012,"RGV1",3719290),
                 new StationLocation("G21",2606033,"RGV1",3719290),
                 new StationLocation("G22",2660833,"RGV1",3719290),

+ 3 - 13
Projects/永冠OPP/WCS.Service/Works/RGV/RGVWorks.cs

@@ -297,11 +297,10 @@ namespace WCS.Service.Works.RGV
                         }
 
                         //找到自己的后一个小车
-                        var afterStation = obj.After();
-                        //后面的小车是否在执行任务
-                        if (afterStation.Data2.WorkMode == RGVMode.自动 && afterStation.Data2.SystemStatus == RGVRunStatus.空闲) return;
+                        var afterRgv = obj.After();
+
                         //自己是否阻挡了该小车
-                        if (obj.StopedByMe(afterStation))
+                        if (afterRgv.Data2.WorkMode == RGVMode.自动 && afterRgv.Data2.SystemStatus == RGVRunStatus.空闲 && obj.StopedByMe(afterRgv))
                         {
                             //找到当前所在站台的下一个取货点
                             var beforeStation = Device.Where(v => v.Is(DF.BOPPRGV取货设备组) && v.CODE != pickStation.Entity.CODE)
@@ -309,15 +308,6 @@ namespace WCS.Service.Works.RGV
                                           .OrderBy(v => pickStation.Distance(v))
                                           .FirstOrDefault();
 
-                            //if (beforeStation.Entity.CODE == pickStation.Entity.CODE)
-                            //{
-                            //    //取被挡住小车的目标位置的下一个取货点
-                            //    beforeStation = Device.Where(v => v.Is(DF.涂布RGV取货设备组) && v.CODE != beforeStation.Entity.CODE)
-                            //                 .Select(v => v.Create<StationDeviceGroup>())
-                            //                 .OrderBy(v => beforeStation.Distance(v))
-                            //                 .FirstOrDefault();
-                            //}
-
                             //写入移动任务
                             obj.Move(beforeStation);
                             return;