package com.zy.asrs.entity; import com.core.common.Cools;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 com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.enums.IdType; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import com.baomidou.mybatisplus.annotations.TableName; import java.io.Serializable; @Data @TableName("asr_bas_devp_opt") public class BasDevpOpt implements Serializable { private static final long serialVersionUID = 1L; /** * 任务号 */ @ApiModelProperty(value= "任务号") @TableField("wrk_no") private Integer wrkNo; /** * 下发时间 */ @ApiModelProperty(value= "下发时间") @TableField("send_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date sendTime; /** * 源站 */ @ApiModelProperty(value= "源站") @TableField("source_sta") private Integer sourceSta; /** * 目标站 */ @ApiModelProperty(value= "目标站") @TableField("pos_sta") private Integer posSta; /** * 响应结果 1: 正常 0: 失败 */ @ApiModelProperty(value= "响应结果 1: 正常 0: 失败 ") private Integer response; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @TableField("update_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date updateTime; /** * 源站有物状态 */ @ApiModelProperty(value= "源站有物状态") @TableField("source_loading") private String sourceLoading; /** * 目标站有物状态 */ @ApiModelProperty(value= "目标站有物状态") @TableField("pos_loading") private String posLoading; @ApiModelProperty(value= "") @TableId(value = "id", type = IdType.AUTO) private Integer id; @ApiModelProperty(value= "") private String barcode; @ApiModelProperty(value= "") @TableField("front_err") private Long frontErr; @ApiModelProperty(value= "") @TableField("back_err") private Long backErr; @ApiModelProperty(value= "") @TableField("high_err") private Long highErr; @ApiModelProperty(value= "") @TableField("left_err") private Long leftErr; @ApiModelProperty(value= "") @TableField("right_err") private Long rightErr; @ApiModelProperty(value= "") @TableField("barcode_err") private Long barcodeErr; public BasDevpOpt() {} public BasDevpOpt(Integer wrkNo,Date sendTime,Integer sourceSta,Integer posSta,Integer response,Date updateTime,String sourceLoading,String posLoading,String barcode,Long frontErr,Long backErr,Long highErr,Long leftErr,Long rightErr,Long barcodeErr) { this.wrkNo = wrkNo; this.sendTime = sendTime; this.sourceSta = sourceSta; this.posSta = posSta; this.response = response; this.updateTime = updateTime; this.sourceLoading = sourceLoading; this.posLoading = posLoading; this.barcode = barcode; this.frontErr = frontErr; this.backErr = backErr; this.highErr = highErr; this.leftErr = leftErr; this.rightErr = rightErr; this.barcodeErr = barcodeErr; } // BasDevpOpt basDevpOpt = new BasDevpOpt( // null, // 任务号 // null, // 下发时间 // null, // 源站 // null, // 目标站 // null, // 响应结果 // null, // 修改时间 // null, // 源站有物状态 // null, // 目标站有物状态 // null, // // null, // // null, // // null, // // null, // // null, // // null // // ); public String getSendTime$(){ if (Cools.isEmpty(this.sendTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.sendTime); } public String getResponse$(){ if (null == this.response){ return null; } switch (this.response){ case 1: return "正常"; case 0: return "失败"; default: return String.valueOf(this.response); } } public String getUpdateTime$(){ if (Cools.isEmpty(this.updateTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } }