private void Autoquery() {

    Vector<Vehicle> vehicles;
    Vector<Vector> datas;
    String departmentName = this.comboBox_query_choosebusiness.getSelectedItem().toString();

    if (departmentName.equals("所有")) {

      vehicles = vehicleblservice.getAll();
      datas = changeDatas(vehicles);
      setDatas(datas);
      refreshTable();
    } else {
      Vector<Department> departments = vehicleblservice.getBusiness();
      for (Department department : departments) {
        if (department.getDepartment_name().equals(departmentName)) {

          vehicles = vehicleblservice.getByCondition("department_id_fk", department.getId());
          datas = changeDatas(vehicles);
          setDatas(datas);
          refreshTable();
        }
      }
    }
  }
 @Override
 public void setViewDatas() {
   Vector<Vehicle> vehicles = vehicleblservice.getAll();
   // 转换显示格式
   Vector<Vector> datas = changeDatas(vehicles);
   // 调用父类方法设置结果集合
   setDatas(datas);
 }
 /**
  * 获得所有的tips提示,自动补全查询文本框
  *
  * @return
  */
 private Vector<String> getAllTips() {
   Vector<Vehicle> vehicles = vehicleblservice.getAll();
   tips.clear();
   for (Vehicle vehicle : vehicles) {
     tips.add(vehicle.getVehicle_num());
     tips.add(vehicle.getLicense_plate_number());
   }
   return tips;
 }