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

📄 cpaccoutdetailreport.java

📁 WAP PUSH后台源码,WAP PUSH后台源码
💻 JAVA
字号:
package com.sxit.wap.report;import java.sql.*;import java.util.*;import com.sxit.wap.common.*;import com.sxit.wap.exception.*;public class CpAccoutDetailReport extends Report {    public CpAccoutDetailReport() {    }	public String[] getReportHeader () {		String [] str = {"MDN","费率","费率类型","频道名称","定制日期" };		return str;	}	public String getReportTitle () {		return "cp 收费明细报表";	}	public ResultSet getResult ( java.sql.Statement statement, java.util.Date startDate, java.util.Date endDate ,int cpid  ) {		if (startDate == null)			startDate = new java.util.Date();		if (endDate == null)			endDate = new java.util.Date();		Timestamp bt = new java.sql.Timestamp ( startDate.getTime () );		Timestamp et = new java.sql.Timestamp ( endDate.getTime () );		String sql = "select  h.user_mdn , ft.fee_type ,h.fee_code ,ch.channel_name, h.sub_date  ,c.cp_name ";			   sql += " from wap_user_sub_his h,wap_cp c,wap_channel ch, wap_fee_type ft ";			   sql += " where h.channel_id = ch.id and ch.cp_id = c.id and ft.fee_type = h.fee_type ";			   sql += " and c.id ="+ cpid;			   sql+= " and "+DateUtil.getDateCompareSql(Database.dbType, "h.sub_date", bt, et) ;			java.sql.ResultSet rs = null;		try {			rs = statement.executeQuery ( sql );		}catch (Exception e1) {		}		return rs;	}	public Collection getCollection ( java.util.Date startDate, java.util.Date endDate , int cpid , int beginRow,									  int endRow ) throws SysException {		if (startDate == null)			startDate = new java.util.Date();		if (endDate == null)			endDate = new java.util.Date();		Timestamp bt = new java.sql.Timestamp ( startDate.getTime () );		Timestamp et = new java.sql.Timestamp ( endDate.getTime () );		String sql = "select c.id ,c.cp_name , h.fee_code ,ch.channel_name, ft.fee_type, h.user_mdn ,h.sub_date";			   sql += " from wap_user_sub_his h,wap_cp c,wap_channel ch, wap_fee_type ft ";			   sql += " where h.channel_id = ch.id and ch.cp_id = c.id and ft.fee_type = h.fee_type ";			   sql += " and c.id ="+ cpid;			   sql+= " and "+DateUtil.getDateCompareSql(Database.dbType, "h.sub_date", bt, et) ;		return queryBySql ( sql, beginRow, endRow );	}	public int getCollectionCount ( java.util.Date startDate, java.util.Date endDate, int cpid ) throws SysException {		if (startDate == null)			startDate = new java.util.Date();		if (endDate == null)			endDate = new java.util.Date();		Timestamp bt = new java.sql.Timestamp ( startDate.getTime () );		Timestamp et = new java.sql.Timestamp ( endDate.getTime () );		String sql = "select count(*) ";			   sql += " from wap_user_sub_his h,wap_cp c,wap_channel ch, wap_fee_type ft ";			   sql += " where h.channel_id = ch.id and ch.cp_id = c.id and ft.fee_type = h.fee_type ";			   sql += " and c.id ="+ cpid;			   sql+= " and "+DateUtil.getDateCompareSql(Database.dbType, "h.sub_date", bt, et) ;		return getRowCountBySql ( sql );	}}

⌨️ 快捷键说明

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