feat:use all config file
This commit is contained in:
parent
4b8d04538c
commit
22eb5d974c
@ -26,9 +26,6 @@ import java.nio.file.*;
|
||||
@Service
|
||||
public class FileService {
|
||||
|
||||
@Value("${collabora.file-storage-path}")
|
||||
private String BASE_DIR;
|
||||
|
||||
@Autowired
|
||||
private KingdeeService kingdeeService;
|
||||
|
||||
|
@ -37,13 +37,16 @@ public class KingdeeService {
|
||||
@Value("${collabora.file-storage-path}")
|
||||
private String BASE_DIR;
|
||||
|
||||
@Value("${ensign.kingdee.attachment-query-uri}")
|
||||
private String attachmentQueryURI;
|
||||
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
public String requestFile(String attPkId) {
|
||||
try {
|
||||
String accessToken = authService.initAccessToken();
|
||||
URI newUri = new URI(authService.initBasePath() + "/ierp/kapi/v2/yem/yem_receipt/AttachmentsQueryAPI/Query");
|
||||
URI newUri = new URI(authService.initBasePath() + attachmentQueryURI);
|
||||
|
||||
ClientHttpRequest delegate = new SimpleClientHttpRequestFactory().createRequest(newUri, HttpMethod.POST);
|
||||
delegate.getHeaders().add("access_token", accessToken);
|
||||
|
@ -1,7 +1,5 @@
|
||||
|
||||
collabora:
|
||||
# 本机局域网ip,注意 CollaboraOnline容器需要访问该地址,,最后不要加/
|
||||
host-server-addr: http://47.99.175.155:59981
|
||||
|
||||
# 文件保存路径
|
||||
host-server-addr: https://web-api.wmyun.com
|
||||
file-storage-path: /work/projects/collabora-api/file
|
@ -4,10 +4,12 @@ spring:
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# http://192.168.3.211:9980/browser/dist/cool.html?WOPISrc=http://192.168.3.104:8080/wopi/files/test.docx&lang=zh-cn
|
||||
# http://192.168.3.211:9980/browser/dist/cool.html?WOPISrc=http://192.168.3.104:8080/wopi/files/2087131858671270912&lang=zh-cn
|
||||
|
||||
# http://47.99.175.155:59980/browser/dist/cool.html?lang=zh-cn&WOPISrc=http://47.99.175.155:59981/wopi/files/test.docx
|
||||
|
||||
# https://web.wmyun.com/browser/dist/cool.html?lang=zh-cn&WOPISrc=https://web-api.wmyun.com/wopi/files/2127702662332843008
|
||||
|
||||
# http://<collabora容器IP>:<端口>/browser/dist/cool.html?WOPISrc=http://<本机IP>:<服务端口>/wopi/files/<文件名>&lang=zh-cn
|
||||
|
||||
|
||||
@ -28,4 +30,6 @@ ensign:
|
||||
language: 'zh_CN'
|
||||
accessToken:
|
||||
user: 'COSMIC'
|
||||
usertype: 'UserName'
|
||||
usertype: 'UserName'
|
||||
|
||||
attachment-query-uri: /ierp/kapi/v2/yem/yem_receipt/AttachmentsQueryAPI/Query
|
Loading…
Reference in New Issue
Block a user