From c6babb9834248e2bc8fa6c037b3fb3e6ea4dc524 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 03 一月 2025 14:57:52 +0800
Subject: [PATCH] 更新代码
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index f5ec2dd..0fda9b9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -34,6 +34,7 @@
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.BasicInfo;
+using WIDESEAWCS_DTO.System;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
@@ -56,6 +57,7 @@
private readonly ITaskExecuteDetailRepository _taskExecuteDetailRepository;
private readonly IStationMangerRepository _stationMangerRepository;
private readonly IRouterRepository _routerRepository;
+ private readonly IApiInfoRepository _apiInfoRepository;
private List<Dt_ApiInfo> apiInfos;
private Dictionary<string, OrderByType> _taskOrderBy = new()
@@ -72,7 +74,7 @@
public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList();
- public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository) : base(BaseDal)
+ public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository) : base(BaseDal)
{
_mapper = mapper;
_cacheService = cacheService;
@@ -81,6 +83,7 @@
_taskExecuteDetailRepository = taskExecuteDetailRepository;
_stationMangerRepository = stationMangerRepository;
_routerRepository = routerRepository;
+ _apiInfoRepository = apiInfoRepository;
string? cacheStr = _cacheService.Get(nameof(Dt_Warehouse));
if (!string.IsNullOrEmpty(cacheStr))
@@ -102,7 +105,6 @@
apiInfos = infos;
}
}
-
}
public WebResponseContent TaskCompleted(int taskNum)
@@ -161,6 +163,7 @@
if (string.IsNullOrEmpty(item.AGVArea))
{
+ //task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StackerCraneCode == item.RoadWay);
if (stationManger == null)
{
@@ -188,6 +191,7 @@
{
if (item.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
+ task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi);
if (routers.FirstOrDefault() == null)
{
@@ -201,6 +205,7 @@
}
else
{
+ task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi);
if (routers.FirstOrDefault() == null)
{
@@ -215,7 +220,7 @@
}
task.NextAddress = stationManger?.AGVStationCode ?? "";
- task.DeviceCode = "AGV";
+ task.DeviceCode = stationManger?.Remark ?? "";
task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
}
}
@@ -273,7 +278,7 @@
/// <returns></returns>
public string? RequestAssignLocation(int taskNum, string roadwayNo)
{
- string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}");
+ string responseStr = HttpHelper.Get($"http://127.0.0.1:9283/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}");
WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
if (responseContent != null && responseContent.Status && responseContent.Data != null)
--
Gitblit v1.9.3