修改对接接口
This commit is contained in:
+2
-1
@@ -67,6 +67,7 @@ public class DockingController {
|
||||
String title = json.getString("title");
|
||||
String docId = json.getString("docId");
|
||||
String filePath = json.getString("filePath");
|
||||
String token = json.getString("token");
|
||||
|
||||
SarFileSplitInfoEO sarFileSplitInfoEO = new SarFileSplitInfoEO();
|
||||
sarFileSplitInfoEO.setFileName(fileName);
|
||||
@@ -75,7 +76,7 @@ public class DockingController {
|
||||
sarFileSplitInfoEO.setTitle(title);
|
||||
sarFileSplitInfoEO.setId(docId);
|
||||
sarFileSplitInfoEO.setFilePath(filePath);
|
||||
documentSplitService.add(sarFileSplitInfoEO, CommonConstant.SPLIT_SOURCE_2);
|
||||
documentSplitService.add(token,sarFileSplitInfoEO, CommonConstant.SPLIT_SOURCE_2);
|
||||
|
||||
Map<String,String> resultMap = new HashMap<>();
|
||||
resultMap.put("infoId",docId);
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ public class DocumentSplitController {
|
||||
@PostMapping(value = "/split")
|
||||
@ApiOperationSupport(order = 6)
|
||||
public Result<T> split(@Validated @RequestBody SarFileSplitInfoEO sarFileSplitInfoEO) {
|
||||
documentSplitService.add(sarFileSplitInfoEO, CommonConstant.SPLIT_SOURCE_1);
|
||||
documentSplitService.add("",sarFileSplitInfoEO, CommonConstant.SPLIT_SOURCE_1);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public interface IDocumentSplitService {
|
||||
* 文档拆分-拆分
|
||||
* @param sarFileSplitInfoEO
|
||||
*/
|
||||
void add(SarFileSplitInfoEO sarFileSplitInfoEO,String splitSource);
|
||||
void add(String token,SarFileSplitInfoEO sarFileSplitInfoEO,String splitSource);
|
||||
|
||||
/**
|
||||
* 拆分文档保存
|
||||
|
||||
+2
-4
@@ -312,9 +312,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(SarFileSplitInfoEO sarFileSplitInfoEO,String splitSource) {
|
||||
// // 企标权限校验
|
||||
// enterpriseCheck(sarFileSplitInfoEO);
|
||||
public void add(String token,SarFileSplitInfoEO sarFileSplitInfoEO,String splitSource) {
|
||||
// 唯一校验
|
||||
uniqueCheck(sarFileSplitInfoEO);
|
||||
// 保存文本拆分数据
|
||||
@@ -338,6 +336,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||
headers.add("Authorization",token);
|
||||
|
||||
// 创建MultiValueMap对象,用于存储请求参数
|
||||
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
|
||||
@@ -368,7 +367,6 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
}
|
||||
});
|
||||
thread.start();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+7
-5
@@ -526,7 +526,7 @@ public class OnlyOfficeController {
|
||||
String jxFileName = json.getString("jxFileName");
|
||||
String fileId = json.getString("fileId");
|
||||
String appId = json.getString("appId");
|
||||
String token = json.getString("Authorization");
|
||||
String token = json.getString("token");
|
||||
String dataType = "1";
|
||||
|
||||
Date now = new Date();
|
||||
@@ -610,6 +610,11 @@ public class OnlyOfficeController {
|
||||
ResponseEntity<String> responseEntity = restTemplate.postForEntity(bydSaveBaseLineDocIdUrl, requestEntity, String.class);
|
||||
String body = responseEntity.getBody();
|
||||
logger.info("推送保存基线版本文件信息结果:" + body);
|
||||
JSONObject jres = JSONObject.parseObject(body);
|
||||
String code = jres.getString("code");
|
||||
if(!"000000".equals(code)){
|
||||
return Result.error(jres.getString("mesg"));
|
||||
}
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
logger.error("推送保存基线版本文件信息失败:" + ex.getMessage());
|
||||
@@ -666,11 +671,8 @@ public class OnlyOfficeController {
|
||||
|
||||
@ApiOperation(value = "关闭页面回调接口")
|
||||
@GetMapping("/onlyOfficeCloseTab")
|
||||
public Result<String> onlyOfficeCloseTab(String fileId, String appId, String Authorization, HttpServletResponse response, HttpServletRequest request) {
|
||||
public Result<String> onlyOfficeCloseTab(String fileId, String appId, String token, 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);
|
||||
|
||||
Reference in New Issue
Block a user