|
@@ -85,7 +85,7 @@ public class GenMetaConstantPlugin extends AbstractFormPlugin {
|
|
DataEntityPropertyCollection mainEntityProperties = mainEntityType.getProperties();
|
|
DataEntityPropertyCollection mainEntityProperties = mainEntityType.getProperties();
|
|
|
|
|
|
// 创建前缀代码
|
|
// 创建前缀代码
|
|
- this.createPrefixCode(content, javaName, entityName);
|
|
|
|
|
|
+ this.createPrefixCode(content, entityNumber, entityName);
|
|
String annotation = " /**" + entityName + "**/" + LINEFEED;
|
|
String annotation = " /**" + entityName + "**/" + LINEFEED;
|
|
String code = " public static final String " + entityNumber.toUpperCase() + " = \"" + entityNumber + "\";" + LINEFEED;
|
|
String code = " public static final String " + entityNumber.toUpperCase() + " = \"" + entityNumber + "\";" + LINEFEED;
|
|
content.append(annotation + code);
|
|
content.append(annotation + code);
|
|
@@ -161,7 +161,11 @@ public class GenMetaConstantPlugin extends AbstractFormPlugin {
|
|
content.append("}" + LINEFEED);
|
|
content.append("}" + LINEFEED);
|
|
}
|
|
}
|
|
|
|
|
|
- protected void createPrefixCode(StringBuilder content, String javaName, String entityName) {
|
|
|
|
|
|
+ protected void createPrefixCode(StringBuilder content, String entityNumber, String entityName) {
|
|
|
|
+ // 生成常量类名
|
|
|
|
+ String javaName = entityNumber + "Constant";
|
|
|
|
+ javaName = this.rename(javaName);
|
|
|
|
+
|
|
String packageName = "kd.constant";
|
|
String packageName = "kd.constant";
|
|
Object packageNameValue = this.getModel().getValue(PACKAGENAME);
|
|
Object packageNameValue = this.getModel().getValue(PACKAGENAME);
|
|
if (packageNameValue != null && !packageNameValue.toString().isEmpty()) {
|
|
if (packageNameValue != null && !packageNameValue.toString().isEmpty()) {
|
|
@@ -173,7 +177,8 @@ public class GenMetaConstantPlugin extends AbstractFormPlugin {
|
|
String dateStr = this.formatter.format(new Date());
|
|
String dateStr = this.formatter.format(new Date());
|
|
String prefixCode = "package " + packageName + ";" + LINEFEED + LINEFEED + "/**" + LINEFEED + " * "
|
|
String prefixCode = "package " + packageName + ";" + LINEFEED + LINEFEED + "/**" + LINEFEED + " * "
|
|
+ entityName + "常量类" + LINEFEED + " *" + LINEFEED + " * @author " + rdNumber + LINEFEED + " * @version 1.0"
|
|
+ entityName + "常量类" + LINEFEED + " *" + LINEFEED + " * @author " + rdNumber + LINEFEED + " * @version 1.0"
|
|
- + LINEFEED + " * @date " + dateStr + LINEFEED + " */" + LINEFEED + "public class " + javaName + " {" + LINEFEED;
|
|
|
|
|
|
+ + LINEFEED + " * @date " + dateStr + LINEFEED + " */" + LINEFEED + "public class " + javaName + " {" + LINEFEED + LINEFEED
|
|
|
|
+ + " public static final String FORMBILLID = \"" + entityNumber + "\";" + LINEFEED;
|
|
content.append(prefixCode);
|
|
content.append(prefixCode);
|
|
}
|
|
}
|
|
|
|
|