| package com.zy.acs.fake.entity; | 
|   | 
| import com.baomidou.mybatisplus.annotation.IdType; | 
| import com.baomidou.mybatisplus.annotation.TableId; | 
| import com.baomidou.mybatisplus.annotation.TableName; | 
| import com.zy.acs.fake.service.ActionStsService; | 
| import com.zy.acs.fake.service.ActionTypeService; | 
| import com.zy.acs.fake.service.AgvService; | 
| import com.zy.acs.framework.common.Cools; | 
| import com.zy.acs.framework.common.SpringUtils; | 
| import io.swagger.annotations.ApiModelProperty; | 
| import lombok.Data; | 
|   | 
| import java.io.Serializable; | 
| import java.util.Date; | 
|   | 
| @Data | 
| @TableName("man_action") | 
| public class Action implements Serializable { | 
|   | 
|     private static final long serialVersionUID = 1L; | 
|   | 
|     /** | 
|      * ID | 
|      */ | 
|     @ApiModelProperty(value= "ID") | 
|     @TableId(value = "id", type = IdType.AUTO) | 
|     private Long id; | 
|   | 
|     /** | 
|      * 编号 | 
|      */ | 
|     @ApiModelProperty(value= "编号") | 
|     private String uuid; | 
|   | 
|     /** | 
|      * 动作组 | 
|      */ | 
|     @ApiModelProperty(value= "动作组") | 
|     private String groupId; | 
|   | 
|     /** | 
|      * 总线 | 
|      */ | 
|     @ApiModelProperty(value= "总线") | 
|     private Long busId; | 
|   | 
|     /** | 
|      * 任务 | 
|      */ | 
|     @ApiModelProperty(value= "任务") | 
|     private Long taskId; | 
|   | 
|     /** | 
|      * 动作号 | 
|      */ | 
|     @ApiModelProperty(value= "动作号") | 
|     private String seqNum; | 
|   | 
|     /** | 
|      * 优先级 | 
|      * The large the value, the earlier it will be executed | 
|      */ | 
|     @ApiModelProperty(value= "优先级") | 
|     private Integer priority; | 
|   | 
|     /** | 
|      * 名称 | 
|      */ | 
|     @ApiModelProperty(value= "名称") | 
|     private String name; | 
|   | 
|     /** | 
|      * 属性值 | 
|      */ | 
|     @ApiModelProperty(value= "属性值") | 
|     private Double val; | 
|   | 
|     /** | 
|      * 地面码 | 
|      */ | 
|     @ApiModelProperty(value= "地面码") | 
|     private String code; | 
|   | 
|     /** | 
|      * 动作参数 | 
|      */ | 
|     @ApiModelProperty(value= "动作参数") | 
|     private String params; | 
|   | 
|     /** | 
|      * 动作类型 | 
|      */ | 
|     @ApiModelProperty(value= "动作类型") | 
|     private Long actionType; | 
|   | 
|     /** | 
|      * 动作进度 | 
|      */ | 
|     @ApiModelProperty(value= "动作进度") | 
|     private Long actionSts; | 
|   | 
|     /** | 
|      * AGV | 
|      */ | 
|     @ApiModelProperty(value= "AGV") | 
|     private Long agvId; | 
|   | 
|     /** | 
|      * 工作时间 | 
|      */ | 
|     @ApiModelProperty(value= "工作时间") | 
|     private Date ioTime; | 
|   | 
|     /** | 
|      * 开始时间 | 
|      */ | 
|     @ApiModelProperty(value= "开始时间") | 
|     private Date startTime; | 
|   | 
|     /** | 
|      * 结束时间 | 
|      */ | 
|     @ApiModelProperty(value= "结束时间") | 
|     private Date endTime; | 
|   | 
|     /** | 
|      * 异常时间 | 
|      */ | 
|     @ApiModelProperty(value= "异常时间") | 
|     private Date errTime; | 
|   | 
|     /** | 
|      * 异常描述 | 
|      */ | 
|     @ApiModelProperty(value= "异常描述") | 
|     private String errDesc; | 
|   | 
|     /** | 
|      * 状态 1: 正常  0: 冻结   | 
|      */ | 
|     @ApiModelProperty(value= "状态 1: 正常  0: 冻结  ") | 
|     private Integer status; | 
|   | 
|     /** | 
|      * 是否删除 1: 是  0: 否   | 
|      */ | 
|     @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|     private Integer deleted; | 
|   | 
|     /** | 
|      * 租户 | 
|      */ | 
|     @ApiModelProperty(value= "租户") | 
|     private Long tenantId; | 
|   | 
|     /** | 
|      * 添加人员 | 
|      */ | 
|     @ApiModelProperty(value= "添加人员") | 
|     private Long createBy; | 
|   | 
|     /** | 
|      * 添加时间 | 
|      */ | 
|     @ApiModelProperty(value= "添加时间") | 
|     private Date createTime; | 
|   | 
|     /** | 
|      * 修改人员 | 
|      */ | 
|     @ApiModelProperty(value= "修改人员") | 
|     private Long updateBy; | 
|   | 
|     /** | 
|      * 修改时间 | 
|      */ | 
|     @ApiModelProperty(value= "修改时间") | 
|     private Date updateTime; | 
|   | 
|     /** | 
|      * 备注 | 
|      */ | 
|     @ApiModelProperty(value= "备注") | 
|     private String memo; | 
|   | 
|     public Action() { | 
|     } | 
|   | 
|     public Action(String uuid, Long busId, Long taskId, String seqNum, Integer priority, String name, Double val, String code, String params, Long actionType, Long actionSts, Long agvId, Date ioTime) { | 
|         this.uuid = uuid; | 
|         this.busId = busId; | 
|         this.taskId = taskId; | 
|         this.seqNum = seqNum; | 
|         this.priority = priority; | 
|         this.name = name; | 
|         this.val = val; | 
|         this.code = code; | 
|         this.params = params; | 
|         this.actionType = actionType; | 
|         this.actionSts = actionSts; | 
|         this.agvId = agvId; | 
|         this.ioTime = ioTime; | 
|     } | 
|   | 
|   | 
|   | 
|     public String getActionType$(){ | 
|         ActionTypeService service = SpringUtils.getBean(ActionTypeService.class); | 
|         ActionType actionType = service.getById(this.actionType); | 
|         if (!Cools.isEmpty(actionType)){ | 
|             return String.valueOf(actionType.getName()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getActionTypeEl(){ | 
|         ActionTypeService service = SpringUtils.getBean(ActionTypeService.class); | 
|         ActionType type = service.getById(this.actionType); | 
|         if (!Cools.isEmpty(type)){ | 
|             return String.valueOf(type.getUuid()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getActionSts$(){ | 
|         ActionStsService service = SpringUtils.getBean(ActionStsService.class); | 
|         ActionSts actionSts = service.getById(this.actionSts); | 
|         if (!Cools.isEmpty(actionSts)){ | 
|             return String.valueOf(actionSts.getName()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public String getAgvId$(){ | 
|         AgvService service = SpringUtils.getBean(AgvService.class); | 
|         Agv agv = service.getById(this.agvId); | 
|         if (!Cools.isEmpty(agv)){ | 
|             return String.valueOf(agv.getUuid()); | 
|         } | 
|         return null; | 
|     } | 
|   | 
|     public Boolean getStatusBool(){ | 
|         if (null == this.status){ return null; } | 
|         switch (this.status){ | 
|             case 1: | 
|                 return true; | 
|             case 0: | 
|                 return false; | 
|             default: | 
|                 return null; | 
|         } | 
|     } | 
|   | 
|   | 
|   | 
| } |