|
|
@@ -520,8 +520,8 @@ public class RecordSealController extends BaseController {
|
|
|
|
|
|
// 文件路径
|
|
|
String filePath = "";
|
|
|
- // 文件名称
|
|
|
- String fileName = "";
|
|
|
+// // 文件名称
|
|
|
+// String fileName = "";
|
|
|
// 不是已盖章文件
|
|
|
if (financeFileList.size() == 0) {
|
|
|
/**-------- word 变量替换 开始--------**/
|
|
|
@@ -571,6 +571,8 @@ public class RecordSealController extends BaseController {
|
|
|
//保存为PDF格式
|
|
|
//截取文件名称
|
|
|
//获取.的位置
|
|
|
+// int index = String.valueOf(fileInfList.get(i).get("zfcName")).lastIndexOf(".");
|
|
|
+// fileName =String.valueOf(fileInfList.get(i).get("zfcName")).substring(0,index);
|
|
|
// doc.saveToFile(directory + fileName + currecntDate + ".pdf", FileFormat.PDF);
|
|
|
WordPdfUtil.doc2pdf(filePath,directory + String.valueOf(fileInfList.get(i).get("zfcName")) + currecntDate + ".pdf");
|
|
|
filePath = directory + String.valueOf(fileInfList.get(i).get("zfcName")) + currecntDate + ".pdf";
|
|
|
@@ -583,11 +585,11 @@ public class RecordSealController extends BaseController {
|
|
|
// 文件服务器的文件下载到本地
|
|
|
PubFileInf fileInf = fileInfService.getById(financeFileList.get(0).getZffrFileId());
|
|
|
filePath = downloadFile(fileInf.getPfiFileUrl(), fileInf.getPfiFileName());
|
|
|
- int index = fileInf.getPfiFileName().lastIndexOf(".");
|
|
|
- fileName = fileInf.getPfiFileName().substring(0,index);
|
|
|
+// int index = fileInf.getPfiFileName().lastIndexOf(".");
|
|
|
+// fileName = fileInf.getPfiFileName().substring(0,index);
|
|
|
|
|
|
logger.info("是已盖章文件的" + filePath + "!!!!!!!!!");
|
|
|
- logger.info("是已盖章文件的" + fileName + "!!!!!!!!!");
|
|
|
+ logger.info("是已盖章文件的" + String.valueOf(fileInfList.get(i).get("zfcName")) + "!!!!!!!!!");
|
|
|
}
|
|
|
|
|
|
/**-------- 获取合同盖章关键字 开始--------**/
|
|
|
@@ -639,7 +641,7 @@ public class RecordSealController extends BaseController {
|
|
|
String channel = configService.selectConfigByKey("cfca_channel").getMsg();
|
|
|
//platId
|
|
|
String platId = configService.selectConfigByKey("cfca_platId").getMsg();
|
|
|
- JSONObject jsonObject = AxqCommonUtil.contractSigning(userIds,"MM",fileName,keyWords,"0","0","250","250",projectCode,filePath,new HttpConnector(jksPath,keyStorePassword, channel,platId));
|
|
|
+ JSONObject jsonObject = AxqCommonUtil.contractSigning(userIds,"MM",String.valueOf(fileInfList.get(i).get("zfcName")),keyWords,"0","0","250","250",projectCode,filePath,new HttpConnector(jksPath,keyStorePassword, channel,platId));
|
|
|
/**-------- CFCA盖章 结束--------**/
|
|
|
/**-------- CFCA盖章文件下载 开始--------**/
|
|
|
//获取错误码
|
|
|
@@ -667,8 +669,8 @@ public class RecordSealController extends BaseController {
|
|
|
//文件传输
|
|
|
File file = new File(path + contractNo + ".pdf");
|
|
|
FileInputStream input = new FileInputStream(file);
|
|
|
- int index = String.valueOf(fileInfList.get(i).get("zfcName")).lastIndexOf(".");
|
|
|
- MultipartFile multipartFile =new MockMultipartFile("file", String.valueOf(fileInfList.get(i).get("zfcName")).substring(0,index)+".pdf", "text/plain", IOUtils.toByteArray(input));
|
|
|
+// int index = String.valueOf(fileInfList.get(i).get("zfcName")).lastIndexOf(".");
|
|
|
+ MultipartFile multipartFile =new MockMultipartFile("file", String.valueOf(fileInfList.get(i).get("zfcName"))+".pdf", "text/plain", IOUtils.toByteArray(input));
|
|
|
R<com.tianhu.system.api.domain.PubFileInf> fileResult = remoteFileService.uploadFile(multipartFile,"01", "02","00",companyId,token);
|
|
|
|
|
|
ZcFinanceRecordFileRel recordFileRel =new ZcFinanceRecordFileRel();
|