From c5cf76657ef4bda557a445b56466a85db0b2662d Mon Sep 17 00:00:00 2001 From: 647556386 <647556386@qq.com> Date: 星期五, 14 三月 2025 18:05:52 +0800 Subject: [PATCH] 新增物料出库详情单页面 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 25 +++++++++++++++++++++---- 1 files changed, 21 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 6a74dc6..5be0087 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" @@ -171,6 +171,14 @@ if (taskTypeGroup == TaskTypeGroup.InboundGroup) { stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StationDeviceCode == item.SourceAddress); + if (stationManger==null && task.TaskType==TaskTypeEnum.InProduct.ObjToInt()) + { + stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode==task.SourceAddress); + //杞崲鎴愬搧浠撹捣鐐圭珯鍙� + item.SourceAddress = stationManger.StationCode; + task.CurrentAddress = stationManger.StationCode; + task.SourceAddress = stationManger.StationCode; + } } else { @@ -211,12 +219,23 @@ task.DeviceCode = stationManger.StackerCraneCode; task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); } + else if (item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt() && item.RoadWay.Contains("ZH")) + { + task.NextAddress = stationManger.StackerCraneStationCode; + task.DeviceCode = stationManger.StackerCraneCode; + task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); + } else { task.NextAddress = taskTypeGroup == TaskTypeGroup.InboundGroup ? task.TargetAddress : router.NextPosi; - if (item.RoadWay.Contains("AGV")) + if (item.RoadWay.Contains("AGV_FL")) { task.DeviceCode = item.RoadWay; + task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; + } + else if(item.RoadWay.Contains("AGV_FL")) + { + task.DeviceCode = stationManger.StationDeviceCode; task.AgvTaskNum = task.DeviceCode + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum; } else @@ -251,7 +270,6 @@ return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�"); } router = routers.FirstOrDefault(); - task.NextAddress = router?.StartPosi ?? ""; task.DeviceCode = item.RoadWay; task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); @@ -265,8 +283,7 @@ return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�"); } router = routers.FirstOrDefault(); - string stationCode = router?.NextPosi ?? ""; - Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == stationCode); + Dt_StationManger? stationManger = _stationMangerRepository.QueryData(x => true).FirstOrDefault(x=>x.StationCode== router?.NextPosi); if (stationManger == null) { return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙伴厤缃俊鎭�"); -- Gitblit v1.9.3