if(StringUtils.isNotBlank(leave.getLeaveType())) {
dc.add(Restrictions.like("leaveType", leave.getLeaveType()));
}
dc.add(Restrictions.ne("processStatus","已完成"));
dc.add(Restrictions.eq("delFlag", Leave.DEL_FLAG_NORMAL));
dc.createAlias("createBy", "createBy");
dc.createAlias("createBy.office", "office");
dc.add(dataScopeFilter(UserUtils.getUser(), "office", "createBy"));
dc.addOrder(Order.desc("id"));
List<Leave> list = leaveDao.find(dc);
List<Leave> result = Lists.newArrayList();