You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
6.8 KiB
147 lines
6.8 KiB
<%--<%--%>
|
|
<%-- /***************************************************************--%>
|
|
<%-- * <p>ProName:EndorsementF1PJ3.jsp</p>--%>
|
|
<%-- * <p>Title:官网团体保单信息打印---打印批单</p>--%>
|
|
<%-- * <p>Description:官网团体保单信息打印--打印批单</p>--%>
|
|
<%-- * <p>Copyright:Copyright (c) 2012</p>--%>
|
|
<%-- * <p>Company:Sinosoft</p>--%>
|
|
<%-- * @author : lisy--%>
|
|
<%-- * @version : 8.0--%>
|
|
<%-- * @date : 2024-11-05--%>
|
|
<%-- ****************************************************************/--%>
|
|
<%--%>--%>
|
|
<%--<%@ page import="com.sinosoft.lis.pubfun.GlobalInput" %>--%>
|
|
<%--<%@ page import="com.sinosoft.utility.ExeSQL" %>--%>
|
|
<%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>--%>
|
|
<%--<%@page import="com.sinosoft.utility.XssUtil" %>--%>
|
|
<%--<html>--%>
|
|
<%--<%--%>
|
|
<%-- String strEdorNo = XssUtil.escapeJavaScript(request.getParameter("EdorNo"));--%>
|
|
<%-- String strErrInfo = "";--%>
|
|
|
|
<%-- ExeSQL tES = new ExeSQL();--%>
|
|
|
|
<%-- GlobalInput tG = new GlobalInput();--%>
|
|
<%-- tG = (GlobalInput)session.getValue("GI");--%>
|
|
<%-- //String strType = XssUtil.escapeJavaScript(request.getParameter("Type"));--%>
|
|
<%-- String strType = "Endorsement";--%>
|
|
<%-- System.out.println("EdorNo: " + strEdorNo);--%>
|
|
<%-- System.out.println("prtType: " + strType);--%>
|
|
|
|
<%-- //Get the path of VTS file from LDSysVar table--%>
|
|
<%-- LDSysVarDB tLDSysVarDB = new LDSysVarDB();--%>
|
|
<%-- System.out.println("0");--%>
|
|
<%-- String strSql1 = "select * from ldsysvar where Sysvar='VTSFilePath'";--%>
|
|
<%-- LDSysVarSet tLDSysVarSet = tLDSysVarDB.executeQuery(strSql1);--%>
|
|
<%-- LDSysVarSchema tLDSysVarSchema = tLDSysVarSet.get(1);--%>
|
|
<%-- String strFilePath = tLDSysVarSchema.getV("SysVarValue");--%>
|
|
<%-- System.out.println("222");--%>
|
|
<%-- String strVFFileName = strFilePath + "callcenter_"+strEdorNo +".vts";--%>
|
|
<%-- System.out.println("333");--%>
|
|
<%-- System.out.println("1");--%>
|
|
<%-- //获取存放临时文件的路径--%>
|
|
<%-- String strRealPath = application.getRealPath("/").replace('\\','/');--%>
|
|
<%-- String strVFPathName = strRealPath + strVFFileName;--%>
|
|
<%-- //String strSql2 = "select * from ldsysvar where Sysvar='VTSRealPath'";--%>
|
|
<%-- //tLDSysVarSet = tLDSysVarDB.executeQuery(strSql2);--%>
|
|
<%-- //tLDSysVarSchema = tLDSysVarSet.get(1);--%>
|
|
<%-- //String strRealPath = tLDSysVarSchema.getV("SysVarValue");--%>
|
|
<%-- //String strVFPathName = strRealPath + strVFFileName;--%>
|
|
|
|
<%-- CombineVts tcombineVts=null;--%>
|
|
<%-- InputStream ins=null;--%>
|
|
|
|
<%-- if( strEdorNo != null && !strEdorNo.equals("") ) // 合并VTS模板文件与数据文件存入服务器磁盘中--%>
|
|
<%-- {--%>
|
|
<%-- // 建立数据库连接--%>
|
|
<%-- try--%>
|
|
<%-- {--%>
|
|
<%-- Connection conn = DBConnPool.getConnection();--%>
|
|
<%-- Statement stmt = null;--%>
|
|
<%-- ResultSet rs = null;--%>
|
|
<%-- System.out.println("2");--%>
|
|
<%-- if( conn == null )--%>
|
|
<%-- {--%>
|
|
<%-- strErrInfo = "连接数据库失败";--%>
|
|
<%-- }--%>
|
|
<%-- else--%>
|
|
<%-- {--%>
|
|
<%-- stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);--%>
|
|
<%-- if (strType!=null && strType.equals("CashValue"))--%>
|
|
<%-- {--%>
|
|
<%-- rs = stmt.executeQuery("SELECT * FROM LPEDORPRINT3 WHERE EdorNo = '" + strEdorNo + "' and EdorType='1'");--%>
|
|
<%-- }--%>
|
|
<%-- else--%>
|
|
<%-- {--%>
|
|
<%-- rs = stmt.executeQuery("SELECT * FROM LPEDORPRINT WHERE EdorNo = '" + strEdorNo + "'");--%>
|
|
<%-- }--%>
|
|
|
|
<%-- if(rs.next())--%>
|
|
<%-- {--%>
|
|
<%-- //输出数据文件--%>
|
|
<%-- COracleBlob tCOracleBlob = new COracleBlob();--%>
|
|
<%-- Blob tBlob = null;--%>
|
|
|
|
<%-- String tSQL = " and EdorNo = '" + strEdorNo + "'";--%>
|
|
<%-- if (strType!=null && strType.equals("CashValue"))--%>
|
|
<%-- {--%>
|
|
<%-- System.out.println("==> 现金价值");--%>
|
|
<%-- tBlob = tCOracleBlob.SelectBlob("LPEDORPRINT3","edorinfo",tSQL,conn);--%>
|
|
<%-- }--%>
|
|
<%-- else--%>
|
|
<%-- {--%>
|
|
<%-- System.out.println("==> 个人批单");--%>
|
|
<%-- tBlob = tCOracleBlob.SelectBlob("LPEDORPRINT","edorinfo",tSQL,conn);--%>
|
|
<%-- }--%>
|
|
|
|
<%-- //BLOB blob = (oracle.sql.BLOB)tBlob;//delete by jianglai at 2004-7-22 18:08--%>
|
|
|
|
<%-- //BLOB blob = ((OracleResultSet)rs).getBLOB("edorinfo");--%>
|
|
<%-- ins=tBlob.getBinaryStream();--%>
|
|
<%-- System.out.println("get stream object");--%>
|
|
|
|
<%-- }--%>
|
|
<%-- else--%>
|
|
<%-- {--%>
|
|
<%-- System.out.println("can't get stream object");--%>
|
|
<%-- }--%>
|
|
<%-- rs.close();--%>
|
|
<%-- stmt.close();--%>
|
|
<%-- conn.close();--%>
|
|
|
|
<%-- //合并VTS文件--%>
|
|
<%-- String strTemplatePath = application.getRealPath("f1print/NCLtemplate/") + "/";--%>
|
|
<%-- tcombineVts = new CombineVts(ins,strTemplatePath);--%>
|
|
|
|
<%-- ByteArrayOutputStream dataStream = new ByteArrayOutputStream();--%>
|
|
<%-- tcombineVts.output(dataStream);--%>
|
|
|
|
<%-- //把dataStream存储到磁盘文件--%>
|
|
<%-- AccessVtsFile.saveToFile(dataStream,strVFPathName);--%>
|
|
<%-- System.out.println("==> Write VTS file to disk ");--%>
|
|
|
|
<%-- //session.putValue("FileName", strVFFileName);--%>
|
|
<%-- //System.out.println("===strVFFileName : "+strVFFileName);--%>
|
|
<%-- session.putValue("RealPath", strVFPathName);--%>
|
|
<%-- session.putValue("PrintNo",strEdorNo );--%>
|
|
<%-- session.putValue("Code","endorsement");--%>
|
|
<%-- //session.putValue("PrintStream", ins);--%>
|
|
<%-- System.out.println("put session value...."+strVFPathName);--%>
|
|
<%-- //response.sendRedirect("../uw/GetF1PrintEndorse.jsp");--%>
|
|
<%-- request.getRequestDispatcher("../bq/GetF3PrintEndorse.jsp?EdorNo="+strEdorNo+"&RealPath1="+strVFPathName).forward(request,response);--%>
|
|
<%-- }--%>
|
|
<%-- }--%>
|
|
<%-- catch(Exception ex)--%>
|
|
<%-- {--%>
|
|
<%-- logger.error("程序执行异常",ex);--%>
|
|
<%-- }--%>
|
|
<%-- }--%>
|
|
<%-- else--%>
|
|
<%-- {--%>
|
|
<%-- strErrInfo = "没有输入保全号";--%>
|
|
<%-- }--%>
|
|
<%--%>--%>
|
|
<%--<body>--%>
|
|
<%--<%= strErrInfo %>--%>
|
|
<%--</body>--%>
|
|
<%--</html>--%>
|
|
|