| | |
| | | cabinOrderDetail.Order_Inqty += Inqty; |
| | | if (cabinOrderDetail.Order_Inqty > cabinOrderDetail.Order_qty) |
| | | return WebResponseContent.Instance.Error($"å
¥åºæ°éä¸å¯è¶
åºåæ®æ°é"); |
| | | //å¤§ä»¶åºæ´ç®±æ ¡éª |
| | | if (warehouseCode == WarehouseEnum.大件åº.ObjToInt().ToString("000")) |
| | | { |
| | | 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) |
| | |
| | | Dt_Inventory_Batch? inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == item.Goods_no && x.BatchNo == item.Batch_num).FirstOrDefault(); |
| | | if (inventory_Batch == null) throw new Exception($"æªæ¾å°åºåºåå·ã{entityOrder.Out_no}ãä¸ç©æç¼å·ã{item.Goods_no}ãç©ææ¹æ¬¡ã{item.Batch_num}ãçåºåæ¹æ¬¡ä¿¡æ¯"); |
| | | if (inventory_Batch.AvailableQuantity < item.Order_qty) throw new Exception($"åºåºåå·ã{entityOrder.Out_no}ãä¸ç©æç¼å·ã{item.Goods_no}ãç©ææ¹æ¬¡ã{item.Batch_num}ãçåºåæ¹æ¬¡ä¿¡æ¯å¯ç¨æ°éä¸è¶³"); |
| | | if (inventory_Batch.SupplyQuantity > 0) throw new Exception($"åºåºåå·ã{entityOrder.Out_no}ãä¸ç©æç¼å·ã{item.Goods_no}ãç©ææ¹æ¬¡ã{item.Batch_num}ãçåºåæ¹æ¬¡ä¿¡æ¯å卿ªå®æççç¹ä»»å¡ï¼æ æ³å建åºåºå"); |
| | | inventory_Batch.AvailableQuantity -= item.Order_qty; |
| | | inventory_Batch.OutboundQuantity += item.Order_qty; |
| | | List<Dt_InventoryInfo> dt_InventoryInfos = InventoryInfos.Where(x => x.MaterielCode == item.Goods_no && x.BatchNo == item.Batch_num).ToList(); |
| | |
| | | #endregion |
| | | else |
| | | { |
| | | |
| | | string WareCodeDJ = WarehouseEnum.大件åº.ObjToInt().ToString("000"); |
| | | string WareCodeLK = WarehouseEnum.ç«åº.ObjToInt().ToString("000"); |
| | | #region å建大件åºãç«åºåºåºå¤´è¡¨ |
| | |
| | | Dt_Inventory_Batch? inventory_Batch = inventory_Batchs.Where(x => x.MaterielCode == detail.goods_no && x.BatchNo == detail.batch_num).FirstOrDefault(); |
| | | if (inventory_Batch == null) throw new Exception($"æªæ¾å°åºåºåå·ã{outorder.order_no}ãä¸ç©æç¼å·ã{detail.goods_no}ãç©ææ¹æ¬¡ã{detail.batch_num}ãçåºåæ¹æ¬¡ä¿¡æ¯"); |
| | | if (inventory_Batch.AvailableQuantity < detail.order_qty) throw new Exception($"åºåºåå·ã{outorder.order_no}ãä¸ç©æç¼å·ã{detail.goods_no}ãç©ææ¹æ¬¡ã{detail.batch_num}ãçåºåæ¹æ¬¡ä¿¡æ¯å¯ç¨æ°éä¸è¶³"); |
| | | if(inventory_Batch.SupplyQuantity>0) throw new Exception($"åºåºåå·ã{outorder.order_no}ãä¸ç©æç¼å·ã{detail.goods_no}ãç©ææ¹æ¬¡ã{detail.batch_num}ãçåºåæ¹æ¬¡ä¿¡æ¯å卿ªå®æççç¹ä»»å¡ï¼æ æ³å建åºåºå"); |
| | | inventory_Batch.AvailableQuantity -= detail.order_qty; |
| | | inventory_Batch.OutboundQuantity += detail.order_qty; |
| | | List<Dt_InventoryInfo> dt_InventoryInfos = InventoryInfos.Where(x => x.MaterielCode == inventory_Batch.MaterielCode && x.BatchNo == inventory_Batch.BatchNo).ToList(); |
| | |
| | | using Pomelo.AspNetCore.TimedJob; |
| | | using WIDESEA_ISquareCabinServices; |
| | | using WIDESEA_ISystemService; |
| | | using WIDESEA_IWMsInfoServices; |
| | | using static WIDESEA_DTO.SquareCabin.TowcsDto; |
| | | |
| | | |
| | | namespace WIDESEA_WMSServer |
| | | { |
| | | public class GoodsJob : Job |
| | | { |
| | | private readonly IMaterielInfoService _materielInfoService; |
| | | public GoodsJob(IMaterielInfoService materielInfoService) |
| | | private readonly ISys_LogService _logger; |
| | | public GoodsJob(IMaterielInfoService materielInfoService, ISys_LogService logger) |
| | | { |
| | | _materielInfoService = materielInfoService; |
| | | _logger=logger; |
| | | } |
| | | //æ¯é1ç§æ§è¡ä¸æ¬¡ |
| | | [Invoke(Begin = "2025-09-01", Interval = 1000 * 5, IsEnabled = false, SkipWhileExecuting = true)] |
| | | [Invoke(Begin = "2025-09-01", Interval = 1000 * 60 * 60 * 24 * 7, IsEnabled = true, SkipWhileExecuting = true)] |
| | | public void Run() |
| | | { |
| | | Console.WriteLine($"ç©æä¿¡æ¯ä»»å¡æ§è¡ç»æï¼{DateTime.Now}"); |
| | | _logger.ScheduledDeletion(); |
| | | Console.WriteLine($"å 餿¥å¿æ§è¡ç»æï¼{DateTime.Now}"); |
| | | //Console.WriteLine($"ç©æä¿¡æ¯ä»»å¡æ§è¡ç»æï¼{DateTime.Now}"); |
| | | } |
| | | } |
| | | } |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "center", |
| | | bind: { key: "messageGroupBy", data: [] }, |
| | | bind: { key: "MessageGroupByEnum", data: [] }, |
| | | require: true, |
| | | }, |
| | | { |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "center", |
| | | bind: { key: "messageStatus", data: [] }, |
| | | bind: { key: "MessageStatusEnum", data: [] }, |
| | | require: true, |
| | | }, |
| | | { |