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

📄 operationtypeimp.java

📁 自己制作的联通CRM,支持客户分类,管理,升级,积分管理等等..
💻 JAVA
字号:
package com.jn0801.operation;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
/**
 * 显示业务类型的实现类
 * @author student
 *
 */
public class operationtypeIMP extends HibernateDaoSupport implements operationtypeIFC {

	/**
	 * 显示业务类型列表
	 * @return
	 */
	public List listOperationType() {
		String hql = "select operation from operationtype operation order by operation.npid";
		List<operationtype> list = this.getHibernateTemplate().find(hql);
		
		//大类小类
		ArrayList<ArrayList<operationtype>> operationList = new ArrayList<ArrayList<operationtype>>();
		
		HashMap<Long,ArrayList<operationtype>> tmpMap = new HashMap<Long,ArrayList<operationtype>>();
		
		for (operationtype operation : list) {
			if(operation.getNpid()==0){
				ArrayList<operationtype> tmpList = new ArrayList<operationtype>();
				tmpList.add(operation);
				tmpMap.put(operation.getTypeid(), tmpList);
				operationList.add(tmpList);
				
			}else{
				
				ArrayList<operationtype> tmpList = tmpMap.get(operation.getNpid());
				tmpList.add(operation);
			}
				
			
		}

		return operationList;
	}

}

⌨️ 快捷键说明

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