|
@@ -83,6 +83,11 @@ public class CreditHandleController extends BaseController {
|
|
|
//消息待办服务类
|
|
|
@Autowired
|
|
|
private RemoteSystemService remoteSystemService;
|
|
|
+ //融信文件关系服务类
|
|
|
+ @Autowired
|
|
|
+ private IZcFinanceFileRelService financeFileRelService;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 融信确权
|
|
@@ -753,9 +758,6 @@ public class CreditHandleController extends BaseController {
|
|
|
ps.put("expireDate",expireDateA);
|
|
|
//调用替换word中的变量
|
|
|
WordUtil.wordTemplate(filePath,filePath,ps);
|
|
|
- //加载word示例文档
|
|
|
- Document doc = new Document();
|
|
|
- doc.loadFromFile(filePath);
|
|
|
//保存为PDF格式
|
|
|
//截取文件名称
|
|
|
//获取.的位置
|
|
@@ -854,26 +856,40 @@ public class CreditHandleController extends BaseController {
|
|
|
}
|
|
|
return val;
|
|
|
}
|
|
|
- /* 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("转换成功");
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取融信盖章文件
|
|
|
+ * @param map
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @PutMapping("/getCreditSealFile")
|
|
|
+ public AjaxResult getCreditSealFile(@RequestBody Map<String,Object> map)throws Exception
|
|
|
+ {
|
|
|
+ //获取融信编号
|
|
|
+ String zfiId = CommonUtil.objToString(map.get("zfiId"));
|
|
|
+ //查询融信和文件的关系表
|
|
|
+ LambdaQueryWrapper<ZcFinanceFileRel> relLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ relLambdaQueryWrapper.eq(ZcFinanceFileRel::getZffrFinanceId,zfiId);
|
|
|
+ List<ZcFinanceFileRel> financeFileRelList = financeFileRelService.findZcFinanceFileRels(relLambdaQueryWrapper);
|
|
|
+ //文件信息
|
|
|
+ List<PubFileInf> list = new ArrayList<>();
|
|
|
+ for(int i = 0 ; i < financeFileRelList.size();i ++){
|
|
|
+ ZcFinanceFileRel rel = financeFileRelList.get(i);
|
|
|
+ //获取文件编号
|
|
|
+ String fileId = rel.getZffrFileId();
|
|
|
+ //获取文件信息
|
|
|
+ PubFileInf fileInf = fileInfService.getById(fileId);
|
|
|
+ if(fileInf == null){
|
|
|
+ throw new Exception("获取文件信息失败");
|
|
|
+ }
|
|
|
+ list.add(fileInf);
|
|
|
}
|
|
|
- }*/
|
|
|
+ //返回
|
|
|
+ Map<String,Object> p = new HashMap<>();
|
|
|
+ p.put("list",list);
|
|
|
+ return AjaxResult.success(p);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|