| | |
| | | WebResponseContent webResponseContent = new WebResponseContent(); |
| | | try |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | Dt_Tactics tactics = _tacticsService.Repository.QueryFirst(x => x.TacticeName == "åºåºçç¥"); |
| | | #region ç¹æ®åºæ¿åºåº |
| | | string WareCodeMJ = WarehouseEnum.麻精åº.ObjToInt().ToString("000"); |
| | |
| | | Status = 2, // padå¹³åºï¼æ é忥 |
| | | }).ToList() |
| | | }; |
| | | BaseDal.Db.InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand(); |
| | | BaseDal.Db.CopyNew().InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand(); |
| | | #endregion |
| | | #region å¤çåºåãåºåæ¹æ¬¡ãæ·»å åºåºä»»å¡ |
| | | List<Dt_SupplyTask> supplyTasks = new List<Dt_SupplyTask>(); |
| | |
| | | } |
| | | } |
| | | if (entityOrder.Details.Count > 0) |
| | | BaseDal.Db.InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand(); |
| | | BaseDal.Db.CopyNew().InsertNav(entityOrder).Include(x => x.Details).ExecuteCommand(); |
| | | if (entityOrderLK.Details.Count > 0) |
| | | BaseDal.Db.InsertNav(entityOrderLK).Include(x => x.Details).ExecuteCommand(); |
| | | BaseDal.Db.CopyNew().InsertNav(entityOrderLK).Include(x => x.Details).ExecuteCommand(); |
| | | #endregion |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | webResponseContent.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | webResponseContent.Error(ex.Message); |
| | | } |
| | | return webResponseContent; |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | _unitOfWorkManage.BeginTran(); |
| | | string WareCodeMJ = WarehouseEnum.麻精åº.ObjToInt().ToString("000"); |
| | | string WareCodeLD = WarehouseEnum.å·å»åº.ObjToInt().ToString("000"); |
| | | #region ç¹æ®åºæ¿ |
| | |
| | | //Repository.AddData(entityOrder); |
| | | #endregion |
| | | } |
| | | //return WebResponseContent.Instance.OK("æå"); |
| | | } |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return WebResponseContent.Instance.OK("æå"); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | |
| | | try |
| | | { |
| | | // 1ï¸â£ æ¥æ¾æå®æ¹æ¬¡ä¸ç©æçåºåä¿¡æ¯ |
| | | var batchInfo = BaseDal.Db.Queryable<Dt_Inventory_Batch>() |
| | | var batchInfo = BaseDal.Db.CopyNew().Queryable<Dt_Inventory_Batch>() |
| | | .Where(x => x.BatchNo == batchNo && x.MaterielCode == goodsNo) |
| | | .First(); |
| | | |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_DeliveryOrder? cabinOrder = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode).Includes(x => x.Details).First(); |
| | | Dt_DeliveryOrder? cabinOrder = BaseDal.Db.CopyNew().Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == supplyTask.OrderNo && x.Warehouse_no == supplyTask.WarehouseCode).Includes(x => x.Details).First(); |
| | | if (cabinOrder == null) return WebResponseContent.Instance.Error($"åºåºå已宿"); |
| | | |
| | | Dt_DeliveryOrderDetail? cabinOrderDetail = cabinOrder.Details.Where(x => x.Batch_num == supplyTask.BatchNo && x.Reservoirarea == supplyTask.WarehouseCode && x.Goods_no == supplyTask.MaterielCode).FirstOrDefault(); |
| | |
| | | //_deliveryOrderDetailServices.Repository.DeleteAndMoveIntoHty(cabinOrderDetail, OperateTypeEnum.èªå¨å®æ); |
| | | } |
| | | _deliveryOrderDetailServices.Repository.UpdateData(cabinOrderDetail); |
| | | var cabinOrder1 = BaseDal.Db.Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == cabinOrder.Out_no && x.Warehouse_no == supplyTask.WarehouseCode && x.Out_type != "20").Includes(x => x.Details).First(); |
| | | var cabinOrder1 = BaseDal.Db.CopyNew().Queryable<Dt_DeliveryOrder>().Where(x => x.Out_no == cabinOrder.Out_no && x.Warehouse_no == supplyTask.WarehouseCode && x.Out_type != "20").Includes(x => x.Details).First(); |
| | | if (!cabinOrder1.Details.Where(x => x.OotDetailStatus != "已宿").Any()) |
| | | cabinOrder.OutStatus = "已宿"; |
| | | Repository.UpdateData(cabinOrder); |