| | |
| | | private readonly IRouterRepository _routerRepository; |
| | | private readonly IRouterService _routerService; |
| | | private readonly IRouterExtension _routerExtension; |
| | | |
| | | private static string BarCode1 = ""; |
| | | private static string BarCode2 = ""; |
| | | public ConveyorLineJob1(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension) |
| | | { |
| | | _cacheService = cacheService; |
| | |
| | | //䏿¥WMSæç®±å°è¾¾ |
| | | if (pickBarCode.IsNotEmptyOrNull()) |
| | | { |
| | | WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode); |
| | | if (content.Status) |
| | | if (device.DeviceCode == "CL1" && BarCode1!= pickBarCode) |
| | | { |
| | | WriteInfo(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥æå{pickBarCode}"); |
| | | WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode); |
| | | if (content.Status) |
| | | { |
| | | WriteInfo(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥æå{pickBarCode}"); |
| | | } |
| | | else |
| | | { |
| | | WriteError(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥WMSé误{pickBarCode}ï¼ä¿¡æ¯{content.Message}"); |
| | | } |
| | | BarCode1 = pickBarCode; |
| | | } |
| | | else |
| | | if (device.DeviceCode == "CL2" && BarCode1 != pickBarCode) |
| | | { |
| | | WriteError(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥WMSé误{pickBarCode}ï¼ä¿¡æ¯{content.Message}"); |
| | | WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode); |
| | | if (content.Status) |
| | | { |
| | | WriteInfo(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥æå{pickBarCode}"); |
| | | } |
| | | else |
| | | { |
| | | WriteError(device.DeviceCode, $"{station.PickStationCode}æ£éç³è¯·ä¸æ¥WMSé误{pickBarCode}ï¼ä¿¡æ¯{content.Message}"); |
| | | } |
| | | BarCode2 = pickBarCode; |
| | | } |
| | | } |
| | | else |
| | |
| | | if (InTake==256 && InBarCode.IsNotEmptyOrNull()) |
| | | { |
| | | //ç³è¯·å
¥åºä»»å¡ |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt()); |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt() && x.DeviceCode==device.DeviceCode); |
| | | if (task != null) continue; |
| | | |
| | | WebResponseContent content = _taskService.RequestInTask(station.StationCode, InBarCode); |