wangxinhui
5 天以前 9ec715d2deb18a269dd49c48da91a36632d08c81
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/ConveyorLineJob_PP.cs
@@ -77,20 +77,12 @@
                                if (!string.IsNullOrEmpty(boxcode))
                                {
                                    string sc = device.Communicator.Read<string>("DB900.598.0");
                                    string sc = device.Communicator.Read<string>("DB900.578.0");
                                    WriteError(device.DeviceName, $"璇诲彇鍊硷細{boxcode},瀵规瘮{sc}");
                                    string boxEndCode = "";
                                    if (boxcode.LastIndexOf(",SC:") >= 0)
                                    if (boxcode.LastIndexOf(",PO:") >= 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",SC:")) + sc.Substring(sc.IndexOf(",SC:")).Replace("\0", "");
                                    }
                                    else if (boxcode.LastIndexOf(",SC") > 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",SC")) + sc.Substring(sc.IndexOf("SC:")).Replace("\0", "");
                                    }
                                    else if (boxcode.LastIndexOf(",S") > 0)
                                    {
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",S")) + sc.Substring(sc.IndexOf("SC:")).Replace("\0", "");
                                        boxEndCode = "M" + boxcode.Substring(0, boxcode.LastIndexOf(",PO:")) + sc.Substring(sc.IndexOf(",PO:")).Replace("\0", "");
                                    }
                                    //鍏ュ簱鐢宠浠诲姟
@@ -111,7 +103,8 @@
                            }
                            else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
                            {
                                Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt());
                                string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode);
                                Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && boxcode.Contains(x.PalletCode) && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt());
                                if (task != null)
                                {
                                    _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress);