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

📄 reportdao.java

📁 本系统基本完善了CRM管理系统的各个模块
💻 JAVA
字号:
package com.accp.dao.jb_crm_team0.Imp;

import org.hibernate.Query;
import org.hibernate.Session;

import com.accp.util.PageResult;
import com.accp.hib.HibernateSessionFactory;

public class ReportDAO {
	//查询客户构成
	public PageResult finCustStructure(String type) {
		PageResult pgr = new PageResult();
		Session session = HibernateSessionFactory.getSession();
		String hql = null;
		if (type == "cstLevel") {
			hql = "select (select b.dictItem from BasDict b where dictType='客户等级' and b.dictId=c.basDictByCustLevel.dictId) as 等级,count(*) from CstCustomer c group by c.basDictByCustLevel.dictId";
		} else if (type == "cstSatisfy") {
			hql = "select c.custSatisfy,count(*) from CstCustomer c group by c.custSatisfy";
		} else if (type == "cstCredit") {
			hql = "select c.custCredit,count(*) from CstCustomer c group by c.custCredit";
		}
		Query query = session.createQuery(hql);
		pgr.setData(query.list());
		pgr.setRowCount(query.list().size());
		return pgr;
	}
}

⌨️ 快捷键说明

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