This commit is contained in:
yang.lee
2023-11-23 14:49:38 +08:00
parent 87e8e40ebc
commit c879f0b6bd
2 changed files with 4 additions and 7 deletions

View File

@@ -5,9 +5,9 @@
/// </summary> /// </summary>
public enum EnumTaskChainType public enum EnumTaskChainType
{ {
AGV = 1, CTU = 1,
KIVA = 2, KIVA = 2,
CTU = 3, AGV = 3,
= 4, = 4,
线 = 5, 线 = 5,
} }

View File

@@ -460,11 +460,12 @@ namespace Tnb.WarehouseMgr
private async Task CallingLanding(List<(string endlocation_code, string device_id, string id, string floorNO)> endLocCodes) private async Task CallingLanding(List<(string endlocation_code, string device_id, string id, string floorNO)> endLocCodes)
{ {
Logger.Information($" 开始呼梯操作............."); Logger.Information($" 开始呼梯操作.............");
Logger.Information($"电梯信息:{JsonConvert.SerializeObject(s_elevatorMap)}");
try try
{ {
foreach ((_, string devId, string disTaskId, string floorNO) in endLocCodes) foreach ((_, string devId, string disTaskId, string floorNO) in endLocCodes)
{ {
Logger.Information($"devId:{devId}");
if (!s_elevatorMap.TryGetValue(devId, out object? elevatorCode)) if (!s_elevatorMap.TryGetValue(devId, out object? elevatorCode))
{ {
continue; continue;
@@ -1041,22 +1042,18 @@ namespace Tnb.WarehouseMgr
{ {
if (points.FindAll(x => x.location_code != null && x.location_code.Contains("dt", StringComparison.OrdinalIgnoreCase))?.Count > 0) if (points.FindAll(x => x.location_code != null && x.location_code.Contains("dt", StringComparison.OrdinalIgnoreCase))?.Count > 0)
{ {
Logger.Information("获取当前电梯点");
//查询当前电梯点 //查询当前电梯点
List<WmsElevatorD> curEleDs = await _db.Queryable<WmsElevatorD>().Where(it => points.Select(x => x.id).Contains(it.point_id)).ToListAsync(); List<WmsElevatorD> curEleDs = await _db.Queryable<WmsElevatorD>().Where(it => points.Select(x => x.id).Contains(it.point_id)).ToListAsync();
Logger.Information($"当前电梯点:{string.Join(",",curEleDs.Select(x=>x.point_code))}");
//如果有电梯点,则会进行电梯的均匀分配 //如果有电梯点,则会进行电梯的均匀分配
if (curEleDs?.Count > 0) if (curEleDs?.Count > 0)
{ {
//当前电梯 //当前电梯
WmsElevatorH curEle = await _db.Queryable<WmsElevatorH>().SingleAsync(it => it.id == curEleDs.First().bill_id && it.enabled == 1); WmsElevatorH curEle = await _db.Queryable<WmsElevatorH>().SingleAsync(it => it.id == curEleDs.First().bill_id && it.enabled == 1);
Logger.Debug($"档期电梯信息:{JsonConvert.SerializeObject(curEle)}");
//同电梯组电梯 //同电梯组电梯
List<WmsElevatorH> sGpEle = await _db.Queryable<WmsElevatorH>().Where(it => it.elevator_group == curEle.elevator_group && it.id != curEle.id && it.enabled == 1).ToListAsync(); List<WmsElevatorH> sGpEle = await _db.Queryable<WmsElevatorH>().Where(it => it.elevator_group == curEle.elevator_group && it.id != curEle.id && it.enabled == 1).ToListAsync();
Logger.Debug($"同电梯组电梯:{JsonConvert.SerializeObject(sGpEle)}");
if (curEle == null && sGpEle?.Count > 0) if (curEle == null && sGpEle?.Count > 0)
{ {