| | |
| | | Warehouse_no = order.warehouse_no, |
| | | Details = order.details.Select(d => new Dt_CabinOrderDetail |
| | | { |
| | | Reservoirarea=order.warehouse_no, |
| | | Goods_no = d.goods_no, |
| | | Order_qty = Math.Abs(d.order_qty), |
| | | Batch_num = d.batch_num, |
| | |
| | | if (!Enum.IsDefined(typeof(MaterielSourceTypeEnum), materielInfo.MaterielSourceType)) |
| | | throw new Exception($"请设置è¯åç¼å·ã{item.goods_no}ãç屿§åç±»"); |
| | | if (materielInfo.BoxQty < 1) throw new Exception($"请设置è¯åç¼å·ã{item.goods_no}ãçç®±è§æ°é"); |
| | | if (materielInfo.MinQty < 1) throw new Exception($"请设置è¯åç¼å·ã{item.goods_no}ãçç«åºæä½åºåæ°"); |
| | | #endregion |
| | | #region 大件 |
| | | if (materielInfo.MaterielSourceType == MaterielSourceTypeEnum.PurchasePart)//å¦æç©ææ¯å¤§ä»¶ |
| | |
| | | #endregion |
| | | else |
| | | { |
| | | if (materielInfo.MinQty < 1) throw new Exception($"请设置è¯åç¼å·ã{item.goods_no}ãçç«åºæä½åºåæ°"); |
| | | Dt_CabinOrderDetail orderDetail = null; |
| | | var ys = item.order_qty % materielInfo.BoxQty; //ä¸è½æ´é¤ç®±è§çæ£ä»¶æ° |
| | | var xs = (int)(item.order_qty / materielInfo.BoxQty);//ä¿çæ´æ° |