|
@@ -1,28 +1,22 @@
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.ComponentModel;
|
|
|
-using System.Diagnostics;
|
|
|
-using System.Linq;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
-using ServiceCenter.Extensions;
|
|
|
-using ServiceCenter.Logs;
|
|
|
+using ServiceCenter.Extensions;
|
|
|
using ServiceCenter.SqlSugars;
|
|
|
+using System.ComponentModel;
|
|
|
using WCS.Core;
|
|
|
using WCS.Entity;
|
|
|
-using WCS.Entity.Protocol.Robot;
|
|
|
using WCS.Entity.Protocol.Station;
|
|
|
using WCS.WorkEngineering.Extensions;
|
|
|
using WCS.WorkEngineering.WebApi.Controllers;
|
|
|
using WCS.WorkEngineering.WebApi.Models.WMS.Response;
|
|
|
using WCS.WorkEngineering.Worlds;
|
|
|
-using WCS.WorkEngineering.Worlds.环形库.环形库;
|
|
|
using TaskStatus = WCS.Entity.TaskStatus;
|
|
|
|
|
|
namespace WCS.WorkEngineering.Systems.环形库
|
|
|
{
|
|
|
+ /// <summary>
|
|
|
+ /// 环形库分配货位
|
|
|
+ /// </summary>
|
|
|
[BelongTo(typeof(SortingBranchWorld))]
|
|
|
- [Description("机械臂")]
|
|
|
+ [Description("环形库分配货位")]
|
|
|
public class 环形库分配货位 : DeviceSystem<Device<IStation520, IStation521, IStation523>>
|
|
|
{
|
|
|
protected override bool ParallelDo => true;
|
|
@@ -58,7 +52,7 @@ namespace WCS.WorkEngineering.Systems.环形库
|
|
|
}
|
|
|
|
|
|
WCS_TaskInfo taskInfo = null;
|
|
|
-
|
|
|
+ int sideNum = 0;
|
|
|
//开始获取货位号
|
|
|
SqlSugarHelper.Do(db =>
|
|
|
{
|
|
@@ -96,6 +90,8 @@ namespace WCS.WorkEngineering.Systems.环形库
|
|
|
task.EditWho = "WCS";
|
|
|
db.Default.UpdateableRowLock(task).UpdateColumns(x => new { x.Status, x.AddrTo, x.Line, x.Col, x.Layer, x.Depth, x.LastInteractionPoint, x.SrmStation, x.Device, x.EditWho }).ExecuteCommand();
|
|
|
task.AddWCS_TASK_DTL(db.Default, obj.Entity.Code, task.AddrTo, $"任务分配货位{task.AddrTo}");
|
|
|
+ var invNow = db.Default.Queryable<BillInvnow>().NoLock().First(x => x.ContGrpBarCode == task.BarCode);
|
|
|
+ sideNum = invNow.SideNum;
|
|
|
taskInfo = task;
|
|
|
});
|
|
|
if (taskInfo == null) return;
|
|
@@ -105,6 +101,12 @@ namespace WCS.WorkEngineering.Systems.环形库
|
|
|
obj.Data.GoodsStart = obj.Entity.Code.ToShort();
|
|
|
obj.Data.GoodsStart = obj.Entity.Code.ToShort();
|
|
|
obj.Data.GoodsEnd = next;
|
|
|
+ if (sideNum == 2) //反面
|
|
|
+ {
|
|
|
+ obj.Data.CmdType = StationCmd.Res6;
|
|
|
+ obj.Data.CmdType = StationCmd.Res6;
|
|
|
+ }
|
|
|
+
|
|
|
obj.Data.GoodsEnd = next;
|
|
|
obj.Data.SetVoucherNo();
|
|
|
}
|
|
@@ -120,4 +122,4 @@ namespace WCS.WorkEngineering.Systems.环形库
|
|
|
return codes.Any(x => x == dev.Code);
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|