| | |
| | | DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | | if (item.StationType==StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProWrite!=null) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.WarehouseId == warehouseDevice.WarehouseId); |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt()) && x.DeviceCode == device.DeviceCode); |
| | | if (task!=null) |
| | | { |
| | | //鑾峰彇绔欏彴 |
| | |
| | | device.SetValue(W_ConveyorLineCPDB.TaskNum, task.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.WorkType, task.PalletType, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.WorkMode, 1, item.StationCode); |
| | | device.SetValue(W_ConveyorLineCPDB.CheckPos, 1, item.StationCode); |
| | | //鍚姩鎸囦护 |
| | | device.SetValue(W_ConveyorLineCPDB.ConveyArrival, 1, item.StationCode); |
| | | |
| | | if (task.TaskType==TaskTypeEnum.EmptyProductBack.ObjToInt()) |
| | | { |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | } |
| | | } |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null) |
| | |
| | | if (conveyorLineInfoRead.ConveyArrivaled==1 && isCanTake==1) |
| | | { |
| | | //鑾峰彇浠诲姟 |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()) && x.WarehouseId == warehouseDevice.WarehouseId && x.TaskNum == conveyorLineInfoRead.TaskNum.ObjToInt()); |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()) && x.DeviceCode == device.DeviceCode && x.TaskNum == conveyorLineInfoRead.TaskNum.ObjToInt()); |
| | | //鑾峰彇绔欏彴 |
| | | if (task!=null) |
| | | { |