<%@page import="com.amarsoft.app.edoc.EDocument"%> <%@page import="org.jdom.JDOMException"%> <%@ page contentType="text/html; charset=GBK"%> <%@ include file="/IncludeBegin.jsp"%><% /* Author: fmwu 2008/01/09 Content: 电子文档模板状态 */ String sEDocNo = CurPage.getParameter("EDocNo"); String sTagList = ""; String sCheckTagList = ""; String sStateFmt="正常"; String sStateDef="正常"; //格式文件状态 String sFullPathFmt = Sqlca.getString("select FullPathFmt from EDOC_DEFINE where EDocNo='"+sEDocNo+"'"); if (sFullPathFmt == null) sFullPathFmt=""; java.io.File dFileFmt=new java.io.File(sFullPathFmt); if(!dFileFmt.exists()){ sStateFmt="文档格式文件不存在,需要重新上传!!"; }else{ try { sTagList = EDocument.getTagList(sFullPathFmt); } catch (IOException e) { throw new JDOMException("模板格式文件的格式不符合要求,请重新上传符合要求规范的格式文件"); } } String sFullPathDef = Sqlca.getString("select FullPathDef from EDOC_DEFINE where EDocNo='"+sEDocNo+"'"); if (sFullPathDef == null) sFullPathDef=""; java.io.File dFileDef =new java.io.File(sFullPathDef); if(!dFileDef.exists()){ sStateDef="数据定义文件不存在,需要重新上传!!"; }else{ if (dFileFmt.exists()) { EDocument doc = new EDocument(sFullPathFmt,sFullPathDef); sCheckTagList = doc.checkTag(); } } %> 电子文档状态
 
<% if (dFileFmt.exists()) { %> <%=new Button("查看格式文件","查看格式文件","javascript:TemplateViewFmt()","","").getHtmlText()%> <% } %> <% if (dFileDef.exists()) { %> <%=new Button("查看数据定义文件","查看数据定义文件","javascript:TemplateViewDef()","","").getHtmlText()%> <% } %> <% if (dFileFmt.exists() && dFileDef.exists()) { %> <%-- <%=new Button("查看文档示例","查看文档示例","javascript:TemplateViewExample()","","").getHtmlText()%> --%> <% } %>
格式文件状态: <%=sStateFmt%>
数据定义文件状态: <%=sStateDef%>
文档格式文件存在的标签列表:
数据定义和格式文件标签检查:
<%@ include file="/IncludeEnd.jsp"%>