| | |
| | | |
| | | @PostMapping(value = "/plan/approval/auth") |
| | | @ManagerAuth |
| | | public R approval(@RequestParam Long planId){ |
| | | public R approval(@RequestParam Long planId, |
| | | @RequestParam(required = false) Long planner){ |
| | | Plan plan = planService.selectById(planId); |
| | | assert plan != null; |
| | | |
| | |
| | | default: |
| | | return R.error(); |
| | | } |
| | | |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping(value = "/plan/planner/list/auth") |
| | | @ManagerAuth |
| | | public R plannerList(@RequestParam Long planId){ |
| | | Plan plan = planService.selectById(planId); |
| | | assert plan != null; |
| | | |
| | | if (plan.getSettle() != 2) { |
| | | return R.error(); |
| | | } |
| | | // 查找规划组长 |
| | | PlanType planType = planTypeService.selectById(plan.getPlanType()); |
| | | User planLeader = planTypeService.findPlanLeader(planType); |
| | | if (Cools.isEmpty(planLeader)) { |
| | | throw new CoolException("未查找到规划组长,请联系管理员"); |
| | | } |
| | | if (!getUserId().equals(planLeader.getId())) { |
| | | return R.error("抱歉,您没有审核的权限"); |
| | | } |
| | | // 获取当期规划组所有成员 |
| | | List<User> users = userService.selectList(new EntityWrapper<User>().eq("dept_id", planLeader.getDeptId())); |
| | | return R.ok().add(users); |
| | | } |
| | | |
| | | @RequestMapping(value = "/planQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |