| | |
| | | private readonly IRepository<Dt_TaskExecuteDetail> _taskExecuteDetailRepository; |
| | | private readonly IApiInfoService _apiInfoService; |
| | | private readonly IStationMangerService _stationMangerService; |
| | | private readonly IStationInfoService _stationInfo; |
| | | private readonly IMapper _mapper; |
| | | |
| | | private Dictionary<string, OrderByType> _taskOrderBy = new() |
| | |
| | | /// </summary> |
| | | public IRepository<Dt_Task> Repository => BaseDal; |
| | | |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService, IStationMangerService stationMangerService) : base(BaseDal) |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService, IStationMangerService stationMangerService, IStationInfoService stationInfo) : base(BaseDal) |
| | | { |
| | | _routerService = routerService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _apiInfoService = apiInfoService; |
| | | _trackloginfoService = trackloginfoService; |
| | | _stationMangerService = stationMangerService; |
| | | _stationInfo = stationInfo; |
| | | } |
| | | public WebResponseContent ReceiveWMSTask([NotNull] List<WMSTasksDTO> taskDTOs) |
| | | { |
| | |
| | | continue; |
| | | //throw new Exception($"ä»»å¡å·ã{task.taskCode}ãå·²åå¨ä»»å¡"); |
| | | } |
| | | if (BaseDal.QueryFirst(x => x.PalletCode == task.containerCode && x.TaskType == item.taskType) != null) |
| | | if (BaseDal.QueryFirst(x => x.PalletCode == task.containerCode /*&& x.TaskType == item.taskType*/) != null) |
| | | { |
| | | objects.Add(new |
| | | { |
| | |
| | | break; |
| | | case (int)TaskTypeEnum.CPOutbound: |
| | | content = CreateRGVNewOutTask(task, item.taskType); |
| | | objects.Add(content.Data); |
| | | break; |
| | | case (int)TaskTypeEnum.CPMoveInventory: |
| | | content = CreateRGVNewMoveTask(task, item.taskType); |
| | | objects.Add(content.Data); |
| | | break; |
| | | #endregion |
| | |
| | | } |
| | | else if (getLocationInfo.WarehouseId == 3) |
| | | { |
| | | |
| | | //è¿éæ¯æåæºç |
| | | var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "TSJ") as OtherDevice; |
| | | if (device == null) throw new Exception("æªæ¾å°æåæºè®¾å¤ä¿¡æ¯"); |
| | | if (!device.IsConnected) throw new Exception("PLC1æåæºè®¾å¤è¿æ¥å¤±è´¥"); |
| | | var value = device.GetValue<HoistEnum, short>(HoistEnum.Outboundmaterialbox, "TSJ"); |
| | | list.Add(new |
| | | { |
| | | LoctionCode = value, |
| | | LocationStatus = value!=0? 100 : 0, |
| | | EnableStatus = 0, |
| | | }); |
| | | } |
| | | else if (getLocationInfo.WarehouseId == 4) |
| | | { |