ISerialNumberServices.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace EMIS.CommonLogic.SystemServices
  6. {
  7. public interface ISerialNumberServices
  8. {
  9. /// <summary>
  10. /// 获取下一个序列号带key(可指定序列号位数)
  11. /// </summary>
  12. /// <param name="key">序列号的类别标识</param>
  13. /// <returns></returns>
  14. string GetSN(string key, int postfixLength = 2);
  15. /// <summary>
  16. /// 获取下一个序列号带key同时更新(可指定序列号位数)
  17. /// </summary>
  18. /// <param name="key">序列号的类别标识</param>
  19. /// <returns></returns>
  20. string SetSN(string key, int postfixLength = 2);
  21. /// <summary>
  22. /// 获取下一位序列号不带key
  23. /// </summary>
  24. /// <param name="key">序列号的类别标识</param>
  25. /// <returns></returns>
  26. int GetSNValue(string key);
  27. /// <summary>
  28. /// 设置下一个序列号,同时更新(带skip)
  29. /// 把序列号向后跳过一定的数量,该方法主要用于批量建立序列号
  30. /// </summary>
  31. /// <param name="key"></param>
  32. /// <param name="skipCount"></param>
  33. /// <returns></returns>
  34. void SkipSN(string key, int skipCount);
  35. }
  36. }