zhangbb e69d6d8164 1.文件复制下载重构;
2.增加消息通知;
3.租金计划模板完善;
4.excel默认路径更改;
2019-05-26 21:17:33 +08:00

59 lines
2.3 KiB
Plaintext

<%@page import="com.tenwa.reckon.copydata.FileCopyToOtherPath"%>
<%@page import="com.tenwa.officetempalte.action.CreateOfficeAction"%>
<%@page import="jbo.app.tenwa.doc.LC_COPYFILE_LOG"%>
<%@page import="com.amarsoft.are.util.StringFunction"%>
<%@page import="com.amarsoft.are.jbo.JBOFactory"%>
<%@page import="com.amarsoft.are.jbo.JBOTransaction"%>
<%@page import="com.amarsoft.are.jbo.BizObjectManager"%>
<%@page import="com.amarsoft.are.jbo.BizObjectQuery"%>
<%@page import="com.amarsoft.are.jbo.BizObject"%>
<%@ page contentType="text/html; charset=GBK"%><%@ include file="/IncludeBeginMDAJAX.jsp"%><%
//创建资料
String contractNos = CurPage.getParameter("contractNos");
String batchNos = CurPage.getParameter("batchNos");
String userid = CurPage.getParameter("userid");
String sParam = CurPage.getParameter("sParam");
String templateNo = "8c0b32eefcf349e5b5f76d898df0bbbb";
FileCopyToOtherPath cp = new FileCopyToOtherPath();
cp.setContractNos(contractNos);
cp.setBatchNos(batchNos);
cp.setUserid(userid);
CreateOfficeAction coa = new CreateOfficeAction();
JBOTransaction tx = JBOFactory.createJBOTransaction();
if(sParam.contains("PayFileList")){
cp.copyFile("PayFileList");
}
if(sParam.contains("FileList")){
cp.copyFile("FileList");
}
if(sParam.contains("RentPlan")){
String[] contractNoArray = contractNos.split("@");
String[] batchNoArray = batchNos.split("@");
for(int i=0;i<contractNoArray.length;i++){
String fileSavePath = CurPage.getParameter("fileSavePath")+"/"+contractNoArray[i]+"/";
String templateParam = "{\"OBJECTTYPE\":\"租金支付表导出\"@\"CurUserId\":\""+userid+"\"@\"fileSavePath\":\""+fileSavePath+"\"@\"CONTRACT_NO\":\""+contractNoArray[i]+"\"}";
coa.setTemplateNo(templateNo);
coa.setTemplateParam(templateParam);
String result = coa.createOfficeByTemplate(tx);
if("success".equals(result)){
BizObjectManager bom = JBOFactory.getBizObjectManager(LC_COPYFILE_LOG.CLASS_NAME);
BizObject nbom = bom.newObject();
nbom.setAttributeValue("CONTRACT_NO", contractNoArray[i]);
nbom.setAttributeValue("BATCH_NO", batchNoArray[i]);
nbom.setAttributeValue("COPY_TYPE","租金计划");
nbom.setAttributeValue("INPUTTIME",StringFunction.getTodayNow());
nbom.setAttributeValue("INPUTUSERID",userid);
bom.saveObject(nbom);
}
}
}
out.print("SUCCESS");
%><%@ include file="/IncludeEndAJAX.jsp"%>