apzl_leasing/WebContent/FormatDoc/GetReportFile.jsp
2018-06-03 22:26:41 +08:00

40 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@page import="com.amarsoft.are.jbo.*"%><%@ page contentType="text/html; charset=GBK"%><%@ include file="/IncludeBeginMDAJAX.jsp"%><%
/*
Author: xdhou 2005.02.17
Content: 检查生成的格式化报告文件是否存在
Input Param:
DocID: 文档类别( FORMATDOC_CATALOG中的调查报告贷后检查报告...)
ObjectNo对象编号
ObjectType对象类型
*/
String sFlag = "",sSerialNoNew = "",sFileName = "";
//获得页面参数
String sObjectNo = CurPage.getParameter("ObjectNo"); //业务流水号
String sObjectType = CurPage.getParameter("ObjectType"); //对象类型
String sDocID = CurPage.getParameter("DocID"); //对象类型
//将空值转化为空字符串
if(sObjectNo == null) sObjectNo = "";
if(sObjectType == null) sObjectType = "";
if(sDocID == null) sDocID = "";
// 获取文档存储路径方式
String sSql1 = " select SerialNo,SavePath from O where ObjectType=:ObjectType and ObjectNo=:ObjectNo ";
if(!sObjectType.equals("PutOutApply"))
sSql1 += " and DocID='"+sDocID+"'";
BizObject bo = JBOFactory.createBizObjectQuery("jbo.formatdoc.FORMATDOC_RECORD", sSql1)
.setParameter("ObjectType", sObjectType).setParameter("ObjectNo", sObjectNo).getSingleResult(false);
sFileName = bo==null?"":bo.getAttribute("SavePath").getString();
if(sFileName==null) sFileName="";
if(!sFileName.equals("")){
java.io.File file = new java.io.File(sFileName);
if(file.exists()){
sFlag = "true";
}else{
sFlag = "false";
}
}else{
sFlag = "false";
}
out.print(sFlag);
%><%@ include file="/IncludeEndAJAX.jsp"%>