@GET
	@Produces(MediaType.APPLICATION_JSON)
	public String list(@QueryParam("start") Integer start,  @QueryParam("itemsPerPage") Integer itemsPerPage, 
			@QueryParam("user_id") Integer user_id) {
		// 获取参数
		Map<String, Object> params = new LinkedHashMap<String, Object>();
		Page page = new Page();
		params.put("page", page);
		if (start != null) page.setStartIndex(start);
		if (itemsPerPage != null) page.setItemsPerPage(itemsPerPage);

		// 获取数据
		/* BEGIN 用于给用户分配部门时，默认选中已分配部门 */
		List<Integer> depList = new ArrayList<Integer>();
		if (user_id != null) {
			List<UserDepartment> myList = userDepartmentService.queryUserDepartments(user_id);
			if (myList != null) {
				for (UserDepartment ad : myList) {
					depList.add(ad.getDep_id());
				}
			}
		}
		/* END 用于给用户分配部门时，默认选中已分配部门 */
		List<Department> list = departmentService.queryDepartments(params);
		List<Map<String, Object>> items = new ArrayList<Map<String, Object>>();
		for (Department dep : list){
			Map<String, Object> item = dep.toMap();
			/* BEGIN 用于给用户分配部门时，默认选中已分配部门 */
			if (user_id != null) {
				if (depList.contains(dep.getDep_id())) {
					item.put("checked", true);
				} else {
					item.put("checked", false);
				}
			}
			/* END 用于给用户分配部门时，默认选中已分配部门 */
			items.add(item);
		}

		Map<String, Object> attrs = generateQueryResult(page, items);
		ResponseWithData response = new ResponseWithData(attrs);
		return response.toJson();
	}