WYB
2021-03-22 91b8cdad021ab052e4991f3d41834a6f0ddc36b8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using JiepeiWMS.IRepository;
using JiepeiWMS.IRepository.UnitOfWork;
using JiepeiWMS.Model.Models;
using JiepeiWMS.Repository.Base;
using System.Threading.Tasks;
 
namespace JiepeiWMS.Repository
{
    /// <summary>
    /// WMInInventoryRepository
    /// </summary>
    public class WMInInventoryRepository : BaseRepository<WMInInventory>, IWMInInventoryRepository
    {
        public WMInInventoryRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
        {
        }
 
        /// <summary>
        /// 获取入库单最大的Id
        /// </summary>
        /// <returns></returns>
        public async Task<int> GetInInventoryMaxId()
        {
            var db = await base.QueryTable("SELECT ISNULL(MAX(Id),0) FROM dbo.WMInInventory");
            return db.Rows[0][0].ObjToInt();
        }
    }
}