¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_StorageOutOrderRepository; |
| | | |
| | | public class Dt_OutOrderAndStockRepository : RepositoryBase<Dt_OutOrderAndStock>, IDt_OutOrderAndStockRepository |
| | | { |
| | | public Dt_OutOrderAndStockRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ç¹å®æ¡ä»¶è·ååºåºç©æä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="locationID">è´§ä½ID</param> |
| | | /// <param name="orderNum">åºåºè®¢å</param> |
| | | /// <param name="palletCode">æçå·</param> |
| | | /// <returns>åºåºç©æä¿¡æ¯</returns> |
| | | public async Task<Dt_OutOrderAndStock> GetOrderAndStock(string locationID = null, string orderNum = null, string palletCode = null) |
| | | { |
| | | return await Db.Queryable<Dt_OutOrderAndStock>() |
| | | .Includes(x => x.OrderList) |
| | | .Includes(x => x.StockList) |
| | | .Includes(x => x.LocationList) |
| | | .WhereIF(locationID != null, x => x.LocationCode == locationID) |
| | | .WhereIF(orderNum != null, x => x.OrderNumber == orderNum) |
| | | .WhereIF(palletCode != null, x => x.PalletCode == palletCode) |
| | | .FirstAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导èªå é¤ |
| | | /// </summary> |
| | | /// <param name="stock">åºåºç©æä¿¡æ¯</param> |
| | | /// <returns>æå/失败</returns> |
| | | public bool DeleteNavOrderStock(Dt_OutOrderAndStock stock) |
| | | { |
| | | return Db.DeleteNav<Dt_OutOrderAndStock>(x => x.Id == stock.Id) |
| | | .Include(x => x.OrderList).ThenInclude(x => x.OrderDetailList) |
| | | .Include(x => x.StockList).ThenInclude(x => x.Dt_BillGroupStockDetailList) |
| | | .ExecuteCommand(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¯¼èªæ´æ° |
| | | /// </summary> |
| | | /// <param name="stock">åºåºç©æä¿¡æ¯</param> |
| | | /// <returns>æå/失败</returns> |
| | | public bool UpdateNavOrderStock(Dt_OutOrderAndStock stock) |
| | | { |
| | | return Db.UpdateNav(stock) |
| | | .Include(x => x.OrderList) |
| | | .Include(x => x.StockList) |
| | | .ExecuteCommand(); |
| | | } |
| | | } |