| | |
| | | @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 ? null : String.valueOf(deptId) |
| | | , userId == null ? getUserId() : userId |
| | | , userId |
| | | , director |
| | | , condition) |
| | | ); |
| | | } |
| | |
| | | ProcessPermissions processPermissions2 = processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 5).eq("process", "1-2"));//2:核价流程 |
| | | User manager2 = userService.selectById(processPermissions2.getUserId()); // 获取核价流程节点1确认人 |
| | | |
| | | ProcessPermissions processPermissions3= processPermissionsService.selectOne(new EntityWrapper<ProcessPermissions>().eq("process_memo", 5).eq("process", "1-3"));//2:核价流程 |
| | | User manager3 = userService.selectById(processPermissions3.getUserId()); // 获取核价流程节点1确认人 |
| | | |
| | | int type =0; |
| | | if (getUserId().equals(manager1.getId())){ |
| | | type=1;//(货架) |
| | | }else if (getUserId().equals(manager2.getId())){ |
| | | }else if (getUserId().equals(manager2.getId()) || getUserId().equals(manager3.getId())){ |
| | | type = 2;//(集成) |
| | | }else { |
| | | return R.error("你不是核价员,无权接任务"); |
| | | } |
| | | |
| | | List<Long> typeList = new ArrayList<>(); |
| | | 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>()); |
| | | } |
| | | if (Cools.isEmpty(planTypes) || planTypes.size()==0){ |
| | | return R.ok(); |
| | | } |
| | | for (PlanType planType : planTypes){ |
| | | typeList.add(planType.getId()); |
| | | } |