|  |  |  | 
|---|
|  |  |  | ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>(); | 
|---|
|  |  |  | if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //骞茶啘鍏ュ簱绔欏彴浜や簰 | 
|---|
|  |  |  | if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string boxcode = device.GetValue<R_ConveyorLineDB, string>(R_ConveyorLineDB.Boxcode, item.StationCode); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //骞茶啘鍑哄簱绔欏彴浜や簰 | 
|---|
|  |  |  | if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == item.StationDeviceCode); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else if (conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //瀹屾垚骞茶啘鍑哄簱浠诲姟 | 
|---|
|  |  |  | _taskService.TaskCompleted(conveyorLineInfoWrite.TaskNum); | 
|---|
|  |  |  | device.SetValue(W_ConveyorLineDB.STB, false, item.StationCode); | 
|---|
|  |  |  | } | 
|---|