DictionaryDataService.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. package jnpf.base.service;
  2. import jnpf.base.ActionResult;
  3. import jnpf.base.entity.DictionaryDataEntity;
  4. import jnpf.base.model.dictionarytype.DictionaryExportModel;
  5. import jnpf.base.vo.DownloadVO;
  6. import jnpf.exception.DataException;
  7. import java.util.List;
  8. /**
  9. * 字典数据
  10. *
  11. * @author JNPF开发平台组
  12. * @version V3.1.0
  13. * @copyright 引迈信息技术有限公司
  14. * @date 2019年9月27日 上午9:18
  15. */
  16. public interface DictionaryDataService extends SuperService<DictionaryDataEntity> {
  17. /**
  18. * 列表
  19. *
  20. * @param dictionaryTypeId 字段分类id
  21. * @param enable 是否只看有效
  22. * @return ignore
  23. */
  24. List<DictionaryDataEntity> getList(String dictionaryTypeId, Boolean enable);
  25. /**
  26. * 列表
  27. *
  28. * @param dictionaryTypeId 类别主键
  29. * @return ignore
  30. */
  31. List<DictionaryDataEntity> getList(String dictionaryTypeId);
  32. /**
  33. * 列表
  34. *
  35. * @param dictionaryTypeId 类别主键(在线开发数据转换)
  36. * @return ignore
  37. */
  38. List<DictionaryDataEntity> getDicList(String dictionaryTypeId);
  39. /**
  40. * 列表
  41. *
  42. * @param dictionaryTypeId 类别主键(在线开发数据转换)
  43. * @return ignore
  44. */
  45. List<DictionaryDataEntity> geDicList(String dictionaryTypeId);
  46. /**
  47. * 列表
  48. *
  49. * @param parentId 父级id
  50. * @return ignore
  51. */
  52. Boolean isExistSubset(String parentId);
  53. /**
  54. * 信息
  55. *
  56. * @param id 主键值
  57. * @return ignore
  58. */
  59. DictionaryDataEntity getInfo(String id);
  60. /**
  61. * 代码生成器数据字典转换
  62. * @param value encode 或者 id
  63. * @param dictionaryTypeId 类别
  64. * @return
  65. */
  66. DictionaryDataEntity getSwapInfo(String value,String dictionaryTypeId);
  67. /**
  68. * 验证名称
  69. *
  70. * @param dictionaryTypeId 类别主键
  71. * @param fullName 名称
  72. * @param id 主键值
  73. * @return ignore
  74. */
  75. boolean isExistByFullName(String dictionaryTypeId, String fullName, String id);
  76. /**
  77. * 验证编码
  78. *
  79. * @param dictionaryTypeId 类别主键
  80. * @param enCode 编码
  81. * @param id 主键值
  82. * @return ignore
  83. */
  84. boolean isExistByEnCode(String dictionaryTypeId, String enCode, String id);
  85. /**
  86. * 删除
  87. *
  88. * @param entity 实体对象
  89. */
  90. void delete(DictionaryDataEntity entity);
  91. /**
  92. * 创建
  93. *
  94. * @param entity 实体对象
  95. */
  96. void create(DictionaryDataEntity entity);
  97. /**
  98. * 更新
  99. *
  100. * @param id 主键值
  101. * @param entity 实体对象
  102. * @return ignore
  103. */
  104. boolean update(String id, DictionaryDataEntity entity);
  105. /**
  106. * 上移
  107. *
  108. * @param id 主键值
  109. * @return ignore
  110. */
  111. boolean first(String id);
  112. /**
  113. * 下移
  114. *
  115. * @param id 主键值
  116. * @return ignore
  117. */
  118. boolean next(String id);
  119. /**
  120. * 获取名称
  121. *
  122. * @param id 主键id集合
  123. * @return ignore
  124. */
  125. List<DictionaryDataEntity> getDictionName(List<String> id);
  126. /**
  127. * 导出数据
  128. *
  129. * @param id 主键
  130. * @return DownloadVO
  131. */
  132. DownloadVO exportData(String id);
  133. /**
  134. * 导入数据
  135. *
  136. * @param exportModel ignore
  137. * @param type 类型
  138. * @return ignore
  139. * @throws DataException ignore
  140. */
  141. ActionResult importData(DictionaryExportModel exportModel, Integer type) throws DataException;
  142. /**
  143. * 根据字典分类获取 字典信息列表
  144. * @param typeCode
  145. * @return
  146. */
  147. List<DictionaryDataEntity> getListByTypeDataCode(String typeCode);
  148. /**
  149. * 获取启用字典列表
  150. * @param typeCode
  151. * @return
  152. */
  153. List<DictionaryDataEntity> getByTypeCodeEnable(String typeCode);
  154. }