package com.zy.asrs.entity; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.annotations.TableField; import java.text.SimpleDateFormat; import java.util.Date; import org.springframework.format.annotation.DateTimeFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.text.SimpleDateFormat; import java.util.Date; import com.core.common.SpringUtils; import com.zy.asrs.service.BasJarMastStatusService; import com.zy.asrs.entity.BasJarMastStatus; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import com.baomidou.mybatisplus.annotations.TableName; import java.io.Serializable; @Data @TableName("jar_wrk_mast_execute") public class WrkMastExecute implements Serializable { private static final long serialVersionUID = 1L; /** * ID */ @ApiModelProperty(value= "ID") @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 工作号 */ @ApiModelProperty(value= "工作号") @TableField("wrk_no") private Long wrkNo; /** * 入库源站点 */ @ApiModelProperty(value= "入库源站点") @TableField("enter_sta_no") private Integer enterStaNo; /** * 入库目标站点 */ @ApiModelProperty(value= "入库目标站点") @TableField("out_sta_no") private Integer outStaNo; /** * 入硫化罐站点 */ @ApiModelProperty(value= "入硫化罐站点") @TableField("jar_enter_sta_no") private Integer jarEnterStaNo; /** * 出硫化罐站点 */ @ApiModelProperty(value= "出硫化罐站点") @TableField("jar_out_sta_no") private Integer jarOutStaNo; /** * 设备ID */ @ApiModelProperty(value= "设备ID") @TableField("jar_id") private Integer jarId; /** * 区域 */ @ApiModelProperty(value= "区域") @TableField("jar_regin") private Integer jarRegin; /** * 状态 */ @ApiModelProperty(value= "状态") private Integer status; /** * 穿梭板 */ @ApiModelProperty(value= "穿梭板") @TableField("ste_id") private Integer steId; /** * RGV */ @ApiModelProperty(value= "RGV") @TableField("rgv_id") private Integer rgvId; /** * 作业时间 */ @ApiModelProperty(value= "作业时间") @TableField("io_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date ioTime; /** * 创建时间 */ @ApiModelProperty(value= "创建时间") @TableField("modi_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date modiTime; /** * 更新时间 */ @ApiModelProperty(value= "更新时间") @TableField("appe_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date appeTime; /** * 任务状态 0: 初始 1: 作业中 2: 完成 */ @ApiModelProperty(value= "任务状态 0: 初始 1: 作业中 2: 完成 ") @TableField("wrk_type") private Integer wrkType; /** * 工作状态 */ @ApiModelProperty(value= "工作状态") @TableField("wrk_sts") private Integer wrkSts; /** * 任务类型 0: 未知 1: 开进料门 2: 关进料门 3: 开出料门 4: 关出料门 5: 入硫化罐 6: 入冷却槽 7: 穿梭车进冷却槽 B=>C 8: 穿梭车离开冷却槽 C=>B 9: 出冷却槽 10:A=>B 11:B=>A */ @ApiModelProperty(value= "任务类型 0: 未知 1: 开进料门 2: 关进料门 3: 开出料门 4: 关出料门 5: 入硫化罐 6: 入冷却槽 7: 穿梭车进冷却槽 B=>C 8: 穿梭车离开冷却槽 C=>B 9: 出冷却槽 10:A=>B 11:B=>A ") @TableField("io_type") private Integer ioType; /** * 设备 0: 未知 1: 硫化罐 2: 冷却槽 */ @ApiModelProperty(value= "设备 0: 未知 1: 硫化罐 2: 冷却槽 ") private Integer type; /** * 尾部穿梭板 */ @ApiModelProperty(value= "尾部穿梭板") @TableField("rgv_end_id") private Integer rgvEndId; public WrkMastExecute() {} public WrkMastExecute(Long wrkNo,Integer enterStaNo,Integer outStaNo,Integer jarEnterStaNo,Integer jarOutStaNo,Integer jarId,Integer jarRegin,Integer status,Integer steId,Integer rgvId,Date ioTime,Date modiTime,Date appeTime,Integer wrkType,Integer wrkSts,Integer ioType,Integer type,Integer rgvEndId) { this.wrkNo = wrkNo; this.enterStaNo = enterStaNo; this.outStaNo = outStaNo; this.jarEnterStaNo = jarEnterStaNo; this.jarOutStaNo = jarOutStaNo; this.jarId = jarId; this.jarRegin = jarRegin; this.status = status; this.steId = steId; this.rgvId = rgvId; this.ioTime = ioTime; this.modiTime = modiTime; this.appeTime = appeTime; this.wrkType = wrkType; this.wrkSts = wrkSts; this.ioType = ioType; this.type = type; this.rgvEndId = rgvEndId; } // WrkMastExecute wrkMastExecute = new WrkMastExecute( // null, // 工作号[非空] // null, // 入库源站点[非空] // null, // 入库目标站点[非空] // null, // 入硫化罐站点[非空] // null, // 出硫化罐站点[非空] // null, // 设备ID[非空] // null, // 区域[非空] // null, // 状态[非空] // null, // 穿梭板[非空] // null, // RGV[非空] // null, // 作业时间 // null, // 创建时间 // null, // 更新时间 // null, // 任务状态[非空] // null, // 工作状态[非空] // null, // 任务类型[非空] // null, // 设备[非空] // null // 尾部穿梭板[非空] // ); public String getIoTime$(){ if (Cools.isEmpty(this.ioTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); } public String getModiTime$(){ if (Cools.isEmpty(this.modiTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); } public String getAppeTime$(){ if (Cools.isEmpty(this.appeTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); } public String getWrkType$(){ if (null == this.wrkType){ return null; } switch (this.wrkType){ case 0: return "初始"; case 1: return "作业中"; case 2: return "完成"; default: return String.valueOf(this.wrkType); } } public String getWrkSts$(){ try{ if (Cools.isEmpty(this.wrkSts)){ return this.wrkSts+":未知"; } // BasJarMastStatusService service = SpringUtils.getBean(BasJarMastStatusService.class); //// BasJarMastStatus basJarMastStatus = service.selectById(this.wrkSts); // BasJarMastStatus basJarMastStatus = service.selectOne(new EntityWrapper().eq("box_type",this.wrkSts.toString())); // if (!Cools.isEmpty(basJarMastStatus)){ // return String.valueOf(basJarMastStatus.getBoxSpecs()); // } if (true){ return this.wrkSts.toString(); } } catch (Exception e){ return this.wrkSts+":未知==>异常:"+e.getMessage(); } return this.wrkSts+":未知"; } //任务类型 0: 未知 1: 开进料门 2: 关进料门 3: 开出料门 4: 关出料门 5: 入硫化罐 6: 入冷却槽 7: 穿梭车进冷却槽 B=>C 8: 穿梭车离开冷却槽 C=>B 9: 出冷却槽 10:A=>B 11:B=>A public String getIoType$(){ if (null == this.ioType){ return "未知"; } switch (this.ioType){ case 0: return "未知"; case 1: return "开进料门"; case 2: return "关进料门"; case 3: return "开出料门"; case 4: return "关出料门"; case 5: return "入硫化罐"; case 6: return "入冷却槽"; case 7: return "B=>C"; case 8: return "C=>B"; case 9: return "出冷却槽"; case 10: return "A=>B"; case 11: return "B=>A"; case 100: return "充电任务"; default: return String.valueOf(this.ioType); } } public String getType$(){ if (null == this.type){ return null; } switch (this.type){ case 0: return "未知"; case 1: return "硫化罐"; case 2: return "冷却槽"; default: return String.valueOf(this.type); } } }