| | |
| | | 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); // 规划组长待审 |
| | |
| | | } |
| | | |
| | | // 添加规划组长跟进人 |
| | | PlanFoll planFoll = new PlanFoll(); |
| | | planFoll.setPlanId(plan.getId()); |
| | | planFoll.setUserId(planLeader.getId()); |
| | | if (!planFollService.insert(planFoll)) { |
| | | throw new CoolException("审核失败,请联系管理员"); |
| | | } |
| | | |
| | | } else { |
| | | return R.error("抱歉,您没有审核的权限"); |