|
|
@@ -0,0 +1,184 @@
|
|
|
+package com.github.zuihou.business.productionResourceCenter.entity;
|
|
|
+
|
|
|
+import cn.afterturn.easypoi.excel.annotation.Excel;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableField;
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
+import com.github.zuihou.base.entity.Entity;
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
+import lombok.*;
|
|
|
+import lombok.experimental.Accessors;
|
|
|
+import org.hibernate.validator.constraints.Length;
|
|
|
+
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
|
|
|
+
|
|
|
+
|
|
|
+@Data
|
|
|
+@NoArgsConstructor
|
|
|
+@ToString(callSuper = true)
|
|
|
+@EqualsAndHashCode(callSuper = true)
|
|
|
+@Accessors(chain = true)
|
|
|
+@TableName("imcs_resource_autocode")
|
|
|
+@ApiModel(value = "ResourceAutoCode", description = "设备节点管理")
|
|
|
+@AllArgsConstructor
|
|
|
+public class ResourceAutoCode extends Entity<Long> {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备业务名
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "节点名称")
|
|
|
+ @Length(max = 256, message = "节点名称长度不能超过256")
|
|
|
+ @TableField(value = "name", condition = LIKE)
|
|
|
+ @Excel(name = "节点名称")
|
|
|
+ private String name;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 节点类型(0-动作节点 1-自动化节点)
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "节点类型(0-动作节点 1-自动化节点)")
|
|
|
+ @Length(max = 4, message = "节点类型(0-动作节点 1-自动化节点)长度不能超过4")
|
|
|
+ @TableField(value = "type", condition = LIKE)
|
|
|
+ @Excel(name = "节点类型(0-动作节点 1-自动化节点)")
|
|
|
+ private String type;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 操作设备类型(1-机械节点 2-AGV 3-机械手臂)
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
|
|
|
+ @Length(max = 4, message = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
|
|
|
+ @TableField(value = "category", condition = LIKE)
|
|
|
+ @Excel(name = "操作设备类型(1-机械节点 2-AGV 3-机械手臂)")
|
|
|
+ private String category;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 动作指令
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "动作指令")
|
|
|
+ @TableField(value = "command", condition = LIKE)
|
|
|
+ @Excel(name = "动作指令")
|
|
|
+ private Integer command;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 权重
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "权重")
|
|
|
+ @TableField(value = "weight", condition = LIKE)
|
|
|
+ @Excel(name = "权重")
|
|
|
+ @NotNull(message="权重数值不能为空")
|
|
|
+ private Integer weight;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 节点状态(1-启用0-停用)
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "节点状态(1-启用0-停用)")
|
|
|
+ @Length(max = 4, message = "节点状态(1-启用0-停用)长度不能超过4")
|
|
|
+ @TableField(value = "status", condition = LIKE)
|
|
|
+ @Excel(name = "节点状态(1-启用0-停用)")
|
|
|
+ private String status;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 备注
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "备注")
|
|
|
+ @Length(max = 512, message = "备注长度不能超过512")
|
|
|
+ @TableField(value = "remark", condition = LIKE)
|
|
|
+ @Excel(name = "备注")
|
|
|
+ private String remark;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 业务ID
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "业务ID")
|
|
|
+ @TableField(value = "business_id", condition = LIKE)
|
|
|
+ @Excel(name = "业务ID")
|
|
|
+ @NotNull(message="业务ID不能为空")
|
|
|
+ private Long businessId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 父节点ID
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "父节点ID")
|
|
|
+ @TableField(value = "parent_id", condition = LIKE)
|
|
|
+ @Excel(name = "父节点ID")
|
|
|
+ private Long parentId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 操作设备ID
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "操作设备ID")
|
|
|
+ @TableField(value = "resource_id", condition = LIKE)
|
|
|
+ @Excel(name = "操作设备ID")
|
|
|
+ private Long resourceId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 起始设备ID
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "起始设备ID")
|
|
|
+ @TableField(value = "start_id", condition = LIKE)
|
|
|
+ @Excel(name = "起始设备ID")
|
|
|
+ private Long startId;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 目标设备ID
|
|
|
+ */
|
|
|
+ @ApiModelProperty(value = "目标设备ID")
|
|
|
+ @TableField(value = "target_id", condition = LIKE)
|
|
|
+ @Excel(name = "目标设备ID")
|
|
|
+ private Long targetId;
|
|
|
+
|
|
|
+
|
|
|
+ @TableField(exist=false)
|
|
|
+ private List<ResourceAutoCode> children;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 操作设备名
|
|
|
+ */
|
|
|
+ @TableField(exist=false)
|
|
|
+ private String resourceName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 起始设备名
|
|
|
+ */
|
|
|
+ @TableField(exist=false)
|
|
|
+ private String startName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 目标设备名
|
|
|
+ */
|
|
|
+ @TableField(exist=false)
|
|
|
+ private String targetName;
|
|
|
+
|
|
|
+ @Builder
|
|
|
+ public ResourceAutoCode(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, String name, String type, int command, Integer weight, String status, String remark, Long parentId, Long businessId, Long resourceId, Long startId, Long targetId, String resourceName, String startName, String targetName) {
|
|
|
+ super(id, createTime, createUser, updateTime, updateUser);
|
|
|
+ this.name = name;
|
|
|
+ this.type = type;
|
|
|
+ this.command = command;
|
|
|
+ this.weight = weight;
|
|
|
+ this.status = status;
|
|
|
+ this.remark = remark;
|
|
|
+ this.parentId = parentId;
|
|
|
+ this.businessId = businessId;
|
|
|
+ this.resourceId = resourceId;
|
|
|
+ this.startId = startId;
|
|
|
+ this.targetId = targetId;
|
|
|
+ this.resourceName = resourceName;
|
|
|
+ this.startName = startName;
|
|
|
+ this.targetName = targetName;
|
|
|
+ this.createTime = createTime;
|
|
|
+ this.createUser = createUser;
|
|
|
+ this.updateTime = updateTime;
|
|
|
+ this.updateUser = updateUser;
|
|
|
+ }
|
|
|
+}
|