CodeNumService.java 918 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package jnpf.service;
  2. import jnpf.base.service.SuperService;
  3. import jnpf.entity.CodeNumEntity;
  4. import java.util.List;
  5. import java.util.function.Predicate;
  6. import java.util.function.Supplier;
  7. /**
  8. * 编码序号
  9. *
  10. * @author JNPF开发平台组
  11. * @version v6.0.0
  12. * @copyright 引迈信息技术有限公司
  13. * @date 2025/2/28 11:14:52
  14. */
  15. public interface CodeNumService extends SuperService<CodeNumEntity> {
  16. /**
  17. * 根据类型获取数据
  18. *
  19. * @param type
  20. * @return
  21. */
  22. Integer getNumByType(String type, Integer times);
  23. /**
  24. * 获取多次编码
  25. *
  26. * @param type
  27. * @param num
  28. * @return
  29. */
  30. List<String> getCode(String type, Integer num);
  31. /**
  32. * 获取一次编码
  33. *
  34. * @param type
  35. * @return
  36. */
  37. String getCodeOnce(String type);
  38. String getCodeFunction(Supplier<String> getCode, Predicate<String> existCode);
  39. }