| | |
| | | public void RequestOutbound(CommonConveyorLine_BZ conveyorLine, ConveyorLineTaskCommand_After command, Dt_StationManager station) |
| | | { |
| | | //查询对应产线的在途数据 |
| | | ConveyorLineTaskCommand_After readSignal = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(station.stationLocation); |
| | | if (readSignal.Reserved5 == 1) |
| | | { |
| | | ConsoleHelper.WriteErrorLine($"包装{station.productLine}开始清料"); |
| | | return; |
| | | } |
| | | |
| | | dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == station.productLine && x.toArea == station.stationChildCode); |
| | | |
| | | needBarcode.inLineNum = _taskRepository.QueryData(x => x.TargetAddress == station.stationChildCode).Count(); |
| | | |
| | | //若在途数量小于目标位置的缓存数量 则寻找对应常温库存中常温3工序的可出库数据 并建立出库任务 |
| | | if (needBarcode.inLineNum <= needBarcode.cacheNum) |
| | | if (needBarcode.inLineNum < needBarcode.cacheNum) |
| | | { |
| | | if (_taskService.RequestOutTaskToBZAsync(station).Result.Status) |
| | | { |
| | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, station.stationChildCode); |
| | | _taskRepository.DeleteData(task); |
| | | |
| | | if (needBarcode.inLineNum-- <= 0) needBarcode.inLineNum = 0; |
| | | if (--needBarcode.inLineNum <= 0) needBarcode.inLineNum = 0; |
| | | _needBarcodeRepository.UpdateData(needBarcode); |
| | | } |
| | | else //如无任务 则判定为从NG口上料 调取MOM接口 判断返回参数 无异常则送入包装,有异常则退回NG口 |