日期:2014-05-17 浏览次数:20720 次
PageInfo<Wagesinfo> pages =(PageInfo<Wagesinfo>) this.wagesService.getWagesForPage(wages, request.getParameterMap());
/**
* 获取员工工资信息 - 分页
* @param wages
* @return
*/
public PageInfo<?> getWagesForPage(Wagesinfo wages,Map<String,Object> pagerValues);
/**
* 获取员工工资信息 - 分页
* @param wages
* @return
*/
public PageInfo<?> getWagesForPage(Wagesinfo wages,Map<String,Object> pagerValues){
StringBuffer hql = new StringBuffer(" from Wagesinfo wages where 1=1 ");
Map<String,Object> params = new HashMap<String,Object>();
if(wages != null){
if(wages.getUser()!=null && !this.baseUtil.isEmpty(wages.getUser().getUserId())){
hql.append(" and wages.user.userId = :userId ");
params.put("userId", wages.getUser().getUserId());
}
if(wages.getDepart()!=null && !this.baseUtil.isEmpty(wages.getDepart().getDepartId())){
hql.append(" and wages.depart.departId = :departId ");
params.put("departId", wages.getDepart().getDepartId());
}
if(!this.baseUtil.isEmpty(wages.getWageTime())){
hql.append(" and wages.wageTime like :wageTime");
params.put("wageTime", "%"+wages.getWageTime()+"%");
}
}
hql.append(" order by wages.wageId desc ");
PageInfo<?> wagesPage = this.pageUtil.paging(hql.toString(), params, null, pagerValues);
return wagesPage;
}
public PageInfo<?> getWagesForPage(Wagesinfo wages,Map<String,Object> pagerValues);