package com.zy.crm.manager.entity;
|
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
|
import com.baomidou.mybatisplus.enums.IdType;
|
import com.baomidou.mybatisplus.annotations.TableField;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
|
import com.core.common.SpringUtils;
|
import com.zy.crm.manager.service.*;
|
import com.zy.crm.system.entity.User;
|
import com.zy.crm.system.service.UserService;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import com.baomidou.mybatisplus.annotations.TableName;
|
import java.io.Serializable;
|
|
@Data
|
@TableName("man_pri_sales")
|
public class PriSales implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* ID
|
*/
|
@ApiModelProperty(value= "ID")
|
@TableId(value = "id", type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* excel表标题
|
*/
|
@ApiModelProperty(value= "excel表标题")
|
private String title;
|
|
/**
|
* excel表数据
|
*/
|
@ApiModelProperty(value= "excel表数据")
|
@TableField("sheet_data")
|
private String sheetData;
|
|
@ApiModelProperty(value= "文件保存地址")
|
private String filepath;
|
|
/**
|
* 创建时间
|
*/
|
@ApiModelProperty(value= "创建时间")
|
@TableField("create_time")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
@ApiModelProperty(value= "项目id{man_item}")
|
@TableField("item_id")
|
private Long itemId;
|
|
@ApiModelProperty(value= "订单号")
|
@TableField("order_num")
|
private String orderNum;
|
|
@ApiModelProperty(value= "模板名")
|
@TableField("template_name")
|
private String templateName;
|
|
@ApiModelProperty(value= "创建人员")
|
@TableField("user_id")
|
private Long userId;
|
|
@ApiModelProperty(value= "创建部门")
|
@TableField("dept_id")
|
private Long deptId;
|
|
@ApiModelProperty(value= "更新人员")
|
@TableField("update_user_id")
|
private Long updateUserId;
|
|
@ApiModelProperty(value= "更新时间")
|
@TableField("update_time")
|
private Date updateTime;
|
|
@ApiModelProperty(value= "内部编号")
|
@TableField("in_order_num")
|
private String inOrderNum;
|
|
@ApiModelProperty(value= "上级id")
|
@TableField("pri_online2_id")
|
private Long priOnline2Id;
|
|
@ApiModelProperty(value= "业务员")
|
@TableField("member_id")
|
private Long memberId;
|
|
/**
|
* hostId
|
*/
|
@ApiModelProperty(value= "hostId")
|
@TableField("host_id")
|
private Long hostId;
|
|
/**
|
* 进度
|
*/
|
@ApiModelProperty(value= "进度")
|
private Integer settle;
|
|
/**
|
* 流程进度
|
*/
|
@ApiModelProperty(value= "流程进度")
|
@TableField("settle_msg")
|
private String settleMsg;
|
|
public PriSales() {}
|
|
public PriSales(String title,String sheetData,Date createTime,String filepath) {
|
this.title = title;
|
this.sheetData = sheetData;
|
this.createTime = createTime;
|
this.filepath = filepath;
|
}
|
|
public String getSettle$(){
|
if (null == this.settle){ return null; }
|
switch (this.settle){
|
case 0:
|
return "等待提交";
|
case 1:
|
return "等待审批";
|
case 2:
|
return "等待确认";
|
case 3:
|
return "审批通过";
|
default:
|
return String.valueOf(this.settle);
|
}
|
}
|
|
public Long getCstmrId$(){
|
CstmrService cstmrService = SpringUtils.getBean(CstmrService.class);
|
Cstmr cstmr = cstmrService.selectByName(1L, this.templateName);
|
if (!Cools.isEmpty(cstmr)){
|
return cstmr.getId();
|
}
|
return 0L;
|
}
|
|
public String getCreateTime$(){
|
if (Cools.isEmpty(this.createTime)){
|
return "";
|
}
|
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
|
}
|
|
public String getPlanId$() {
|
PlanService planService = SpringUtils.getBean(PlanService.class);
|
Plan plan = planService.selectById(this.itemId);
|
if (!Cools.isEmpty(plan)){
|
return String.valueOf(plan.getUuid());
|
}
|
return null;
|
}
|
public String getPriOnline2Id$() {
|
PriSalesService priSalesService = SpringUtils.getBean(PriSalesService.class);
|
PriSales priSales = priSalesService.selectById(this.priOnline2Id);
|
if (!Cools.isEmpty(priSales)){
|
return String.valueOf(priSales.getId());
|
}
|
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 getUserId$() {
|
UserService userService = SpringUtils.getBean(UserService.class);
|
User user = userService.selectById(this.userId);
|
if (!Cools.isEmpty(user)){
|
return String.valueOf(user.getNickname());
|
}
|
return null;
|
}
|
|
public String getUpdateUserId$() {
|
UserService userService = SpringUtils.getBean(UserService.class);
|
User user = userService.selectById(this.updateUserId);
|
if (!Cools.isEmpty(user)){
|
return String.valueOf(user.getNickname());
|
}
|
return null;
|
}
|
|
public String getMemberId$() {
|
UserService userService = SpringUtils.getBean(UserService.class);
|
User user = userService.selectById(this.memberId);
|
if (!Cools.isEmpty(user)){
|
return String.valueOf(user.getNickname());
|
}
|
return null;
|
}
|
|
}
|