文件下载添加租金计划表
This commit is contained in:
parent
69666f4201
commit
a8ee3258af
@ -57,19 +57,47 @@ public class CopyFileToOther {
|
||||
StringBuffer docSb = new StringBuffer();
|
||||
for (String docName : docNameList) {
|
||||
String[] docNames = docName.split("@");
|
||||
if("RentPlan".equals(docNames[0])){
|
||||
String[] contractNoArray = contractNos.split("@");
|
||||
String[] batchNoArray = batchNos.split("@");
|
||||
for(int i=0;i<contractNoArray.length;i++){
|
||||
String fileSavePath_xml = fileSavePath_temp+"/"+contractNoArray[i]+"/";
|
||||
String templateParam = "{\"OBJECTTYPE\":\"租金支付表导出\"@\"CurUserId\":\""+userid+"\"@\"fileSavePath\":\""+fileSavePath_xml+"\"@\"CONTRACT_NO\":\""+contractNoArray[i]+"\"}";
|
||||
System.out.println("路径为:"+fileSavePath_xml);
|
||||
File temDir = new File(fileSavePath_xml);
|
||||
if(!temDir.exists()){
|
||||
temDir.mkdirs();
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(docNames[0].length()>3){
|
||||
docSb.append("'");
|
||||
docSb.append(docNames[1]);
|
||||
docSb.append("',");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(docSb!=null&&docSb.length()>0){
|
||||
cp.copyFile(docSb.substring(0,docSb.length()-1).toString());
|
||||
}else{
|
||||
return "Êý¾ÝÓÐÎó£¡";
|
||||
}
|
||||
}
|
||||
if(fileList.contains("RentPlan")){
|
||||
/*if(fileList.contains("RentPlan")){
|
||||
|
||||
String[] contractNoArray = contractNos.split("@");
|
||||
String[] batchNoArray = batchNos.split("@");
|
||||
@ -94,7 +122,7 @@ public class CopyFileToOther {
|
||||
bom.saveObject(nbom);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
tx.commit();
|
||||
//ѹËõ
|
||||
FileOutputStream fos1 = new FileOutputStream(new File(fileSavePath+"/"+time+".zip"));
|
||||
|
||||
@ -39,6 +39,12 @@ public class FtpDownloadFile {
|
||||
|
||||
}
|
||||
}
|
||||
//Ìí¼Ó×â½ð¼Æ»®ÏÔʾ
|
||||
BusinessObject docRent = BusinessObject.createBusinessObject();
|
||||
docRent.setAttributeValue("ID", "RentPlan");
|
||||
docRent.setAttributeValue("SortNo", "RentPlan");
|
||||
docRent.setAttributeValue("Name","×â½ð¼Æ»®±í");
|
||||
lst.add(docRent);
|
||||
return lst;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user