params.add( p.getCredentialsType() );
}
//人事信息
if(p.getEmployee() != null ){
Employee employee = p.getEmployee();
StringBuffer hql_emp = new StringBuffer(" SELECT e.person.id FROM " );
hql_emp.append( Employee.class.getName() );
hql_emp.append(" AS e WHERE 1=1 ");
if( employee.getOrganization() != null
&& StringUtils.isNotEmpty(employee.getOrganization().getId())){
hql_emp.append( " AND e.organization.id = ? " );
params.add( employee.getOrganization().getId().trim() );
}
if( employee.getStatus() != null ){
hql_emp.append( " AND e.status = ? " );
params.add( employee.getStatus() );
}
if( employee.getType() != null ){
hql_emp.append( " AND e.type = ? " );
params.add( employee.getType() );
}
if( hql_emp.toString().indexOf("AND") >0 )
hql.append( " AND m.id IN ( " + hql_emp +") " );
}