| | |
| | | using WIDESEA_Comm.MES_Info; |
| | | using System.Reflection; |
| | | using static System.Collections.Specialized.BitVector32; |
| | | using WIDESEA_Comm; |
| | | |
| | | namespace WIDESEA_WMS.Services |
| | | { |
| | |
| | | detail detail = new detail(); |
| | | detail.sn = inventory.SN; |
| | | lists.Add(detail); |
| | | str = str == "" ? inventory.SN : "," + inventory.SN; |
| | | str += str == "" ? inventory.SN : "," + inventory.SN; |
| | | } |
| | | agvInWarehousePara outWarehousePara = new agvInWarehousePara() |
| | | { |
| | |
| | | foreach (var inventory in inventorys) |
| | | { |
| | | var station = stationinfoRepository.Find(x => x.stationCode == inventory.stationCode).FirstOrDefault(); |
| | | var bindSNS = station.bindSN.Split(","); |
| | | station.bindSN = ToMesServer.OperStr(bindSNS, inventory.SN); |
| | | var billetS = station.billetID.Split(","); |
| | | station.billetID = ToMesServer.OperStr(billetS, inventory.BilletNumber.ToString()); |
| | | station.quantity = station.quantity - 1; |
| | | if (station.quantity == 0) |
| | | { |
| | | station.stationType = string.Empty; |
| | | station.heatNumber = string.Empty; |
| | | station.Number = string.Empty; |
| | | station.billetID = string.Empty; |
| | | station.bindSN = string.Empty; |
| | | station.enable = false; |
| | | station.tray_status = string.Empty; |
| | | station.location_state = LocationStateEnum.Empty.ToString(); |
| | | } |
| | | else |
| | | { |
| | | var bindSNS = station.bindSN.Split(","); |
| | | station.bindSN = ToMesServer.OperStr(bindSNS, inventory.SN); |
| | | var billetS = station.billetID.Split(","); |
| | | station.billetID = ToMesServer.OperStr(billetS, inventory.BilletNumber.ToString()); |
| | | } |
| | | |
| | | #region åæ¶è·è¸ªDbContextä¸è¢«è·è¸ªçå®ä½ |
| | | var currentEntry = stationinfoRepository.DbContext.ChangeTracker.Entries<dt_stationinfo>().FirstOrDefault(); |
| | | if (currentEntry != null) currentEntry.State = EntityState.Detached; |
| | | #endregion |
| | | |
| | | stationinfoRepository.Update(station, true); |
| | | _repository.Delete(inventory, true); |
| | | } |