feat:use all config file
This commit is contained in:
parent
22eb5d974c
commit
5cb4f68fbe
@ -37,43 +37,43 @@ import java.util.concurrent.TimeUnit;
|
||||
public class AuthService {
|
||||
|
||||
|
||||
@Value("${ensign.kingdee.is-public}")
|
||||
@Value("${kingdee.is-public}")
|
||||
private Boolean isPublic;
|
||||
|
||||
@Value("${ensign.kingdee.test-public-end-point}")
|
||||
@Value("${kingdee.test-public-end-point}")
|
||||
private String testPublicEndPoint;
|
||||
|
||||
@Value("${ensign.kingdee.test-inner-end-point}")
|
||||
@Value("${kingdee.test-inner-end-point}")
|
||||
private String testInnerEndPoint;
|
||||
|
||||
@Value("${ensign.kingdee.prod-public-end-point}")
|
||||
@Value("${kingdee.prod-public-end-point}")
|
||||
private String prodPublicEndPoint;
|
||||
|
||||
@Value("${ensign.kingdee.prod-inner-end-point}")
|
||||
@Value("${kingdee.prod-inner-end-point}")
|
||||
private String prodInnerEndPoint;
|
||||
|
||||
@Value("${ensign.kingdee.env}")
|
||||
@Value("${kingdee.env}")
|
||||
private String env;
|
||||
|
||||
@Value("${ensign.kingdee.appToken.appId}")
|
||||
@Value("${kingdee.appToken.appId}")
|
||||
private String appId;
|
||||
|
||||
@Value("${ensign.kingdee.appToken.appSecuret}")
|
||||
@Value("${kingdee.appToken.appSecuret}")
|
||||
private String appSecuret;
|
||||
|
||||
@Value("${ensign.kingdee.appToken.tenantid}")
|
||||
@Value("${kingdee.appToken.tenantid}")
|
||||
private String tenantid;
|
||||
|
||||
@Value("${ensign.kingdee.appToken.accountId}")
|
||||
@Value("${kingdee.appToken.accountId}")
|
||||
private String accountId;
|
||||
|
||||
@Value("${ensign.kingdee.appToken.language}")
|
||||
@Value("${kingdee.appToken.language}")
|
||||
private String language;
|
||||
|
||||
@Value("${ensign.kingdee.accessToken.user}")
|
||||
@Value("${kingdee.accessToken.user}")
|
||||
private String user;
|
||||
|
||||
@Value("${ensign.kingdee.accessToken.usertype}")
|
||||
@Value("${kingdee.accessToken.usertype}")
|
||||
private String usertype;
|
||||
|
||||
public String initBasePath() {
|
||||
|
@ -37,9 +37,15 @@ public class KingdeeService {
|
||||
@Value("${collabora.file-storage-path}")
|
||||
private String BASE_DIR;
|
||||
|
||||
@Value("${ensign.kingdee.attachment-query-uri}")
|
||||
@Value("${kingdee.attachment-query-uri}")
|
||||
private String attachmentQueryURI;
|
||||
|
||||
@Value("${kingdee.bill.formId}")
|
||||
private String fromId;
|
||||
|
||||
@Value("${kingdee.bill.attachKey}")
|
||||
private String attachKey;
|
||||
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
@ -52,9 +58,9 @@ public class KingdeeService {
|
||||
delegate.getHeaders().add("access_token", accessToken);
|
||||
delegate.getHeaders().add("Content-Type", "application/json;charset=UTF-8");
|
||||
Map<String, String> requestBody = new HashMap<>();
|
||||
requestBody.put("formId", "yem_testbill");
|
||||
requestBody.put("formId", fromId);
|
||||
requestBody.put("pkId", attPkId);
|
||||
requestBody.put("attachKey", "attachmentpanel");
|
||||
requestBody.put("attachKey", attachKey);
|
||||
String jsonBody = JSON.toJSONString(requestBody);
|
||||
// 设置请求体
|
||||
try (OutputStream os = delegate.getBody()) {
|
||||
|
26
src/main/resources/application-cmoc.yml
Normal file
26
src/main/resources/application-cmoc.yml
Normal file
@ -0,0 +1,26 @@
|
||||
kingdee:
|
||||
env: test
|
||||
test-public-end-point: 'https://srm-dev.cmoc.cloud:8022'
|
||||
test-inner-end-point: ''
|
||||
prod-public-end-point: ''
|
||||
prod-inner-end-point: ''
|
||||
is-public: true
|
||||
appToken:
|
||||
appId: 'OA'
|
||||
appSecuret: 'Cmoc@OA2024!#@..'
|
||||
tenantid: 'cmocdev'
|
||||
accountId: '2117884374501299200'
|
||||
language: 'zh_CN'
|
||||
accessToken:
|
||||
user: '18791337254'
|
||||
usertype: 'Mobile'
|
||||
|
||||
attachment-query-uri: /ierp/kapi/v2/yem/yem_base/AttachmentsQueryAPI/Query
|
||||
|
||||
bill:
|
||||
formId: 'yem_webofficemodel2'
|
||||
attachKey: 'yem_attachmentpanelap'
|
||||
|
||||
collabora:
|
||||
host-server-addr: https://web-api.wmyun.com/cmoc
|
||||
file-storage-path: /work/projects/collabora-api/cmoc/file
|
@ -1,5 +0,0 @@
|
||||
|
||||
collabora:
|
||||
# 本机局域网ip,注意 CollaboraOnline容器需要访问该地址,,最后不要加/
|
||||
host-server-addr: https://web-api.wmyun.com
|
||||
file-storage-path: /work/projects/collabora-api/file
|
26
src/main/resources/application-ensign.yml
Normal file
26
src/main/resources/application-ensign.yml
Normal file
@ -0,0 +1,26 @@
|
||||
kingdee:
|
||||
env: test
|
||||
test-public-end-point: 'http://122.4.221.133:8022'
|
||||
test-inner-end-point: 'http://10.64.112.152:8022'
|
||||
prod-public-end-point: 'http://122.4.221.130:8022'
|
||||
prod-inner-end-point: 'http://10.64.111.134:8022'
|
||||
is-public: true
|
||||
appToken:
|
||||
appId: 'CRM'
|
||||
appSecuret: 'yx.CRM.tksecurit@240924'
|
||||
tenantid: 'yxzg-topview-dev'
|
||||
accountId: '1878420900609526784'
|
||||
language: 'zh_CN'
|
||||
accessToken:
|
||||
user: 'COSMIC'
|
||||
usertype: 'UserName'
|
||||
|
||||
attachment-query-uri: /ierp/kapi/v2/yem/yem_receipt/AttachmentsQueryAPI/Query
|
||||
|
||||
bill:
|
||||
formId: 'yem_testbill'
|
||||
attachKey: 'attachmentpanel'
|
||||
|
||||
collabora:
|
||||
host-server-addr: https://web-api.wmyun.com/ensign
|
||||
file-storage-path: /work/projects/collabora-api/ensign/file
|
@ -1,7 +1,26 @@
|
||||
kingdee:
|
||||
env: test
|
||||
test-public-end-point: 'http://122.4.221.133:8022'
|
||||
test-inner-end-point: 'http://10.64.112.152:8022'
|
||||
prod-public-end-point: 'http://122.4.221.130:8022'
|
||||
prod-inner-end-point: 'http://10.64.111.134:8022'
|
||||
is-public: true
|
||||
appToken:
|
||||
appId: 'CRM'
|
||||
appSecuret: 'yx.CRM.tksecurit@240924'
|
||||
tenantid: 'yxzg-topview-dev'
|
||||
accountId: '1878420900609526784'
|
||||
language: 'zh_CN'
|
||||
accessToken:
|
||||
user: 'COSMIC'
|
||||
usertype: 'UserName'
|
||||
|
||||
attachment-query-uri: /ierp/kapi/v2/yem/yem_receipt/AttachmentsQueryAPI/Query
|
||||
|
||||
bill:
|
||||
formId: 'yem_testbill'
|
||||
attachKey: 'attachmentpanel'
|
||||
|
||||
collabora:
|
||||
# 本机局域网ip,注意 CollaboraOnline容器需要访问该地址,,最后不要加/
|
||||
host-server-addr: http://192.168.3.104:8080
|
||||
|
||||
# 文件保存路径
|
||||
file-storage-path: E:\Code\CollaboraOnline\files
|
26
src/main/resources/application-yem.yml
Normal file
26
src/main/resources/application-yem.yml
Normal file
@ -0,0 +1,26 @@
|
||||
kingdee:
|
||||
env: test
|
||||
test-public-end-point: ''
|
||||
test-inner-end-point: ''
|
||||
prod-public-end-point: ''
|
||||
prod-inner-end-point: ''
|
||||
is-public: true
|
||||
appToken:
|
||||
appId: ''
|
||||
appSecuret: ''
|
||||
tenantid: ''
|
||||
accountId: ''
|
||||
language: 'zh_CN'
|
||||
accessToken:
|
||||
user: ''
|
||||
usertype: 'UserName'
|
||||
|
||||
attachment-query-uri: ''
|
||||
|
||||
bill:
|
||||
formId: ''
|
||||
attachKey: ''
|
||||
|
||||
collabora:
|
||||
host-server-addr: https://web-api.wmyun.com/yem
|
||||
file-storage-path: /work/projects/collabora-api/yem/file
|
@ -2,7 +2,7 @@ spring:
|
||||
application:
|
||||
name: CollaboraOnline
|
||||
profiles:
|
||||
active: dev
|
||||
active: ensign
|
||||
|
||||
# http://192.168.3.211:9980/browser/dist/cool.html?WOPISrc=http://192.168.3.104:8080/wopi/files/2087131858671270912&lang=zh-cn
|
||||
|
||||
@ -14,22 +14,3 @@ spring:
|
||||
|
||||
|
||||
# http://192.168.3.211:9980/browser/dist/cool.html?lang=zh-cn&WOPISrc=http://192.168.3.104:8080/wopi/files/2087131858671270912
|
||||
ensign:
|
||||
kingdee:
|
||||
env: test
|
||||
test-public-end-point: 'http://122.4.221.133:8022'
|
||||
test-inner-end-point: 'http://10.64.112.152:8022'
|
||||
prod-public-end-point: 'http://122.4.221.130:8022'
|
||||
prod-inner-end-point: 'http://10.64.111.134:8022'
|
||||
is-public: true
|
||||
appToken:
|
||||
appId: 'CRM'
|
||||
appSecuret: 'yx.CRM.tksecurit@240924'
|
||||
tenantid: 'yxzg-topview-dev'
|
||||
accountId: '1878420900609526784'
|
||||
language: 'zh_CN'
|
||||
accessToken:
|
||||
user: 'COSMIC'
|
||||
usertype: 'UserName'
|
||||
|
||||
attachment-query-uri: /ierp/kapi/v2/yem/yem_receipt/AttachmentsQueryAPI/Query
|
Loading…
Reference in New Issue
Block a user