| | |
| | | BaseDal.UpdateData(task); |
| | | } |
| | | // //忥¼åºæåæº å
¥åº ä¹åæ¯AGV_ToExecute //è¦åæåè´§å®æç¶æTakeFinish |
| | | else if ((task.TaskType == TaskTypeEnum.Q1TSJ4.ObjToInt() || task.TaskType == TaskTypeEnum.F03.ObjToInt()) && task.TaskState == (int)TaskStatusEnum.AGV_ToExecute) |
| | | else if ((task.TaskType == TaskTypeEnum.Q1TSJ4.ObjToInt() || task.TaskType == TaskTypeEnum.F03.ObjToInt()) && task.TaskState == (int)TaskStatusEnum.TakeFinish) |
| | | { |
| | | var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "TSJ") as OtherDevice; |
| | | if (device == null) task.ExceptionMessage = "æªæ¾å°æåæºä¿¡æ¯"; |
| | |
| | | case "intolift": //è¿å
¥çµæ¢¯ |
| | | { |
| | | //å
楼å°ä¸æ¥¼çå
¥åºä»»å¡ |
| | | if (task.TaskType == (int)TaskTypeEnum.Q3RK || task.TaskType == (int)TaskTypeEnum.MOVE || task.TaskType == (int)TaskTypeEnum.F01) |
| | | if (task.TaskType == (int)TaskTypeEnum.Q3RK || task.TaskType == (int)TaskTypeEnum.MOVE || task.TaskType == (int)TaskTypeEnum.F01 || task.TaskType == (int)TaskTypeEnum.Q3CK) |
| | | { |
| | | task.TaskState = TaskStatusEnum.Hkintolift.ObjToInt(); |
| | | BaseDal.UpdateData(task); |
| | |
| | | break; |
| | | case "leavelift": //离å¼çµæ¢¯ |
| | | { |
| | | if (task.TaskType == (int)TaskTypeEnum.Q3RK || task.TaskType == (int)TaskTypeEnum.MOVE || task.TaskType == (int)TaskTypeEnum.F01) |
| | | if (task.TaskType == (int)TaskTypeEnum.Q3RK || task.TaskType == (int)TaskTypeEnum.MOVE || task.TaskType == (int)TaskTypeEnum.F01|| task.TaskType == (int)TaskTypeEnum.Q3CK) |
| | | { |
| | | task.TaskState = TaskStatusEnum.HKleavelift.ObjToInt(); |
| | | BaseDal.UpdateData(task); |
| | |
| | | dt_RGVLocationInfo.LocationStatus = locationStatusEnum.ObjToInt(); |
| | | _rGVLocationInfoService.Repository.UpdateData(dt_RGVLocationInfo); |
| | | } |
| | | } |
| | | else//å¹³åºåºä½ |
| | | { |
| | | |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ´æ°ä¸æ¥¼ç«å°ç¶æ |
| | | public WebResponseContent UpdateStandStatus(Dt_Task task, string stationCode, LocationStatusEnum locationStatusEnum) |
| | | { |
| | | try |
| | | { |
| | | Dt_StationManger? stationManger = _stationMangerService.Repository.QueryFirst(x => x.StationCode == task.TargetAddress); |
| | | //stationManger.IsOccupied = LocationStatusEnum.Lock.ObjToInt(); |
| | | if (stationManger != null) |
| | | { |
| | | if (locationStatusEnum == LocationStatusEnum.Free) //å¦æèµ·ç¹å®æå°±ç»è´§ä½èµå¼æçå· |
| | | Dt_StationManger stationManger = _stationMangerService.Repository.QueryFirst(x => x.StationCode == locationCode); |
| | | if (stationManger != null) |
| | | { |
| | | stationManger.IsOccupied = LocationStatusEnum.Lock.ObjToInt(); |
| | | if (locationStatusEnum == LocationStatusEnum.Free) //å¦æèµ·ç¹å®æå°±ç»è´§ä½èµå¼æçå· |
| | | { |
| | | stationManger.Remark = ""; |
| | | stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | stationManger.Remark = palletCode; |
| | | stationManger.IsOccupied = LocationStatusEnum.Lock.ObjToInt(); |
| | | } |
| | | _stationMangerService.UpdateData(stationManger); |
| | | } |
| | | else |
| | | { |
| | | stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt(); |
| | | } |
| | | _stationMangerService.UpdateData(stationManger); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | | } |