FormDataDto.java 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. package com.boman.domain.dto;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.alibaba.fastjson.annotation.JSONField;
  4. import java.io.Serializable;
  5. import java.util.List;
  6. /**
  7. * @author:zc
  8. * @since:2018/12/27
  9. * @createat:2018/12/274:41 PM
  10. */
  11. public class FormDataDto implements Serializable {
  12. private static final long serialVersionUID = -8653990707913725671L;
  13. @JSONField(name = "id")
  14. private Long id;
  15. @JSONField(name = "objId")
  16. private Long objId;
  17. @JSONField(name = "fixedData")
  18. private JSONObject fixedData;
  19. @JSONField(name = "table")
  20. private String table;
  21. @JSONField(name = "tableName")
  22. private String tableName;
  23. /**
  24. * 逻辑删除,数据库对应的属性名称
  25. */
  26. @JSONField(name = "logicDelName")
  27. private String logicDelName;
  28. /**
  29. * 逻辑删除,数据库对应的属性值
  30. */
  31. @JSONField(name = "logicDelValue")
  32. private String logicDelValue;
  33. /**
  34. * 删除时,前台传过来需要删除的idList
  35. */
  36. @JSONField(name = "idList")
  37. private List<Long> idList;
  38. /**
  39. * 批量提交时,提交到后台的数据
  40. */
  41. @JSONField(name = "commitData")
  42. private List<JSONObject> commitData;
  43. /**
  44. * orderBy eg: order_by columnName desc
  45. */
  46. @JSONField(name = "orderBy")
  47. private String orderBy;
  48. /**
  49. * 分页
  50. */
  51. @JSONField(name = "pageNo")
  52. private Integer pageNo;
  53. /**
  54. * 分页
  55. */
  56. @JSONField(name = "pageSize")
  57. private Integer pageSize;
  58. /**
  59. * 状态
  60. */
  61. @JSONField(name = "status")
  62. private String status;
  63. /**
  64. * username
  65. */
  66. private String username;
  67. /**
  68. * 跳转新增或者编辑页面显示的类型带不带折叠,如果isUi=true, 带折叠
  69. */
  70. @JSONField(name = "isUi")
  71. private Boolean isUi;
  72. /**
  73. * 表单类型
  74. */
  75. private String other;
  76. /**
  77. * 提交来源
  78. * @return
  79. */
  80. private String submitSource;
  81. private String candidatorTableName;
  82. private Long moduleId;
  83. private Long nodeId;
  84. /******************************* 几个常量 **************************************/
  85. public static final int MAX_PAGE_SIZE = 200;
  86. public static final int DEFAULT_PAGE_SIZE = 10;
  87. public static final int DEFAULT_PAGE_NO = 1;
  88. public int getLimit() {
  89. try {
  90. return pageNo == 0 ? 0 : (pageNo - 1) * pageSize;
  91. } catch (Exception e) {
  92. e.printStackTrace();
  93. return DEFAULT_PAGE_NO;
  94. }
  95. }
  96. public int getOffset(){
  97. try {
  98. int pageSize = this.pageSize == 0 ? DEFAULT_PAGE_SIZE : this.pageSize;
  99. return Math.min(pageSize, MAX_PAGE_SIZE);
  100. } catch (Exception e) {
  101. e.printStackTrace();
  102. return DEFAULT_PAGE_SIZE;
  103. }
  104. }
  105. public static long getSerialVersionUID() {
  106. return serialVersionUID;
  107. }
  108. public Long getObjId() {
  109. return objId;
  110. }
  111. public void setObjId(Long objId) {
  112. this.objId = objId;
  113. }
  114. public JSONObject getFixedData() {
  115. return fixedData;
  116. }
  117. public void setFixedData(JSONObject fixedData) {
  118. this.fixedData = fixedData;
  119. }
  120. public String getTable() {
  121. return table;
  122. }
  123. public void setTable(String table) {
  124. this.table = table;
  125. }
  126. public String getLogicDelName() {
  127. return logicDelName;
  128. }
  129. public void setLogicDelName(String logicDelName) {
  130. this.logicDelName = logicDelName;
  131. }
  132. public String getLogicDelValue() {
  133. return logicDelValue;
  134. }
  135. public void setLogicDelValue(String logicDelValue) {
  136. this.logicDelValue = logicDelValue;
  137. }
  138. public List<Long> getIdList() {
  139. return idList;
  140. }
  141. public void setIdList(List<Long> idList) {
  142. this.idList = idList;
  143. }
  144. public List<JSONObject> getCommitData() {
  145. return commitData;
  146. }
  147. public void setCommitData(List<JSONObject> commitData) {
  148. this.commitData = commitData;
  149. }
  150. public String getOrderBy() {
  151. return orderBy;
  152. }
  153. public void setOrderBy(String orderBy) {
  154. this.orderBy = orderBy;
  155. }
  156. public String getStatus() {
  157. return status;
  158. }
  159. public void setStatus(String status) {
  160. this.status = status;
  161. }
  162. public Integer getPageNo() {
  163. return pageNo;
  164. }
  165. public void setPageNo(Integer pageNo) {
  166. this.pageNo = pageNo;
  167. }
  168. public Integer getPageSize() {
  169. return pageSize;
  170. }
  171. public void setPageSize(Integer pageSize) {
  172. this.pageSize = pageSize;
  173. }
  174. public Boolean getIsUi() {
  175. return isUi;
  176. }
  177. public void setIsUi(Boolean ui) {
  178. isUi = ui;
  179. }
  180. public String getUsername() {
  181. return username;
  182. }
  183. public void setUsername(String username) {
  184. this.username = username;
  185. }
  186. public String getOther() {
  187. return other;
  188. }
  189. public void setOther(String other) {
  190. this.other = other;
  191. }
  192. public String getSubmitSource() {
  193. return submitSource;
  194. }
  195. public void setSubmitSource(String submitSource) {
  196. this.submitSource = submitSource;
  197. }
  198. public String getTableName() {
  199. return tableName;
  200. }
  201. public void setTableName(String tableName) {
  202. this.tableName = tableName;
  203. }
  204. public Long getId() {
  205. return id;
  206. }
  207. public void setId(Long id) {
  208. this.id = id;
  209. }
  210. public String getCandidatorTableName() {
  211. return candidatorTableName;
  212. }
  213. public void setCandidatorTableName(String candidatorTableName) {
  214. this.candidatorTableName = candidatorTableName;
  215. }
  216. public Long getModuleId() {
  217. return moduleId;
  218. }
  219. public void setModuleId(Long moduleId) {
  220. this.moduleId = moduleId;
  221. }
  222. public Long getNodeId() {
  223. return nodeId;
  224. }
  225. public void setNodeId(Long nodeId) {
  226. this.nodeId = nodeId;
  227. }
  228. }