From ea7c07f651759bec6e5a7a528cf4b2ba9216b124 Mon Sep 17 00:00:00 2001 From: helongyang <647556386@qq.com> Date: 星期四, 12 六月 2025 18:34:23 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs | 4 ++-- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/MaterielnfoStatisticsDTO.cs | 4 ++-- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/AGV_ZHExtend.cs | 19 ++++++++++++------- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MaterielnfoStatisticsService.cs | 17 +++++++++-------- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" index e5a8d58..3890544 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs" @@ -133,10 +133,10 @@ { var content = PutFinish(task.NextAddress); if (!content.Status) throw new Exception(content.Message); - Dt_StationManger dt_Station = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == task.NextAddress); + Dt_StationManger dt_Station = _stationMangerRepository.QueryFirst(x => x.StationCode == task.NextAddress); if (dt_Station == null) { - throw new Exception($"{task.NextAddress}AGV绔欏彴鏈畾涔�"); + throw new Exception($"{task.NextAddress}绔欏彴鏈畾涔�"); } task.CurrentAddress = dt_Station.StationCode; task.NextAddress = ""; 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/AGV_ZHExtend.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/AGV_ZHExtend.cs" index a4da7dd..f3f37c0 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/AGV_ZHExtend.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/AGV_ZHExtend.cs" @@ -90,13 +90,14 @@ var WaitToTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt() && nameof(AGV_ZHJob).Contains(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); foreach (var WaitToTask in WaitToTasks) { + AgvSecureReplyDTO replyDTO = new AgvSecureReplyDTO(); if (WaitToTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) { if (WaitToTasks.FirstOrDefault(x => x.TaskState == TaskStatusEnum.AGV_Puting.ObjToInt() || x.TaskState == TaskStatusEnum.Finish.ObjToInt()) != null) { continue; } - Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == WaitToTask.NextAddress); + Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == WaitToTask.NextAddress); if (stationManger == null) { continue; @@ -119,6 +120,14 @@ continue; } otherDevice.SetValue(GroundStationDBName.W_PutPalletType, WaitToTask.PalletType, stationManger.StationCode); + + replyDTO.ReqCode = Guid.NewGuid().ToString().Replace("-", "");//WaitToTask.TaskNum.ToString(), + replyDTO.taskCode = WaitToTask.AgvTaskNum; + replyDTO.nextPositionCode = new CodePath() + { + type="00", + positionCode= stationManger.AGVStationCode + }; } else { @@ -144,13 +153,9 @@ { continue; } + replyDTO.ReqCode = Guid.NewGuid().ToString().Replace("-", "");//WaitToTask.TaskNum.ToString(), + replyDTO.taskCode = WaitToTask.AgvTaskNum; } - - AgvSecureReplyDTO replyDTO = new AgvSecureReplyDTO() - { - ReqCode = Guid.NewGuid().ToString().Replace("-", ""), //WaitToTask.TaskNum.ToString(), - taskCode = WaitToTask.AgvTaskNum, - }; WebResponseContent content = _taskService.AgvSecureReply(replyDTO); if (content.Status && WaitToTask.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/MaterielnfoStatisticsDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/MaterielnfoStatisticsDTO.cs" index cc5b348..c809b0c 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/MaterielnfoStatisticsDTO.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/MaterielnfoStatisticsDTO.cs" @@ -33,13 +33,13 @@ /// 搴撳瓨鏁伴噺 /// </summary> [ExporterHeader(DisplayName = "搴撳瓨鏁伴噺")] - public float StockQuantity { get; set; } + public decimal StockQuantity { get; set; } /// <summary> /// 鍑哄簱鏁伴噺 /// </summary> [ExporterHeader(DisplayName = "鍑哄簱鏁伴噺")] - public float OutboundQuantity { get; set; } + public decimal OutboundQuantity { get; set; } /// <summary> /// 搴撳瓨鐘舵�� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MaterielnfoStatisticsService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MaterielnfoStatisticsService.cs" index d8d262c..d167c0a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MaterielnfoStatisticsService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MaterielnfoStatisticsService.cs" @@ -95,8 +95,8 @@ WarehouseId = a.WarehouseId, MaterielCode = b.MaterielCode, MaterielName = b.MaterielName, - StockQuantity = b.StockQuantity, - OutboundQuantity = b.OutboundQuantity, + StockQuantity =(decimal) b.StockQuantity, + OutboundQuantity =(decimal) b.OutboundQuantity, StockStatus = a.StockStatus, Unit = b.Unit, Remark = a.Remark, @@ -109,10 +109,11 @@ var groupedData = new Dictionary<string, MaterielnfoStatisticsDTO>(); foreach (var item in allData) { + // 纭繚鍒濆鍊间负decimal绫诲瀷 if (groupedData.ContainsKey(item.MaterielCode)) { - groupedData[item.MaterielCode].StockQuantity += item.StockQuantity; - groupedData[item.MaterielCode].OutboundQuantity += item.OutboundQuantity; + groupedData[item.MaterielCode].StockQuantity += Convert.ToDecimal(item.StockQuantity); + groupedData[item.MaterielCode].OutboundQuantity += Convert.ToDecimal(item.OutboundQuantity); } else { @@ -121,8 +122,8 @@ WarehouseId = item.WarehouseId, MaterielCode = item.MaterielCode, MaterielName = item.MaterielName, - StockQuantity = item.StockQuantity, - OutboundQuantity = item.OutboundQuantity, + StockQuantity = Convert.ToDecimal(item.StockQuantity), + OutboundQuantity = Convert.ToDecimal(item.OutboundQuantity), StockStatus = item.StockStatus, Unit = item.Unit, Remark = item.Remark @@ -224,8 +225,8 @@ WarehouseId = a.WarehouseId, MaterielCode = b.MaterielCode, MaterielName = b.MaterielName, - StockQuantity = b.StockQuantity, - OutboundQuantity = b.OutboundQuantity, + StockQuantity = (decimal)b.StockQuantity, + OutboundQuantity =(decimal) b.OutboundQuantity, StockStatus = a.StockStatus, Unit = b.Unit, Remark = a.Remark, -- Gitblit v1.9.3