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

📄 c432notiondao.java

📁 使用spring ,hibernate 框架的稽查管理系统
💻 JAVA
字号:
package com.je.ims.dao;

import java.sql.SQLException;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import com.je.ims.dao.eCommonDAO;
import com.je.ims.hibernate.Notion;
import com.je.ims.hibernate.Wise;


import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class C432notionDao extends eCommonDAO {

		public List getAllfilenumber(Long year,Long month,String level)
		{
			String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by fileId desc" ;
			List list=getHibernateTemplate().find(hql);
			return list;
		}
		public List getAllitem(Long year,Long month,String level)
		{
			String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by nodeId desc";
			List list=getHibernateTemplate().find(hql);
			return list;
		}
		public List getAllorg(Long year,Long month,String level)
		{
			String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by orgPk desc";
			List list=getHibernateTemplate().find(hql);
			return list;
		}
		public List getAllperson(Long year,Long month,String level)
		{
			String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by adviceUndertakerId desc";
			List list=getHibernateTemplate().find(hql);
			return list;
		}
		public List getAllstate(Long year,Long month,String level)
		{
			String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by adviceState desc";
			List list=getHibernateTemplate().find(hql);
			return list;
		}
		public List getAlldate(Long year,Long month,String level)
		{
			String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by adviceDate desc";
			List list=getHibernateTemplate().find(hql);
			return list;
		}
		public String findtitle(Long temp)
		{
	
			String hql="from Notion where notionId="+temp;
			List list=getHibernateTemplate().find(hql);
			Notion e=new Notion();
			Iterator t=list.iterator();
			e=(Notion)t.next();
			String str=e.getTitle();
			return str;
			//getHibernateTemplate().saveOrUpdate(e);

		} 
		public void send(Long temp)
		{
	
			String hql="from Notion where notionId="+temp;
			List list=getHibernateTemplate().find(hql);
			Notion e=new Notion();
			Iterator t=list.iterator();
			e=(Notion)t.next();
			 Long str=e.getAdviceState();
			 Long temp1=new Long(2);
			 if(str.equals(temp1))
			 {
				 e.setAdviceState(new Long(3));
			 }
			
			getHibernateTemplate().saveOrUpdate(e);

		}
		public List getFoundProceeding(Long notionId){
			
			List l=getHibernateTemplate().find("from FoundProceeding c where c.id.notionId="+notionId);
			//if(l.size()>0) return ((FoundProceeding)l.get(l.size()-1));
			//else return null;
			return l;

		}
		public List getAdviceDeal(Long notionId,Long foundItem){
			
			List l=getHibernateTemplate().find("from AdviceDeal c where c.id.notionId="+notionId+"and c.id.foundItem="+foundItem);
			//if(l.size()>0) return ((AdviceDeal)l.get(l.size()-1));
			//else return null;
			return l;

		}
		public Notion getNotionById(Long temp)
		{
	
			String hql="from Notion where notionId="+temp;
			List list=getHibernateTemplate().find(hql);
			Notion e=new Notion();
			Iterator t=list.iterator();
			e=(Notion)t.next();
	        return e;
		}
		public void cancelsend(Long temp)
		{
	
			String hql="from Notion where notionId="+temp;
			List list=getHibernateTemplate().find(hql);
			Notion e=new Notion();
			Iterator t=list.iterator();
			e=(Notion)t.next();
			 Long str=e.getAdviceState();
			 Long temp1=new Long(3);
			 if(str.equals(temp1))
			 {
				 e.setAdviceState(new Long(2));
			 }
			 
			
		getHibernateTemplate().saveOrUpdate(e);

		}  
		public List shownotion(Long temp)
		{
	
			String hql="from Notion where notionId="+temp;
			List list=getHibernateTemplate().find(hql);
			return list;
			//getHibernateTemplate().saveOrUpdate(e);

		}  
	public int getSizefilenumber(Long year,Long month,String level)
		{
		String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by fileId desc";
		List list=getHibernateTemplate().find(hql);
		int i=list.size();
		return i;
		}
	public int getSizeitem(Long year,Long month,String level)
	{
	String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by nodeId desc";
	List list=getHibernateTemplate().find(hql);
	int i=list.size();
	return i;
	}
	public int getSizeorg(Long year,Long month,String level)
	{
	String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by orgPk desc";
	List list=getHibernateTemplate().find(hql);
	int i=list.size();
	return i;
	}
	public int getSizeperson(Long year,Long month,String level)
	{
	String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by adviceUndertakerId desc";
	List list=getHibernateTemplate().find(hql);
	int i=list.size();
	return i;
	}
	public int getSizestate(Long year,Long month,String level)
	{
	String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by adviceState desc";
	List list=getHibernateTemplate().find(hql);
	int i=list.size();
	return i;
	}
	public int getSizedate(Long year,Long month,String level)
	{
	String hql="from Notion where year="+year+"and month="+month+"and nodeId= '"+level+"' order by adviceDate desc";
	List list=getHibernateTemplate().find(hql);
	int i=list.size();
	return i;
	}
	public Object[] getCountdate(int start, int size, Long year, Long month, String level) {
		List list=getAlldate(year,month,level);
		
		Notion[] app = new Notion[size];
		
		for (int i=0;i<size;i++)
		{
			app[i]=new Notion();
			app[i]=(Notion)list.get(i+start);
		}
		return app;
		}

		public Object[] getCount(int start, int count) {
			// TODO Auto-generated method stub
			return null;
		}

		public Object[] getCount(int start, int count, List l) {
			// TODO Auto-generated method stub
			return null;
		}
		public Object[] getCountfilenumber(int start, int size, Long year, Long month, String level) {
			List list=getAllfilenumber(year,month,level);
			
			Notion[] app = new Notion[size];
			
			for (int i=0;i<size;i++)
			{
				app[i]=new Notion();
				app[i]=(Notion)list.get(i+start);
			}
			return app;
		}
		public Object[] getCountitem(int start, int size, Long year, Long month, String level) {
List list=getAllitem(year,month,level);
			
			Notion[] app = new Notion[size];
			
			for (int i=0;i<size;i++)
			{
				app[i]=new Notion();
				app[i]=(Notion)list.get(i+start);
			}
			return app;
		}
		public Object[] getCountorg(int start, int size, Long year, Long month, String level) {
List list=getAllorg(year,month,level);
			
			Notion[] app = new Notion[size];
			
			for (int i=0;i<size;i++)
			{
				app[i]=new Notion();
				app[i]=(Notion)list.get(i+start);
			}
			return app;
		}
		public Object[] getCountperson(int start, int size, Long year, Long month, String level) {
List list=getAllperson(year,month,level);
			
			Notion[] app = new Notion[size];
			
			for (int i=0;i<size;i++)
			{
				app[i]=new Notion();
				app[i]=(Notion)list.get(i+start);
			}
			return app;
		}
		public Object[] getCountstate(int start, int size, Long year, Long month, String level) {
List list=getAllstate(year,month,level);
			
			Notion[] app = new Notion[size];
			
			for (int i=0;i<size;i++)
			{
				app[i]=new Notion();
				app[i]=(Notion)list.get(i+start);
			}
			return app;
		}
}

⌨️ 快捷键说明

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