中扬CRM客户关系管理系统
#
luxiaotao1123
2023-07-31 ef8f08ff763cae09314fa90e0582f8f120c62ff1
src/main/java/com/zy/crm/manager/entity/Plan.java
@@ -7,6 +7,7 @@
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.crm.manager.service.CstmrService;
import com.zy.crm.manager.service.OrderService;
import com.zy.crm.manager.service.PlanNeedService;
import com.zy.crm.manager.service.PlanTypeService;
import com.zy.crm.system.entity.Dept;
@@ -95,7 +96,7 @@
     */
    @ApiModelProperty(value= "申请日期")
    @TableField("apple_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date appleTime;
    /**
@@ -103,7 +104,7 @@
     */
    @ApiModelProperty(value= "方案所需")
    @TableField("plan_need")
    private Long planNeed;
    private String planNeed;
    /**
     * 立项 1: 是  0: 否
@@ -122,14 +123,14 @@
     * 规划员
     */
    @ApiModelProperty(value= "规划员")
    private String planner;
    private Long planner;
    /**
     * 完成时间
     */
    @ApiModelProperty(value= "完成时间")
    @TableField("finish_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date finishTime;
    /**
@@ -173,9 +174,9 @@
    private String files;
    /**
     * 进度 1: 开始  2: 组长待审  3: 组长审核  4: 规划待审  5: 规划审核  6: 审批中  7: 审批通过
     * 进度 1: 开始  2: 组长审核  3: 售前组长审核  4: 规划员审核  5: 审批通过
     */
    @ApiModelProperty(value= "进度 1: 开始  2: 组长待审  3: 组长审核  4: 规划待审  5: 规划审核  6: 审批中  7: 审批通过  ")
    @ApiModelProperty(value= "进度 1: 开始  2: 组长审核  3: 售前审核  4: 规划员审核  5: 审批通过  ")
    private Integer settle;
    /**
@@ -235,70 +236,6 @@
    public Plan() {}
    public Plan(Long hostId,Long deptId,Long planType,Long userId,Long orderId,Long cstmrId,String uuid,String name,Date appleTime,Long planNeed,Integer beItem,String planner,Date finishTime,String form,Integer change,Integer changeTime,String changeReason,Double planBonus,Double planLeaderBonus,String files,Integer settle,String settleMsg,String comment,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) {
        this.hostId = hostId;
        this.deptId = deptId;
        this.planType = planType;
        this.userId = userId;
        this.orderId = orderId;
        this.cstmrId = cstmrId;
        this.uuid = uuid;
        this.name = name;
        this.appleTime = appleTime;
        this.planNeed = planNeed;
        this.beItem = beItem;
        this.planner = planner;
        this.finishTime = finishTime;
        this.form = form;
        this.change = change;
        this.changeTime = changeTime;
        this.changeReason = changeReason;
        this.planBonus = planBonus;
        this.planLeaderBonus = planLeaderBonus;
        this.files = files;
        this.settle = settle;
        this.settleMsg = settleMsg;
        this.comment = comment;
        this.status = status;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.memo = memo;
    }
//    Plan plan = new Plan(
//            null,    // 所属商户
//            null,    // 所属部门
//            null,    // 业务类型[非空]
//            null,    // 业务员
//            null,    // 跟踪项目
//            null,    // 甲方单位
//            null,    // 规划单代号[非空]
//            null,    // 规划单名称[非空]
//            null,    // 申请日期
//            null,    // 方案所需
//            null,    // 立项
//            null,    // 规划员
//            null,    // 完成时间
//            null,    // 表单内容
//            null,    // 更改方案
//            null,    // 更改次数
//            null,    // 更改方案原因
//            null,    // 规格奖金
//            null,    // 规格组长奖金
//            null,    // 附件
//            null,    // 进度
//            null,    // 审核进度
//            null,    // 评论
//            null,    // 状态
//            null,    // 添加人员
//            null,    // 添加时间
//            null,    // 修改人员
//            null,    // 修改时间
//            null    // 注释
//    );
    public String getHostId$(){
        HostService service = SpringUtils.getBean(HostService.class);
        Host host = service.selectById(this.hostId);
@@ -336,10 +273,10 @@
    }
    public String getOrderId$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.orderId);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        OrderService service = SpringUtils.getBean(OrderService.class);
        Order order = service.selectById(this.orderId);
        if (!Cools.isEmpty(order)){
            return String.valueOf(order.getName());
        }
        return null;
    }
@@ -357,16 +294,24 @@
        if (Cools.isEmpty(this.appleTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appleTime);
        return new SimpleDateFormat("yyyy-MM-dd").format(this.appleTime);
    }
    public String getPlanNeed$(){
        PlanNeedService service = SpringUtils.getBean(PlanNeedService.class);
        PlanNeed planNeed = service.selectById(this.planNeed);
        if (!Cools.isEmpty(planNeed)){
            return String.valueOf(planNeed.getName());
        if (Cools.isEmpty(this.planNeed)){
            return null;
        }
        return null;
        PlanNeedService service = SpringUtils.getBean(PlanNeedService.class);
        String[] planNeeds = this.planNeed.split("-");
        String name="";
        for (String planNeeda : planNeeds){
            PlanNeed planNeed = service.selectById(Integer.parseInt(planNeeda));
            if (!Cools.isEmpty(planNeed)){
//                return String.valueOf(planNeed.getName());
                name = name+planNeed.getName()+";";
            }
        }
        return name;
    }
    public String getBeItem$(){
@@ -385,7 +330,7 @@
        if (Cools.isEmpty(this.finishTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.finishTime);
        return new SimpleDateFormat("yyyy-MM-dd").format(this.finishTime);
    }
    public String getChange$(){
@@ -404,24 +349,39 @@
        if (null == this.settle){ return null; }
        switch (this.settle){
            case 1:
                return "开始";
                return "等待组长审核";
            case 2:
                return "组长待审";
                return "等待售前分配规划员";
            case 3:
                return "组长审核";
                return "等待规划员提交";
            case 4:
                return "规划待审";
                return "规划员已提交";
            case 5:
                return "规划审核";
            case 6:
                return "审批中";
            case 7:
                return "审批通过";
            default:
                return String.valueOf(this.settle);
        }
    }
    public String getPlanner$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.planner);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return "";
    }
    public String getNowHeadman$(){
        PlanTypeService planTypeService = SpringUtils.getBean(PlanTypeService.class);
        PlanType planType = planTypeService.selectById(this.planType);
        User user = planTypeService.findPlanLeader(planType);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){