| | |
| | | using System.Net.NetworkInformation; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | |
| | | if (materielInfo.Business_qty >= materielInfo.MinQty) return response; |
| | | Dt_Tactics tactics = _tacticsService.Repository.QueryFirst(x => x.TacticeName == "åºåºçç¥"); |
| | | List<Dt_SupplyTask> supplyTasks = new List<Dt_SupplyTask>(); |
| | | List<Dt_InventoryInfo> dt_InventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.MaterielCode == materielInfo.MaterielCode && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt() && x.StockQuantity > x.OutboundQuantity && x.WarehouseCode == WareCode); |
| | | //// æ¥è¯¢å¤§ä»¶åºä¸å¯ç¨çåºå |
| | | List<Dt_InventoryInfo> dt_InventoryInfos = _inventoryInfoService.Repository.QueryData(x => x.MaterielCode == materielInfo.MaterielCode && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt() && x.AvailableQuantity > 0 && x.WarehouseCode == WareCode); |
| | | if (dt_InventoryInfos.Count < 1) throw new Exception($"ç©æç¼å·ã{materielInfo.MaterielCode}ãå¤§ä»¶åºæ åºåï¼"); |
| | | if (tactics.SelectTactice == TacticsEnum.ComeOutonFirstTime.ObjToInt()) |
| | | dt_InventoryInfos = dt_InventoryInfos.OrderBy(x => x.ValidityPeriod).ToList(); |
| | | else |
| | |
| | | Details = new List<Dt_DeliveryOrderDetail>() |
| | | }; |
| | | dt_InventoryInfos = dt_InventoryInfos.Where(X => X.StockStatus == StockStatusEmun.åºåºéå®.ObjToInt()).ToList(); |
| | | foreach (var item in dt_InventoryInfos.GroupBy(x => x.BatchNo)) |
| | | foreach (var item in dt_InventoryInfos.GroupBy(x => x.BatchNo)) //è¿éææ¹æ¬¡åç»äº |
| | | { |
| | | Dt_DeliveryOrderDetail deliveryOrderDetail = new Dt_DeliveryOrderDetail() |
| | | { |
| | |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | _messageInfoService.AddMessageInfo(MessageGroupByEnum.InventoryLowAlarm, "大件åºè¡¥è´§ç«åº", ex.Message); |
| | | response.Error(ex.Message); |
| | | } |
| | | return response; |