cgform_pageTemplate.ftl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <#if packageStyle == "service">
  2. package ${bussiPackage}.${entityPackage}.page;
  3. import ${bussiPackage}.${entityPackage}.entity.${entityName}Entity;
  4. <#list subTab as sub>
  5. import ${bussiPackage}.${sub.entityPackage}.entity.${sub.entityName}Entity;
  6. </#list>
  7. <#else>
  8. package ${bussiPackage}.page.${entityPackage};
  9. import ${bussiPackage}.entity.${entityPackage}.${entityName}Entity;
  10. <#list subTab as sub>
  11. import ${bussiPackage}.entity.${sub.entityPackage}.${sub.entityName}Entity;
  12. </#list>
  13. </#if>
  14. import java.math.BigDecimal;
  15. import java.util.Date;
  16. import java.util.List;
  17. import java.util.ArrayList;
  18. import javax.persistence.Column;
  19. import javax.persistence.Entity;
  20. import javax.persistence.GeneratedValue;
  21. import javax.persistence.GenerationType;
  22. import javax.persistence.Id;
  23. import javax.persistence.Table;
  24. import org.hibernate.annotations.GenericGenerator;
  25. import javax.persistence.SequenceGenerator;
  26. import org.jeecgframework.poi.excel.annotation.Excel;
  27. import org.jeecgframework.poi.excel.annotation.ExcelCollection;
  28. /**
  29. * @Title: Entity
  30. * @Description: ${ftl_description}
  31. * @author onlineGenerator
  32. * @date ${ftl_create_time}
  33. * @version V1.0
  34. *
  35. */
  36. public class ${entityName}Page implements java.io.Serializable {
  37. <#list columns as po>
  38. /**${po.content}*/
  39. <#if po.isShow != 'N'>
  40. @Excel(name="${po.content}"<#if po.type == "java.util.Date">,format = "yyyy-MM-dd"</#if>)
  41. </#if>
  42. private ${po.type} ${po.fieldName};
  43. </#list>
  44. <#list columns as po>
  45. /**
  46. *方法: 取得${po.type}
  47. *@return: ${po.type} ${po.content}
  48. */
  49. public ${po.type} get${po.fieldName?cap_first}(){
  50. return this.${po.fieldName};
  51. }
  52. /**
  53. *方法: 设置${po.type}
  54. *@param: ${po.type} ${po.content}
  55. */
  56. public void set${po.fieldName?cap_first}(${po.type} ${po.fieldName}){
  57. this.${po.fieldName} = ${po.fieldName};
  58. }
  59. </#list>
  60. <#list subTab as sub>
  61. /**保存-${sub.ftlDescription}*/
  62. @ExcelCollection(name="${sub.ftlDescription}")
  63. private List<${sub.entityName}Entity> ${sub.entityName?uncap_first}List = new ArrayList<${sub.entityName}Entity>();
  64. public List<${sub.entityName}Entity> get${sub.entityName}List() {
  65. return ${sub.entityName?uncap_first}List;
  66. }
  67. public void set${sub.entityName}List(List<${sub.entityName}Entity> ${sub.entityName?uncap_first}List) {
  68. this.${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}List;
  69. }
  70. </#list>
  71. }