huangxiaoqiang
12 小时以前 2f64683d8081a69115acfb72c93a08cb83cea54d
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -202,8 +202,6 @@
            try
            {
                var task = _taskService.QueryBarCodeConveyorLineTask(command.ConveyorLineBarcode, childDeviceCode);
                //HandleTaskOut(conveyorLine, command, childDeviceCode, task);
                // && command.ConveyorLineBarcode != "NoRead" && !command.ConveyorLineBarcode.IsNotEmptyOrNull()
                var log = $"【{conveyorLine.DeviceName}】托盘号:【{command.ConveyorLineBarcode}】任务号:【{command.ConveyorLineTaskNum}】设备编码:【{childDeviceCode}】";
                ConsoleHelper.WriteSuccessLine(log);
@@ -216,9 +214,6 @@
                }
                else
                {
                    //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
                    //conveyorLine.SendCommand(taskCommand, childDeviceCode);
                    //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)task.TaskNum, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, childDeviceCode);
@@ -241,7 +236,6 @@
        /// <param name="childDeviceCode">子设备编号</param>
        public void RequestInNextAddress(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode)
        {
            //Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.ConveyorLineTaskNum, childDeviceCode);
            Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.ConveyorLineTaskNum, childDeviceCode, command.ConveyorLineBarcode);
            if (task != null)
            {
@@ -275,8 +269,6 @@
            var task = _taskService.QueryExecutingTaskByBarcode(command.ConveyorLineBarcode, childDeviceCode);
            if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish)
            {
                //ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
                if (content.Status)
@@ -301,10 +293,6 @@
            //var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode, command.ConveyorLineBarcode);
            if (task != null)
            {
                //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
                //conveyorLine.SendCommand(taskCommand, childDeviceCode);
                //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)task.TaskNum, childDeviceCode);
                conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode);
                conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, childDeviceCode);
@@ -362,10 +350,6 @@
                    Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
                    if (newTask != null)
                    {
                        //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask);
                        //conveyorLine.SendCommand(taskCommand, childDeviceCode);
                        //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                        conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)newTask.TaskNum, childDeviceCode);
                        conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, newTask.NextAddress, childDeviceCode);
                        conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, newTask.PalletCode, childDeviceCode);
@@ -375,11 +359,6 @@
                }
                else
                {
                    //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
                    //taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode);
                    //conveyorLine.SendCommand(taskCommand, childDeviceCode);
                    //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)task.TaskNum, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode);
                    conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, childDeviceCode);
@@ -484,7 +463,8 @@
                                _needBarcodeRepository.UpdateData(needBarcode);
                            }
                        }
                        content = _taskService.UpdateTaskStatusToNext(task);
                        taskNext.ExceptionMessage = log;
                        content = _taskService.UpdateTaskStatusToNext(taskNext);
                        var proAddress = conveyorLine.DeviceProDTOs
                                        .FirstOrDefault(x => x.DeviceChildCode == childDeviceCode && x.DeviceProParamName == ConveyorLineDBName_After.InteractiveSignal.ToString())
                                        ?.DeviceProAddress;