package com.zy.asrs.common.wms.entity; 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.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import com.zy.asrs.framework.common.Cools; import com.zy.asrs.framework.common.SpringUtils; import com.zy.asrs.common.sys.entity.User; import com.zy.asrs.common.sys.entity.Host; import com.zy.asrs.common.sys.service.UserService; import com.zy.asrs.common.sys.service.HostService; import java.io.Serializable; import java.util.Date; @Data @TableName("wms_row_lastno") public class RowLastno implements Serializable { private static final long serialVersionUID = 1L; /** * 类别 */ @ApiModelProperty(value= "类别") @TableId(value = "whs_type", type = IdType.INPUT) private Integer whsType; /** * 当前工作号 */ @ApiModelProperty(value= "当前工作号") private String wrkMk; /** * 当前排号 */ @ApiModelProperty(value= "当前排号") private Integer currentRow; /** * 起始排号 */ @ApiModelProperty(value= "起始排号") private Integer sRow; /** * 终止排号 */ @ApiModelProperty(value= "终止排号") private Integer eRow; /** * 堆垛机数量 */ @ApiModelProperty(value= "堆垛机数量") private Integer crnQty; /** * 备注 */ @ApiModelProperty(value= "备注") private String memo; /** * 修改人员 */ @ApiModelProperty(value= "修改人员") private Long modiUser; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date modiTime; /** * 创建者 */ @ApiModelProperty(value= "创建者") private Long appeUser; /** * 添加时间 */ @ApiModelProperty(value= "添加时间") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date appeTime; @ApiModelProperty(value= "") private Integer limintLoc; public RowLastno() {} public RowLastno(Integer whsType,String wrkMk,Integer currentRow,Integer sRow,Integer eRow,Integer crnQty,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Integer limintLoc) { this.whsType = whsType; this.wrkMk = wrkMk; this.currentRow = currentRow; this.sRow = sRow; this.eRow = eRow; this.crnQty = crnQty; this.memo = memo; this.modiUser = modiUser; this.modiTime = modiTime; this.appeUser = appeUser; this.appeTime = appeTime; this.limintLoc = limintLoc; } // RowLastno rowLastno = new RowLastno( // null, // 类别[非空] // null, // 当前工作号[非空] // null, // 当前排号 // null, // 起始排号 // null, // 终止排号 // null, // 堆垛机数量 // null, // 备注 // null, // 修改人员 // null, // 修改时间 // null, // 创建者 // null, // 添加时间 // null // // ); public String getModiUser$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.getById(this.modiUser); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public String getModiTime$(){ if (Cools.isEmpty(this.modiTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); } public String getAppeUser$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.getById(this.appeUser); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public String getAppeTime$(){ if (Cools.isEmpty(this.appeTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); } }