中扬CRM客户关系管理系统
#
LSH
2023-11-10 2a08b97f0aad3af5d981a722efb218fb201f821f
src/main/java/com/zy/crm/manager/entity/PriOnline2.java
@@ -8,7 +8,9 @@
import com.core.common.SpringUtils;
import com.zy.crm.manager.service.CstmrService;
import com.zy.crm.manager.service.PlanService;
import com.zy.crm.system.entity.Dept;
import com.zy.crm.system.entity.User;
import com.zy.crm.system.service.DeptService;
import com.zy.crm.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -44,6 +46,20 @@
    @TableField("sheet_data")
    private String sheetData;
    /**
     * excel表标题
     */
    @ApiModelProperty(value= "excel表标题")
    @TableField("sales_title")
    private String salesTitle;
    /**
     * excel表数据
     */
    @ApiModelProperty(value= "excel表数据")
    @TableField("sales_sheet_data")
    private String salesSheetData;
    @ApiModelProperty(value= "文件保存地址")
    private String filepath;
@@ -55,7 +71,7 @@
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value= "项目id{man_item}")
    @ApiModelProperty(value= "规划单ID plan_id")
    @TableField("item_id")
    private Long itemId;
@@ -96,17 +112,94 @@
    @TableField("member_id")
    private Long memberId;
    @ApiModelProperty(value= "规划单ID")
    @TableField("plan_id")
    private Long planId;
    @ApiModelProperty(value= "上传报价excel数据的原始文件地址")
    @TableField("check_data_file")
    private String checkDataFile;
    /**
     * hostId
     */
    @ApiModelProperty(value= "hostId")
    @TableField("host_id")
    private Long hostId;
    /**
     * 进度
     */
    @ApiModelProperty(value= "进度")
    private Integer settle;
    /**
     * 进度
     */
    @ApiModelProperty(value= "进度")
    @TableField("settle_size")
    private Integer settleSize;
    /**
     * 流程进度
     */
    @ApiModelProperty(value= "流程进度")
    @TableField("settle_msg")
    private String settleMsg;
    @ApiModelProperty(value= "")
    private String form;
    /**
     * 集成项目货架核价状态
     */
    @ApiModelProperty(value = "状态 3: 完成核价 2: 开始核价 1: 等待核价  0: 初始  ")
    private Integer status2;
    /**
     * 节点负责人
     */
    @ApiModelProperty(value = "副planId")
    @TableField("assistant_plan_id")
    private Long assistantPlanId;
    /**
     * 节点负责人
     */
    @ApiModelProperty(value = "主planId")
    @TableField("host_plan_id")
    private Long hostPlanId;
    /**
     * 节点负责人
     */
    @ApiModelProperty(value = "副planId")
    @TableField("assistant_pri_id")
    private Long assistantPriId;
    /**
     * 节点负责人
     */
    @ApiModelProperty(value = "主planId")
    @TableField("host_pri_id")
    private Long hostPriId;
    /**
     * 节点负责人
     */
    @ApiModelProperty(value = "主planId")
    @TableField("assistant_host_sign")
    private Integer assistantHostSign;
    public PriOnline2() {}
    public PriOnline2(String title, String sheetData, Date createTime, String filepath) {
    public PriOnline2(String title, String sheetData, Date createTime, String filepath,Integer settle,Integer settleSize) {
        this.title = title;
        this.sheetData = sheetData;
        this.createTime = createTime;
        this.filepath = filepath;
        this.settle = settle;
        this.settleSize = settleSize;
    }
//    PriOnline priOnline = new PriOnline(
@@ -114,6 +207,36 @@
//            null,    // excel表数据
//            null    // 创建时间
//    );
    public String getSettle$(){
        if (null == this.settle){ return null; }
        switch (this.settle){
            case 0:
                return "等待提交";
            case 1:
                return "等待确认";
            case 2:
                return this.settleSize.equals(this.settle+1)? "审批通过" : "等待确认";
            case 3:
                return "审批通过";
            default:
                return String.valueOf(this.settle);
        }
    }
    public String getAssistantHostSign$() {
        if (null == this.assistantHostSign) {
            return null;
        }
        switch (this.assistantHostSign) {
            case 1:
                return "副流程";
            case 0:
                return "主流程";
            default:
                return String.valueOf(this.assistantHostSign);
        }
    }
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
@@ -139,8 +262,10 @@
//    }
    public Long getCstmrId$(){
        PlanService planService = SpringUtils.getBean(PlanService.class);
        Plan plan = planService.selectById(this.itemId);
        CstmrService cstmrService = SpringUtils.getBean(CstmrService.class);
        Cstmr cstmr = cstmrService.selectByName(1L, this.templateName);
        Cstmr cstmr = cstmrService.selectById(plan.getCstmrId());
        if (!Cools.isEmpty(cstmr)){
            return cstmr.getId();
        }
@@ -165,6 +290,15 @@
        return null;
    }
    public String getDeptId$(){
        DeptService service = SpringUtils.getBean(DeptService.class);
        Dept dept = service.selectById(this.deptId);
        if (!Cools.isEmpty(dept)){
            return String.valueOf(dept.getName());
        }
        return null;
    }
    public String getUpdateUserId$() {
        UserService userService = SpringUtils.getBean(UserService.class);
        User user = userService.selectById(this.updateUserId);
@@ -183,15 +317,50 @@
        return null;
    }
    public String getStatus$() {
        if (null == this.status){ return null; }
        switch (this.status){
    public String getStatusAll$(){
        PlanService planService = SpringUtils.getBean(PlanService.class);
        Plan plan = planService.selectById(this.itemId);
        if (plan.getStatus2()>3 || (!Cools.isEmpty(this.getAssistantHostSign()) && this.getAssistantHostSign()==1)){
            return getStatus$();
        }else {
            return "集成"+getStatus$()+"/"+"货架"+getStatus2$();
        }
    }
    public String getStatus$(){
        PlanService planService = SpringUtils.getBean(PlanService.class);
        Plan plan = planService.selectById(this.itemId);
        if (null == plan.getStatus()){ return null; }
        switch (plan.getStatus()){
            case 3:
                return "完成核价";
            case 2:
                return "开始核价";
            case 1:
                return "已完成";
                return "等待核价";
            case 0:
                return "未完成";
                return "初始";
            default:
                return String.valueOf(this.status);
                return String.valueOf(plan.getStatus());
        }
    }
    public String getStatus2$(){
        PlanService planService = SpringUtils.getBean(PlanService.class);
        Plan plan = planService.selectById(this.itemId);
        if (null == plan.getStatus2()){ return null; }
        switch (plan.getStatus2()){
            case 3:
                return "完成核价";
            case 2:
                return "开始核价";
            case 1:
                return "等待核价";
            case 0:
                return "初始";
            default:
                return String.valueOf(plan.getStatus2());
        }
    }