| | |
| | | } |
| | | if (warehouse.WarehouseCode.Contains("CP")) |
| | | { |
| | | |
| | | |
| | | Dt_Production production1 = new Dt_Production(); |
| | | OutboundOrderAddDTO orderAddDTO1 = new OutboundOrderAddDTO(); |
| | | orderAddDTO1.OrderNo = orderAddDTO.No; |
| | |
| | | inboundOrder.CreateDate = DateTime.Now; |
| | | inboundOrder.CreateType = CreateType.UpperSystemPush.ObjToInt(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | Dt_NewOutboundOrder dt_NewOutboundOrder = BaseDal.Db.Queryable<Dt_NewOutboundOrder>().Where(x => x.OrderNo == inboundOrder.OrderNo).Includes(x => x.Details).First(); |
| | | if(dt_NewOutboundOrder != null) |
| | | { |
| | | if (dt_NewOutboundOrder.OrderStatus > 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该出库单在进行中,无法更新该出库单"); |
| | | } |
| | | Db.DeleteNav(dt_NewOutboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | } |
| | | bool a = BaseDal.Db.InsertNav(inboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | |
| | | foreach (var item in orderAddDTO1.Details) |
| | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 生成出库任务 |
| | | /// 生成‘任务 |
| | | /// </summary> |
| | | /// <param name="orderDetailId"></param> |
| | | /// <param name="stockSelectViews"></param> |
| | |
| | | BaseDal.AddData(tasks); |
| | | _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus); |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | if (tasks.FirstOrDefault().PalletCode.Contains("BC")) |
| | | { |
| | | PushTasksToWCS(tasks); |
| | | } |
| | | else |
| | | { |
| | | PushTasksWCS(tasks); |
| | | } |
| | | |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |