From 1e43b2e36f7b438541b1c5f03b39340bb69e7ef0 Mon Sep 17 00:00:00 2001 From: "wei.peng" Date: Sun, 20 Jan 2019 15:13:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BFPojo=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/base/enumutil/BlockReportEnumUtil.java | 79 ++++++++++++++++++++++ .../i3plus/pojo/base/enumutil/CommonEnumUtil.java | 10 +++ modules/i3plus-pojo-model/pom.xml | 5 ++ .../i3plus/pojo/model/report/TemplateModel.java | 16 +++++ .../i3plus/pojo/report/bean/BrRefServerPojo.java | 74 ++++++++++++++------ .../pojo/report/bean/BrRefTemplateServer.java | 2 +- .../estsh/i3plus/pojo/report/bean/BrTemplate.java | 4 ++ pom.xml | 6 ++ 8 files changed, 174 insertions(+), 22 deletions(-) create mode 100644 modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/report/TemplateModel.java diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java index 4a09da5..9d33da8 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java @@ -14,6 +14,85 @@ import java.util.List; **/ public class BlockReportEnumUtil { + /** + * 软件类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SOFT_TYPE { + CORE(2, "i3core", "i3业务平台"); + + private int value; + private String code; + private String description; + + private SOFT_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + public String getDescription() { + return description; + } + + public static String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static SOFT_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } /** * 报表元素枚举 diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java index 24e4496..7c21d8c 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java @@ -85,6 +85,16 @@ public class CommonEnumUtil { return tmp; } + public static SOFT_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + public static String codeOfDescription(String code) { String tmp = null; for (int i = 0; i < values().length; i++) { diff --git a/modules/i3plus-pojo-model/pom.xml b/modules/i3plus-pojo-model/pom.xml index 485fdd6..24763f0 100644 --- a/modules/i3plus-pojo-model/pom.xml +++ b/modules/i3plus-pojo-model/pom.xml @@ -24,6 +24,11 @@ i3plus-pojo-platform + + i3plus.pojo + i3plus-pojo-report + + diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/report/TemplateModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/report/TemplateModel.java new file mode 100644 index 0000000..7a70e01 --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/report/TemplateModel.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.model.report; + +import cn.estsh.i3plus.pojo.report.bean.BrTemplate; + +import java.util.List; + +/** + * @Description : + * @Reference : + * @Author : Adair Peng + * @CreateDate : 2019-01-20 14:05 + * @Modify: + **/ +public class TemplateModel { + +} diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefServerPojo.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefServerPojo.java index faeef2b..1d765cd 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefServerPojo.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefServerPojo.java @@ -39,32 +39,64 @@ public class BrRefServerPojo extends BaseBean { @ApiParam(value ="模板名称" , access ="模板名称") private String templateNameRdd; - @Column(name="SERVER_ID") - @ApiParam(value ="服务编号" ,example = "-1") - private Integer serverId; + @Column(name="POJO_REF_TYPE") + @ApiParam(value ="关系类型") + private Integer pojoRefType; - @Column(name="SERVER_NAME_RDD") - @ApiParam(value ="服务名称" , access ="服务名称") - private String serverNameRdd; + @Column(name="POJO_WHERE_TYPE") + @ApiParam(value ="连接关系") + private Integer pojoWhereType; - @Column(name="SERVER_PACKAGE_NAME_RDD") - @ApiParam(value ="服务对象包名称" , access ="服务对象包名称") - private String serverPackageNameRdd; + @Column(name="POJO_SORT") + @ApiParam(value ="主服务编号" ,example = "-1") + private Integer pojoSort; - @Column(name="SERVER_POJO_NAME_RDD") - @ApiParam(value ="服务对象名称" , access ="服务对象名称") - private String serverPojoNameRdd; + @Column(name="MASTER_SERVER_ID") + @ApiParam(value ="主服务编号" ,example = "-1") + private Integer masterServerId; - @Column(name="SERVER_POJO_NAME_DESC_RDD") - @ApiParam(value ="服务对象名称中文" , access ="服务对象名称中文") - private String serverPojoNameDescRdd; + @Column(name="MASTER_SERVER_NAME_RDD") + @ApiParam(value ="主服务名称" ,example = "-1") + private String masterServerNameRdd; - @Column(name="SERVER_POJO_NAME_ALIAS") - @ApiParam(value ="服务对象别名" , access ="服务对象别名") - private String serverPojoNameAlias; + @Column(name="MASTER_POJO_NAME") + @ApiParam(value ="副对象名称") + private String masterPojoName; - @Column(name="SERVER_POJO_CLASS_PATH") - @ApiParam(value ="对象全路径名称" , access ="对象全路径名称") - private String serverPojoFullName; + @Column(name="MASTER_PACKAGE_NAME_RDD") + @ApiParam(value ="主服务对象包名称" , access ="服务对象包名称") + private String masterPackageNameRdd; + + @Column(name="MASTER_POJO_NAME_ALIAS") + @ApiParam(value ="主对象别名") + private String masterPojoNameAlias; + + @Column(name="MASTER_POJO_NAME_ATTR_NAME") + @ApiParam(value ="主对象属性名称" ) + private String masterPojoAttName; + + @Column(name="SECONDARY_SERVER_ID") + @ApiParam(value ="主服务编号") + private Integer secondaryServerId; + + @Column(name="SECONDARY_SERVER_NAME") + @ApiParam(value ="主服务编号") + private Integer secondaryServerName; + + @Column(name="SECONDARY_POJO_NAME") + @ApiParam(value ="副对象名称") + private String secondaryPojoName; + + @Column(name="SECONDARY_PACKAGE_NAME") + @ApiParam(value ="主服务对象包名称" , access ="服务对象包名称") + private String secondaryPackageName; + + @Column(name="SECONDARY_POJO_NAME_ALIAS") + @ApiParam(value ="副对象别名" ) + private String secondaryPojoNameAlias; + + @Column(name="SECONDARY_POJO_ATTR_NAME") + @ApiParam(value ="副对象属性名称") + private String secondaryPojoAttrName; } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefTemplateServer.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefTemplateServer.java index db686b1..059881a 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefTemplateServer.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefTemplateServer.java @@ -42,7 +42,7 @@ public class BrRefTemplateServer extends BaseBean { @Column(name="SERVER_ID") @ApiParam(value ="服务编号" ,example = "-1") @JsonSerialize(using = ToStringSerializer.class) - private Long serverId; + private Integer serverId; @Column(name="SERVER_NAME_RDD") @ApiParam(value ="服务名称" , access ="模板名称") diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java index 0a2be32..36fc139 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java @@ -95,6 +95,10 @@ public class BrTemplate extends BaseBean { private String templateHtml; @Transient + @ApiParam(value ="模板服务编号集合") + private List serverIdList; + + @Transient @ApiParam(value ="模板服务") private List serverList; diff --git a/pom.xml b/pom.xml index b8f4488..81d8228 100644 --- a/pom.xml +++ b/pom.xml @@ -107,6 +107,12 @@ ${project.version} + + i3plus.pojo + i3plus-pojo-report + ${project.version} + + com.fasterxml.jackson.core