feat:use all config file

This commit is contained in:
zzs 2025-02-24 16:07:31 +08:00
parent 22eb5d974c
commit 5cb4f68fbe
8 changed files with 124 additions and 45 deletions

View File

@ -37,43 +37,43 @@ import java.util.concurrent.TimeUnit;
public class AuthService { public class AuthService {
@Value("${ensign.kingdee.is-public}") @Value("${kingdee.is-public}")
private Boolean isPublic; private Boolean isPublic;
@Value("${ensign.kingdee.test-public-end-point}") @Value("${kingdee.test-public-end-point}")
private String testPublicEndPoint; private String testPublicEndPoint;
@Value("${ensign.kingdee.test-inner-end-point}") @Value("${kingdee.test-inner-end-point}")
private String testInnerEndPoint; private String testInnerEndPoint;
@Value("${ensign.kingdee.prod-public-end-point}") @Value("${kingdee.prod-public-end-point}")
private String prodPublicEndPoint; private String prodPublicEndPoint;
@Value("${ensign.kingdee.prod-inner-end-point}") @Value("${kingdee.prod-inner-end-point}")
private String prodInnerEndPoint; private String prodInnerEndPoint;
@Value("${ensign.kingdee.env}") @Value("${kingdee.env}")
private String env; private String env;
@Value("${ensign.kingdee.appToken.appId}") @Value("${kingdee.appToken.appId}")
private String appId; private String appId;
@Value("${ensign.kingdee.appToken.appSecuret}") @Value("${kingdee.appToken.appSecuret}")
private String appSecuret; private String appSecuret;
@Value("${ensign.kingdee.appToken.tenantid}") @Value("${kingdee.appToken.tenantid}")
private String tenantid; private String tenantid;
@Value("${ensign.kingdee.appToken.accountId}") @Value("${kingdee.appToken.accountId}")
private String accountId; private String accountId;
@Value("${ensign.kingdee.appToken.language}") @Value("${kingdee.appToken.language}")
private String language; private String language;
@Value("${ensign.kingdee.accessToken.user}") @Value("${kingdee.accessToken.user}")
private String user; private String user;
@Value("${ensign.kingdee.accessToken.usertype}") @Value("${kingdee.accessToken.usertype}")
private String usertype; private String usertype;
public String initBasePath() { public String initBasePath() {

View File

@ -37,9 +37,15 @@ 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}") @Value("${kingdee.attachment-query-uri}")
private String attachmentQueryURI; private String attachmentQueryURI;
@Value("${kingdee.bill.formId}")
private String fromId;
@Value("${kingdee.bill.attachKey}")
private String attachKey;
@Autowired @Autowired
private AuthService authService; private AuthService authService;
@ -52,9 +58,9 @@ public class KingdeeService {
delegate.getHeaders().add("access_token", accessToken); delegate.getHeaders().add("access_token", accessToken);
delegate.getHeaders().add("Content-Type", "application/json;charset=UTF-8"); delegate.getHeaders().add("Content-Type", "application/json;charset=UTF-8");
Map<String, String> requestBody = new HashMap<>(); Map<String, String> requestBody = new HashMap<>();
requestBody.put("formId", "yem_testbill"); requestBody.put("formId", fromId);
requestBody.put("pkId", attPkId); requestBody.put("pkId", attPkId);
requestBody.put("attachKey", "attachmentpanel"); requestBody.put("attachKey", attachKey);
String jsonBody = JSON.toJSONString(requestBody); String jsonBody = JSON.toJSONString(requestBody);
// 设置请求体 // 设置请求体
try (OutputStream os = delegate.getBody()) { try (OutputStream os = delegate.getBody()) {

View 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

View File

@ -1,5 +0,0 @@
collabora:
# 本机局域网ip注意 CollaboraOnline容器需要访问该地址最后不要加/
host-server-addr: https://web-api.wmyun.com
file-storage-path: /work/projects/collabora-api/file

View 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

View 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: collabora:
# 本机局域网ip注意 CollaboraOnline容器需要访问该地址最后不要加/
host-server-addr: http://192.168.3.104:8080 host-server-addr: http://192.168.3.104:8080
# 文件保存路径
file-storage-path: E:\Code\CollaboraOnline\files file-storage-path: E:\Code\CollaboraOnline\files

View 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

View File

@ -2,7 +2,7 @@ spring:
application: application:
name: CollaboraOnline name: CollaboraOnline
profiles: 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 # 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 # 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