| | |
| | | { |
| | | if (AreaNr == 0) |
| | | { |
| | | Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId), number);//车轮类å |
| | | var area = Convert.ToInt16(Station.stationCode.Substring(Station.stationCode.Length - 1, 1)); |
| | | Gantry_client.WriteByOrder("W_AreaNr", (Int16)area, number);//åºåè´§ä½å· |
| | | Gantry_client.WriteByOrder("W_IndexNr", (Int16)SNS.Length, number);//æçä¸ç第å 个车轮 |
| | | Gantry_client.WriteByOrder("W_Storage_Type", (Int16)1, number); //æçç±»å1-横æ¾;2-ç«æ¾ |
| | | Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId), number);//车轮类å |
| | | Gantry_client.WriteByOrder("W_Wheel_id", SNS[SNS.Length - 1], number);//车轮SNå· |
| | | Gantry_client.WriteByOrder("W_RequestUnload", true, number); |
| | | #region æ¥å¿è®°å½ |
| | |
| | | var Station = stationinfoRepository.Find(x => x.stationCode == inventory.stationCode).FirstOrDefault();//æ¥æ¾åºåè´§ä½ |
| | | if (Station != null) |
| | | { |
| | | dt_stationinfo stationinfo = null; |
| | | |
| | | #region åºåºä¸ |
| | | #region |
| | | |
| | | dt_stationinfo stationinfo = null; |
| | | if (Station.area == "1") |
| | | { |
| | | //æ¥æ¾å½åè´§ä½å忝å¦åå¨å
¥åºä»»å¡ |
| | |
| | | |
| | | 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 |
| | | { |
| | | //æ¥æ¾å½åè´§ä½å忝å¦åå¨å
¥åºä»»å¡ |
| | |
| | | |
| | | 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; |
| | |
| | | //} |
| | | #endregion |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | | } |
| | |
| | | WriteDBLog.Error("å建åºåºä»»å¡", $"é误信æ¯ï¼{ex.Message}", "PCS"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |