| | |
| | | var Station = stationinfoRepository.Find(x => x.stationCode == inventory.stationCode).FirstOrDefault();//æ¥æ¾åºåè´§ä½ |
| | | if (Station != null) |
| | | { |
| | | |
| | | #region |
| | | |
| | | dt_stationinfo stationinfo = null; |
| | | //æ¥æ¾å½åè´§ä½åè¡æ¯å¦åå¨å
¥åºä»»å¡ |
| | | if (stationinfoRepository.Find(x => x.line == Station.line && x.area == Station.area && x.location_state == LocationStateEnum.InBusy.ToString()).Any()) continue; |
| | | |
| | | #region åºåºä¸ |
| | | if (Station.area == "1") |
| | | { |
| | | //æ¥æ¾å½åè´§ä½å忝å¦åå¨å
¥åºä»»å¡ |
| | | if (stationinfoRepository.Find(x => x.column == Station.column && x.area == "1" && x.location_state == LocationStateEnum.InBusy.ToString()).Any()) continue; |
| | | |
| | | stationinfo = stationinfoRepository.Find(x => x.column == Station.column && x.enable && x.area == "1" && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).OrderBy(x => x.line).FirstOrDefault(); |
| | | } |
| | | #endregion |
| | | else |
| | | { |
| | | //æ¥æ¾å½åè´§ä½å忝å¦åå¨å
¥åºä»»å¡ |
| | | if (stationinfoRepository.Find(x => x.line == Station.line && x.area == Station.area && x.location_state == LocationStateEnum.InBusy.ToString()).Any()) 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(); |
| | | } |
| | | |
| | | 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 (stationinfoRepository.Find(x => x.line == stationinfo.line && x.area == stationinfo.area && x.column > stationinfo.column && !x.enable).Any()) |
| | | continue; |
| | | if (string.IsNullOrEmpty(stationinfo.bindSN)) |
| | | { |
| | | stationinfo.remark = "车轮SNå·ä¿¡æ¯å¼å¸¸"; |
| | |
| | | var count = 0; |
| | | foreach (var SN in lists) |
| | | { |
| | | //if (!workinfoRepository.Find(x => x.processCode == "28" && x.SN.Contains(SN)).Any()) return; |
| | | if (workinfoRepository.Find(x => x.processCode == "28" && x.SN.Contains(SN)).Any()) count++; |
| | | if (workinfoRepository.Find(x => x.processCode == "28" && x.SN == SN).Any()) count++; |
| | | //if (workinfoRepository.Find(x => x.processCode == "28" && x.SN.Contains(SN)).Any()) count++; |
| | | |
| | | } |
| | | if (count != lists.Count) continue; |
| | |
| | | agv_toaddress = "", |
| | | agv_userid = "ç³»ç»", |
| | | bindSN = stationinfo.bindSN, |
| | | jobID = Mes_Work.jobID, |
| | | jobID = Mes_Work.workOrder, |
| | | agv_worktype = Convert.ToInt32(Mes_Work.processCode), |
| | | agv_materbarcode = Mes_Work.materialCode, |
| | | agv_Traytype = stationinfo.tray_type, |
| | |
| | | //} |
| | | #endregion |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | } |
| | |
| | | WriteDBLog.Error("å建åºåºä»»å¡", $"é误信æ¯ï¼{ex.Message}", "PCS"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |