dangsn
2024-12-03 d0ae279ff3b83358d1c07f4481a041c4ad335026
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
package ${doPackage};
 
import java.lang.*;
import java.util.Date;
 
import com.vci.starter.web.annotation.*;
import com.vci.starter.web.model.BaseModel;
 
/**
 * ${comments}数据对象
 * 
 * @author ${author}
 * @date ${datetime}
 */
public class ${doClassName} extends BaseModel {
 
    /**
     * 禁止修改这个值
     */
    private static final long serialVersionUID = ${doSerialVersionUID};
 
#foreach ($attr in $uiAttributes)
    /**
    * $attr.name
    */
    @Column(columnDefinition = "$attr.name" #if(!$attr.nullable) ,nullable = false #end #if($attr.defaultValue && $attr.defaultValue !='') ,defaultValue = "$attr.defaultValue" #end #if($attr.referFlag) ,showTextField = "$attr.referBtmTypeShowField" #end #if($attr.enumFlag) ,showTextField = "$attr.enumShowField" #end)
#if($attr.referFlag)
    @VciUseRefer(value = "$attr.referBtmTypeId",showTextField = "$attr.referBtmTypeShowField" )
#end
#if($attr.enumFlag)
    @VciUseEnum(value = "$attr.enumId",showTextField = "$attr.enumShowField")
#end
#if($attr.vciAttrDataType == "vtboolean")
    @VciFieldType(VciFieldType.VciFieldTypeEnum.VTBoolean)
#end
#if($attr.vciAttrDataType == "vtinteger")
    @VciFieldType(VciFieldType.VciFieldTypeEnum.VTInteger)
#end
#if($attr.vciAttrDataType == "vtlong")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTLong)
#end
#if($attr.vciAttrDataType == "vtdouble")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTDouble)
#end
#if($attr.vciAttrDataType == "vtboolean")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTBoolean)
#end
#if($attr.vciAttrDataType == "vtchar")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTChar)
#end
#if($attr.vciAttrDataType == "vtdate")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTDate)
#end
#if($attr.vciAttrDataType == "vtdatetime")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTDateTime)
#end
#if($attr.vciAttrDataType == "vttime")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTTime)
#end
#if($attr.vciAttrDataType == "vtnote")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTNote)
#end
#if($attr.vciAttrDataType == "vtfilepath")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTFilePath)
#end
#if($attr.vciAttrDataType == "vtclob")
   @VciFieldType(VciFieldType.VciFieldTypeEnum.VTClob)
#end
    private $attr.attrDataType $attr.id;
 
#if($attr.referFlag)
    /**
    * $attr.name显示文本
    */
    @Transient(referColumn = "$attr.referDBField")
    private String $attr.referBtmTypeShowField;
#end
 
#if($attr.enumFlag)
    /**
    * $attr.name显示文本
    */
    @Transient(referColumn = "$attr.enumDBField")
    private String $attr.enumShowField;
#end
 
#end
 
#foreach ($attr in $uiAttributes)
    /**
     * 获取 $attr.name
     */
#if($attr.id == "id" || $attr.id == "name" || $attr.id =="description")
    @Override
#end
    public $attr.voJavaDataType $attr.voGetter (){
        return $attr.id;
    }
 
    /**
    * 设置 $attr.name
    */
#if($attr.id == "id" || $attr.id == "name" || $attr.id =="description")
    @Override
#end
    public void $attr.voSetter ($attr.voJavaDataType $attr.id){
        this.$attr.id = $attr.id;
    }
#if($attr.referFlag)
    /**
     * 获取$attr.name显示文本
     */
    public String $attr.referBtmTypeShowFieldGetter (){
        return $attr.referBtmTypeShowField;
    }
 
    /**
    * 设置$attr.name显示文本
    */
    public void $attr.referBtmTypeShowFieldSetter (String $attr.referBtmTypeShowField){
        this.$attr.referBtmTypeShowField = $attr.referBtmTypeShowField;
    }
#end
#if($attr.enumFlag)
    /**
     * 获取$attr.name显示文本
     */
    public String $attr.enumShowFieldGetter (){
        return $attr.enumShowField;
    }
 
    /**
     * 设置 $attr.name显示文本
     */
    public void $attr.enumShowFieldSetter (String $attr.enumShowField){
        this.$attr.enumShowField = $attr.enumShowField;
    }
#end
#end
 
    @Override
    public String toString() {
        return "${className}VO{" +
#foreach ($attr in $uiAttributes)
        "$attr.id='" + $attr.id +"'," +
#if($attr.referFlag)
        "$attr.referBtmTypeShowField='" + $attr.referBtmTypeShowField +"'," +
#end
#if($attr.enumFlag)
        "$attr.enumShowField='" + $attr.enumShowField +"'," +
#end
#end
        "}" + super.toString();
    }
}