| | |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Core.EFDbContext; |
| | | using WIDESEA_Entity.DomainModels; |
| | | using WIDESEA_WCS.IRepositories; |
| | | using WIDESEA_WCS.JobsPart.Common; |
| | | using WIDESEA_WCS.Repositories; |
| | | using WIDESEA_WMS.IRepositories; |
| | | using WIDESEA_WMS.Repositories; |
| | | using static System.Collections.Specialized.BitVector32; |
| | |
| | | VOLContext Context = new VOLContext(); |
| | | Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(Context); |
| | | Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context); |
| | | Idt_management_timeRepository timeRepository = new dt_management_timeRepository(Context); |
| | | |
| | | #region å çåºæ»¡5个å
¥åº éä¼å |
| | | var EmptyStations = stationinfoRepository.Find(x => x.stationCode.Contains("DD") && x.enable).ToList(); |
| | | var EmptyD = EmptyStations.Where(x => x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity == 5).FirstOrDefault(); |
| | | if (EmptyD != null) EmptyTray.CreateEmptyTrayIn(stationinfoRepository, EmptyD); |
| | | //EmptyD = EmptyStations.Where(x => x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0&&x.lastUpdateTime.).FirstOrDefault();//æ¶é´è¶
è¿6å°æ¶å
¥åº |
| | | var val = timeRepository.Find(x => x.management_name == "StackingArea").FirstOrDefault().management_numericalvalue; |
| | | EmptyD = EmptyStations.Where(x => x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity < 5 && x.lastUpdateTime.AddHours(val) < DateTime.Now).FirstOrDefault();//æ¶é´è¶
è¿6å°æ¶å
¥åº |
| | | if (EmptyD != null) EmptyTray.CreateEmptyTrayIn(stationinfoRepository, EmptyD); |
| | | #endregion |
| | | |
| | | var agv_tasks = agvtaskRepository.Find(x => x.agv_taskstate == AGVTaskStateEnum.Queue.ToString() && x.agv_tasktype == AGVTaskTypeEnum.TaskType_EmptyPallet.ToString() && string.IsNullOrEmpty(x.agv_toaddress)).OrderByDescending(x => x.agv_grade).ThenBy(x => x.agv_createtime).ToList(); |