From 5732962e2fe146d81273b4b02faaec87c05f0417 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 30 十二月 2024 00:29:19 +0800
Subject: [PATCH] 1
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 12 ++++++++----
1 files changed, 8 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 7414c6e..2080ff3 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)
@@ -152,7 +154,6 @@
}
Dt_Task task = _mapper.Map<Dt_Task>(item);
task.Creater = "WMS";
- task.AgvTaskNum = "AGV-" + item.TaskNum;
task.TaskState = (int)TaskStatusEnum.New;
task.CurrentAddress = item.SourceAddress;
@@ -162,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)
{
@@ -189,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)
{
@@ -202,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)
{
@@ -216,7 +220,7 @@
}
task.NextAddress = stationManger?.AGVStationCode ?? "";
- task.DeviceCode = "AGV";
+ task.DeviceCode = "AGV_CSJ";
task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
}
}
--
Gitblit v1.9.3