| | |
| | | } |
| | | |
| | | #region 调用事件总线通知前端 |
| | | var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken"); |
| | | if (tokenInfos == null || !tokenInfos.Any()) |
| | | { |
| | | //throw new Exception(conveyorLine.DeviceName + "缓存中未找到Token缓存"); |
| | | continue; |
| | | } |
| | | var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList(); |
| | | var userIds = tokenInfos?.Select(x => x.UserId).ToList(); |
| | | //var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken"); |
| | | //if (tokenInfos == null || !tokenInfos.Any()) |
| | | //{ |
| | | // //throw new Exception(conveyorLine.DeviceName + "缓存中未找到Token缓存"); |
| | | // continue; |
| | | //} |
| | | //var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList(); |
| | | //var userIds = tokenInfos?.Select(x => x.UserId).ToList(); |
| | | |
| | | object obj = new |
| | | { |
| | | station.stationChildCode, |
| | | commandAfter = command, |
| | | }; |
| | | _noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj }); |
| | | //object obj = new |
| | | //{ |
| | | // station.stationChildCode, |
| | | // commandAfter = command, |
| | | //}; |
| | | //_noticeService.StackerData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj }); |
| | | |
| | | #endregion 调用事件总线通知前端 |
| | | } |
| | |
| | | public void RequestOutbound(CommonConveyorLine_BZ conveyorLine, ConveyorLineTaskCommand_After command, Dt_StationManager station) |
| | | { |
| | | //查询对应产线的在途数据 |
| | | dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == station.productLine); |
| | | dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == station.productLine && x.toArea == station.stationChildCode); |
| | | |
| | | needBarcode.inLineNum = _taskRepository.QueryData(x => x.TargetAddress == station.stationChildCode).Count(); |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | //写入对应产线目标地址 |
| | | //写入对应产线的目标地址 |
| | | if (station.productLine == "ZJ-7") |
| | | { |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, "", station.stationChildCode); |