reportbiz.java
来自「crm系统 有源码 及相关文档sql2005 数据库 客户反馈模块」· Java 代码 · 共 66 行
JAVA
66 行
package org.jb.y272.team0.biz;
import java.util.List;
import org.jb.common.biz.BaseBiz;
/**
* 报表BIZ
* 如果是多人合作完成,最好每个报表建立一个Biz类
* @author Beida Jade Bird
*/
public class ReportBiz extends BaseBiz {
/**
* 客户贡献分析
*/
public List getContrList(String custName,String year){
List ret = null;
String hql = "select c.custName, sum(l.oddPrice*l.oddCount) from CstCustomer c,VOrders o ,VOrdersLine l " +
"where c.custName=o.odrCustomer and o.odrId=l.oddOrderId ";
if (super.isNotNullOrEmpty(custName)){
hql += "and c.custName like '%"+custName+"%' ";
}
if (super.isNotNullOrEmpty(year)){
hql += "and year(o.odrDate)="+year+" ";
}
hql += "group by c.custName";
ret = this.getCommonDAO().list(hql);
return ret;
}
/**
* 客户构成分析
*/
public List getConsList(String type){
List ret = null;
String hql = "";
if ("等级".equals(type)){
hql = "select custLevelLabel,COUNT(c) from CstCustomer c where c.custStatus=1 " +
"group by c.custLevel,custLevelLabel ";
}else if ("信用度".equals(type)){
hql = "select c.custCredit,COUNT(c) from CstCustomer c where c.custStatus=1 " +
"group by c.custCredit ";
}else if ("满意度".equals(type)){
hql = "select c.custSatisfy,COUNT(c) from CstCustomer c where c.custStatus=1 " +
"group by c.custSatisfy ";
}
ret = this.getCommonDAO().list(hql);
return ret;
}
/**
* 客户服务分析
* 对所有状态的服务进行统计
*/
public List getSvrList(String year){
List ret = null;
String hql = "select s.svrType, COUNT(s) from CstService s ";
if (super.isNotNullOrEmpty(year)){
hql += "where year(s.svrCreateDate)="+year+" ";
}
hql += "group by s.svrType ";
ret = this.getCommonDAO().list(hql);
return ret;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?