| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | //è·åææåè®®çè¾é线ç«å° |
| | | List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList(); |
| | | //è·åæåè®®çè¾é线-z |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode); |
| | | //让æ¯ä¸ªè¾é线å¯å¨-z |
| | | foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode))) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(WR_CLineYLDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | R_ConveyorLineYLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineYLInfo>(deviceProRead.DeviceProAddress); |
| | | if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //䏿¥¼æ¥æç§°éç«å°å
许å
¥åºç³è¯· |
| | | { |
| | | device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); |
| | | WriteInfo(item.StationCode, $"请æ±å
¥åºæ¡ç :{conveyorLineInfoRead.WR_TMID}"); |
| | | WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID); |
| | | if (content.Status) |
| | | { |
| | | device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); |
| | | WriteInfo(item.StationCode, $"请æ±å
¥åºæ¡ç :{conveyorLineInfoRead.WR_TMID}"); |
| | | } |
| | | else |
| | | { |
| | | WriteError(item.StationCode, $"请æ±å
¥åºå¤±è´¥ï¼{content.Message}"); |
| | | } |
| | | |
| | | } |
| | | else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && conveyorLineInfoRead.WR_Task <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //䏿¥¼åé
ç«å°å
¥åºåé
ç®æ ç¹ |
| | | { |
| | |
| | | { |
| | | device.SetValue(WR_CLineYLDB.WR_Task, task.TaskNum, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_ToHode, task.NextAddress, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_Width, task.TaskLength, item.StationCode); |
| | | device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing); |
| | | WriteInfo(item.StationCode, $"{conveyorLineInfoRead.Serialize()}"); |