Package com.google.code.lightssh.project.party.entity

Examples of com.google.code.lightssh.project.party.entity.Employee


   
    Organization org = partyManager.getOrganization(t.getOrganization().getId());
    if( org == null )
      throw new ApplicationException("部门信息["+t.getOrganization().getId()+"]不存在!");
   
    Employee db_e = get(p);
    if( db_e == null ){
      db_e = t;
      dao.create(db_e);
    }else{
      db_e.setOrganization(t.getOrganization());
      db_e.setStatus(t.getStatus());
      db_e.setType( t.getType() );
      db_e.setPosition( t.getPosition() );
      db_e.setWorkplace(t.getWorkplace());
      db_e.setEmploymentDate(t.getEmploymentDate());
      db_e.setDescription(t.getDescription());
      dao.update(db_e);
    }
  }
View Full Code Here


          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 +") " );
        }
View Full Code Here

TOP

Related Classes of com.google.code.lightssh.project.party.entity.Employee

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.