| | |
| | | Dt_LocationInfo? locationInfo = null; |
| | | string CarChargingStation = AppSettings.Configuration[nameof(CarChargingStation)];//è·åç©¿æ¢è½¦å
çµä½ç½® |
| | | var ChargingStations = CarChargingStation.Split(","); |
| | | Dt_StockInfoDetail instockInfoDetail = _stockService.StockInfoDetailService.Repository.QueryData(x => x.MaterielCode == stockInfoDetail.MaterielCode).OrderByDescending(x => x.CreateDate).First(); |
| | | Dt_StockInfoDetail? instockInfoDetail = null; |
| | | var instockInfoDetails = _stockService.StockInfoDetailService.Repository.QueryData(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.Status == StockStatusEmun.å·²å
¥åº.ObjToInt()); |
| | | if (instockInfoDetails != null && instockInfoDetails.Count > 0) |
| | | instockInfoDetail = instockInfoDetails.OrderByDescending(x => x.CreateDate).First(); |
| | | if (instockInfoDetail != null) instockInfo = _stockService.StockInfoService.Repository.GetStockInfo(instockInfoDetail.StockId); |
| | | if (instockInfo != null)//æ åºå |
| | | { |
| | |
| | | } |
| | | if (locationInfo == null) locationInfo = _basicService.LocationInfoService.AssignLocation(2);//éæ°åé
è´§ä½ |
| | | if (locationInfo == null) throw new Exception($"æ å¯å
¥è´§ä½"); |
| | | Dt_LocationInfo? locationInfo1 = null; |
| | | if (locationInfo.Row == 1) |
| | | { |
| | | locationInfo1 = _basicService.LocationInfoService.Repository.QueryFirst(x => x.Row == 2 && x.Layer == locationInfo.Layer && x.Column == locationInfo.Column); |
| | | locationInfo1.LocationStatus = LocationStatusEnum.Pallet.ObjToInt(); |
| | | } |
| | | |
| | | task.TaskState = (int)InTaskStatusEnum.SC_InExecuting; |
| | | task.CurrentAddress = task.NextAddress; |
| | |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | _stockService.StockInfoDetailService.Repository.UpdateData(stockInfoDetail); |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | if (locationInfo1 != null) _basicService.LocationInfoService.Repository.UpdateData(locationInfo1); |
| | | Db.Ado.CommitTran(); |
| | | |
| | | return WebResponseContent.Instance.OK(data: new ReceiveWMSInfo() |