📄 reportbiz.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -