|
@@ -1,4 +1,5 @@
|
|
|
-using ServiceCenter.SqlSugars;
|
|
|
|
|
|
|
+using ServiceCenter.Logs;
|
|
|
|
|
+using ServiceCenter.SqlSugars;
|
|
|
using System.ComponentModel;
|
|
using System.ComponentModel;
|
|
|
using WCS.Core;
|
|
using WCS.Core;
|
|
|
using WCS.Entity;
|
|
using WCS.Entity;
|
|
@@ -7,7 +8,6 @@ using WCS.Entity.Protocol.Station;
|
|
|
using WCS.WorkEngineering.Extensions;
|
|
using WCS.WorkEngineering.Extensions;
|
|
|
using WCS.WorkEngineering.WebApi.Controllers;
|
|
using WCS.WorkEngineering.WebApi.Controllers;
|
|
|
using WCS.WorkEngineering.Worlds;
|
|
using WCS.WorkEngineering.Worlds;
|
|
|
-using WCS.WorkEngineering.Worlds.Logs;
|
|
|
|
|
using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
|
|
using DeviceFlags = WCS.WorkEngineering.Extensions.DeviceFlags;
|
|
|
|
|
|
|
|
namespace WCS.WorkEngineering.Systems
|
|
namespace WCS.WorkEngineering.Systems
|
|
@@ -57,10 +57,11 @@ namespace WCS.WorkEngineering.Systems
|
|
|
if (agv.Position != obj.Entity.Code) throw new KnownException($"任务{task.ID}对应AGV任务目标地址不是当前站台", LogLevelEnum.Mid);
|
|
if (agv.Position != obj.Entity.Code) throw new KnownException($"任务{task.ID}对应AGV任务目标地址不是当前站台", LogLevelEnum.Mid);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
//获取称重
|
|
//获取称重
|
|
|
var dev91 = Device.All.Where(v => v.Code == obj.Entity.Code).Select(v => new Device<IStation91>(v, this.World)).FirstOrDefault();
|
|
var dev91 = Device.All.Where(v => v.Code == obj.Entity.Code).Select(v => new Device<IStation91>(v, this.World)).FirstOrDefault();
|
|
|
task.Weight = dev91.Data.Weight;
|
|
task.Weight = dev91.Data.Weight;
|
|
|
|
|
+ if (task.Weight == 0) throw new KnownException($"称重异常", LogLevelEnum.Mid);
|
|
|
|
|
+
|
|
|
WmsApi.WcsUploadInfo(task.ID, (decimal)task.Weight, task.BarCode);
|
|
WmsApi.WcsUploadInfo(task.ID, (decimal)task.Weight, task.BarCode);
|
|
|
|
|
|
|
|
task.Status = Entity.TaskStatus.ConveyorExecution;
|
|
task.Status = Entity.TaskStatus.ConveyorExecution;
|