huangxiaoqiang
2025-07-29 f23e0326aa05a1c5b47d4aec4c06e73d0d86b8e7
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -21,6 +21,8 @@
using Newtonsoft.Json;
using Quartz;
using System.Reflection;
using System.Text;
using System.Web;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
@@ -105,7 +107,8 @@
            try
            {
                ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode);
                //var Barcode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.ConveyorLineBarcode, station.stationChildCode);
                var Barcodea = conveyorLine.Communicator.Read("DB1103.2",5);
                string x=Encoding.UTF8.GetString(Barcodea);
                if (command != null)
                {
                    #region è°ƒç”¨äº‹ä»¶æ€»çº¿é€šçŸ¥å‰ç«¯
@@ -162,8 +165,21 @@
                var log = $"【{conveyorLine._deviceName}】站台【{station.stationChildCode}】请求取货";
                await LogAndWarn(conveyorLine.DeviceName, log);
                var task = _taskService.QueryConveyorLineTask(station.stationChildCode, command.TaskNum);
                if (station.stationChildCode == "3004")
                {
                    var taskIn = _taskRepository.QueryFirst(x => x.TaskNum == command.TaskNum && x.NextAddress == station.stationChildCode && x.TaskType == (int)TaskInboundTypeEnum.Inbound&&x.TaskState==(int)TaskInStatusEnum.HoistInExecuting);
                    if(taskIn != null)
                    {
                        Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.Roadway == taskIn.Roadway && x.stationType == 3 && x.stationFloor == taskIn.Floor);
                        taskIn.CurrentAddress = station.stationChildCode;
                        taskIn.NextAddress = stationManager.stationChildCode;
                        taskIn.TaskState = (int)TaskInStatusEnum.InNew;
                        _taskRepository.UpdateData(taskIn);
                    }
                }
                var task = _taskService.QueryConveyorLineTask(station.stationChildCode, command.TaskNum);
                await HandleNewTaskAsync(conveyorLine, command, station.stationChildCode, task);
            }
            catch (Exception ex)