huangxiaoqiang
2026-03-30 7db419acdd2c02950b67c081dd2d7f61fdb2cb89
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -117,7 +117,21 @@
                                if (station.stationModel == "1") //直通模式
                                {
                                    //todo BDC02过点  ç„Šæ¶‚绑定
                                    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.HZPassTZ)?.ConfigValue;
                                    if (wmsBase == null || requestTask == null)
                                    {
                                        throw new InvalidOperationException("WMS IP æœªé…ç½®");
                                    }
                                    var wmsIpAddrss = wmsBase + requestTask;
                                    var result = await HttpHelper.PostAsync(wmsIpAddrss, new { palletCode = palletcode, Roadways = station.Roadway, area = station.stationArea, Position = station.stationChildCode, PVI = pvi }.ToJsonString());
                                    WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result);
                                    if (!content.Status)
                                    {
                                        throw new Exception(content.Message);
                                    }
                                    conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.Spare6, 2, station.stationChildCode);
                                    conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode);
                                }
@@ -138,59 +152,14 @@
                                            _taskService.UpdateTaskStatusToNext(task);
                                        }
                                    }
                                    //else
                                    //{
                                    //    conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 12, station.stationChildCode);
                                    //}
                                }
                            }
                            //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.RequestInboundRoadWayNo)?.ConfigValue;
                            //if (wmsBase == null || requestTask == null)
                            //{
                            //    throw new InvalidOperationException("WMS IP æœªé…ç½®");
                            //}
                            //var wmsIpAddrss = wmsBase + requestTask;
                            //var result = await HttpHelper.PostAsync(wmsIpAddrss, new { palletCode = palletcode, Roadways = station.Roadway, area = station.stationArea, Position = station.stationChildCode, PVI = pvi }.ToJsonString());
                            //WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result);
                            //if (!content.Status)
                            //{
                            //    return;
                            //}
                            ////焊涂提升机  ç›´é€šäººæ¶‚装-2  å…¥åº“-3
                            //conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.Spare6, 3, station.stationChildCode);
                            //conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.Spare5, 5, station.stationChildCode);
                            //conveyorLine.SetValue<ConveyorLineDBName, Int16>(ConveyorLineDBName.AllowRelease, 1, station.stationChildCode);
                        }
                        //DeviceProtocolDetailDTO? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == station.stationChildCode && x.ProtocalDetailValue == request.ToString());
                        //if (deviceProtocolDetails != null)
                        //{
                        //    MethodInfo? method = GetType().GetMethod(deviceProtocolDetails.ProtocolDetailType);
                        //    if (method != null)
                        //    {
                        //        method.Invoke(this, new object[] { conveyorLine, conveyorLine, station });
                        //    }
                        //}
                        //ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(station.stationChildCode);
                        //command.PVI.Replace("/0", "").Replace("\"\\u0010\\u000f", "");
                        //command.CarColor.Replace("/0", "");
                        //command.CarType.Replace("/0", "");
                        //command.CarCate.Replace("/0", "");
                        //command.CatSkyWindow.Replace("/0", "");
                        //DeviceProtocolDetailDTO? deviceProtocolDetails = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.DeviceProParamName == station.stationChildCode && x.ProtocalDetailValue == command.Request.ToString());
                        ////x.DeviceProParamName == nameof(ConveyorLineTaskCommand.ConveyorLineSingal)
                        //if (deviceProtocolDetails != null)
                        //{
                        //    MethodInfo? method = GetType().GetMethod(deviceProtocolDetails.ProtocolDetailType);
                        //    if (method != null)
                        //    {
                        //        method.Invoke(this, new object[] { conveyorLine, command, station });
                        //    }
                        //}
                        #region è°ƒç”¨äº‹ä»¶æ€»çº¿é€šçŸ¥å‰ç«¯
                        //var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");