| | |
| | | Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(context); |
| | | IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(context); |
| | | |
| | | var Mes_Works = workinfoRepository.Find(x => x.processCode == "28").OrderBy(x => x.CreateTime).ToList(); |
| | | var Mes_Works = workinfoRepository.Find(x => x.processCode == "28").OrderByDescending(x => x.CreateTime).ToList(); |
| | | foreach (var Mes_Work in Mes_Works) |
| | | { |
| | | var inventory = inventoryRepository.Find(x => x.SN == Mes_Work.SN).FirstOrDefault(); |
| | |
| | | |
| | | dt_stationinfo stationinfo = null; |
| | | //鏌ユ壘褰撳墠璐т綅鍚岃鏄惁瀛樺湪鍏ュ簱浠诲姟 |
| | | if (stationinfoRepository.Find(x => x.line == Station.line && x.area == Station.area && x.location_state == LocationStateEnum.InBusy.ToString()).Any()) continue; |
| | | if (GetStation.InBusyStation(Station.stationCode)) continue; |
| | | |
| | | stationinfo = stationinfoRepository.Find(x => x.line == Station.line && x.area == Station.area && x.enable && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).OrderByDescending(x => x.column).FirstOrDefault(); |
| | | if (stationinfo != null) |
| | | { |
| | | if (agvtaskRepository.Find(x => x.agv_fromaddress == stationinfo.stationCode).Any()) continue; |
| | | |
| | | if (stationinfoRepository.Find(x => x.line == stationinfo.line && x.area == stationinfo.area && x.column > stationinfo.column && !x.enable).Any()) |
| | | continue; |
| | | if (string.IsNullOrEmpty(stationinfo.bindSN)) |