| | |
| | | @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(); |
| | |
| | | deptId = getDeptId(); |
| | | userId = null; |
| | | } |
| | | director = getUserId(); |
| | | } |
| | | |
| | | return R.ok(planService.getPage(new Page<>(curr, limit) |
| | | , getHostId() |
| | | , deptId == null ? null : String.valueOf(deptId) |
| | | , userId |
| | | , director |
| | | , condition) |
| | | ); |
| | | } |
| | |
| | | |
| | | Plan selectPlanByNewestUuid(@Param("hostId") Long hostId); |
| | | |
| | | List<Plan> listByPage(Page<Plan> page, @Param("hostId")Long hostId, @Param("deptId") String deptId, @Param("userId") Long userId , @Param("condition") String condition); |
| | | List<Plan> listByPage(Page<Plan> page, @Param("hostId")Long hostId, @Param("deptId") String deptId, @Param("userId") Long userId ,@Param("director")Long director, @Param("condition") String condition); |
| | | |
| | | } |
| | |
| | | |
| | | String getUuid(Long hostId); |
| | | |
| | | Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId, String condition); |
| | | Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId,Long direcote, String condition); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId, String condition) { |
| | | return page.setRecords(baseMapper.listByPage(page, hostId, deptId, userId, condition)); |
| | | public Page<Plan> getPage(Page<Plan> page, Long hostId, String deptId, Long userId, Long director,String condition) { |
| | | return page.setRecords(baseMapper.listByPage(page, hostId, deptId, userId,director, condition)); |
| | | } |
| | | |
| | | private String getNextUuid(Long hostId) { |
| | |
| | | ( |
| | | <if test="userId != null and userId != ''"> |
| | | user_id = #{userId} |
| | | or |
| | | director = #{userId} |
| | | or |
| | | </if> |
| | | <if test="userId == null or userId == ''"> |
| | | user_id is not null |
| | | </if> |
| | | or |
| | | mp.id in |
| | | ( |
| | | select |
| | |
| | | or mp.planner like concat('%',#{condition},'%') |
| | | ) |
| | | </if> |
| | | <if test="director != null and director != ''"> |
| | | or mp.director = #{director} |
| | | </if> |
| | | ORDER BY mp.create_time DESC |
| | | </select> |
| | | |