From c8d5cd6fdc7c6774e090ad168a1d110da15d9dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Mon, 25 Mar 2024 14:15:50 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/onlyoffice/index.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jero-web/src/views/onlyoffice/index.vue b/jero-web/src/views/onlyoffice/index.vue index 43dd31c..1b99dc1 100644 --- a/jero-web/src/views/onlyoffice/index.vue +++ b/jero-web/src/views/onlyoffice/index.vue @@ -24,10 +24,10 @@ export default { if (val.id) { const oldFileName = '比亚迪企业标准' const nowTime = new Date().getTime() - const serialNumber = 'x/xx xxxx-xxxx' + const standCode = 'G/BYD xxxx-xxxx' const standName = '比亚迪企业标准' - const estDepart = '起草部门' - const drafts = '起草人' + const draftingDepartment = '起草部门' + const draftsman = '起草人' const assessor = '评审人员' const focalUnit = '归口单位' const watermark = '比亚迪' @@ -38,9 +38,9 @@ export default { '&taskIds=' + val.taskId + '&oldFileName=' + oldFileName + '&assessor=' + assessor + '&fileType=docx' + '&attId=' + val.id + '&fileUrl=' + val.downLoadUrl + '&key=' + val.id + nowTime + '&filePath=' + val.editFilePath + '&fileName=' + val.fileName + - '&userId=' + val.userId + '&userName=admin' + '&serialNumber=' + serialNumber + - '&standName=' + standName + '&replaceStand=' + replaceStand + '&drafts=' + drafts + - '&estDepart=' + estDepart + '&focalUnit=' + focalUnit + '&watermark=' + watermark) + '&userId=' + val.userId + '&userName=admin' + '&standCode=' + standCode + + '&standName=' + standName + '&replaceStand=' + replaceStand + '&draftsman=' + draftsman + + '&draftingDepartment=' + draftingDepartment + '&focalUnit=' + focalUnit + '&watermark=' + watermark) } }) } else { From d9dd9dd0f4a6191c0c188c93a97697cb864a16e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Mon, 25 Mar 2024 16:06:30 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/onlyoffice/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/views/onlyoffice/index.vue b/jero-web/src/views/onlyoffice/index.vue index 1b99dc1..af38187 100644 --- a/jero-web/src/views/onlyoffice/index.vue +++ b/jero-web/src/views/onlyoffice/index.vue @@ -37,7 +37,7 @@ export default { window.open(window.CONFIG.onlyOfficeRoute + '/editor?fileId=' + val.id + '&pid=' + val.pid + '&taskIds=' + val.taskId + '&oldFileName=' + oldFileName + '&assessor=' + assessor + '&fileType=docx' + '&attId=' + val.id + '&fileUrl=' + val.downLoadUrl + - '&key=' + val.id + nowTime + '&filePath=' + val.editFilePath + '&fileName=' + val.fileName + + '&key=' + nowTime + '&filePath=' + val.editFilePath + '&fileName=' + val.fileName + '&userId=' + val.userId + '&userName=admin' + '&standCode=' + standCode + '&standName=' + standName + '&replaceStand=' + replaceStand + '&draftsman=' + draftsman + '&draftingDepartment=' + draftingDepartment + '&focalUnit=' + focalUnit + '&watermark=' + watermark) From f430311eedd5ab5b25d86490ae9396ec96029d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Tue, 26 Mar 2024 11:09:31 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OnlyOfficeController.java | 3 +- .../impl/BusProcessModelHisServiceImpl.java | 48 +++++++++++-------- 2 files changed, 29 insertions(+), 22 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 1d69f8d..b63abff 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 @@ -564,6 +564,7 @@ public class OnlyOfficeController { // 发送POST请求并获取响应 ResponseEntity responseEntity2 = restTemplate2.postForEntity(bydUploadFileUrl, requestEntity2, String.class); String body2 = responseEntity2.getBody(); + logger.info("基线版本文件上传接口结果:" + body2); JSONObject jsonObject2 = JSONObject.parseObject(body2); String data = jsonObject2.getString("data"); createTimeLatestOnlineFileLog.setBydJxFileId(data); @@ -571,7 +572,7 @@ public class OnlyOfficeController { createTimeLatestOnlineFileLog2.setBydJxFileId(data); this.onlineFileLogDao.insert(createTimeLatestOnlineFileLog2); - logger.info("基线版本文件上传接口结果:" + body2); +// logger.info("基线版本文件上传接口结果:" + body2); }catch (Exception ex){ ex.printStackTrace(); diff --git a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/BusProcessModelHisServiceImpl.java b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/BusProcessModelHisServiceImpl.java index a4b1d54..14af4ac 100644 --- a/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/BusProcessModelHisServiceImpl.java +++ b/byd-structuredplugins-serve/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/BusProcessModelHisServiceImpl.java @@ -564,34 +564,40 @@ public class BusProcessModelHisServiceImpl extends ServiceImpl> pageList(HttpServletRequest req, BusProcessModelHis processModelHis, @@ -521,6 +525,8 @@ public class OnlyOfficeController { public Result updateOnlineFileLogJxInfo(@RequestBody JSONObject json){ String jxFileName = json.getString("jxFileName"); String fileId = json.getString("fileId"); + String appId = json.getString("appId"); + String token = json.getString("Authorization"); String dataType = "1"; Date now = new Date(); @@ -547,7 +553,8 @@ public class OnlyOfficeController { HttpHeaders headers2 = new HttpHeaders(); headers2.setContentType(MediaType.MULTIPART_FORM_DATA); - + headers2.add("appId",appId); + headers2.add("Authorization",token); // 创建MultiValueMap对象,用于存储请求参数 MultiValueMap params2 = new LinkedMultiValueMap<>(); @@ -577,6 +584,7 @@ public class OnlyOfficeController { }catch (Exception ex){ ex.printStackTrace(); logger.error("基线版本文件上传失败:" + ex.getMessage()); + return Result.error("更新基线信息失败!"); } logger.info("基线版本文件上传接口结束=========================================="); @@ -587,6 +595,8 @@ public class OnlyOfficeController { RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); + headers.add("appId",appId); + headers.add("Authorization",token); // 创建MultiValueMap对象,用于存储请求参数 MultiValueMap params = new LinkedMultiValueMap<>(); @@ -603,6 +613,7 @@ public class OnlyOfficeController { }catch (Exception ex){ ex.printStackTrace(); logger.error("推送保存基线版本文件信息失败:" + ex.getMessage()); + return Result.error("更新基线信息失败!"); } logger.info("推送保存基线版本文件信息结束=========================================="); @@ -653,6 +664,32 @@ public class OnlyOfficeController { return result; } + @ApiOperation(value = "关闭页面回调接口") + @GetMapping("/onlyOfficeCloseTab") + public Result onlyOfficeCloseTab(String fileId, String appId, String Authorization, HttpServletResponse response, HttpServletRequest request) { + try { +// String appId = request.getParameter("appId"); +// String token = request.getParameter("Authorization"); + String token = Authorization; + RestTemplate restTemplate = new RestTemplate(); + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + headers.add("appId",appId); + headers.add("Authorization",token); + // 创建MultiValueMap对象,用于存储请求参数 + MultiValueMap params = new LinkedMultiValueMap<>(); + params.add("fileId", fileId); + // 使用HttpEntity对象包装请求体和请求头 + HttpEntity> requestEntity = new HttpEntity<>(params, headers); + // 发送POST请求并获取响应 + ResponseEntity responseEntity = restTemplate.postForEntity(unlockUrl, requestEntity, String.class); + String body = responseEntity.getBody(); + logger.info("关闭页面回调接口:" + body); + }catch (Exception ex){ + ex.printStackTrace(); + } + return Result.OK(); + } @ApiOperation(value = "|File|在线编辑下载docx文件") @GetMapping("/onlyOfficeDownloadDocxFile") diff --git a/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-dev.yml b/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-dev.yml index 314fc1f..e0b4416 100644 --- a/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-dev.yml +++ b/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-dev.yml @@ -236,4 +236,5 @@ byd: saveBaseLineDocIdUrl: http://127.0.0.1:9998/saveBaseLineDocIdUrl splitResultUrl: http://127.0.0.1:9998/splitResultUrl downLoadFileUrl: http://127.0.0.1:9998/downLoadFileUrl + unlockUrl: http://127.0.0.1:9998/api/qbp/document/unlock diff --git a/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-prod.yml b/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-prod.yml index e60367b..11366fe 100644 --- a/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-prod.yml +++ b/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-prod.yml @@ -220,3 +220,4 @@ byd: saveBaseLineDocIdUrl: http://127.0.0.1:9998/api/qbp/organization/saveBaseLineDocId splitResultUrl: http://127.0.0.1:9998/api/qbp/library/structured downLoadFileUrl: http://127.0.0.1:9998/ipd-files/file/downLoad + unlockUrl: http://127.0.0.1:9998/api/qbp/document/unlock diff --git a/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-test.yml b/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-test.yml index 14244c7..8373fe7 100644 --- a/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-test.yml +++ b/byd-structuredplugins-serve/laws-single-startup/src/main/resources/application-test.yml @@ -232,3 +232,4 @@ byd: saveBaseLineDocIdUrl: http://127.0.0.1:9998/saveBaseLineDocIdUrl splitResultUrl: http://127.0.0.1:9998/splitResultUrl downLoadFileUrl: http://127.0.0.1:9998/downLoadFileUrl + unlockUrl: http://127.0.0.1:9998/api/qbp/document/unlock From fb70fd01b59635c7dfbf770f8df882b4acedd6fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Tue, 26 Mar 2024 17:09:06 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/onlyoffice/index.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jero-web/src/views/onlyoffice/index.vue b/jero-web/src/views/onlyoffice/index.vue index af38187..e41f9c2 100644 --- a/jero-web/src/views/onlyoffice/index.vue +++ b/jero-web/src/views/onlyoffice/index.vue @@ -10,6 +10,8 @@