| | |
| | | using WIDESEAWCS_IPackInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_Tasks.ConveyorLineJob; |
| | |
| | | var station = _stationMangerRepository.QueryFirst(x => x.StationDeviceCode == device.DeviceCode); |
| | | if (station != null && station.Remark != null)//鑾峰彇绔欏彴閲岄潰鐨勬墭鐩樺彿 |
| | | { |
| | | var task = _taskRepository.QueryFirst(x => x.DeviceCode == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute || x.TaskState == (int)TaskStatusEnum.AGV_Executing) && x.SourceAddress == station.AGVStationCode); |
| | | var task = _taskRepository.QueryData(x => x.SourceAddress == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute || x.TaskState == (int)TaskStatusEnum.AGV_Executing)); |
| | | if (task == null) |
| | | { |
| | | WebResponseContent content = _taskService.CPEmptyInbound(station.Remark, station.AGVStationCode); |
| | |
| | | var tasks = _taskRepository.QueryData(x => x.Roadway == device.DeviceCode && (x.TaskState == (int)TaskStatusEnum.AGV_Execute || x.TaskState == (int)TaskStatusEnum.AGV_Executing) && x.TargetAddress == device.DeviceCode); |
| | | if (tasks.Count + Convert.ToInt32(command.Num) < 9) |
| | | { |
| | | var task = _taskRepository.QueryFirst(x => x.Roadway == device.DeviceCode && x.TaskState == (int)TaskStatusEnum.StackPlate_Execute); |
| | | var task = _taskRepository.Db.Queryable<Dt_Task>().Where(x => x.Roadway == device.DeviceCode && x.TaskState == (int)TaskStatusEnum.New).OrderBy(x=>x.TaskNum).First(); |
| | | if (task != null && station != null) |
| | | { |
| | | task.TaskState = (int)TaskStatusEnum.AGV_Execute; |
| | | _taskRepository.UpdateData(task); |
| | | task.DeviceCode = station.StackerCraneCode; |
| | | station.Remark = task.PalletCode; |
| | | _taskRepository.UpdateData(task); |
| | | _stationMangerRepository.UpdateData(station); |
| | | } |
| | | } |