package com.zy.asrs.entity; import com.core.common.Cools; import com.zy.system.entity.User; import com.zy.system.service.UserService; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.annotations.TableField; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import com.core.common.SpringUtils; import java.text.SimpleDateFormat; import java.util.Date; import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotations.TableName; import java.io.Serializable; @TableName("asr_bas_agv") public class BasAgv implements Serializable { private static final long serialVersionUID = 1L; /** * 小车编号 */ @ApiModelProperty(value= "小车编号") @TableId(value = "agv_id", type = IdType.INPUT) @TableField("agv_id") private Integer agvId; /** * 可入(checkBox) */ @ApiModelProperty(value= "可入(checkBox)") @TableField("in_enable") private String inEnable; /** * 可出(checkBox) */ @ApiModelProperty(value= "可出(checkBox)") @TableField("out_enable") private String outEnable; /** * 是否启用 1: 启用 0: 禁用 */ @ApiModelProperty(value= "是否启用 1: 启用 0: 禁用 ") @TableField("is_user") private Integer isUser; /** * 当前位置 */ @ApiModelProperty(value= "当前位置") @TableField("current_node") private String currentNode; /** * 当前电量 */ @ApiModelProperty(value= "当前电量") private String power; /** * 状态 1: 前往取货点 2: 取货点取货 3: 前往送货点 4: 送货点放货 5: 任务完成 6: 空闲 7: 故障 8: 充电中 9: 手动 10: 失联 11: 离线 12: 行走 */ @ApiModelProperty(value= "状态 1: 前往取货点 2: 取货点取货 3: 前往送货点 4: 送货点放货 5: 任务完成 6: 空闲 7: 故障 8: 充电中 9: 手动 10: 失联 11: 离线 12: 行走 ") private Integer status; /** * 故障码 */ @ApiModelProperty(value= "故障码") private String fault; /** * 任务号 */ @ApiModelProperty(value= "任务号") @TableField("task_code") private String taskCode; /** * 任务点 */ @ApiModelProperty(value= "任务点") @TableField("end_loc") private String endLoc; /** * 任务类型 1: 行走 2: 取货 3: 放货 4: 充电 */ @ApiModelProperty(value= "任务类型 1: 行走 2: 取货 3: 放货 4: 充电 ") private Integer action; /** * 修改人员 */ @ApiModelProperty(value= "修改人员") @TableField("modi_user") private Long modiUser; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @TableField("modi_time") private Date modiTime; /** * 备注 */ @ApiModelProperty(value= "备注") private String memo; public BasAgv() {} public BasAgv(Integer agvId,String inEnable,String outEnable,Integer isUser,String currentNode,String power,Integer status,String fault,String taskCode,String endLoc,Integer action,Long modiUser,Date modiTime,String memo) { this.inEnable = inEnable; this.outEnable = outEnable; this.isUser = isUser; this.currentNode = currentNode; this.power = power; this.status = status; this.fault = fault; this.taskCode = taskCode; this.endLoc = endLoc; this.action = action; this.modiUser = modiUser; this.modiTime = modiTime; this.memo = memo; } // BasAgv basAgv = new BasAgv( // null, // 小车编号[非空] // null, // 可入(checkBox) // null, // 可出(checkBox) // null, // 是否启用 // null, // 当前位置 // null, // 当前电量 // null, // 状态 // null, // 故障码 // null, // 任务号 // null, // 任务点 // null, // 任务类型 // null, // 修改人员 // null, // 修改时间 // null // 备注 // ); public Integer getAgvId() { return agvId; } public void setAgvId(Integer agvId) { this.agvId = agvId; } public String getInEnable() { return inEnable; } public void setInEnable(String inEnable) { this.inEnable = inEnable; } public String getOutEnable() { return outEnable; } public void setOutEnable(String outEnable) { this.outEnable = outEnable; } public Integer getIsUser() { return isUser; } public String getIsUser$(){ if (null == this.isUser){ return null; } switch (this.isUser){ case 1: return "启用"; case 0: return "禁用"; default: return String.valueOf(this.isUser); } } public void setIsUser(Integer isUser) { this.isUser = isUser; } public String getCurrentNode() { return currentNode; } public void setCurrentNode(String currentNode) { this.currentNode = currentNode; } public String getPower() { return power; } public void setPower(String power) { this.power = power; } public Integer getStatus() { return status; } public String getStatus$(){ if (null == this.status){ return null; } switch (this.status){ case 1: return "前往取货点"; case 2: return "取货点取货"; case 3: return "前往送货点"; case 4: return "送货点放货"; case 5: return "任务完成"; case 6: return "空闲"; case 7: return "故障"; case 8: return "充电中"; case 9: return "手动"; case 10: return "失联"; case 11: return "离线"; case 12: return "行走"; default: return String.valueOf(this.status); } } public void setStatus(Integer status) { this.status = status; } public String getFault() { return fault; } public void setFault(String fault) { this.fault = fault; } public String getTaskCode() { return taskCode; } public void setTaskCode(String taskCode) { this.taskCode = taskCode; } public String getEndLoc() { return endLoc; } public void setEndLoc(String endLoc) { this.endLoc = endLoc; } public Integer getAction() { return action; } public String getAction$(){ if (null == this.action){ return null; } switch (this.action){ case 1: return "行走"; case 2: return "取货"; case 3: return "放货"; case 4: return "充电"; default: return String.valueOf(this.action); } } public void setAction(Integer action) { this.action = action; } public Long getModiUser() { return modiUser; } public String getModiUser$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.modiUser); if (!Cools.isEmpty(user)){ return String.valueOf(user.getUsername()); } return null; } public void setModiUser(Long modiUser) { this.modiUser = modiUser; } public Date getModiTime() { return modiTime; } public String getModiTime$(){ if (Cools.isEmpty(this.modiTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); } public void setModiTime(Date modiTime) { this.modiTime = modiTime; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } }