ReportDoExcel.jsp 2.1 KB
<%@ page language="java" contentType="application/msexcel;" %><%@ page import="weaver.general.GCONST" %><%@ page import="weaver.general.Util" %><%@ page import="java.io.*" %><%@ page import="java.util.ArrayList" %><%@ page import="java.util.HashMap" %><%@ page import="java.util.List" %><%@ page import="weaver.upgradetool.dbupgrade.upgrade.ReportToExcel" %><%String tableName = Util.null2String(request.getParameter("tableName"));
    String fieldName = Util.null2String(request.getParameter("fieldName"));
    String modifys = Util.null2String(request.getParameter("modifys"));
    String laststatus=Util.null2String(request.getParameter("laststatus"));
    HashMap<String, String> params = new HashMap<String, String>();
    params.put("tableName", tableName);
    params.put("myname", "weaver@wcology_");
    params.put("fieldName", fieldName);
    params.put("modifys", modifys);
    String filelistInfo = null;
    filelistInfo= ReportToExcel.getModifyAll(params, null, GCONST.getRootPath());
    wscheck.ZipUtils PackFileUtil = new wscheck.ZipUtils();
    List bhSelectList = new ArrayList();
    bhSelectList.add(filelistInfo);
    File allecologyzip = new File(GCONST.getRootPath() + "system"+File.separator+"upgradetoe9"+File.separator+"report"+File.separator+"weaverReport.zip");
    if (allecologyzip.exists()) {
        allecologyzip.delete();
    }
    PackFileUtil.execute(bhSelectList, GCONST.getRootPath() + "system"+File.separator+"upgradetoe9"+File.separator+"report"+File.separator+"weaverReport.zip", GCONST.getRootPath(), "report");
    if("last".equals(laststatus)){
        //获得迁移总报告
        File allSystemrepot = new File(GCONST.getRootPath() + "filesystem"+File.separator+"allSystemrepot.zip");
        if (allSystemrepot.exists()) {
            allSystemrepot.delete();
        }
        List<String> packfilelist=new ArrayList<String>();
        packfilelist.add(GCONST.getRootPath() + "system"+File.separator+"upgradetoe9"+File.separator+"report");
        PackFileUtil.execute(packfilelist,GCONST.getRootPath() + "filesystem"+File.separator+"allSystemrepot.zip",GCONST.getRootPath(),"ecology");
    }
%>