报告模板配置
This commit is contained in:
@@ -6,24 +6,18 @@ import lombok.Getter;
|
||||
* @author hany
|
||||
* @date 2022/09/21
|
||||
*/
|
||||
@Getter
|
||||
public enum TemplateTreeEnum {
|
||||
|
||||
public interface TemplateTreeEnum {
|
||||
|
||||
/**
|
||||
* 各层级描述
|
||||
* 权限资源状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
REPORT_LEVEL(0, "报告基础项"),
|
||||
LINE_LEVEL(1, "监测点"),
|
||||
DETAIL_LEVEL(2, "监测点详情"),
|
||||
TRANS_LEVEL(2, "暂降事件列表表格"),
|
||||
TRANS_D_LEVEL(2, "暂降密度图形"),
|
||||
TRANS_R_LEVEL(2, "暂降原因表格");
|
||||
int DELETE = 0;
|
||||
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
int ENABLE = 1;
|
||||
|
||||
TemplateTreeEnum(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
/**
|
||||
* 顶层父类的pid
|
||||
*/
|
||||
String FATHER_PID = "0";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.system.pojo.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DictDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private String reportDescribe;
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
List<DictDTO> children;
|
||||
}
|
||||
@@ -6,31 +6,32 @@ import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
@Data
|
||||
public class EventDictParam {
|
||||
|
||||
/**
|
||||
* 字典表字段名称
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表字段名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 字典表字段描述
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表字段描述")
|
||||
private String describe;
|
||||
@ApiModelProperty(value = "类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "字典表字段描述")
|
||||
private String reportDescribe;
|
||||
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
@ApiModelProperty(value = "父级id")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@NotNull
|
||||
@Range(min = 0, max = 999)
|
||||
private Integer sort;
|
||||
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hany
|
||||
@@ -22,15 +23,13 @@ public class EventTemplateParam {
|
||||
@Pattern(regexp = PatternRegex.DIC_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("模板名称")
|
||||
@ApiModelProperty("模板描述")
|
||||
@NotBlank(message = ValidMessage.CODE_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.DES64_REGEX, message = ValidMessage.CODE_FORMAT_ERROR)
|
||||
private String mark;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
@NotBlank(message = ValidMessage.CODE_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.TYPE_REGEX, message = ValidMessage.DICT_TYPE_ID_FORMAT_ERROR)
|
||||
private String type;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
@@ -49,15 +48,25 @@ public class EventTemplateParam {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询数据
|
||||
* 查询数据实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class EventTemplateQueryParam extends BaseParam {
|
||||
@ApiModelProperty("pid")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String pid;
|
||||
/**
|
||||
* 区分监测点与区域报告
|
||||
*/
|
||||
private String type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模板的相关关联
|
||||
*/
|
||||
@Data
|
||||
public static class TemplateRelevancy {
|
||||
private String id;
|
||||
private List<String> idList;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class EventTemplate extends BaseEntity {
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ReportDict extends BaseEntity {
|
||||
|
||||
private Integer type;
|
||||
|
||||
private String describe;
|
||||
private String reportDescribe;
|
||||
|
||||
private String pid;
|
||||
|
||||
@@ -29,7 +29,5 @@ public class ReportDict extends BaseEntity {
|
||||
|
||||
private Integer state;
|
||||
|
||||
private Integer level;
|
||||
|
||||
private Integer sort;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.njcn.system.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("report_relevancy")
|
||||
public class TemplateRel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 模板Id
|
||||
*/
|
||||
private String RtId;
|
||||
|
||||
/**
|
||||
* 字典Id
|
||||
*/
|
||||
private String RdId;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.njcn.system.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DictVO implements Serializable {
|
||||
|
||||
@ApiModelProperty("Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String reportDescribe;
|
||||
|
||||
@ApiModelProperty("父节点")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
List<DictVO> children;
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.njcn.system.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典树实体
|
||||
* @author hany
|
||||
* @date 2022/09/09
|
||||
*/
|
||||
@ApiModel
|
||||
@Data
|
||||
public class EventTemplateTree implements Serializable {
|
||||
private String id;
|
||||
@ApiModelProperty(name = "parentId",value = "父id")
|
||||
private String pid;
|
||||
@ApiModelProperty(name = "level",value = "等级")
|
||||
private Integer level;
|
||||
@ApiModelProperty(name = "name",value = "名称")
|
||||
private String name;
|
||||
@ApiModelProperty(name = "describe",value = "描述")
|
||||
private String describe;
|
||||
@ApiModelProperty(name = "sort",value = "排序")
|
||||
private Integer sort;
|
||||
@ApiModelProperty(name = "state",value = "数据状态")
|
||||
private Integer state;
|
||||
@ApiModelProperty(name = "children",value = "子节点")
|
||||
private List<EventTemplateTree> children = new ArrayList<>();
|
||||
|
||||
private String pids;
|
||||
|
||||
}
|
||||
@@ -15,33 +15,29 @@ public class EventTemplateVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 字典数据表Id
|
||||
* 模板数据表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
* 模板名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父节点
|
||||
* 类型
|
||||
*/
|
||||
private String pid;
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 所有父节点
|
||||
* 模板描述
|
||||
*/
|
||||
private String pids;
|
||||
private String mark;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user