Package com.thinkgem.jeesite.modules.sys.entity

Examples of com.thinkgem.jeesite.modules.sys.entity.Office


  @ResponseBody
  @RequestMapping(value = "users")
  public List<Map<String, Object>> users(String officeId, HttpServletResponse response) {
    response.setContentType("application/json; charset=UTF-8");
    List<Map<String, Object>> mapList = Lists.newArrayList();
    Office office = officeService.get(officeId);
    List<User> userList = office.getUserList();
    for (User user : userList) {
      Map<String, Object> map = Maps.newHashMap();
      map.put("id", user.getId());
      map.put("pId", 0);
      map.put("name", user.getName());
View Full Code Here


      addMessage(redirectAttributes, "演示模式,不允许操作!");
      return "redirect:" + Global.getAdminPath() + "/sys/user/?repage";
    }
   
    // 修正引用赋值问题,不知道为何,Company和Office引用的一个实例地址,修改了一个,另外一个跟着修改。
    user.setCompany(new Office(request.getParameter("company.id")));
    user.setOffice(new Office(request.getParameter("office.id")));
   
    // 如果新密码为空,则不更换密码
    if (StringUtils.isNotBlank(newPassword)) {
      user.setPassword(SystemService.entryptPassword(newPassword));
    }
View Full Code Here

  @ModelAttribute("office")
  public Office get(@RequestParam(required = false) String id) {
    if (StringUtils.isNotBlank(id)) {
      return officeService.get(id);
    } else {
      return new Office();
    }
  }
View Full Code Here

    List<Map<String, Object>> mapList = Lists.newArrayList();
   
//    User user = UserUtils.getUser();
    List<Office> list = officeService.findAll();
    for (int i=0; i<list.size(); i++){
      Office e = list.get(i);
     
      if ((extId == null || (extId!=null && !extId.equals(e.getId()) && e.getParentIds().indexOf(","+extId+",")==-1))
          && (type == null || (type != null && Integer.parseInt(e.getType()) <= type.intValue()))
          && (grade == null || (grade != null && Integer.parseInt(e.getGrade()) <= grade.intValue()))){
       
        Map<String, Object> map = Maps.newHashMap();
        map.put("id", e.getId());
//        map.put("pId", !user.isAdmin() && e.getId().equals(user.getOffice().getId())?0:e.getParent()!=null?e.getParent().getId():0);
        map.put("pId", e.getParent() != null ? e.getParent().getId() : 0);
        map.put("name", e.getName());
        mapList.add(map);
      }
    }
    return mapList;
  }
View Full Code Here

TOP

Related Classes of com.thinkgem.jeesite.modules.sys.entity.Office

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.