1
helongyang
2025-06-12 ea7c07f651759bec6e5a7a528cf4b2ba9216b124
1
已修改4个文件
44 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/ZH_AGVController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/AGV_ZHExtend.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/MaterielnfoStatisticsDTO.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MaterielnfoStatisticsService.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/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 = "";
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/×躸²Ö/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)
                    {
´úÂë¹ÜÀí/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>
        /// åº“存状态
´úÂë¹ÜÀí/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,