Java Code Examples for org.beetl.sql.core.engine.PageQuery#getList()

The following examples show how to use org.beetl.sql.core.engine.PageQuery#getList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UserConsoleService.java    From springboot-plus with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public List<UserExcelExportData> queryExcel(PageQuery<CoreUser> query) {
	PageQuery<CoreUser> ret = userDao.queryByCondtion(query);
	List<CoreUser> list = ret.getList();
	OrgItem orgRoot = platformService.buildOrg();
	List<UserExcelExportData> items = new ArrayList<>();
	for(CoreUser user:list) {
		UserExcelExportData userItem = new UserExcelExportData();
		userItem.setCode(user.getCode());
		userItem.setId(user.getId());
		userItem.setName(user.getName());
		CoreDict dict = dictService.findCoreDict(CoreDictType.USER_STATE,user.getState());
		userItem.setStateText(dict.getName());
		
		if(StringUtils.isNotEmpty(user.getJobType1())){
			dict = dictService.findCoreDict("job_type",user.getJobType1());
			userItem.setJobType1Text(dict.getName());
		}
		
		String orgName = orgRoot.findChild(user.getOrgId()).getName();
		userItem.setOrgText(orgName);
		items.add(userItem);
		
	}
	return items;
	
}
 
Example 2
Source File: RoleConsoleService.java    From springboot-plus with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public PageQuery<CoreUser> queryRoleUser(PageQuery query) {
	OrgItem root = platformService.buildOrg();
	PageQuery<CoreUser>  ret = roleDao.queryUser(query);
	List<CoreUser> list = ret.getList();
	//从缓存里取出组织机构名称
	for(CoreUser user:list) {
		Long orgId = user.getOrgId();
		Integer orgId1 = (Integer)user.get("orgId1");
		user.set("orgIdText", root.findChild(orgId).getName());
		user.set("orgId1Text", root.findChild((long)orgId1).getName());
		
	}
	//再次处理数据字典
	this.queryListAfter(list);
	return ret;
	 
}
 
Example 3
Source File: FunctionConsoleService.java    From springboot-plus with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public void queryByCondtion(PageQuery<CoreFunction> query) {
	functionDao.queryByCondtion(query);
	List<CoreFunction> list = query.getList();
	this.queryListAfter(list);
	//处理父功能名称显示
	FunctionItem root = platformService.buildFunction();
       for(CoreFunction function:list) {
       	Long parentId = function.getParentId();
       	String name = "";
       	if(parentId != 0) {
       		FunctionItem item = root.findChild(parentId);
           	name = item!=null?item.getName():"";
       	}
       	function.set("parentFunctionText", name);
       }
	
}
 
Example 4
Source File: OrgConsoleService.java    From springboot-plus with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * 根据条件查询
 * @param query
 */
public void queryByCondtion(PageQuery query) {
    orgDao.queryByCondtion(query);
    List<CoreOrg> list = query.getList();
    queryListAfter(list);
    OrgItem root = platformService.buildOrg();
    //处理父机构名称显示,没有用sql查询是考虑到跨数据库
    for(CoreOrg org:list) {
    	Long parentId = org.getParentOrgId();
    	OrgItem item = root.findChild(parentId);
    	String name = item!=null?item.getName():"";
    	org.set("parentOrgText", name);
    }
    
}
 
Example 5
Source File: DictConsoleService.java    From springboot-plus with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public List<CoreDict> queryExcel(PageQuery<CoreUser> query) {
    //同查询,不需要额外数据
    PageQuery ret =  dictDao.queryByCondition(query);
    queryListAfter(ret.getList());
    return ret.getList();
    
}
 
Example 6
Source File: RoleConsoleService.java    From springboot-plus with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
/**
 * 根据条件查询
 * @param query
 */
public void queryByCondtion(PageQuery query) {
    roleDao.queryByCondtion(query);
    super.queryListAfter(query.getList());
}