⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 driverinfobusiness.java

📁 hibernate+spring+ext2.0 的物流网站
💻 JAVA
字号:
package com.bu.mars;

import java.util.*;

import com.service.DAOService;
import com.struts.form.*;
import com.po.*;

public class DriverInfoBusiness implements ibusiness {
	private DAOService daos;
	public boolean delete(String id) {
		// TODO Auto-generated method stub
		return false;
	}

	public Vector findAll() {
		// TODO Auto-generated method stub
		Vector drivevc=new Vector();
		List ls=daos.getDriverinfodao().findAll();
		for (Object object : ls) {
			DriverInfo driver=(DriverInfo)object;
			MarsDriverInfoForm driverf=new MarsDriverInfoForm();
			driverf.setDriverid(driver.getDriverId().toString());
			driverf.setDrivername(driver.getDriverName());
			driverf.setBranchid(driver.getBranchInfo().getBranchName());
			driverf.setDriverage(driver.getDriverAge());
			driverf.setDriversex(driver.getDriverSex());
			driverf.setDriverphoto(driver.getDriverPhoto());
			driverf.setDrivercardid(driver.getDriverCardId());
			driverf.setDriverdrivecardid(driver.getDriverDriveCardId());
			driverf.setDriverphone(driver.getDriverPhone());
			driverf.setDrivermemo(driver.getDriverMemo());
			if(driver.getDriverIsVacancy().toString().equals("0"))
			{
				driverf.setDriverisvacancy("空闲");
			}
			if(driver.getDriverIsVacancy().toString().equals("1"))
			{
				driverf.setDriverisvacancy("在途");
			}
			if(driver.getDriverIsVacancy().toString().equals("2"))
			{
				driverf.setDriverisvacancy("请假");
			}
			drivevc.add(driverf);
		}
		return drivevc;
	}
	public Vector findByBranchID(String id)
	{
		Vector drivevc=new Vector();
		List ls=daos.getDriverinfodao().findByBranchID(new Integer(id));
		for (Object object : ls) {
			DriverInfo driver=(DriverInfo)object;
			MarsDriverInfoForm driverf=new MarsDriverInfoForm();
			driverf.setDriverid(driver.getDriverId().toString());
			driverf.setDrivername(driver.getDriverName());
			driverf.setBranchid(driver.getBranchInfo().getBranchName());
			driverf.setDriverage(driver.getDriverAge());
			driverf.setDriversex(driver.getDriverSex());
			driverf.setDriverphoto(driver.getDriverPhoto());
			driverf.setDrivercardid(driver.getDriverCardId());
			driverf.setDriverdrivecardid(driver.getDriverDriveCardId());
			driverf.setDriverphone(driver.getDriverPhone());
			driverf.setDrivermemo(driver.getDriverMemo());
			if(driver.getDriverIsVacancy().toString().equals("0"))
			{
				driverf.setDriverisvacancy("空闲");
			}
			if(driver.getDriverIsVacancy().toString().equals("1"))
			{
				driverf.setDriverisvacancy("在途");
			}
			if(driver.getDriverIsVacancy().toString().equals("2"))
			{
				driverf.setDriverisvacancy("请假");
			}
			drivevc.add(driverf);
		}
		return drivevc;
	}
	public Object findById(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean save(Object ob) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean update(Object ob) {
		// TODO Auto-generated method stub
		return false;
	}

	public DAOService getDaos() {
		return daos;
	}

	public void setDaos(DAOService daos) {
		this.daos = daos;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -