EventTemplate控制器编写
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package com.njcn.system.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* @author hany
|
||||
* @version 1.0.0
|
||||
* @date 2022/09/13
|
||||
*/
|
||||
@Data
|
||||
public class EventTemplateParam {
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@NotBlank(message = ValidMessage.NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.DIC_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
|
||||
@ApiModelProperty("父节点")
|
||||
@NotBlank(message = ValidMessage.PID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.DIC_REGEX, message = ValidMessage.PID_FORMAT_ERROR)
|
||||
private String pid;
|
||||
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@NotNull(message = ValidMessage.SORT_NOT_NULL)
|
||||
@Min(value = 0, message = ValidMessage.SORT_FORMAT_ERROR)
|
||||
@Max(value = 999, message = ValidMessage.SORT_FORMAT_ERROR)
|
||||
private Integer sort;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class EventTemplateUpdateParam extends EventTemplateParam {
|
||||
|
||||
/**
|
||||
* 表Id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class EventTemplateQueryParam extends BaseParam {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.njcn.system.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author hany
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/09/10
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "eventreport_dict")
|
||||
public class EventDict extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 字典数据表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父节点
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 上层所有父节点
|
||||
*/
|
||||
private String pids;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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 = "sort",value = "排序")
|
||||
private Integer sort;
|
||||
@ApiModelProperty(name = "comFlag",value = "设备状态")
|
||||
private Integer comFlag;
|
||||
@ApiModelProperty(name = "children",value = "子节点")
|
||||
private List<EventTemplateTree> children = new ArrayList<>();
|
||||
|
||||
private String pids;
|
||||
|
||||
/**
|
||||
* 终端厂家
|
||||
*/
|
||||
private String manufacturer;
|
||||
|
||||
/**
|
||||
* 电压等级Id,字典表
|
||||
*/
|
||||
private String scale;
|
||||
|
||||
/**
|
||||
* 干扰源类型,字典表
|
||||
*/
|
||||
private String loadType;
|
||||
|
||||
/**
|
||||
* 接线方式
|
||||
*/
|
||||
private Integer ptType;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.njcn.system.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hany
|
||||
* @version 1.0.0
|
||||
* @date 2022/09/13
|
||||
*/
|
||||
@Data
|
||||
public class EventTemplateVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 字典数据表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父节点
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 所有父节点
|
||||
*/
|
||||
private String pids;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user