| | |
| | | using System.Transactions; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.MaterielEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | |
| | | cabinOrderDetail.Order_Inqty += Inqty; |
| | | if (cabinOrderDetail.Order_Inqty > cabinOrderDetail.Order_qty) |
| | | return WebResponseContent.Instance.Error($"å
¥åºæ°éä¸å¯è¶
åºåæ®æ°é"); |
| | | //å¤§ä»¶åºæ´ç®±æ ¡éª |
| | | if (warehouseCode == WarehouseEnum.大件åº.ObjToInt().ToString("000")&& (materielInfo.MaterielSourceType==MaterielSourceTypeEnum.SelfMadePart)) |
| | | { |
| | | var BoxRule = materielInfo.BoxQty; |
| | | if (BoxRule > 0 && Inqty % BoxRule != 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"大件åºåªå
è®¸åæ¾æ´ç®±è´§ç©ï¼å½åå
¥åºæ°é {Convert.ToInt32(Inqty)} 䏿¯ç®±è§ {Convert.ToInt32(BoxRule)} çæ´æ°å"); |
| | | } |
| | | } |
| | | |
| | | #region å¤çå
¥åºåï¼è´§ä½ï¼åºåï¼åºåæ¹æ¬¡ä¿¡æ¯ |
| | | _unitOfWorkManage.BeginTran(); |
| | |
| | | #region è´§ä½ |
| | | var location = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == LocationCode); |
| | | if (location == null) return WebResponseContent.Instance.Error($"请维æ¤è´§ä½ç¼å·ã{LocationCode}ãçè´§ä½ä¿¡æ¯"); |
| | | |
| | | //if (location.EnableStatus == EnableStatusEnum.Disable.ObjToInt()) |
| | | // return WebResponseContent.Instance.Error($"è´§ä½ç¼å·ã{LocationCode}ãå·²ç¦ç¨ï¼è¯·æ¢å¤æ£å¸¸å使ç¨"); |
| | | if (location.WarehouseCode != cabinOrderDetail.Reservoirarea) |
| | |
| | | { |
| | | string WareCodeMJ = WarehouseEnum.麻精åº.ObjToInt().ToString("000"); |
| | | string WareCodeLD = WarehouseEnum.å·å»åº.ObjToInt().ToString("000"); |
| | | #region æ£æ¥æ¯å¦ææªå®æççç¹ä»»å¡ |
| | | var dt_bath = _inventory_BatchServices.Repository.QueryData(x => order.details.Select(d => d.goods_no).Contains(x.MaterielCode)).ToList(); |
| | | if (dt_bath.Count>=1) |
| | | { |
| | | foreach (var item in dt_bath) |
| | | { |
| | | if (item.SupplyQuantity > 0) throw new Exception($"å
¥åºåã{order.order_no}ãç©æç¼å·ã{dt_bath[0].MaterielCode}ãå卿ªå®æçççå
¥åºä»»å¡ï¼è¯·å¤ç宿ååè¿è¡æ£å¸¸å
¥åºæä½"); |
| | | } |
| | | } |
| | | #endregion |
| | | List<Dt_CabinOrder> dt_CabinOrders = new List<Dt_CabinOrder>(); |
| | | #region ç¹æ®è¯åå
¥ç¹æ®åºæ¿ |
| | | if (order.warehouse_no == WareCodeMJ || order.warehouse_no == WareCodeLD) |