wangxinhui
2024-11-06 8f392cc88b0768b74efca3b68785cf5aa1c38e70
wcs-server-hbf/WIDESEA_WCS/SchedulerExecute/Equipment/F_TSJ_DownTask.cs
@@ -1,6 +1,7 @@
using HslCommunication;
using System;
using System.Threading;
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Common.LoctionEnum;
using WIDESEA_Common.Tools;
@@ -28,7 +29,8 @@
            if (Interlocked.Exchange(ref _readTSJDOWNSignalsoFTSJ, 1) == 0)
            {
                Task.Run(() =>
                {
                try
                {
                    VOLContext Context = new VOLContext();
@@ -89,8 +91,8 @@
                            if (a==1)
                            {
                                agvRepository.Add(agvtask, true);
                                WriteDBLog.Info($"负极提升机下料任务生成").Write($"生成任务:{agvtask.agv_tasknum},终点货位【{ware_Locations.upper_code}】状态:托盘光电检测:{ware_Locations.tpgd},状态:{ware_Locations.location_state},更新时间:{ware_Locations.wireless_time}", $"负极提升机下料任务生成");
                                WriteDBLog.Info($"负极提升机下料任务生成").Write($"----------------任务生成成功  {DateTime.Now} -------------- {Environment.NewLine}", $"负极提升机下料任务生成");
                                    //WriteDBLog.Info($"负极提升机下料任务生成").Write($"生成任务:{agvtask.agv_tasknum},终点货位【{ware_Locations.upper_code}】状态:托盘光电检测:{ware_Locations.tpgd},状态:{ware_Locations.location_state},更新时间:{ware_Locations.wireless_time}", $"负极提升机下料任务生成");
                                    //WriteDBLog.Info($"负极提升机下料任务生成").Write($"----------------任务生成成功  {DateTime.Now} -------------- {Environment.NewLine}", $"负极提升机下料任务生成");
                            }
                            //WriteLog.GetLog("设备呼叫").Write($"设备 {plc.PLCDescroption} 呼叫成功,任务{agvtask.agv_tasknum}生成", "设备呼叫");
                        }
@@ -98,16 +100,17 @@
                }
                catch (Exception)
                    catch (Exception ex)
                {
                    throw;
                        WriteLog.GetLog().Write($"负极提升机下料:{DateTime.Now} --------------{ex}", $"负极提升机下料调度");
                }
                finally
                {
                    Interlocked.Exchange(ref _readTSJDOWNSignalsoFTSJ, 0);
                }
                });
            }
        }