/** 查询未读列表 */ public String list() { BeanUtils.copyProperties(reQuery, query); if (this.getRequest().getParameter("query.state") == null) { query.setState("0"); } query.setStatus("1"); query.setReceiverId(this.getCurrUser().getUserID()); // 接收人id Page page = this.messageManager.findPage(query); super.saveCurrentPage(page, query); return LIST_JSP; }
public int compare(ZgTorderPlanbomEx arg0, ZgTorderPlanbomEx arg1) { String v1 = BeanUtils.getProperty(arg0, this.sortColumn); String v2 = BeanUtils.getProperty(arg1, this.sortColumn); int flag = 0; if (StringUtils.isNumeric(v1) && StringUtils.isNumeric(v2)) { int iv1 = Integer.parseInt(v1); int iv2 = Integer.parseInt(v2); flag = iv1 - iv2; } else { if (StringUtils.isBlank(v1) && !StringUtils.isBlank(v2)) { flag = 1; } else if (!StringUtils.isBlank(v1) && StringUtils.isBlank(v2)) { flag = -1; } else if (StringUtils.isBlank(v1) && StringUtils.isBlank(v2)) { flag = 0; } else { flag = v1.compareToIgnoreCase(v2); } } if (!this.isAsc) { flag = flag * -1; } return flag; }
/** * 去分配组织机构页面 * * @return */ public String toGrantOrganizPage() { OrganizationQuery orgQuery = new OrganizationQuery(); BeanUtils.copyProperties(orgQuery, query); orgQuery.setDf("0"); orgQuery.setPageSize(Integer.MAX_VALUE); Page page = organizationManager.findPage(orgQuery); List<Organization> l = page.getResult(); String selectIds = this.partition.getOrgIds(); for (Organization org : l) { if (StrUtil.isNotNullOrBlank(selectIds)) { if (selectIds.indexOf(org.getId()) != -1) { org.setChecked("checked"); } } } this.saveCurrentPage(page, query); return GRANT_ORGANIZ_JSP; }
public <T> T copyProperties(Class<T> destClass, Object orig) { return BeanUtils.copyProperties(destClass, orig); }
public void copyProperties(Object target, Object source) { BeanUtils.copyProperties(target, source); }
protected void setRelative(Object target, String property) { String paramName = property.replace('.', '_'); String value = this.getRequest().getParameter(paramName); BeanUtils.setProperty(target, property, value); }