package com.zy.asrs.entity;
|
|
import com.baomidou.mybatisplus.annotations.TableField;
|
import com.baomidou.mybatisplus.annotations.TableId;
|
import com.baomidou.mybatisplus.annotations.TableName;
|
import com.baomidou.mybatisplus.enums.IdType;
|
import com.core.common.Cools;
|
import com.core.common.SpringUtils;
|
import com.zy.asrs.service.LocMastService;
|
import com.zy.system.entity.User;
|
import com.zy.system.service.UserService;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
|
import java.io.Serializable;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
|
@Data
|
@TableName("asr_adj_detl")
|
public class AdjDetl implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* 序号
|
*/
|
@ApiModelProperty(value= "序号")
|
@TableId(value = "adj_id", type = IdType.AUTO)
|
@TableField("adj_id")
|
private Long adjId;
|
|
/**
|
* 库位号
|
*/
|
@ApiModelProperty(value= "库位号")
|
@TableField("loc_no")
|
private String locNo;
|
|
/**
|
* 商品编号
|
*/
|
@ApiModelProperty(value= "商品编号")
|
private String matnr;
|
|
/**
|
* 批号
|
*/
|
@ApiModelProperty(value= "批号")
|
private String batch;
|
|
/**
|
* 原箱数
|
*/
|
@ApiModelProperty(value= "原箱数")
|
@TableField("ori_ctns")
|
private Double oriCtns;
|
|
/**
|
* 原数量
|
*/
|
@ApiModelProperty(value= "原数量")
|
@TableField("ori_qty")
|
private Double oriQty;
|
|
/**
|
* 原重量
|
*/
|
@ApiModelProperty(value= "原重量")
|
@TableField("ori_wt")
|
private Double oriWt;
|
|
/**
|
* 变更箱数
|
*/
|
@ApiModelProperty(value= "变更箱数")
|
@TableField("adj_ctns")
|
private Double adjCtns;
|
|
/**
|
* 变更数量
|
*/
|
@ApiModelProperty(value= "变更数量")
|
@TableField("adj_qty")
|
private Double adjQty;
|
|
/**
|
* 变更重量
|
*/
|
@ApiModelProperty(value= "变更重量")
|
@TableField("adj_wt")
|
private Double adjWt;
|
|
/**
|
* 备注
|
*/
|
@ApiModelProperty(value= "备注")
|
private String memo;
|
|
/**
|
* 修改人员
|
*/
|
@ApiModelProperty(value= "修改人员")
|
@TableField("modi_user")
|
private Long modiUser;
|
|
/**
|
* 修改时间
|
*/
|
@ApiModelProperty(value= "修改时间")
|
@TableField("modi_time")
|
private Date modiTime;
|
|
/**
|
* 创建者
|
*/
|
@ApiModelProperty(value= "创建者")
|
@TableField("appe_user")
|
private Long appeUser;
|
|
/**
|
* 添加时间
|
*/
|
@ApiModelProperty(value= "添加时间")
|
@TableField("appe_time")
|
private Date appeTime;
|
|
public AdjDetl() {}
|
|
public AdjDetl(String locNo, String matnr, String batch, Double oriCtns, Double oriQty, Double oriWt, Double adjCtns, Double adjQty, Double adjWt, String memo, Long modiUser, Date modiTime, Long appeUser, Date appeTime) {
|
this.locNo = locNo;
|
this.matnr = matnr;
|
this.batch = batch;
|
this.oriCtns = oriCtns;
|
this.oriQty = oriQty;
|
this.oriWt = oriWt;
|
this.adjCtns = adjCtns;
|
this.adjQty = adjQty;
|
this.adjWt = adjWt;
|
this.memo = memo;
|
this.modiUser = modiUser;
|
this.modiTime = modiTime;
|
this.appeUser = appeUser;
|
this.appeTime = appeTime;
|
}
|
|
// AdjDetl adjDetl = new AdjDetl(
|
// null, // 库位号[非空]
|
// null, // 物料编号[非空]
|
// null, // 序列码
|
// null, // 原箱数
|
// null, // 原数量
|
// null, // 原重量
|
// null, // 变更箱数
|
// null, // 变更数量
|
// null, // 变更重量
|
// null, // 备注
|
// null, // 修改人员
|
// null, // 修改时间
|
// null, // 创建者
|
// null // 添加时间
|
// );
|
|
|
public String getLocNo$(){
|
LocMastService service = SpringUtils.getBean(LocMastService.class);
|
LocMast locMast = service.selectById(this.locNo);
|
if (!Cools.isEmpty(locMast)){
|
return String.valueOf(locMast.getLocNo());
|
}
|
return null;
|
}
|
|
|
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 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);
|
}
|
|
}
|