diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs
index f0e7460f..cb09d3f8 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr.Interfaces/IWareHouseService.cs
@@ -71,6 +71,6 @@ namespace Tnb.WarehouseMgr.Interfaces
/// ///
///
Task TaskExecuteAfter(TaskExecuteAfterUpInput input);
- Func AddUnExecuteTask { get; set; }
+ Func AddUnExecuteTask { get; set; }
}
}
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs
index 9e818faa..bcb8303d 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs
@@ -258,7 +258,7 @@ namespace Tnb.WarehouseMgr
elevatorQueueItem = await _db.Queryable().FirstAsync(it => disTasks.Select(x => x.id).Contains(it.distask_id) && it.task_status == "待执行");
if (!elevatorQueueItem?.elevator_code.IsNullOrEmpty() ?? false)
{
- await (_wareHouseService.AddUnExecuteTask?.Invoke(elevatorQueueItem?.elevator_code!) ?? Task.CompletedTask);
+ await (_wareHouseService.AddUnExecuteTask?.Invoke(elevatorQueueItem?.elevator_code!, disTask.start_floor.ParseToInt()) ?? Task.CompletedTask);
}
}
}
@@ -272,7 +272,7 @@ namespace Tnb.WarehouseMgr
disTaskIds = disTasks.Select(x => x.id).ToList()
};
await _wareHouseService.TaskComplate(taskCompleUpInput);
-
+
}
}
catch (Exception ex)
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/ElevatorControlService.cs b/WarehouseMgr/Tnb.WarehouseMgr/ElevatorControlService.cs
index 81cde8fb..89fd7d80 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/ElevatorControlService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/ElevatorControlService.cs
@@ -33,10 +33,10 @@ namespace Tnb.WarehouseMgr
private static Dictionary> _fetchStartedStausValue = new();
private bool isFrontDoorBit = false; //是否到前门位
- public ElevatorControlService(BackgroundService agvHeartbeatMonitorService)
+ public ElevatorControlService()
{
_elevatorCtlCfg = App.Configuration.Build();
- _agvHeartbeatMonitor = agvHeartbeatMonitorService;
+ //_agvHeartbeatMonitor = agvHeartbeatMonitorService;
}
///
@@ -107,7 +107,7 @@ namespace Tnb.WarehouseMgr
public async Task ThreeFloorElevatorFlow()
{
//test by close door
- _agvHeartbeatMonitor.StartAsync(CancellationToken.None);
+ //_agvHeartbeatMonitor.StartAsync(CancellationToken.None);
//await SendOpenCloseCmd(4);
//await SetAgvControlStatus(1);
//监听电梯门是否为关闭的状态
diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
index 6ff7bf66..a5449e30 100644
--- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
+++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs
@@ -49,7 +49,7 @@ namespace Tnb.WarehouseMgr
private readonly IElevatorControlService _elevatorControlService;
private static Dictionary _elevatorMap = new Dictionary();
private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build();
- public Func AddUnExecuteTask { get; set; }
+ public Func AddUnExecuteTask { get; set; }
public WareHouseService(ISqlSugarRepository repository, IDictionaryDataService dictionaryDataService,
IBillRullService billRullService, IUserManager userManager, ICacheManager cacheManager, IElevatorControlService elevatorControlService)
@@ -60,9 +60,9 @@ namespace Tnb.WarehouseMgr
_userManager = userManager;
_cacheManager = cacheManager;
_elevatorControlService = elevatorControlService;
- AddUnExecuteTask = async code =>
+ AddUnExecuteTask = async (code, floor) =>
{
- await _elevatorControlService.CallLift(code, 5, CancellationToken.None);
+ await _elevatorControlService.CallLift(code, floor, CancellationToken.None);
};
}
@@ -415,7 +415,7 @@ namespace Tnb.WarehouseMgr
if ((elevatorQueue.IsNull() || elevatorQueue.Count < 1))
{
elevatorQueueItem.task_status = "执行中";
- await _elevatorControlService.CallLift(devName, 5, CancellationToken.None);
+ await _elevatorControlService.CallLift(devName, floorNO.ParseToInt(), CancellationToken.None);
}