From ded9c653b4bd5f45cb23124068687135c29e6915 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 12 一月 2026 15:06:11 +0800
Subject: [PATCH] 多个功能优化,逻辑修改等
---
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/StackPlateJob/StackPlate.cs | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackPlateJob/StackPlate.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackPlateJob/StackPlate.cs"
index c5fc245..bf9f142 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackPlateJob/StackPlate.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/StackPlateJob/StackPlate.cs"
@@ -25,9 +25,9 @@
private readonly ITaskService _taskService;
private readonly ITaskRepository _taskRepository;
private readonly IStationMangerRepository _stationMangerRepository;
- private readonly IDt_PackaxisRepository _packaxisRepository;
+ private readonly IPackaxisRepository _packaxisRepository;
- public StackPlate(ICacheService cacheService, ITaskService taskService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IDt_PackaxisRepository packaxisRepository)
+ public StackPlate(ICacheService cacheService, ITaskService taskService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository)
{
_cacheService = cacheService;
_taskService = taskService;
@@ -83,14 +83,17 @@
/// <param name="command"></param>
public void EmptySeatAllow(CommonConveyorLine device, StackPlateTaskCommandCommand command)
{
- var tasks = _taskRepository.QueryData(x => x.DeviceCode == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute||x.TaskState==(int)TaskStatusEnum.AGV_Executing));
- if (tasks.Count > 0 && tasks.Count < 9)
+ var station = _stationMangerRepository.QueryFirst(x => x.StationDeviceCode == device.DeviceCode);
+ var tasks = _taskRepository.QueryData(x => x.Roadway == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute || x.TaskState == (int)TaskStatusEnum.AGV_Executing) && x.TargetAddress == device.DeviceCode);
+ if (tasks.Count + Convert.ToInt32(command.Num) < 9)
{
- var task = _taskRepository.QueryFirst(x => x.DeviceCode == device.DeviceCode && x.TaskState == (int)TaskStatusEnum.StackPlate_Execute);
- if(task!= null)
+ var task = _taskRepository.QueryFirst(x => x.Roadway == device.DeviceCode && x.TaskState == (int)TaskStatusEnum.StackPlate_Execute);
+ if (task != null && station != null)
{
task.TaskState = (int)TaskStatusEnum.AGV_Execute;
_taskRepository.UpdateData(task);
+ station.Remark = task.PalletCode;
+ _stationMangerRepository.UpdateData(station);
}
}
}
--
Gitblit v1.9.3