分支自 SuZhouGuanHong/TaiYuanTaiZhong

huanghongfeng
2024-07-08 836a3231be910fd3e11258e18cf389594ac9b420
处理人工出库空托
已修改9个文件
83 ■■■■ 文件已修改
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/AGVServer.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendFromaddress.cs 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendToaddress.cs 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/UploadMesInfo/AGVAPIAddress.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/QueueTask/OutboundTask.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToMes/OutsourceInbound.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/JobQueueTask.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/大屏/src/views/centerRight3.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/AGVServer.cs
@@ -6,6 +6,7 @@
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Common;
using WIDESEA_Core.EFDbContext;
@@ -45,7 +46,7 @@
                    {
                        var Materiel = QueryData.QueryMateriel(agv_task.agv_materielid);//查找车轮数据
                        var Materiel1 = QueryData.QueryMateriel1(agv_task.agv_materielid);//查找车轮数据
                        if (Materiel == null && Materiel1 == null && !agv_task.agv_tasktype.Contains("TaskType_EmptyPallet"))
                        if (Materiel == null && Materiel1 == null && !agv_task.agv_tasktype.Contains(AGVTaskTypeEnum.TaskType_EmptyPallet.ToString()))
                        {
                            agv_task.agv_remark = "未获取到当前任务的车轮数据";
                            agvtaskRepository.Update(agv_task, true);
@@ -57,8 +58,8 @@
                        requestTask.Material = agv_task.agv_materielid;
                        requestTask.Grade = agv_task.agv_grade;
                        requestTask.Quantity = agv_task.agv_qty;
                        requestTask.TrayType = agv_task.agv_Traytype.Contains("Small") ? 1 : 2;//
                        requestTask.TaskType = agv_task.agv_tasktype.Contains("TaskType_EmptyPallet") ? 2 : 1;//
                        requestTask.TrayType = agv_task.agv_Traytype.Contains(TrayTypeEnum.SmallTray.ToString()) ? 1 : 2;//
                        requestTask.TaskType = agv_task.agv_tasktype.Contains(AGVTaskTypeEnum.TaskType_EmptyPallet.ToString()) ? 2 : 1;//
                        #region ç»„/拆空盘任务需处理
                        requestTask.StarQuantity = agv_task.StarQuantity;
                        requestTask.EndQuantity = agv_task.EndQuantity;
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendFromaddress.cs
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendToaddress.cs
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/UploadMesInfo/AGVAPIAddress.cs
@@ -8,17 +8,18 @@
{
    public class AGVAPIAddress
    {
        public const string ip = "http://192.168.12.204:5000/";
        /// <summary>
        /// å®Œæ•´AGV任务下发地址
        /// </summary>
        public const string IPAddress_AGVTask = "http://192.168.12.204:5000/api/TaskCreat/CreatTask";
        public const string IPAddress_AGVTask = ip + "api/TaskCreat/CreatTask";
        /// <summary>
        /// AGV起点任务下发地址
        /// </summary>
        public const string IPAddress_AGVFromaddTask = "http://192.168.12.204:5000/api/TaskCreat/CreatGetPalletTask";
        public const string IPAddress_AGVFromaddTask = ip + "api/TaskCreat/CreatGetPalletTask";
        /// <summary>
        /// AGV终点任务下发地址
        /// </summary>
        public const string IPAddress_AGVToaddTask = "http://192.168.12.204:5000/api/TaskCreat/CreatPutPalletTask";
        public const string IPAddress_AGVToaddTask = ip + "api/TaskCreat/CreatPutPalletTask";
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/QueueTask/OutboundTask.cs
@@ -7,6 +7,7 @@
using WIDESEA_Comm;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Comm.TaskNo;
using WIDESEA_Common;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions;
using WIDESEA_Entity.DomainModels;
@@ -50,7 +51,7 @@
                            //查找当前货位同行是否存在入库任务
                            if (GetStation.InBusyStation(Station.stationCode)) continue;
                            stationinfo = stationinfoRepository.Find(x => x.line == Station.line && x.area == Station.area && x.enable && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).OrderByDescending(x => x.column).FirstOrDefault();
                            stationinfo = stationinfoRepository.Find(x => x.line == Station.line && x.area == Station.area && x.enable && x.tray_status == "StrogeTray" && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).OrderByDescending(x => x.column).FirstOrDefault();
                            if (stationinfo != null)
                            {
                                if (agvtaskRepository.Find(x => x.agv_fromaddress == stationinfo.stationCode).Any()) continue;
@@ -122,5 +123,53 @@
                WriteDBLog.Error("创建出库任务", $"错误信息:{ex.Message}", "PCS");
            }
        }
        /// <summary>
        /// å¤„理人工出库空托
        /// </summary>
        public static void Outkongtuo()
        {
            try
            {
                VOLContext context = new VOLContext();
                Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context);
                Idt_agvtaskRepository agvdb = new dt_agvtaskRepository(context);
                var Station = stationinfoRepository.Find(x => x.tray_status == "EmptyTrayss" && x.enable && x.location_state== LocationStateEnum.Stroge.ToString() && x.quantity==1).ToList();
                foreach (var station in Station)
                {
                    var EmptyStations = stationinfoRepository.Find(x => x.area == station.area && x.line == station.line && x.column > station.column && x.location_state != LocationStateEnum.Empty.ToString()).Any();
                    if (!EmptyStations)
                    {
                        dt_agvtask agvtask = new dt_agvtask()
                        {
                            agv_fromaddress = station.stationCode,
                            agv_id = Guid.NewGuid(),
                            agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"),
                            agv_grade = 3,
                            agv_createtime = DateTime.Now,
                            agv_taskstate = "Queue",
                            agv_qty = station.quantity,
                            agv_Traytype = station.tray_type,
                            agv_tasktype = AGVTaskTypeEnum.TaskType_EmptyPallet.ToString(),
                            //agv_toaddress = TargetLocation.stationCode,
                            agv_toaddress = "",
                            agv_userid = "系统",
                            agv_TrayStatus = "EmptyTray",
                        };
                        agvdb.Add(agvtask, true);
                        station.location_state = LocationStateEnum.OutBusy.ToString();
                        stationinfoRepository.Update(station, x => new { x.location_state }, true);
                    }
                }
            }
            catch (Exception ex)
            {
                WriteDBLog.Error("创建人工出库后的空托出库", $"错误信息:{ex.Message}", "PCS");
            }
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_inventoryService.cs
@@ -272,15 +272,14 @@
                            station.quantity = station.quantity - 1;
                            if (station.quantity < 1)
                            {
                                station.quantity = 0;
                                station.quantity = 1;
                                station.stationType = string.Empty;
                                station.heatNumber = string.Empty;
                                station.Number = string.Empty;
                                station.billetID = string.Empty;
                                station.bindSN = string.Empty;
                                station.enable = false;
                                station.tray_status = string.Empty;
                                station.location_state = LocationStateEnum.Empty.ToString();
                                station.tray_status = "EmptyTrayss";
                                station.location_state = LocationStateEnum.Stroge.ToString();
                            }
                            else
                            {
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToMes/OutsourceInbound.cs
@@ -89,15 +89,14 @@
                            station.quantity = station.quantity - 1;
                            if (station.quantity < 1)
                            {
                                station.quantity = 0;
                                station.quantity = 1;
                                station.stationType = string.Empty;
                                station.heatNumber = string.Empty;
                                station.Number = string.Empty;
                                station.billetID = string.Empty;
                                station.bindSN = string.Empty;
                                station.enable = false;
                                station.tray_status = string.Empty;
                                station.location_state = LocationStateEnum.Empty.ToString();
                                station.tray_status = "EmptyTrayss";
                                station.location_state = LocationStateEnum.Stroge.ToString();
                            }
                            else
                            {
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/JobQueueTask.cs
@@ -11,6 +11,7 @@
            QueueTask.ReplaceTrayTask();
            ToMes.InfoToMes();
            OutboundTask.CreateOutboundTask();
            OutboundTask.Outkongtuo();
        }
    }
}
´úÂë¹ÜÀí/´óÆÁ/src/views/centerRight3.vue
@@ -72,9 +72,8 @@
            oddRowBGC: '#0f1325', //奇数行
            evenRowBGC: '#171c33', //偶数行
            index: true,
            columnWidth: [50,100,100,100,100,100],
            columnWidth: [50,102,100,100,100,100],
            align: ['center'],
          }
      })
      .catch(error => {