feat:use all config file
This commit is contained in:
parent
4b8d04538c
commit
22eb5d974c
@ -26,9 +26,6 @@ import java.nio.file.*;
|
|||||||
@Service
|
@Service
|
||||||
public class FileService {
|
public class FileService {
|
||||||
|
|
||||||
@Value("${collabora.file-storage-path}")
|
|
||||||
private String BASE_DIR;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private KingdeeService kingdeeService;
|
private KingdeeService kingdeeService;
|
||||||
|
|
||||||
|
@ -37,13 +37,16 @@ public class KingdeeService {
|
|||||||
@Value("${collabora.file-storage-path}")
|
@Value("${collabora.file-storage-path}")
|
||||||
private String BASE_DIR;
|
private String BASE_DIR;
|
||||||
|
|
||||||
|
@Value("${ensign.kingdee.attachment-query-uri}")
|
||||||
|
private String attachmentQueryURI;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AuthService authService;
|
private AuthService authService;
|
||||||
|
|
||||||
public String requestFile(String attPkId) {
|
public String requestFile(String attPkId) {
|
||||||
try {
|
try {
|
||||||
String accessToken = authService.initAccessToken();
|
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);
|
ClientHttpRequest delegate = new SimpleClientHttpRequestFactory().createRequest(newUri, HttpMethod.POST);
|
||||||
delegate.getHeaders().add("access_token", accessToken);
|
delegate.getHeaders().add("access_token", accessToken);
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
|
|
||||||
collabora:
|
collabora:
|
||||||
# 本机局域网ip,注意 CollaboraOnline容器需要访问该地址,,最后不要加/
|
# 本机局域网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
|
file-storage-path: /work/projects/collabora-api/file
|
@ -4,10 +4,12 @@ spring:
|
|||||||
profiles:
|
profiles:
|
||||||
active: dev
|
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
|
# 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
|
# http://<collabora容器IP>:<端口>/browser/dist/cool.html?WOPISrc=http://<本机IP>:<服务端口>/wopi/files/<文件名>&lang=zh-cn
|
||||||
|
|
||||||
|
|
||||||
@ -29,3 +31,5 @@ ensign:
|
|||||||
accessToken:
|
accessToken:
|
||||||
user: 'COSMIC'
|
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