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 java.text.SimpleDateFormat;
|
import java.util.Date;
|
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_item")
|
public class Item implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* ID
|
*/
|
@ApiModelProperty(value= "ID")
|
private Long id;
|
|
/**
|
* 项目编号
|
*/
|
@ApiModelProperty(value= "项目编号")
|
@TableId(value = "uuid", type = IdType.INPUT)
|
private String uuid;
|
|
/**
|
* 项目名称
|
*/
|
@ApiModelProperty(value= "项目名称")
|
private String name;
|
|
/**
|
* 内部编号
|
*/
|
@ApiModelProperty(value= "内部编号")
|
private String inUuid;
|
|
/**
|
* 客户编号
|
*/
|
@ApiModelProperty(value= "客户编号")
|
private String cstmrUuid;
|
|
/**
|
* 客户
|
*/
|
@ApiModelProperty(value= "客户")
|
private String cstmr;
|
|
/**
|
* 项目成员
|
*/
|
@ApiModelProperty(value= "项目成员")
|
private String member;
|
|
/**
|
* 项目经理
|
*/
|
@ApiModelProperty(value= "项目经理")
|
private String leader;
|
|
/**
|
* 开始时间
|
*/
|
@ApiModelProperty(value= "开始时间")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date startTime;
|
|
/**
|
* 结束时间
|
*/
|
@ApiModelProperty(value= "结束时间")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date endTime;
|
|
/**
|
* 状态 1: 正常 0: 禁用
|
*/
|
@ApiModelProperty(value= "状态 1: 正常 0: 禁用 ")
|
private Integer status;
|
|
/**
|
* 添加人员
|
*/
|
@ApiModelProperty(value= "添加人员")
|
private Long createBy;
|
|
/**
|
* 添加时间
|
*/
|
@ApiModelProperty(value= "添加时间")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/**
|
* 修改人员
|
*/
|
@ApiModelProperty(value= "修改人员")
|
private Long updateBy;
|
|
/**
|
* 修改时间
|
*/
|
@ApiModelProperty(value= "修改时间")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date updateTime;
|
|
/**
|
* 备注
|
*/
|
@ApiModelProperty(value= "备注")
|
private String memo;
|
|
/**
|
* 授权商户
|
*/
|
@ApiModelProperty(value= "授权商户")
|
private Long hostId;
|
|
public Item() {}
|
|
public Item(String uuid,String name,String inUuid,String cstmrUuid,String cstmr,String member,String leader,Date startTime,Date endTime,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Long hostId) {
|
this.uuid = uuid;
|
this.name = name;
|
this.inUuid = inUuid;
|
this.cstmrUuid = cstmrUuid;
|
this.cstmr = cstmr;
|
this.member = member;
|
this.leader = leader;
|
this.startTime = startTime;
|
this.endTime = endTime;
|
this.status = status;
|
this.createBy = createBy;
|
this.createTime = createTime;
|
this.updateBy = updateBy;
|
this.updateTime = updateTime;
|
this.memo = memo;
|
this.hostId = hostId;
|
}
|
|
// Item item = new Item(
|
// null, // 项目编号[非空]
|
// null, // 项目名称
|
// null, // 内部编号
|
// null, // 客户编号
|
// null, // 客户
|
// null, // 项目成员
|
// null, // 项目经理
|
// null, // 开始时间
|
// null, // 结束时间
|
// null, // 状态
|
// null, // 添加人员
|
// null, // 添加时间
|
// null, // 修改人员
|
// null, // 修改时间
|
// null, // 备注
|
// null // 授权商户
|
// );
|
|
public String getStartTime$(){
|
if (Cools.isEmpty(this.startTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.startTime);
|
}
|
|
public String getEndTime$(){
|
if (Cools.isEmpty(this.endTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.endTime);
|
}
|
|
public String getStatus$(){
|
if (null == this.status){ return null; }
|
switch (this.status){
|
case 1:
|
return "正常";
|
case 0:
|
return "禁用";
|
default:
|
return String.valueOf(this.status);
|
}
|
}
|
|
public String getCreateBy$(){
|
UserService service = SpringUtils.getBean(UserService.class);
|
User user = service.getById(this.createBy);
|
if (!Cools.isEmpty(user)){
|
return String.valueOf(user.getNickname());
|
}
|
return null;
|
}
|
|
public String getCreateTime$(){
|
if (Cools.isEmpty(this.createTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
|
}
|
|
public String getUpdateBy$(){
|
UserService service = SpringUtils.getBean(UserService.class);
|
User user = service.getById(this.updateBy);
|
if (!Cools.isEmpty(user)){
|
return String.valueOf(user.getNickname());
|
}
|
return null;
|
}
|
|
public String getUpdateTime$(){
|
if (Cools.isEmpty(this.updateTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
|
}
|
|
public String getHostId$(){
|
HostService service = SpringUtils.getBean(HostService.class);
|
Host host = service.getById(this.hostId);
|
if (!Cools.isEmpty(host)){
|
return String.valueOf(host.getName());
|
}
|
return null;
|
}
|
|
|
}
|