hql.append( " AND m.name like ? " );
params.add( "%" + t.getName().trim() + "%");
}
if( t instanceof Person ){
Person p = (Person)t;
if( StringUtils.isNotEmpty(p.getIdentityCardNumber()) ){
hql.append( " AND m.identityCardNumber like ? " );
params.add( "%" + p.getIdentityCardNumber().trim() + "%");
}
if( p.getCredentialsType() != null ){
hql.append( " AND m.credentialsType = ? " );
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 ");