package zy.cloud.wms.common.entity;
|
|
import com.baomidou.mybatisplus.annotations.TableId;
|
import com.baomidou.mybatisplus.enums.IdType;
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
import com.core.common.Cools;
|
import com.core.common.SpringUtils;
|
import com.core.exception.CoolException;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import com.baomidou.mybatisplus.annotations.TableField;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import org.springframework.format.annotation.DateTimeFormat;
|
import io.swagger.annotations.ApiModelProperty;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
|
import com.baomidou.mybatisplus.annotations.TableName;
|
import zy.cloud.wms.manager.entity.Cstmr;
|
import zy.cloud.wms.manager.entity.ProjectType;
|
import zy.cloud.wms.manager.service.CstmrService;
|
import zy.cloud.wms.manager.service.ProjectTypeService;
|
import zy.cloud.wms.system.entity.User;
|
import zy.cloud.wms.system.service.UserService;
|
|
import java.io.Serializable;
|
@Data
|
@TableName("man_sale_project")
|
public class SaleProject implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* 唯一ID
|
*/
|
@TableId(value = "id", type = IdType.AUTO)
|
@ApiModelProperty(value= "唯一ID")
|
private Long id;
|
|
@ApiModelProperty(value= "")
|
@TableField("update_by")
|
private Long updateBy;
|
|
@ApiModelProperty(value= "")
|
@TableField("update_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date updateTime;
|
|
@ApiModelProperty(value= "")
|
@TableField("create_by")
|
private Long createBy;
|
|
@ApiModelProperty(value= "")
|
@TableField("create_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/**
|
* 状态,暂未启用
|
*/
|
@ApiModelProperty(value= "状态,暂未启用")
|
private Integer status;
|
|
/**
|
* 业务员
|
*/
|
@ApiModelProperty(value= "业务员")
|
private Long saleman;
|
|
/**
|
* 客户名称
|
*/
|
@ApiModelProperty(value= "客户名称")
|
@TableField("cust_id")
|
private Long custId;
|
|
/**
|
* 项目地址
|
*/
|
@ApiModelProperty(value= "项目地址")
|
@TableField("project_addr")
|
private String projectAddr;
|
|
/**
|
* 项目类型
|
*/
|
@ApiModelProperty(value= "项目类型")
|
@TableField("project_type")
|
private Integer projectType;
|
|
|
@TableField("warehouse_size")
|
private String warehouseSize;
|
|
/**
|
* 货物尺寸
|
*/
|
@ApiModelProperty(value= "货物尺寸")
|
@TableField("goods_size")
|
private String goodsSize;
|
|
/**
|
* 货物重量
|
*/
|
@ApiModelProperty(value= "货物重量")
|
@TableField("goods_weight")
|
private String goodsWeight;
|
|
/**
|
* 厂房情况 1: 新建 2: 旧改
|
*/
|
@ApiModelProperty(value= "厂房情况 1: 新建 2: 旧改 ")
|
@TableField("warehouse_status")
|
private Integer warehouseStatus;
|
|
/**
|
* 规划方案
|
*/
|
@ApiModelProperty(value= "规划方案")
|
@TableField("project_scheme")
|
private String projectScheme;
|
|
/**
|
* 报价阶段
|
*/
|
@ApiModelProperty(value= "报价阶段")
|
private String offer;
|
|
@TableField("bid")
|
private String bid;
|
|
/**
|
* 堆垛机数量
|
*/
|
@ApiModelProperty(value= "堆垛机数量")
|
@TableField("crn_num")
|
private Integer crnNum;
|
|
@TableField("shelf_height")
|
private String shelfHeight;
|
|
/**
|
* 货位数
|
*/
|
@ApiModelProperty(value= "货位数")
|
@TableField("storage_num")
|
private String storageNum;
|
|
/**
|
* 项目金额
|
*/
|
@ApiModelProperty(value= "项目金额")
|
@TableField("project_fee")
|
private String projectFee;
|
|
/**
|
* 成功率
|
*/
|
@ApiModelProperty(value= "成功率")
|
@TableField("success_percentage")
|
private String successPercentage;
|
|
/**
|
* 最近一次联系日期
|
*/
|
@ApiModelProperty(value= "最近一次联系日期")
|
@TableField("last_contact")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date lastContact;
|
|
/**
|
* 备注
|
*/
|
@ApiModelProperty(value= "备注")
|
private String memo;
|
|
public SaleProject() {}
|
|
public SaleProject(Long updateBy,Date updateTime,Long createBy,Date createTime,Integer status,Long saleman,Long custId,String projectAddr,Integer projectType,String goodsSize,String goodsWeight,Integer warehouseStatus,String projectScheme,String offer,Integer crnNum,String storageNum,String projectFee,String successPercentage,Date lastContact,String memo) {
|
this.updateBy = updateBy;
|
this.updateTime = updateTime;
|
this.createBy = createBy;
|
this.createTime = createTime;
|
this.status = status;
|
this.saleman = saleman;
|
this.custId = custId;
|
this.projectAddr = projectAddr;
|
this.projectType = projectType;
|
this.goodsSize = goodsSize;
|
this.goodsWeight = goodsWeight;
|
this.warehouseStatus = warehouseStatus;
|
this.projectScheme = projectScheme;
|
this.offer = offer;
|
this.crnNum = crnNum;
|
this.storageNum = storageNum;
|
this.projectFee = projectFee;
|
this.successPercentage = successPercentage;
|
this.lastContact = lastContact;
|
this.memo = memo;
|
}
|
|
// SaleProject saleProject = new SaleProject(
|
// null, //
|
// null, //
|
// 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 Long getUpdateBy() {
|
return updateBy;
|
}
|
|
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 Long getCreateBy() {
|
return createBy;
|
}
|
|
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 Integer getStatus() {
|
return status;
|
}
|
|
public void setStatus(Integer status) {
|
this.status = status;
|
}
|
|
public Long getSaleman() {
|
return saleman;
|
}
|
|
public void setSaleman(Long saleman) {
|
this.saleman = saleman;
|
}
|
|
public Long getCustId() {
|
return custId;
|
}
|
|
public void setCustId(Long custId) {
|
this.custId = custId;
|
}
|
|
public String getProjectAddr() {
|
return projectAddr;
|
}
|
|
public void setProjectAddr(String projectAddr) {
|
this.projectAddr = projectAddr;
|
}
|
|
public Integer getProjectType() {
|
return projectType;
|
}
|
|
public void setProjectType(Integer projectType) {
|
this.projectType = projectType;
|
}
|
|
public String getGoodsSize() {
|
return goodsSize;
|
}
|
|
public void setGoodsSize(String goodsSize) {
|
this.goodsSize = goodsSize;
|
}
|
|
public String getGoodsWeight() {
|
return goodsWeight;
|
}
|
|
public void setGoodsWeight(String goodsWeight) {
|
this.goodsWeight = goodsWeight;
|
}
|
|
public Integer getWarehouseStatus() {
|
return warehouseStatus;
|
}
|
|
public String getWarehouseStatus$(){
|
if (null == this.warehouseStatus){ return null; }
|
switch (this.warehouseStatus){
|
case 1:
|
return "新建";
|
case 2:
|
return "旧改";
|
default:
|
return String.valueOf(this.warehouseStatus);
|
}
|
}
|
|
public void setWarehouseStatus(Integer warehouseStatus) {
|
this.warehouseStatus = warehouseStatus;
|
}
|
|
public String getProjectScheme() {
|
return projectScheme;
|
}
|
|
public void setProjectScheme(String projectScheme) {
|
this.projectScheme = projectScheme;
|
}
|
|
public String getOffer() {
|
return offer;
|
}
|
|
public void setOffer(String offer) {
|
this.offer = offer;
|
}
|
|
public Integer getCrnNum() {
|
return crnNum;
|
}
|
|
public void setCrnNum(Integer crnNum) {
|
this.crnNum = crnNum;
|
}
|
|
public String getStorageNum() {
|
return storageNum;
|
}
|
|
public void setStorageNum(String storageNum) {
|
this.storageNum = storageNum;
|
}
|
|
public String getProjectFee() {
|
return projectFee;
|
}
|
|
public void setProjectFee(String projectFee) {
|
this.projectFee = projectFee;
|
}
|
|
public String getSuccessPercentage() {
|
return successPercentage;
|
}
|
|
public void setSuccessPercentage(String successPercentage) {
|
this.successPercentage = successPercentage;
|
}
|
|
public Date getLastContact() {
|
return lastContact;
|
}
|
|
public String getLastContact$(){
|
if (Cools.isEmpty(this.lastContact)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd").format(this.lastContact);
|
}
|
|
public void setLastContact(Date lastContact) {
|
this.lastContact = lastContact;
|
}
|
|
public String getMemo() {
|
return memo;
|
}
|
|
public void setMemo(String memo) {
|
this.memo = memo;
|
}
|
|
/**
|
* 获取业务员
|
* @return
|
*/
|
public String getSaleman$(){
|
UserService bean = SpringUtils.getBean(UserService.class);
|
User user = bean.selectOne(new EntityWrapper<User>()
|
.eq("id", this.getSaleman()));
|
if (!Cools.isEmpty(user)) {
|
|
return user.getUsername();
|
}
|
return "";
|
}
|
|
/**
|
* 获取客户名
|
* @return
|
*/
|
public String getCustId$(){
|
CstmrService bean = SpringUtils.getBean(CstmrService.class);
|
Cstmr id1 = bean.selectOne(new EntityWrapper<Cstmr>()
|
.eq("id", this.getCustId()));
|
if (!Cools.isEmpty(id1)) {
|
|
return id1.getName();
|
}
|
return "";
|
}
|
|
/**
|
* 获取项目地址
|
* @return
|
*/
|
public String getprojectAddr$(){
|
CstmrService bean = SpringUtils.getBean(CstmrService.class);
|
Cstmr id1 = bean.selectOne(new EntityWrapper<Cstmr>()
|
.eq("id", this.getCustId()));
|
if (!Cools.isEmpty(id1)) {
|
|
return id1.getAddr();
|
}
|
return "";
|
}
|
|
/**
|
* 获取项目类型
|
*/
|
|
public String getProjectType$(){
|
ProjectTypeService bean = SpringUtils.getBean(ProjectTypeService.class);
|
ProjectType id1 = bean.selectOne(new EntityWrapper<ProjectType>()
|
.eq("id", this.projectType));
|
if (!Cools.isEmpty(id1)) {
|
return id1.getTypeName();
|
}
|
return "";
|
}
|
|
/**
|
* 给货物重量添加KG
|
* @return
|
*/
|
public String getGoodsWeight$(){
|
return this.goodsWeight + "KG";
|
}
|
|
/**
|
* 转换为√和×
|
* @return
|
*/
|
public String getProjectScheme$(){
|
if (Cools.isEmpty(this.projectScheme)) {
|
return "×";
|
}
|
if (this.projectScheme.equals("1")){
|
return "√";
|
}else {
|
return "×";
|
}
|
}
|
public String getOffer$(){
|
if (Cools.isEmpty(this.offer)) {
|
return "×";
|
}
|
if (this.offer.equals("1")){
|
return "√";
|
}else {
|
return "×";
|
}
|
}
|
public String getBid$(){
|
if (Cools.isEmpty(this.bid)) {
|
return "×";
|
}
|
if (this.bid.equals("1")){
|
return "√";
|
}else {
|
return "×";
|
}
|
}
|
|
public String getSuccessPercentage$(){
|
return this.successPercentage + "%";
|
}
|
}
|