文件下载添加租金计划表
This commit is contained in:
parent
69666f4201
commit
a8ee3258af
@ -57,11 +57,39 @@ public class CopyFileToOther {
|
|||||||
StringBuffer docSb = new StringBuffer();
|
StringBuffer docSb = new StringBuffer();
|
||||||
for (String docName : docNameList) {
|
for (String docName : docNameList) {
|
||||||
String[] docNames = docName.split("@");
|
String[] docNames = docName.split("@");
|
||||||
if(docNames[0].length()>3){
|
if("RentPlan".equals(docNames[0])){
|
||||||
docSb.append("'");
|
String[] contractNoArray = contractNos.split("@");
|
||||||
docSb.append(docNames[1]);
|
String[] batchNoArray = batchNos.split("@");
|
||||||
docSb.append("',");
|
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){
|
if(docSb!=null&&docSb.length()>0){
|
||||||
cp.copyFile(docSb.substring(0,docSb.length()-1).toString());
|
cp.copyFile(docSb.substring(0,docSb.length()-1).toString());
|
||||||
@ -69,7 +97,7 @@ public class CopyFileToOther {
|
|||||||
return "Êý¾ÝÓÐÎó£¡";
|
return "Êý¾ÝÓÐÎó£¡";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fileList.contains("RentPlan")){
|
/*if(fileList.contains("RentPlan")){
|
||||||
|
|
||||||
String[] contractNoArray = contractNos.split("@");
|
String[] contractNoArray = contractNos.split("@");
|
||||||
String[] batchNoArray = batchNos.split("@");
|
String[] batchNoArray = batchNos.split("@");
|
||||||
@ -94,7 +122,7 @@ public class CopyFileToOther {
|
|||||||
bom.saveObject(nbom);
|
bom.saveObject(nbom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
tx.commit();
|
tx.commit();
|
||||||
//ѹËõ
|
//ѹËõ
|
||||||
FileOutputStream fos1 = new FileOutputStream(new File(fileSavePath+"/"+time+".zip"));
|
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;
|
return lst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user