<%@page import="com.tenwa.reckon.executor.CreateTransactionExecutor"%> <%@page import="com.tenwa.file.TemplateManage.*"%> <%@page import="java.net.URLDecoder"%> <%@page import="com.amarsoft.are.jbo.impl.BizObjectTableMapper"%> <%@page import="com.amarsoft.awe.util.DBKeyHelp"%> <%@page import="com.amarsoft.awe.common.attachment.*"%> <%@page import="com.amarsoft.awe.common.attachment.*"%> <%@page import="com.amarsoft.are.util.json.*"%> <%@page import="com.tenwa.officetempalte.util.FileOperatorUtil"%> <%@page import="java.io.*" %> <%@ page contentType="text/html; charset=GBK"%> <%@ include file="/IncludeBegin.jsp"%> <% ServletContext s1=this.getServletContext(); String rootPath=s1.getRealPath("/"); AmarsoftUpload myAmarsoftUpload = new AmarsoftUpload(); myAmarsoftUpload.initialize(pageContext); myAmarsoftUpload.upload(); int cindex=0; String cmessage=""; if (!myAmarsoftUpload.getFiles().getFile(0).isMissing()){ try { JBOTransaction tx=JBOFactory.getFactory().createTransaction(); String importparam= CurPage.getParameter("importparam"); importparam=importparam.replaceAll("@", ","); JSONObject paramJson=JSONDecoder.decode(importparam); MapsourceMap=FileOperatorUtil.getJsonObjectToMap(paramJson); System.out.println(sourceMap.toString()); CreateTransactionExecutor transaction = new CreateTransactionExecutor(); cindex=transaction.importRentPlan( myAmarsoftUpload.getFiles().getFile(0).getFileName(), myAmarsoftUpload.getFiles().getFile(0).toInputStream(), sourceMap); myAmarsoftUpload = null; }catch(Exception e){ e.printStackTrace(); myAmarsoftUpload = null; cmessage=e.getMessage(); %> <% } } %> <%@ include file="/IncludeEnd.jsp"%>