package zy.cloud.wms.manager.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 io.swagger.annotations.ApiModelProperty; import zy.cloud.wms.manager.service.NodeService; import zy.cloud.wms.system.entity.User; import zy.cloud.wms.system.service.UserService; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Date; @TableName("man_check") public class Check implements Serializable { private static final long serialVersionUID = 1L; /** * ID */ @ApiModelProperty(value= "ID") @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 盘点编号 */ @ApiModelProperty(value= "盘点编号") private String uuid; /** * 盘点货位 */ @ApiModelProperty(value= "盘点货位") @TableField("node_id") private Long nodeId; /** * 货位编号 */ @ApiModelProperty(value= "货位编号") @TableField("node_uuid") private String nodeUuid; /** * 货位名称 */ @ApiModelProperty(value= "货位名称") @TableField("loc_no") private String locNo; /** * 商品编号 */ @ApiModelProperty(value= "商品编号") private String matnr; /** * 商品名称 */ @ApiModelProperty(value= "商品名称") private String maktx; /** * 单位 */ @ApiModelProperty(value= "单位") private String unit; /** * 单据类型 */ @ApiModelProperty(value= "单据类型") @TableField("doc_id") private Long docId; /** * 单据编号 */ @ApiModelProperty(value= "单据编号") @TableField("doc_num") private String docNum; /** * 账面数量 */ @ApiModelProperty(value= "账面数量") @TableField("ori_qty") private Double oriQty; /** * 实盘数量 */ @ApiModelProperty(value= "实盘数量") @TableField("cek_qty") private Double cekQty; /** * 差值 */ @ApiModelProperty(value= "差值") @TableField("diff_qty") private Double diffQty; /** * 盈亏 1: 盘盈 2: 盘亏 */ @ApiModelProperty(value= "盈亏 1: 盘盈 2: 盘亏 ") private Integer settle; /** * 状态 1: 正常 0: 禁用 */ @ApiModelProperty(value= "状态 1: 待审核 2: 已通过 0: 取消 ") private Integer status; /** * 添加人员 */ @ApiModelProperty(value= "添加人员") @TableField("create_by") private Long createBy; /** * 添加时间 */ @ApiModelProperty(value= "添加时间") @TableField("create_time") private Date createTime; /** * 修改人员 */ @ApiModelProperty(value= "修改人员") @TableField("update_by") private Long updateBy; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @TableField("update_time") private Date updateTime; /** * 备注 */ @ApiModelProperty(value= "备注") private String memo; public Check() {} public Check(String uuid,Long nodeId,String nodeUuid,String locNo,String matnr,String maktx,String unit,Long docId,String docNum,Double oriQty,Double cekQty,Double diffQty,Integer settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { this.uuid = uuid; this.nodeId = nodeId; this.nodeUuid = nodeUuid; this.locNo = locNo; this.matnr = matnr; this.maktx = maktx; this.unit = unit; this.docId = docId; this.docNum = docNum; this.oriQty = oriQty; this.cekQty = cekQty; this.diffQty = diffQty; this.settle = settle; this.status = status; this.createBy = createBy; this.createTime = createTime; this.updateBy = updateBy; this.updateTime = updateTime; this.memo = memo; } // Check check = new Check( // null, // 盘点编号 // null, // 盘点货位 // null, // 货位编号 // null, // 货位名称 // null, // 商品编号 // null, // 商品名称 // null, // 单位 // null, // 单据类型 // null, // 单据编号 // null, // 账面数量 // null, // 实盘数量 // null, // 盈亏 // null, // 状态 // null, // 添加人员 // null, // 添加时间 // null, // 修改人员 // null, // 修改时间 // null // 备注 // ); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUuid() { return uuid; } public void setUuid(String uuid) { this.uuid = uuid; } public Long getNodeId() { return nodeId; } public String getNodeId$(){ NodeService service = SpringUtils.getBean(NodeService.class); Node node = service.selectById(this.nodeId); if (!Cools.isEmpty(node)){ return String.valueOf(node.getName()); } return null; } public void setNodeId(Long nodeId) { this.nodeId = nodeId; } public String getNodeUuid() { return nodeUuid; } public void setNodeUuid(String nodeUuid) { this.nodeUuid = nodeUuid; } public String getLocNo() { return locNo; } public void setLocNo(String locNo) { this.locNo = locNo; } public String getMatnr() { return matnr; } public void setMatnr(String matnr) { this.matnr = matnr; } public String getMaktx() { return maktx; } public void setMaktx(String maktx) { this.maktx = maktx; } public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } public Long getDocId() { return docId; } public void setDocId(Long docId) { this.docId = docId; } public String getDocNum() { return docNum; } public void setDocNum(String docNum) { this.docNum = docNum; } public Double getOriQty() { return oriQty; } public void setOriQty(Double oriQty) { this.oriQty = oriQty; } public Double getCekQty() { return cekQty; } public void setCekQty(Double cekQty) { this.cekQty = cekQty; } public Double getDiffQty() { return diffQty; } public void setDiffQty(Double diffQty) { this.diffQty = diffQty; } public Integer getSettle() { return settle; } public String getSettle$(){ if (null == this.settle){ return null; } switch (this.settle){ case 1: return "盘盈"; case 2: return "盘亏"; default: return String.valueOf(this.settle); } } public void setSettle(Integer settle) { this.settle = settle; } public Integer getStatus() { return status; } public String getStatus$(){ if (null == this.status){ return null; } switch (this.status){ case 1: return "待审核"; case 2: return "已通过"; case 0: return "取消"; default: return String.valueOf(this.status); } } public void setStatus(Integer status) { this.status = status; } public Long getCreateBy() { return createBy; } public String getCreateBy$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.createBy); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public void setCreateBy(Long createBy) { this.createBy = createBy; } public Date getCreateTime() { return createTime; } public String getCreateTime$(){ if (Cools.isEmpty(this.createTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Long getUpdateBy() { return updateBy; } public String getUpdateBy$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.updateBy); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public void setUpdateBy(Long updateBy) { this.updateBy = updateBy; } public Date getUpdateTime() { return updateTime; } public String getUpdateTime$(){ if (Cools.isEmpty(this.updateTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } }