|  |  | 
 |  |  |             status = Integer.parseInt(param.get("status").toString()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         Long director = null; | 
 |  |  |         if (deptId==null && userId == null){ | 
 |  |  |             if (getRole().getId()==3){ | 
 |  |  |                 userId = getUserId(); | 
 |  |  | 
 |  |  |                 deptId = getDeptId(); | 
 |  |  |                 userId = null; | 
 |  |  |             } | 
 |  |  |             director = getUserId(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         return R.ok(orderService.getPage(new Page<>(curr, limit) | 
 |  |  |                 , getHostId() | 
 |  |  |                 , deptId == null ? null : String.valueOf(deptId) | 
 |  |  |                 , userId | 
 |  |  |                 , director | 
 |  |  |                 , condition | 
 |  |  |                 , status) | 
 |  |  |         ); | 
 |  |  | 
 |  |  |                 , getHostId() | 
 |  |  |                 , role.judgeLeader() ? String.valueOf(user.getDeptId()) : null | 
 |  |  |                 , user.getId() | 
 |  |  |                 , null | 
 |  |  |                 , condition | 
 |  |  |                 , 0); | 
 |  |  |         List<KeyValueVo> vos = new ArrayList<>(); | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     Order selectOrderByNewestUuid(@Param("hostId") Long hostId); | 
 |  |  |  | 
 |  |  |     List<Order> listByPage(Page<Order> page, @Param("hostId") Long hostId, @Param("deptId") String deptId, @Param("userId") Long userId, @Param("condition") String condition, @Param("status") Integer status); | 
 |  |  |     List<Order> listByPage(Page<Order> page, @Param("hostId") Long hostId, @Param("deptId") String deptId, @Param("userId") Long userId,@Param("director") Long director,  @Param("condition") String condition, @Param("status") Integer status); | 
 |  |  |  | 
 |  |  |     Double selectMoneyByYearAndStatus(String year, Integer status);//获取指定年份和订单状态总交易金额 | 
 |  |  |  | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     String getUuid(Long hostId); | 
 |  |  |  | 
 |  |  |     Page<Order> getPage(Page<Order> page, Long hostId, String deptId, Long userId, String condition, Integer status); | 
 |  |  |     Page<Order> getPage(Page<Order> page, Long hostId, String deptId, Long userId,Long director,  String condition, Integer status); | 
 |  |  |  | 
 |  |  |     Double selectMoneyByYearAndStatus(String year, Integer status);//获取指定年份和订单状态总交易金额 | 
 |  |  |  | 
 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public Page<Order> getPage(Page<Order> page, Long hostId, String deptId, Long userId, String condition, Integer status) { | 
 |  |  |         return page.setRecords(baseMapper.listByPage(page, hostId, deptId, userId, condition, status)); | 
 |  |  |     public Page<Order> getPage(Page<Order> page, Long hostId, String deptId, Long userId, Long director, String condition, Integer status) { | 
 |  |  |         return page.setRecords(baseMapper.listByPage(page, hostId, deptId, userId,director,  condition, status)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 
 |  |  | 
 |  |  |                 AND (   (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId}) | 
 |  |  |                 or | 
 |  |  |                 ( | 
 |  |  |                     user_id = #{userId} | 
 |  |  |                     mo.user_id = #{userId} | 
 |  |  |                     or | 
 |  |  |                     mo.id in | 
 |  |  |                     ( | 
 |  |  | 
 |  |  |                 and | 
 |  |  |                 ( | 
 |  |  |                     <if test="userId != null and userId != ''"> | 
 |  |  |                         user_id = #{userId} | 
 |  |  |                         mo.user_id = #{userId} | 
 |  |  |                         or | 
 |  |  |                         mo.director = #{userId} | 
 |  |  |                         or | 
 |  |  |                     </if> | 
 |  |  |                     <if test="userId == null or userId == ''"> | 
 |  |  |                         user_id is not null | 
 |  |  |                     </if> | 
 |  |  |                     or | 
 |  |  |                     mo.id in | 
 |  |  |                     ( | 
 |  |  |                         select | 
 |  |  | 
 |  |  |             or mo.addr like concat('%',#{condition},'%') | 
 |  |  |             ) | 
 |  |  |         </if> | 
 |  |  |         <if test="director != null and director != ''"> | 
 |  |  |             or mo.director = #{director} | 
 |  |  |         </if> | 
 |  |  |         ORDER BY mo.create_time DESC | 
 |  |  |     </select> | 
 |  |  |  | 
 
 |  |  | 
 |  |  |                 AND ( (CHARINDEX(','+#{deptId}+',', ','+sd.path+',') > 0 OR sd.id = #{deptId}) | 
 |  |  |                 or | 
 |  |  |                 ( | 
 |  |  |                     user_id = #{userId} | 
 |  |  |                     mp.user_id = #{userId} | 
 |  |  |                     or | 
 |  |  |                     mp.id in | 
 |  |  |                     ( | 
 |  |  | 
 |  |  |                 and | 
 |  |  |                 ( | 
 |  |  |                     <if test="userId != null and userId != ''"> | 
 |  |  |                         user_id = #{userId} | 
 |  |  |                         mp.user_id = #{userId} | 
 |  |  |                         or | 
 |  |  |                         director = #{userId} | 
 |  |  |                         mp.director = #{userId} | 
 |  |  |                         or | 
 |  |  |                     </if> | 
 |  |  |                     mp.id in |