中扬CRM客户关系管理系统
#
luxiaotao1123
2022-11-25 4d2d8d672015c4d741c41026c6efbbdc4bb05df3
src/main/java/com/zy/crm/manager/controller/PlanController.java
@@ -184,8 +184,14 @@
                if (manager.getId().equals(getUserId())) {
                    // 查找规划组长
                    PlanType planType = planTypeService.selectById(plan.getPlanType());
                    User planLeader = planTypeService.findPlanLeader(planType);
                    if (Cools.isEmpty(planLeader)) {
                        throw new CoolException("未查找到规划组长,请联系管理员");
                    }
                    // 修改 settle 步骤数据 todo
                    plan.setSettleMsg(JSON.toJSONString(SettleDto.init(plan, manager)));
                    // 修改 settle 步骤数据
                    // 修改规划单状态
                    plan.setSettle(2);  // 规划组长待审
@@ -197,6 +203,12 @@
                    }
                    // 添加规划组长跟进人
                    PlanFoll planFoll = new PlanFoll();
                    planFoll.setPlanId(plan.getId());
                    planFoll.setUserId(planLeader.getId());
                    if (!planFollService.insert(planFoll)) {
                        throw new CoolException("审核失败,请联系管理员");
                    }
                } else {
                    return R.error("抱歉,您没有审核的权限");