| | |
| | | |
| | | 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); |
| | | } |
| | |
| | | _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"); |