ISNServices.cs 2.0 KB

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