From f97b77a95ad1cfe8bb88cd257aeedb254b01cdb8 Mon Sep 17 00:00:00 2001 From: wangzhijiang <1358525938@qq.com> Date: Fri, 1 Mar 2024 16:57:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E7=BC=96=E8=BE=91=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5-=E5=9F=BA=E7=BA=BF=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onlyoffice/controller/OnlyOfficeController.java | 13 ++++++++----- .../modules/onlyoffice/entity/OnlineFileLog.java | 6 ++++++ .../onlyoffice/service/LawsUserInfoService.java | 4 +++- .../split/service/impl/FileSpiltService.java | 2 ++ 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/controller/OnlyOfficeController.java b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/controller/OnlyOfficeController.java index c30938a..86916e9 100644 --- a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/controller/OnlyOfficeController.java +++ b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/controller/OnlyOfficeController.java @@ -142,7 +142,7 @@ public class OnlyOfficeController { @ApiOperation(value = "|onlyOffice接收文件") @PostMapping("/receiveFile") - public void receiveFile(HttpServletRequest request, HttpServletResponse response, String fileNm, String standNo, String fileId, String standName, String key) { + public void receiveFile(HttpServletRequest request, HttpServletResponse response, String fileNm, String standNo, String fileId, String standName, String key,String dataType,String jxFileName) { logger.info("**********进入receiveFile接收文档接口************"); logger.info("**********fileNm************" + fileNm + "======="); logger.info("**********standNo************" + standNo + "======="); @@ -196,7 +196,7 @@ public class OnlyOfficeController { key = keyObj.toString(); logger.info("**********key************" + key + "======="); } - lawsUserInfoService.selectOnlineFile(fileId, standName, key); + lawsUserInfoService.selectOnlineFile(fileId, standName, key,dataType,jxFileName); } } catch (Exception ex) { saved = 1; @@ -219,7 +219,7 @@ public class OnlyOfficeController { @ApiOperation(value = "|onlyOffice接收文件") @PostMapping("/receiveFileBefore") - public void receiveFileBefore(HttpServletRequest request, HttpServletResponse response, String key, String fileNm, String standNo, String pid, String taskId, String standName) { + public void receiveFileBefore(HttpServletRequest request, HttpServletResponse response, String key, String fileNm, String standNo, String pid, String taskId, String standName,String dataType,String jxFileName) { logger.info("**********进入receiveFileBefore接收文档接口************"); logger.info("**********fileNm************" + fileNm + "======="); logger.info("**********standNo************" + standNo + "======="); @@ -274,7 +274,7 @@ public class OnlyOfficeController { key = keyObj.toString(); logger.info("**********key************" + key + "======="); } - lawsUserInfoService.selectOnlineFile(busProcessModelHis.getId(), standName, key); + lawsUserInfoService.selectOnlineFile(busProcessModelHis.getId(), standName, key, dataType, jxFileName); } } } catch (Exception ex) { @@ -364,11 +364,12 @@ public class OnlyOfficeController { @ApiOperation(value = "根据在线文件Id查询所有onlyoffice历史文件") @GetMapping("/getAllOnlyOfficeHisFileById") - public Result>> getAllOnlyOfficeHisFileById(String fileId, String fileName) { + public Result>> getAllOnlyOfficeHisFileById(String fileId, String fileName,String dataType) { List> fileList = new ArrayList<>(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(OnlineFileLog::getHisId, fileId); + wrapper.eq(OnlineFileLog::getDataType, dataType); wrapper.eq(OnlineFileLog::getValidFlag, "0"); wrapper.orderByDesc(OnlineFileLog::getCreateTime); List onlineFileLogList = onlineFileLogDao.selectList(wrapper); @@ -381,6 +382,8 @@ public class OnlyOfficeController { map.put("attFileId", onlineFileLog.getAttFileId()); map.put("createTime", sdf.format(onlineFileLog.getCreateTime())); map.put("fileKey", onlineFileLog.getFileKey()); + map.put("dataType", onlineFileLog.getDataType()); + map.put("jxFileName", onlineFileLog.getJxFileName()); fileList.add(map); } return Result.OK(fileList); diff --git a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/entity/OnlineFileLog.java b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/entity/OnlineFileLog.java index 95d54b4..9caa72c 100644 --- a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/entity/OnlineFileLog.java +++ b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/entity/OnlineFileLog.java @@ -52,4 +52,10 @@ public class OnlineFileLog { @ApiModelProperty(value = "文件key") private String fileKey; + @ApiModelProperty(value = "数据类型:0历史数据 1基线保存数据") + private String dataType; + + @ApiModelProperty(value = "基线保存文件名称") + private String jxFileName; + } diff --git a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/LawsUserInfoService.java b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/LawsUserInfoService.java index 3e38174..e070954 100644 --- a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/LawsUserInfoService.java +++ b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/LawsUserInfoService.java @@ -51,7 +51,7 @@ public class LawsUserInfoService { * @param standName * @param key */ - public void selectOnlineFile(String onlineFileId, String standName, String key) { + public void selectOnlineFile(String onlineFileId, String standName, String key ,String dataType,String jxFileName) { log.info("======================standName===============================!!!!!!!!!!!!!!!!!!!!!!" + standName); String path = standEditFilePath + "hisFile/"; File file = null; @@ -111,6 +111,8 @@ public class LawsUserInfoService { onlineFileLog.setValidFlag("0"); onlineFileLog.setFileKey(key); onlineFileLog.setFilePath(fileUrl); + onlineFileLog.setDataType(dataType); + onlineFileLog.setJxFileName(jxFileName); onlineFileLogDao.insert(onlineFileLog); log.info("======================日志存入成功==============================="); if (StringUtils.isNotBlank(standName)) { diff --git a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java index 3119c66..7e0ff38 100644 --- a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java +++ b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/split/service/impl/FileSpiltService.java @@ -430,9 +430,11 @@ public class FileSpiltService { } } catch (Exception e) { + log.info("拆分出现异常了:",e); log.error(e.getMessage(),e); return -1; } + log.info("treeList长度:" + treeList.size()); if (treeList.size() > 0 && messageList.size() > 0) { sarFileSplitMenuEOMapper.insertForeach(treeList); for (int i = 0; i < messageList.size(); i++) {