<%@ page contentType="text/html; charset=utf-8" language="java" import="java.io.*,java.net.*" errorPage="" %>
<%@ page import="com.easyvary.form.util.*"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="net.sf.hibernate.*"%>
<%@ page import="org.apache.commons.fileupload.*"%>
<%@ page import="com.easyvary.common.util.*"%>
<%@ page import="com.easyvary.form.*"%>
<%@ page import="com.easyvary.form.util.*"%>
<%@ page import="com.easyvary.system.*"%>
<%@ page import="com.easyvary.system.GmccObject"%>
<%@ page import="com.bpm.pm.*"%>
<%@page import="proc.pm.monitor.CellAlarm"%>
<%@page import="proc.ibpm.alarm.*" %>
<%@page import="proc.ibpm.global.*" %>
<%@page import="com.ibpm.conf.*" %>
<%@page import="proc.ibpm.structure.*" %>
<%@ page import="proc.ibpm.conf.*"%>
<%@page import="proc.ibpm.history.*" %>
<%
Get get = new Get();
HistoryAlarmProcessor hap = new HistoryAlarmProcessor();
String cellTypeConfId = request.getParameter("cellTypeConfId");
if(cellTypeConfId==null){
cellTypeConfId = "";
}
String cellConfId = request.getParameter("cellConfId");
String startAlarmTime = request.getParameter("startAlarmTime");
String endAlarmTime = request.getParameter("endAlarmTime");
String startRecoverTime = request.getParameter("startRecoverTime");
String endRecoverTime = request.getParameter("endRecoverTime");
String recoverType = request.getParameter("recoverType");
String cellTypeShowName = get.getCellTypeShowName(cellTypeConfId);
hap.setRecordCount(cellTypeConfId,cellConfId,startAlarmTime,endAlarmTime,startRecoverTime,endRecoverTime,recoverType);
hap.setPageTotal(cellTypeConfId,cellConfId,startAlarmTime,endAlarmTime,startRecoverTime,endRecoverTime,recoverType);
String filepath="test.txt";//request.getParameter("path");
// 设置HTTP头:
response.reset();
response.setContentType("application/octet-stream");
String fileName= URLDecoder.decode(filepath,"utf-8");
java.net.URLEncoder.encode(fileName, "utf-8");
response.addHeader("Content-Disposition","attachment;"+ "filename=\"" +URLEncoder.encode(fileName, "utf-8") + "\"");
BufferedOutputStream output = null;
BufferedInputStream input = null;
OutputStream os =null;
//FileInputStream fis =null;
// 写缓冲区:
try
{
os = response.getOutputStream();
String historyAlarm="";//historyAlarm为后台得到的数据
byte[]byt=historyAlarm.getBytes();
os.write(byt);
}
catch(Exception e)
{
System.out.println(e);
}
finally
{
//fis.close();
os.flush();
os.close();
if(input!=null) input.close();
if(output!=null) output.close();
}
return;
%>