From 2f281db1e4272c8061cd424c3eb946abb1b0a640 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期三, 30 七月 2025 15:07:09 +0800 Subject: [PATCH] 测试架货位优化,辅料优化等 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/AGV_FLExtend.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 20 ++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/AGV_PPExtend.cs | 2 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 1 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 6 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CP.cs | 42 ------- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs | 2 /dev/null | 0 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/ConveyorLineJob_FL.cs | 21 ++ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs | 63 +--------- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs | 2 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs | 4 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/StackerCraneJob_CSJ.cs | 4 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 10 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile2.pubxml | 17 ++ 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/StackerCraneJob_PP.cs | 102 +++++++++++++++- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs | 2 20 files changed, 174 insertions(+), 134 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" index 9d24261..e82882e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" @@ -129,7 +129,7 @@ ForceCancel="1", MatterArea= task.CurrentAddress, TaskCode=task.AgvTaskNum, - ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss") + task.AgvTaskNum, + ReqCode = DateTime.Now.ToString("yyMMddHHmmss") + task.AgvTaskNum, ReqTime= DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), }; WebResponseContent content = _taskService.AgvBoxApplyPass(agvCTUCancel); 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 759a695..575691f 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" @@ -287,12 +287,12 @@ if (item.RoadWay.Contains("AGV_FL")|| (item.RoadWay.Contains("AGV_CP") && taskTypeGroup == TaskTypeGroup.OutbondGroup)) { task.DeviceCode = item.RoadWay; - task.AgvTaskNum = item.RoadWay + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; + task.AgvTaskNum = item.RoadWay + DateTime.Now.ToString("yyMMdd") + item.TaskNum; } else if(item.RoadWay.Contains("AGV_CP") && taskTypeGroup == TaskTypeGroup.InboundGroup) { task.DeviceCode = stationManger.StationDeviceCode; - task.AgvTaskNum = task.Roadway + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; + task.AgvTaskNum = task.Roadway + DateTime.Now.ToString("yyMMdd") + item.TaskNum; } else if (item.RoadWay.Contains("PP") && taskTypeGroup == TaskTypeGroup.OutbondGroup) { @@ -313,7 +313,7 @@ { task.NextAddress = routerSelect.NextPosi; task.DeviceCode = routerSelect.ChildPosi; - task.AgvTaskNum = item.RoadWay + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; + task.AgvTaskNum = item.RoadWay + DateTime.Now.ToString("yyMMdd") + item.TaskNum; } else { @@ -340,7 +340,7 @@ { if (taskTypeGroup == TaskTypeGroup.OutbondGroup) { - task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; + task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyMMdd") + item.TaskNum; List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi).ToList(); if (routers.FirstOrDefault() == null) { @@ -362,7 +362,7 @@ { if (task.Roadway!="SC01_ZH") { - task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; + task.AgvTaskNum = item.AGVArea + DateTime.Now.ToString("yyMMdd") + item.TaskNum; } List<Dt_Router> routers = routersAll.Where(x => x.InOutType == item.TaskType && item.AGVArea == x.StartPosi).ToList(); if (routers.FirstOrDefault() == null) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" index bfe1676..5b734fc 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/AGV_PPExtend.cs" @@ -27,7 +27,7 @@ AgvTaskDTO TaskDTO = new AgvTaskDTO() { TaskCode = task.AgvTaskNum, - ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss") + task.AgvTaskNum, + ReqCode = DateTime.Now.ToString("yyMMddHHmmss") + task.AgvTaskNum, TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR", ctnrCode = task.PalletCode, PositionCodePath = new List<CodePath>() diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" index f78753c..84563b0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" @@ -21,27 +21,37 @@ using WIDESEAWCS_Tasks.StackerCraneJob; using WIDESEAWCS_Tasks; using WIDESEAWCS_Core; -using SqlSugar.Extensions; using WIDESEAWCS_Tasks.ConveyorLineJob; +using Newtonsoft.Json; +using WIDESEAWCS_Common.APIEnum; +using WIDESEAWCS_Core.Helper; +using WIDESEAWCS_DTO.TaskInfo; +using WIDESEAWCS_Core.Caches; +using AutoMapper; namespace WIDESEAWCS_Tasks { [DisallowConcurrentExecution] public class StackerCraneJob_PP : JobBase, IJob { + private readonly IMapper _mapper; + private readonly ICacheService _cacheService; private readonly ITaskService _taskService; private readonly ITaskExecuteDetailService _taskExecuteDetailService; private readonly ITaskRepository _taskRepository; private readonly IRouterService _routerService; private readonly IStationMangerRepository _stationMangerRepository; + private List<Dt_ApiInfo> apiInfos; - public StackerCraneJob_PP(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository) + public StackerCraneJob_PP(IMapper mapper, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, ICacheService cacheService) { _taskService = taskService; _taskExecuteDetailService = taskExecuteDetailService; _taskRepository = taskRepository; _routerService = routerService; _stationMangerRepository = stationMangerRepository; + _cacheService = cacheService; + _mapper=mapper; } public Task Execute(IJobExecutionContext context) @@ -192,25 +202,95 @@ } } } - + //鍒ゆ柇绉诲簱 if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { - if (OutTaskStationIsOccupied(task) != null || true) + if (OutTaskStationIsOccupied(task) == null) { - return task; - } - else - { - List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress).Select(x => x.ChildPosi).ToList(); + bool flag = false; + List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress, task.TaskType).Select(x => x.ChildPosi).ToList(); List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes); foreach (var item in tasks) { if (OutTaskStationIsOccupied(task) != null) { - return task; + flag = true; + break; } } - task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); + if (!flag) + { + task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); + } + } + } + + if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) + { + string? url = apiInfos.FirstOrDefault(x => x.ApiCode == APIEnum.WMSIsReloaction.ToString())?.ApiAddress; + if (string.IsNullOrEmpty(url)) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛"); + WriteError(commonStackerCrane.DeviceCode, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒癢MS绉诲簱鍒ゆ柇鎺ュ彛"); + return null; + } + string response = HttpHelper.Post($"{url}?taskNum={task.TaskNum}&locationCode={task.CurrentAddress}", "");//todo 璋冪敤WMS浠诲姟瀹屾垚鏂规硶 + if (string.IsNullOrEmpty(response)) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + WriteError(commonStackerCrane.DeviceCode, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + return null; + } + WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(response); + if (responseContent == null || !responseContent.Status) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + WriteError(commonStackerCrane.DeviceCode, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + return null; + } + WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.Serialize()); + if (taskDTO == null) + { + _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + WriteError(commonStackerCrane.DeviceCode, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); + return null; + + } + if (task.TaskNum == taskDTO.TaskNum) + { + return task; + } + else + { + Dt_Task reloTask = _mapper.Map<Dt_Task>(taskDTO); + //鍒ゆ柇绉诲簱璐т綅浠诲姟鏄惁宸插瓨鍦紝濡傚瓨鍦ㄥ厛鎵ц + Dt_Task existTask = _taskService.QueryStackerExistTask(reloTask.PalletCode, reloTask.SourceAddress); + if (existTask != null && existTask.TaskState == (int)TaskStatusEnum.SC_Execute) + { + return existTask; + } + else if (existTask != null && existTask.TaskState != (int)TaskStatusEnum.SC_Execute) + { + WriteError(commonStackerCrane.DeviceCode, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); + return null; + } + else + { + reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); + reloTask.CurrentAddress = taskDTO.SourceAddress; + reloTask.NextAddress = taskDTO.TargetAddress; + reloTask.DeviceCode = task.DeviceCode; + reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt(); + int taskId = _taskRepository.AddData(reloTask); + reloTask.TaskId = taskId; + } + return reloTask; + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" index 0536b05..50ce7ca 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" @@ -295,6 +295,8 @@ } else if (existTask != null && existTask.TaskState != (int)TaskStatusEnum.SC_Execute) { + WriteError(commonStackerCrane.DeviceCode, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); return null; } else diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" index 67bb753..bc39089 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" @@ -36,7 +36,7 @@ AgvTaskDTO taskDTO = new AgvTaskDTO() { TaskCode = task.AgvTaskNum, - ReqCode = DateTime.Now.ToString("yyyyMMdd") + task.AgvTaskNum, + ReqCode = DateTime.Now.ToString("yyMMdd") + task.AgvTaskNum, TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "CPC" : "CPR", ctnrCode = task.PalletCode, PositionCodePath = new List<CodePath>() @@ -104,7 +104,7 @@ AgvTaskDTO taskDTO = new AgvTaskDTO() { TaskCode = task.AgvTaskNum, - ReqCode = DateTime.Now.ToString("yyyyMMdd") + task.AgvTaskNum, + ReqCode = DateTime.Now.ToString("yyMMdd") + task.AgvTaskNum, TaskTyp = "CP", ctnrCode = task.PalletCode, PositionCodePath = new List<CodePath>() diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CP.cs" index be2511e..1b4c87b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CP.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CP.cs" @@ -157,48 +157,6 @@ } } - //Dt_StationManger? dt_StationManger = stationMangers.FirstOrDefault(x => x.StationType == StationTypeEnum.StationType_ProductBackTake.ObjToInt()); - //if (dt_StationManger != null) - //{ - // DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == dt_StationManger.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); - // List<Dt_StationManger> ProductBackStations = stationMangers.Where(x => x.StationType == StationTypeEnum.StationType_ProductBack.ObjToInt()).ToList(); - // for (int i = 0; i < ProductBackStations.Count(); i++) - // { - // short isCanTake = device.GetValue<GroundStationDBName, short>(GroundStationDBName.R_IsCanTake, dt_StationManger.StationCode); - // Dt_StationManger stationManger = ProductBackStations[i]; - // string startDb = "DB29."; - // short stationCurrentStatus = device.Communicator.Read<short>(startDb + stationManger.Remark.ToString()); - // short stationEndStatus = device.Communicator.Read<short>(startDb + (stationManger.Remark.ObjToInt() + 2).ToString()); - // bool endStatus = true; - // if ((i != 2 && i != 5 && i != 8)) - // { - // endStatus = (stationEndStatus == 1); - // } - // //璇诲彇绾夸綋娈电姸鎬� - // if (isCanTake == 1 && stationCurrentStatus == 1 && stationManger.IsOccupied==0 && endStatus) - // { - // device.SetValue(W_ConveyorLineCPDB.StartPos, dt_StationManger.StationCode, dt_StationManger.StationCode); - // device.SetValue(W_ConveyorLineCPDB.EndPos, stationManger.AGVStationCode, dt_StationManger.StationCode); - // device.SetValue(W_ConveyorLineCPDB.Barcode, "C00001", dt_StationManger.StationCode); - // device.SetValue(W_ConveyorLineCPDB.TaskNum, DateTime.Now.ToString("yyMMddHHmmss"), dt_StationManger.StationCode); - // device.SetValue(W_ConveyorLineCPDB.WorkType, 1, dt_StationManger.StationCode); - // device.SetValue(W_ConveyorLineCPDB.WorkMode, 1, dt_StationManger.StationCode); - // device.SetValue(W_ConveyorLineCPDB.CheckPos, 1, dt_StationManger.StationCode); - // //鍚姩鎸囦护 - // device.SetValue(W_ConveyorLineCPDB.ConveyArrival, 1, dt_StationManger.StationCode); - // stationManger.IsOccupied = 1; - // _stationMangerRepository.UpdateData(stationManger); - // Thread.Sleep(2000); - // return Task.CompletedTask; - // } - // else if(stationManger.IsOccupied == 1 && (stationCurrentStatus == 3)) - // { - // stationManger.IsOccupied = 0; - // _stationMangerRepository.UpdateData(stationManger); - // } - // } - //} - } return Task.CompletedTask; } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" index dff1ff8..a65687c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" @@ -99,6 +99,7 @@ ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>(); ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>(); + //婊℃墭鎷夎浇鍑� if (item.StationType == StationTypeEnum.StationType_PakcPallet.ObjToInt()) { if (conveyorLineSignalRead.STB && !conveyorLineSignalWrite.ACK) @@ -121,14 +122,6 @@ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) /*&& x.DeviceCode == item.StationDeviceCode*/ && (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.WarehouseId == warehouseDevice.WarehouseId); if (task != null && conveyorLineInfoWrite.Spare2 == 0 && conveyorLineStatus.Goods) { - //List<string> stations = _routerExtension.GetEndPoint(item.StationCode, TaskTypeEnum.Inbound.ObjToInt()).Select(x => x.NextPosi).ToList(); - ////鍒嗛厤宸烽亾 - //WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations, task.TaskNum, conveyorLineInfoRead.Spare2); - //if (responseContent.Status) - //{ - // device.SetValue(W_ConveyorLineDB.Spare2, 1, item.StationCode); - // _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: item.StationDeviceCode, roadwayNo: responseContent.Data.ToString() ?? ""); - //} device.SetValue(W_ConveyorLineDB.Spare2, 1, item.StationCode); _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: item.StationDeviceCode); } @@ -146,7 +139,7 @@ { if (conveyorLineInfoRead.TaskNum == 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))//閲囪喘鍏ュ簱 { - #region 浠诲姟鍙蜂负0锛屼笖鏈夋墭鐩樺彿锛屽垯鏄噰璐叆搴� + #region 浠诲姟鍙蜂负0锛屼笖鏈夋墭鐩樺彿锛屽垯鏄汉宸ユ斁璐у叆搴� Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && (x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt()) && x.PalletCode == conveyorLineInfoRead.Barcode && x.WarehouseId == warehouseDevice.WarehouseId); if (task != null) { @@ -228,19 +221,15 @@ else//鐢熶骇閫�搴� //鎹㈠贩閬撳叆搴� { #region 鐢熶骇閫�搴�,甯︿换鍔″彿鏌ヨ浠诲姟 - Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt()); // 甯︿换鍔″彿鏌ヨ浠诲姟 - Dt_Task taskIn = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && x.NextAddress == item.StationCode && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()); // 甯︿换鍔″彿鏌ヨ浠诲姟 - if (task != null) + Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt()); // 甯︿换鍔″彿鏌ヨ浠诲姟 閫�鏂欎换鍔� + Dt_Task taskIn = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.DeviceCode == item.StationDeviceCode && x.NextAddress == item.StationCode && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()); // 甯︿换鍔″彿鏌ヨ浠诲姟 鍏ュ簱 + if (task != null) //閫�鏂欎换鍔� 璧风偣鍏ュ簱绔欏彴 { List<string> stations = _routerExtension.GetEndPoint(item.StationCode, TaskTypeEnum.Inbound.ObjToInt()).Select(x => x.NextPosi).ToList(); WebResponseContent responseContent = _taskService.RequestWMSAssignRoadway(stations, task.TaskNum, conveyorLineInfoRead.Spare2); if (responseContent.Status) { - //string currentAddress = task.CurrentAddress; - //string nextAddress = task.NextAddress; - //string targetAddress = task.TargetAddress; string roadwayNo = task.Roadway; - string currentAddress = task.CurrentAddress; string nextAddress = task.NextAddress; string targetAddress = task.TargetAddress; @@ -259,7 +248,7 @@ continue; } - if (router.IsEnd) + if (router.IsEnd) //褰撳墠璧风偣鍏ュ簱绔欏彴鐩存帴鍏ュ簱 { string? targetLoca = _taskService.RequestAssignLocationByHeight(task.TaskNum, responseContent.Data.ToString(), conveyorLineInfoRead.Spare2); if (!string.IsNullOrEmpty(targetLoca)) @@ -279,7 +268,7 @@ continue; } } - else + else //鎹㈠贩閬撳垎閰嶅叾浠栧贩閬撶殑鍏ュ簱绔欏彴 { //task.NextAddress鍙兘鏄痳outer.NextPosi roadwayNo = responseContent.Data.ToString(); @@ -360,50 +349,12 @@ device.SetValue(W_ConveyorLineDB.Spare1, ConveyorWorkTypeEnum.Outbound.ObjToInt(), item.StationCode); device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); } - //else //璋冩嫧浣跨敤 - //{ - // device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); - //} - //{ - // task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && string.IsNullOrEmpty(x.DeviceCode) && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.WarehouseId == warehouseDevice.WarehouseId); - // if (task != null) - // { - // Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.CurrentAddress); - // if (stationManger != null) - // { - // _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: stationManger.StackerCraneCode, currentAddress: stationManger.StackerCraneStationCode, nextAddress: task.TargetAddress); - // } - // } - //} - //else } else if (!conveyorLineSignalRead.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK) { device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode); } } - //else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()) - //{ - // if (!conveyorLineSignalWrite.ACK && conveyorLineSignalRead.STB && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm) - // { - // if (conveyorLineInfoRead.TaskNum == 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))//閫�鏂欏叆搴� - // { - - // } - // else//鍑哄簱瀹屾垚 - // { - - // } - // } - // else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && !conveyorLineStatus.Alarm) - // { - // device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode); - // } - // else if (!conveyorLineSignalRead.STB && conveyorLineSignalWrite.ACK && !conveyorLineStatus.Alarm) - // { - // device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode); - // } - //} } else { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs" index d925619..1672eaf 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/StackerCraneJob_CSJ.cs" @@ -205,7 +205,7 @@ } } } - + //鍒ゆ柇绉诲簱 if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { if (OutTaskStationIsOccupied(task) == null) @@ -278,6 +278,8 @@ } else if (existTask != null && existTask.TaskState != (int)TaskStatusEnum.SC_Execute) { + WriteError(commonStackerCrane.DeviceCode, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); return null; } else diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" index 49172e3..308e58c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" @@ -39,7 +39,7 @@ AgvTaskDTO taskDTO = new AgvTaskDTO() { TaskCode = task.AgvTaskNum, - ReqCode = DateTime.Now.ToString("yyyyMMdd") + task.AgvTaskNum, + ReqCode = DateTime.Now.ToString("yyMMdd") + task.AgvTaskNum, TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR", ctnrCode = task.PalletCode, PositionCodePath = new List<CodePath>() diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs" index 4e0c629..d67fe80 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs" @@ -75,15 +75,28 @@ { R_ConveyorLineFLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineFLInfo>(deviceProRead.DeviceProAddress); bool conveyArrivaled = device.GetValue<R_ConveyorLineFLDB, bool>(R_ConveyorLineFLDB.ConveyArrivaled, item.StationCode); - if (conveyArrivaled) + //杈撻�佺嚎鍙栨枡鍙e埌浣嶆洿鏂颁换鍔$姸鎬� + if (conveyorLineInfoRead!=null && conveyArrivaled) { - Dt_Task newTask = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum.ObjToInt() && x.PalletCode == conveyorLineInfoRead.Barcode && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.DeviceCode == item.StackerCraneCode && !string.IsNullOrEmpty(x.DeviceCode)); - if (newTask != null) + Dt_Task LineTask = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNum.ObjToInt() && x.PalletCode == conveyorLineInfoRead.Barcode && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == item.StackerCraneCode); + if (LineTask != null) { - _taskService.UpdateTask(newTask, TaskStatusEnum.AGV_Execute); + _taskService.UpdateTask(LineTask, TaskStatusEnum.AGV_Execute); } WriteError(item.StationName, $"鍏ュ簱鍒颁綅淇″彿锛屾墭鐩樺彿{conveyorLineInfoRead.Barcode},浠诲姟鍙�:{conveyorLineInfoRead.TaskNum}"); } + + //鍙戦�佽緭閫佺嚎浠诲姟 + Dt_Task? newTask = _taskRepository.QueryData(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && x.DeviceCode == item.StackerCraneCode && x.TaskType>=TaskTypeEnum.Inbound.ObjToInt()).OrderBy(x=>x.TaskNum).FirstOrDefault(); + if (newTask != null) + { + device.SetValue(W_ConveyorLineFLDB.Barcode, newTask.PalletCode, item.StationCode); + Thread.Sleep(500); + device.SetValue(W_ConveyorLineFLDB.TaskNum, newTask.TaskNum, item.StationCode); + Thread.Sleep(500); + device.SetValue(GroundStationDBName.W_PutFinish, true, item.StationCode); + _taskService.UpdateTask(newTask, TaskStatusEnum.Line_Executing); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" index a4c0b39..7f7aa5b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" @@ -276,6 +276,8 @@ } else if (existTask != null && existTask.TaskState != (int)TaskStatusEnum.SC_Execute) { + WriteError(commonStackerCrane.DeviceCode, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"浠诲姟{task.TaskNum}娴呰揣浣嶄换鍔existTask.TaskNum}浠诲姟鐘舵�佷笉涓哄爢鍨涘緟鎵ц"); return null; } else diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" index 4fa7a1d..45d2faa 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_CSJ.cs" @@ -102,6 +102,7 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_CSJ(locationInfos, undefinedTypeEmptyLocation, palletType); if (locationInfo != null) { + //鍚屼竴鍒楀悓涓�灞傚瓨鏀剧殑璐х墿涓�鑷� if (locationInfo.Depth < locationInfoDepth.Max(x => x.Depth)) { Dt_LocationInfo? locationInfoExist = null; @@ -166,6 +167,7 @@ Dt_LocationInfo? locationInfo = GetUsableLocation_CSJ(locationInfos, definedTypeEmptyLocation, palletType); if (locationInfo != null) { + //鍚屼竴鍒楀悓涓�灞傚瓨鏀剧殑璐х墿涓�鑷� if (locationInfo.Depth < locationInfoDepth.Max(x => x.Depth)) { Dt_LocationInfo? locationInfoExist = null; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" index 82ca087..7042b06 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" @@ -464,8 +464,11 @@ int row = location.Row; for (int j = location.Depth + 1; j <= maxDepth; j++) { - row += 1; - Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row); + Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == (row + 1)); + if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6)) + { + locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2)); + } if (locationInfo != null) { groupLocations.Add(locationInfo); @@ -474,8 +477,11 @@ for (int j = location.Depth - 1; j >= 1; j--) { - row -= 1; - Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == row); + Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && x.Row == (row -1)); + if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4)) + { + locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2)); + } if (locationInfo != null) { groupLocations.Add(locationInfo); @@ -499,6 +505,10 @@ for (int j = location.Depth + 1; j <= maxDepth; j++) { Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1)); + if (j == 3 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 1 || row == 6)) + { + locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2)); + } if (locationInfo != null) { groupLocations.Add(locationInfo); @@ -508,7 +518,7 @@ for (int j = location.Depth - 1; j >= 1; j--) { Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 1 || x.Row == row - 1)); - if (j == 1 && location.RoadwayNo.Contains("CSJ") && (row==1 || row==6)) + if (j == 1 && (location.RoadwayNo.Contains("CSJ") || location.RoadwayNo.Contains("PP")) && (row == 3 || row == 4)) { locationInfo = locationInfos.FirstOrDefault(x => x.Depth == j && x.Column == location.Column && x.Layer == location.Layer && (x.Row == row + 2 || x.Row == row - 2)); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" index 3b97fd6..a04ed7f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/AssignInboundTaskLocation_BC.cs" @@ -225,7 +225,7 @@ string roadwayNo=string.Empty; foreach (var location in locationCounts.OrderBy(x => x.Count)) { - if (location.Count <= 2) + if (location.Count <= 5) continue; roadwayNo = location?.RoadwayNo ?? ""; break; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" index f95c73e..bbee210 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesProductService.cs" @@ -74,6 +74,10 @@ } if (bagInfoModel.BatchNo.Substring(0, 3).ToUpper() == "CPK") { + if (warehouse.WarehouseCode==WarehouseEnum.HA73.ToString()) + { + return content.Error($"鐮斿彂浠撳睘鎬т笉鑳藉叆骞冲簱"); + } WebResponseContent inProRespone = InPKProStock(bagInfoModel, proDetailsExists, warehouse); if (!inProRespone.Status) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" index 3deae56..5c6ff6a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" @@ -275,7 +275,7 @@ _stockRepository.StockInfoRepository.AddData(stockInfo); _unitOfWorkManage.CommitTran(); PushTasksToWCS(new List<Dt_Task> { newTask }); - PutFinish(address, newTask.PalletCode, newTask.TaskNum.ToString()); + //PutFinish(address, newTask.PalletCode, newTask.TaskNum.ToString()); return WebResponseContent.Instance.OK(); } catch (Exception ex) @@ -533,7 +533,7 @@ WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask); PushTasksToWCS(new List<Dt_Task> { newTask }); - if (newTask.WarehouseId == 5) PutFinish(stationCode.ToString(),newTask.PalletCode, newTask.TaskNum.ToString()); + //if (newTask.WarehouseId == 5) PutFinish(stationCode.ToString(),newTask.PalletCode, newTask.TaskNum.ToString()); return WebResponseContent.Instance.OK(data: wMSTaskDTO); } catch (Exception ex) @@ -634,7 +634,7 @@ WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask); PushTasksToWCS(new List<Dt_Task> { newTask }); - if (newTask.WarehouseId == 5) PutFinish(stationCode, newTask.PalletCode, newTask.TaskNum.ToString()); + //if (newTask.WarehouseId == 5) PutFinish(stationCode, newTask.PalletCode, newTask.TaskNum.ToString()); return WebResponseContent.Instance.OK(data: wMSTaskDTO); } catch (Exception ex) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" index 3a7cf2e..b28f736 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" @@ -190,7 +190,6 @@ /// <summary> /// 鐢熸垚鎴愬搧鍑哄簱浠诲姟 /// </summary> - /// <param name="ProOutNo">鍑哄簱璁㈠崟鍙�</param> /// <param name="StationCode">绔欏彴鍦板潃</param> /// <returns></returns> [HttpPost, HttpGet, Route("OutProductTask"), AllowAnonymous] diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile2.pubxml" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile2.pubxml" new file mode 100644 index 0000000..36847ea --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/PublishProfiles/FolderProfile2.pubxml" @@ -0,0 +1,17 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- +https://go.microsoft.com/fwlink/?LinkID=208121. +--> +<Project> + <PropertyGroup> + <DeleteExistingFiles>false</DeleteExistingFiles> + <ExcludeApp_Data>false</ExcludeApp_Data> + <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> + <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> + <LastUsedPlatform>Any CPU</LastUsedPlatform> + <PublishProvider>FileSystem</PublishProvider> + <PublishUrl>bin\Release\net6.0\publish\</PublishUrl> + <WebPublishMethod>FileSystem</WebPublishMethod> + <_TargetId>Folder</_TargetId> + </PropertyGroup> +</Project> \ No newline at end of file diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/\346\265\267\345\272\267AGV/\347\273\210\347\202\271\345\217\230\346\233\264\347\233\256\346\240\207\347\202\271\346\216\245\345\217\243\346\226\207\346\241\243.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/\346\265\267\345\272\267AGV/\347\273\210\347\202\271\345\217\230\346\233\264\347\233\256\346\240\207\347\202\271\346\216\245\345\217\243\346\226\207\346\241\243.docx" deleted file mode 100644 index 46d60a3..0000000 --- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/\346\265\267\345\272\267AGV/\347\273\210\347\202\271\345\217\230\346\233\264\347\233\256\346\240\207\347\202\271\346\216\245\345\217\243\346\226\207\346\241\243.docx" +++ /dev/null Binary files differ -- Gitblit v1.9.3