1
huangxiaoqiang
3 天以前 3296ae7c136f405db78c395635e72efa1c0d0125
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
@@ -84,7 +84,8 @@
                Creater = "System",
                Floor = stationManager.stationFloor,
                RGVName = RGVName,
                SourceStation= stationManager.remark,
                SourceStation = stationManager.remark,
                TargetStation = 0,
            };
            _taskRepository.AddData(task);
@@ -93,12 +94,19 @@
        {
            if (stationManager.stationChildCode == "3002")
            {
                var newTask = _taskRepository.QueryFirst(x => x.TargetAddress == "3004");
                if (newTask != null)
                {
                    return;
                }
                DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationChildCode && x.DeviceProParamName == "ConveyorLineBarcode").FirstOrDefault();
                var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 5);
                var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 10);
                string Barcode = Encoding.UTF8.GetString(x);
                if (Barcode == null)
                if (Barcode == null || Barcode==""|| Barcode.Trim().Contains("\0"))
                {
                    conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(3), stationManager.stationChildCode);
                }
@@ -141,11 +149,11 @@
            }
            else
            {
                DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationChildCode && x.DeviceProParamName == "ConveyorLineBarcode").FirstOrDefault();
                var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 5);
                DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationManager.stationNextChildCode && x.DeviceProParamName == "ConveyorLineBarcode").FirstOrDefault();
                var x = conveyorLine.Communicator.Read(devicePro.DeviceProAddress, 10);
                string Barcode = Encoding.UTF8.GetString(x);
                if (Barcode == "")
                if (Barcode == null || Barcode == "" || Barcode.Trim().Contains("\0"))
                {
                    conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, Convert.ToSByte(3), stationManager.stationChildCode);
                }
@@ -159,7 +167,7 @@
                    var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                    var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue;
                    var requestTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue;
                    WMSTaskDTO taskDTO = new WMSTaskDTO()
                    {
                        TPbarcode = Barcode,