春风项目四线(合箱线、总装线)
cl
2024-02-02 e0a2b80807cc52e80bf632adba9cfcb6357025aa
提交 | 用户 | 时间
fd2207 1 package ${packageName}.domain;
2
3 #foreach ($import in $subImportList)
4 import ${import};
5 #end
6 import org.apache.commons.lang3.builder.ToStringBuilder;
7 import org.apache.commons.lang3.builder.ToStringStyle;
8 import com.jcdm.common.annotation.Excel;
9 import com.jcdm.common.core.domain.BaseEntity;
10
11 /**
12  * ${subTable.functionName}对象 ${subTableName}
13  * 
14  * @author ${author}
15  * @date ${datetime}
16  */
17 public class ${subClassName} extends BaseEntity
18 {
19     private static final long serialVersionUID = 1L;
20
21 #foreach ($column in $subTable.columns)
22 #if(!$table.isSuperColumn($column.javaField))
23     /** $column.columnComment */
24 #if($column.list)
25 #set($parentheseIndex=$column.columnComment.indexOf("("))
26 #if($parentheseIndex != -1)
27 #set($comment=$column.columnComment.substring(0, $parentheseIndex))
28 #else
29 #set($comment=$column.columnComment)
30 #end
31 #if($parentheseIndex != -1)
32     @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
33 #elseif($column.javaType == 'Date')
34     @JsonFormat(pattern = "yyyy-MM-dd")
35     @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
36 #else
37     @Excel(name = "${comment}")
38 #end
39 #end
40     private $column.javaType $column.javaField;
41
42 #end
43 #end
44 #foreach ($column in $subTable.columns)
45 #if(!$table.isSuperColumn($column.javaField))
46 #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
47 #set($AttrName=$column.javaField)
48 #else
49 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
50 #end
51     public void set${AttrName}($column.javaType $column.javaField) 
52     {
53         this.$column.javaField = $column.javaField;
54     }
55
56     public $column.javaType get${AttrName}() 
57     {
58         return $column.javaField;
59     }
60 #end
61 #end
62
63     @Override
64     public String toString() {
65         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
66 #foreach ($column in $subTable.columns)
67 #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
68 #set($AttrName=$column.javaField)
69 #else
70 #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
71 #end
72             .append("${column.javaField}", get${AttrName}())
73 #end
74             .toString();
75     }
76 }