ISerialNumberServices.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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, string text = "");
  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. /// <summary>
  36. /// 获取下一个序列号带key同时更新(可指定序列号位数)
  37. /// </summary>
  38. /// <param name="key">序列号的类别标识</param>
  39. /// <returns></returns>
  40. string SetDialySN(string key, int postfixLength = 2);
  41. }
  42. }