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

📄 examservice.java

📁 中应用程序的访问权限对Java Web Console 中应用程序的访问权限 成功登录 Web 控制台后,可能无法自动访问在该控制台中注册的所有应用程序。通常,必须安装应用程序,才能让所有的用户在控制
💻 JAVA
字号:
package edu.yinhe.mis.services;

import java.sql.SQLException;
import java.util.ArrayList;

import javax.sql.DataSource;

import edu.yinhe.mis.dto.DemoDTO;
import edu.yinhe.mis.dto.ExamineeDTO;
import edu.yinhe.mis.dto.IExamDTO;
import edu.yinhe.mis.dto.Reply_cardDTO;
import edu.yinhe.mis.model.DAOFactory;
import edu.yinhe.mis.vo.CheckInfoVO;
import edu.yinhe.mis.vo.DemoVO;
import edu.yinhe.mis.vo.ExamVO;
import edu.yinhe.mis.vo.ExamineeVO;
import edu.yinhe.system.common.AppException;
import edu.yinhe.system.model.IBaseDAO;
import edu.yinhe.system.services.IService;
import edu.yinhe.system.services.Service;
/**
 * 
 * @author 刘洲
 *
 */
public class ExamService extends Service {
	
	private IBaseDAO idao=null;

	public Object alllist() throws AppException {
	
		return null;
	}

	public Object alllist(Object arg0) throws AppException {
	
		return null;
	}

	
	public Object create(Object obj) throws AppException {
		Reply_cardDTO reply_cardDTO=null;
		boolean isOK=false;
		try {
			idao=DAOFactory.getExamDAO(conn);
			reply_cardDTO=(Reply_cardDTO)obj;
			isOK=(Boolean) idao.insert(reply_cardDTO);
		} catch (SQLException e) {
		
			e.printStackTrace();
		}finally{
			this.closeConnection();
		}
		return isOK;
	}

	public Object findAll() throws AppException {
	
		return null;
	}

	public Object findAll(Object arg0) throws AppException {
	
		return null;
	}

	public Object findById(Object arg0) throws AppException {
		
		return null;
	}

	public Object findByObject(Object obj) throws AppException {
		IExamDTO idto=null;
		ArrayList testList=null;
		ArrayList ruleList=null;
		ExamVO examVO=null;
		Object[] object=null;
		try {
			idto=(IExamDTO)obj;
			idao=DAOFactory.getExamDAO(conn);
			testList=(ArrayList) idao.find(idto);
			if(testList.size()!=0&&idto!=null){
				examVO=(ExamVO) testList.get(0);
				idto.setFlag(2);
				idto.setTestPaperRuleID(examVO.getTestPaperRule_NO());
				ruleList=(ArrayList) idao.find(idto);
			}
			if(testList.size()!=0&&ruleList.size()!=0){
				
				object=new Object[2];
				object[0]=testList;
				object[1]=ruleList;
			}
		} catch (SQLException e) {
			
			e.printStackTrace();
		}finally{
			idto=null;
			this.closeConnection();
		}
		
		return object;
	}

	public int getcount() throws AppException {
		
		return 0;
	}

	public int getcount(Object arg0) throws AppException {
	
		return 0;
	}

	public Object list() throws AppException {

		return null;
	}

	public Object list(Object obj) throws AppException {
		ExamineeDTO examineeDTO =null;
	  	ExamineeVO examineeVO=null;
	  	try {
	  		examineeDTO=(ExamineeDTO)obj;
	  		idao=DAOFactory.getExamDAO(conn);
			examineeVO=(ExamineeVO) idao.findByObject(examineeDTO);
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			examineeDTO=null;
			
		}
		return examineeVO;
	}

	public Object load(Object obj) throws AppException {
		Integer checkID;
		CheckInfoVO checkInfoVO=null;
		try {
			checkID=(Integer)obj;
			idao=DAOFactory.getExamDAO(conn);
			checkInfoVO=(CheckInfoVO) idao.findById(checkID);
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			
			this.closeConnection();
		}
		
		return checkInfoVO;
	}

	public Object modify(Object obj) throws AppException {
		boolean isTrue=false;
		Reply_cardDTO reply_cardDTO=null;
		try {
			reply_cardDTO=(Reply_cardDTO)obj;
			idao=DAOFactory.getExamDAO(conn);
			isTrue=(Boolean) idao.update(reply_cardDTO);
		} catch (SQLException e) {
		
			e.printStackTrace();
		}finally{
			this.closeConnection();
		}
		return isTrue;
	}

	public Object remove(Object arg0) throws AppException {
		
		return null;
	}



}

⌨️ 快捷键说明

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