|
@@ -593,7 +593,15 @@ public class RecordSealController extends BaseController {
|
|
|
String userId = "CA74686406B322C7E05311016B0A442F";
|
|
String userId = "CA74686406B322C7E05311016B0A442F";
|
|
|
//项目编号
|
|
//项目编号
|
|
|
String projectCode = DateUtils.dateTimeNow();
|
|
String projectCode = DateUtils.dateTimeNow();
|
|
|
- JSONObject jsonObject = AxqCommonUtil.contractSigning(userId,"MM",fileName,keyWords,"0","0","250","250",projectCode,filePath,new HttpConnector("D:/anxinsign.jks", "123456", "Test", "CA4572A39DCB55ABE05311016B0A04B3"));
|
|
|
|
|
|
|
+ //jks路径
|
|
|
|
|
+ String jksPath = configService.selectConfigByKey("jks_path").getMsg();
|
|
|
|
|
+ //密码
|
|
|
|
|
+ String keyStorePassword = configService.selectConfigByKey("cfca_key_store_password").getMsg();
|
|
|
|
|
+ //渠道
|
|
|
|
|
+ String channel = configService.selectConfigByKey("cfca_channel").getMsg();
|
|
|
|
|
+ //platId
|
|
|
|
|
+ String platId = configService.selectConfigByKey("cfca_platId").getMsg();
|
|
|
|
|
+ JSONObject jsonObject = AxqCommonUtil.contractSigning(userId,"MM",fileName,keyWords,"0","0","250","250",projectCode,filePath,new HttpConnector(jksPath,keyStorePassword, channel,platId));
|
|
|
/**-------- CFCA盖章 结束--------**/
|
|
/**-------- CFCA盖章 结束--------**/
|
|
|
/**-------- CFCA盖章文件下载 开始--------**/
|
|
/**-------- CFCA盖章文件下载 开始--------**/
|
|
|
//获取错误码
|
|
//获取错误码
|
|
@@ -612,7 +620,7 @@ public class RecordSealController extends BaseController {
|
|
|
//String path = "D:/zhuomian/cfca/";
|
|
//String path = "D:/zhuomian/cfca/";
|
|
|
String path = configService.selectConfigByKey("cfca_file_path").getMsg();
|
|
String path = configService.selectConfigByKey("cfca_file_path").getMsg();
|
|
|
//下载文件
|
|
//下载文件
|
|
|
- AxqCommonUtil.downloadFile(contractNo,path,new HttpConnector("D:/anxinsign.jks", "123456", "Test", "CA4572A39DCB55ABE05311016B0A04B3"));
|
|
|
|
|
|
|
+ AxqCommonUtil.downloadFile(contractNo,path,new HttpConnector(jksPath,keyStorePassword,channel,platId));
|
|
|
/**-------- CFCA盖章文件下载 结束--------**/
|
|
/**-------- CFCA盖章文件下载 结束--------**/
|
|
|
//上传到文件服务器
|
|
//上传到文件服务器
|
|
|
//获取token
|
|
//获取token
|
|
@@ -760,26 +768,17 @@ public class RecordSealController extends BaseController {
|
|
|
}
|
|
}
|
|
|
return f.getAbsolutePath();
|
|
return f.getAbsolutePath();
|
|
|
}
|
|
}
|
|
|
- /* public static void main(String[] args) {
|
|
|
|
|
- String date = DateUtils.dateTimeNow();
|
|
|
|
|
- List<String> urlList = new ArrayList<>();
|
|
|
|
|
- urlList.add("http://huyi.img.minpay.cc/file/000000/doc/20210823/8a2ea656-8f98-4d37-98a1-132c1d4fc768.doc");
|
|
|
|
|
- //提取文件名
|
|
|
|
|
- List<String> fileNameList = new ArrayList<>();
|
|
|
|
|
- fileNameList.add("招采文件.doc");
|
|
|
|
|
- for(int i =0 ; i < urlList.size() ;i++){
|
|
|
|
|
- String directory = FileConstants.REMOTE_FILE_PATH;
|
|
|
|
|
- //文件下载
|
|
|
|
|
- String filePath = downloadFile(urlList.get(i),fileNameList.get(i));
|
|
|
|
|
- //加载word示例文档
|
|
|
|
|
- Document doc = new Document();
|
|
|
|
|
- doc.loadFromFile(filePath);
|
|
|
|
|
- //保存为PDF格式
|
|
|
|
|
- doc.saveToFile(directory + fileNameList.get(i) +date+ ".pdf", FileFormat.PDF);
|
|
|
|
|
- filePath = directory + fileNameList.get(i) +date+ ".pdf";
|
|
|
|
|
- System.out.println("转换成功");
|
|
|
|
|
- }
|
|
|
|
|
- }*/
|
|
|
|
|
|
|
+// public static void main(String[] args) throws Exception{
|
|
|
|
|
+// int days = 14;
|
|
|
|
|
+// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//注意月份是MM
|
|
|
|
|
+// GregorianCalendar cal = new GregorianCalendar();
|
|
|
|
|
+// Date date = simpleDateFormat.parse("2021-09-30 00:00:00");
|
|
|
|
|
+// cal.setTime(date);
|
|
|
|
|
+// cal.add(Calendar.DATE, -days);
|
|
|
|
|
+// String date2 = DateUtils.parseDateToStr("yyyy-MM-dd",cal.getTime());
|
|
|
|
|
+// System.out.println(DateUtils.parseDateToStr("yyyy-MM-dd",cal.getTime()));
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|