| | |
| | | @RequestParam(required = false) String condition, |
| | | @RequestParam(required = false, value = "dept_id") Long deptId, |
| | | @RequestParam(required = false, value = "user_id") Long userId) { |
| | | Long director = null; |
| | | if (deptId==null && userId == null){ |
| | | if (getRole().getId()==3){ |
| | | userId = getUserId(); |
| | | }else if (getRole().getId()==2){ |
| | | deptId = getDeptId(); |
| | | userId = null; |
| | | } |
| | | director = getUserId(); |
| | | } |
| | | |
| | | return R.ok(planService.getPage(new Page<>(curr, limit) |
| | | , getHostId() |
| | | , deptId == null ? (userId == null? getDeptId().toString(): null) : String.valueOf(deptId) |
| | | , deptId == null ? null : String.valueOf(deptId) |
| | | , userId |
| | | , director |
| | | , condition) |
| | | ); |
| | | } |
| | |
| | | |
| | | List<Long> typeList = new ArrayList<>(); |
| | | List<PlanType> planTypes = planTypeService.selectList(new EntityWrapper<PlanType>().eq("type", type)); |
| | | if (type==1){ |
| | | planTypes = planTypeService.selectList(new EntityWrapper<PlanType>()); |
| | | } |
| | | for (PlanType planType : planTypes){ |
| | | typeList.add(planType.getId()); |
| | | } |