|
|
@@ -523,7 +523,7 @@ public class OwnMessageController extends BaseController {
|
|
|
//保存为PDF格式
|
|
|
//截取文件名称
|
|
|
//获取.的位置
|
|
|
- int index = fileInfList.get(i).getPfiFileName().indexOf(".");
|
|
|
+ int index = fileInfList.get(i).getPfiFileName().lastIndexOf(".");
|
|
|
fileName = fileInfList.get(i).getPfiFileName().substring(0,index);
|
|
|
// doc.saveToFile(directory + fileName + currecntDate + ".pdf", FileFormat.PDF);
|
|
|
WordPdfUtil.doc2pdf(filePath,directory + fileName + currecntDate + ".pdf");
|
|
|
@@ -534,7 +534,7 @@ public class OwnMessageController extends BaseController {
|
|
|
// 文件服务器的文件下载到本地
|
|
|
PubFileInf fileInf = fileInfService.getById(financeFileList.get(0).getZffrFileId());
|
|
|
filePath = downloadFile(fileInf.getPfiFileUrl(), fileInf.getPfiFileName());
|
|
|
- int index = fileInf.getPfiFileName().indexOf(".");
|
|
|
+ int index = fileInf.getPfiFileName().lastIndexOf(".");
|
|
|
fileName = fileInf.getPfiFileName().substring(0,index);
|
|
|
}
|
|
|
|
|
|
@@ -615,7 +615,10 @@ public class OwnMessageController extends BaseController {
|
|
|
//文件传输
|
|
|
File file = new File(path + contractNo + ".pdf");
|
|
|
FileInputStream input = new FileInputStream(file);
|
|
|
- MultipartFile multipartFile =new MockMultipartFile("file", file.getName(), "text/plain", IOUtils.toByteArray(input));
|
|
|
+ int index = fileInfList.get(i).getPfiFileName().lastIndexOf(".");
|
|
|
+
|
|
|
+// MultipartFile multipartFile =new MockMultipartFile("file", file.getName(), "text/plain", IOUtils.toByteArray(input));
|
|
|
+ MultipartFile multipartFile =new MockMultipartFile("file", fileInfList.get(i).getPfiFileName().substring(0,index), "text/plain", IOUtils.toByteArray(input));
|
|
|
R<com.tianhu.system.api.domain.PubFileInf> fileResult = remoteFileService.uploadFile(multipartFile,"01", "02","00",companyId,token);
|
|
|
|
|
|
ZcFinanceFileRel financeFileRel;
|