Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
OA-Integration
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
李炎
OA-Integration
Commits
ad45bbbc
提交
ad45bbbc
authored
2月 15, 2022
作者:
李炎
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
合同号/立项号检查
上级
6db89de1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
303 行增加
和
40 行删除
+303
-40
docker-compose-server.yml
docker-compose-server.yml
+11
-10
CategoryDao.java
...main/java/org/jeecg/modules/iost/API/Dao/CategoryDao.java
+0
-0
OAUtil.java
...src/main/java/org/jeecg/modules/iost/API/Util/OAUtil.java
+29
-3
QueryBusinessTripDetailsServiceImpl.java
...API/service/impl/QueryBusinessTripDetailsServiceImpl.java
+1
-1
QueryLoanDetailsServiceImpl.java
...es/iost/API/service/impl/QueryLoanDetailsServiceImpl.java
+4
-1
QueryOtherDetailsServiceImpl.java
...s/iost/API/service/impl/QueryOtherDetailsServiceImpl.java
+4
-1
SALorderWebapi.java
...ava/org/jeecg/modules/iost/API/webapi/SALorderWebapi.java
+10
-0
QPOV_Base.java
...boot-module-system/src/test/java/org/jeecg/QPOV_Base.java
+8
-0
QPOV_Base_Fname.java
...odule-system/src/test/java/org/jeecg/QPOV_Base_Fname.java
+9
-0
SecurityToolsTest.java
...ule-system/src/test/java/org/jeecg/SecurityToolsTest.java
+70
-24
Test.java
jeecg-boot-module-system/src/test/java/org/jeecg/Test.java
+147
-0
ToolsTest.java
...boot-module-system/src/test/java/org/jeecg/ToolsTest.java
+10
-0
没有找到文件。
docker-compose-server.yml
浏览文件 @
ad45bbbc
...
@@ -12,12 +12,12 @@
...
@@ -12,12 +12,12 @@
# 第二步:将此yml文件上传服务器,执行启动命令 docker-compose -f ./docker-compose-server.yml up
# 第二步:将此yml文件上传服务器,执行启动命令 docker-compose -f ./docker-compose-server.yml up
version
:
'
2'
version
:
'
2'
services
:
services
:
oasystem-mysql
:
formal
oasystem-mysql
:
image
:
1ar8696937.iok.la:22594/oasystem-mysql:latest
image
:
1ar8696937.iok.la:22594/oasystem-mysql:latest
environment
:
environment
:
MYSQL_ROOT_PASSWORD
:
gf^*i6%&9J83&(*kJ653F&L
MYSQL_ROOT_PASSWORD
:
gf^*i6%&9J83&(*kJ653F&L
restart
:
always
restart
:
always
container_name
:
oasystem-mysql
container_name
:
formal
oasystem-mysql
command
:
command
:
--character-set-server=utf8mb4
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--collation-server=utf8mb4_general_ci
...
@@ -25,22 +25,22 @@ services:
...
@@ -25,22 +25,22 @@ services:
--lower_case_table_names=1
--lower_case_table_names=1
--max_allowed_packet=128M
--max_allowed_packet=128M
ports
:
ports
:
-
24680
:3306
-
13579
:3306
oasystem-redis
:
formal
oasystem-redis
:
image
:
redis:5.0
image
:
redis:5.0
ports
:
ports
:
-
6
666
:6379
-
6
379
:6379
restart
:
always
restart
:
always
container_name
:
oasystem-redis
container_name
:
formal
oasystem-redis
oasystem-system
:
formal
oasystem-system
:
image
:
1ar8696937.iok.la:22594/oasystem-system:latest
image
:
1ar8696937.iok.la:22594/oasystem-system:latest
restart
:
always
restart
:
always
container_name
:
oasystem-system
container_name
:
formal
oasystem-system
volumes
:
volumes
:
-
/data/config:/oasystem/config
-
/data/config:/
formal
oasystem/config
ports
:
ports
:
-
80
81
:8081
-
80
90
:8081
\ No newline at end of file
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/Dao/CategoryDao.java
浏览文件 @
ad45bbbc
差异被折叠。
点击展开。
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/Util/OAUtil.java
浏览文件 @
ad45bbbc
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.iost.API.Util;
...
@@ -2,6 +2,9 @@ package org.jeecg.modules.iost.API.Util;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.parser.Feature
;
import
com.alibaba.fastjson.parser.Feature
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
org.jeecg.modules.iost.API.webapi.SALorderWebapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.*
;
import
java.util.*
;
...
@@ -25,17 +28,40 @@ public class OAUtil {
...
@@ -25,17 +28,40 @@ public class OAUtil {
return
apiUrl
;
return
apiUrl
;
}
}
static
public
String
filter
(
String
s
)
{
//过滤掉不包含F_QPOV_Base字段的数据,并返回展示
static
public
String
filter
(
String
s
,
SALorderWebapi
webapi
)
{
//过滤掉不包含F_QPOV_Base字段的数据,并返回展示
// 那个默认值的代码是:XXDD202105200009,名称是:QJFYQC001
// 那个默认值的代码是:XXDD202105200009,名称是:QJFYQC001
Map
QJFYQC001
=
new
HashMap
<>();
Map
QJFYQC001
=
new
HashMap
<>();
QJFYQC001
.
put
(
"FName"
,
"QJFYQC001"
);
QJFYQC001
.
put
(
"FName"
,
"QJFYQC001"
);
List
list
=
JSON
.
parseObject
(
s
,
List
.
class
,
Feature
.
OrderedField
);
List
list
=
JSON
.
parseObject
(
s
,
List
.
class
,
Feature
.
OrderedField
);
List
<
Map
>
returnResults
=
new
ArrayList
<
Map
>();
List
<
Map
>
returnResults
=
new
ArrayList
<
Map
>();
Map
<
String
,
K3CloudApiClient
>
clientMap
=
new
HashMap
()
{{
put
(
"clientTwo"
,
null
);
}};
for
(
Object
linkedHashMap
:
list
)
{
for
(
Object
linkedHashMap
:
list
)
{
Map
map
=
JSON
.
parseObject
(
linkedHashMap
.
toString
(),
LinkedHashMap
.
class
);
Map
map
=
JSON
.
parseObject
(
linkedHashMap
.
toString
(),
LinkedHashMap
.
class
);
if
(
map
.
containsKey
(
"F_QPOV_Base"
))
{
if
(
map
.
containsKey
(
"F_QPOV_Base"
))
{
if
(
null
!=
map
.
get
(
"F_QPOV_Base"
))
{
if
(
null
!=
map
.
get
(
"F_QPOV_Base"
))
{
returnResults
.
add
(
map
);
Map
F_QPOV_Base
=
JSON
.
parseObject
(
map
.
get
(
"F_QPOV_Base"
).
toString
(),
LinkedHashMap
.
class
);
String
fName
=
F_QPOV_Base
.
get
(
"FName"
).
toString
();
List
isFnumber
=
webapi
.
checkFiled
(
"fnumber"
,
"fnume"
,
fName
,
clientMap
);
if
(
null
==
isFnumber
)
{
List
isFname
=
webapi
.
checkFiled
(
"fname"
,
"fnume"
,
fName
,
clientMap
);
if
(
null
==
isFname
)
{
map
.
put
(
"F_QPOV_Base"
,
QJFYQC001
);
returnResults
.
add
(
map
);
}
else
{
returnResults
.
add
(
map
);
}
}
else
{
map
.
put
(
"F_QPOV_Base"
,
isFnumber
.
get
(
0
));
returnResults
.
add
(
map
);
}
}
else
{
}
else
{
map
.
put
(
"F_QPOV_Base"
,
QJFYQC001
);
map
.
put
(
"F_QPOV_Base"
,
QJFYQC001
);
returnResults
.
add
(
map
);
returnResults
.
add
(
map
);
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/QueryBusinessTripDetailsServiceImpl.java
浏览文件 @
ad45bbbc
...
@@ -91,7 +91,7 @@ public class QueryBusinessTripDetailsServiceImpl extends ServiceImpl<QueryBusine
...
@@ -91,7 +91,7 @@ public class QueryBusinessTripDetailsServiceImpl extends ServiceImpl<QueryBusine
try
{
try
{
add
=
businessTripInterfaceWebapi
.
batchAdd
(
OAUtil
.
filter
(
s
));
add
=
businessTripInterfaceWebapi
.
batchAdd
(
OAUtil
.
filter
(
s
,
salwebapi
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
webApiCatch
=
false
;
webApiCatch
=
false
;
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/QueryLoanDetailsServiceImpl.java
浏览文件 @
ad45bbbc
...
@@ -12,6 +12,7 @@ import org.jeecg.modules.iost.API.service.IQueryLoanDetailsService;
...
@@ -12,6 +12,7 @@ import org.jeecg.modules.iost.API.service.IQueryLoanDetailsService;
import
org.jeecg.modules.iost.API.service.kingdeejournal.IKingdeeSaveJournalService
;
import
org.jeecg.modules.iost.API.service.kingdeejournal.IKingdeeSaveJournalService
;
import
org.jeecg.modules.iost.API.service.oajournal.IOaSelectJournalService
;
import
org.jeecg.modules.iost.API.service.oajournal.IOaSelectJournalService
;
import
org.jeecg.modules.iost.API.webapi.LoanInterfaceWebapi
;
import
org.jeecg.modules.iost.API.webapi.LoanInterfaceWebapi
;
import
org.jeecg.modules.iost.API.webapi.SALorderWebapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -31,6 +32,8 @@ public class QueryLoanDetailsServiceImpl extends ServiceImpl<QueryLoanDetailsMap
...
@@ -31,6 +32,8 @@ public class QueryLoanDetailsServiceImpl extends ServiceImpl<QueryLoanDetailsMap
private
IOaSelectJournalService
oaSelectJournalService
;
private
IOaSelectJournalService
oaSelectJournalService
;
@Autowired
@Autowired
private
IKingdeeSaveJournalService
KingdeeSaveJournalService
;
private
IKingdeeSaveJournalService
KingdeeSaveJournalService
;
@Autowired
private
SALorderWebapi
salwebapi
;
private
int
BusinessNo
=
1
;
private
int
BusinessNo
=
1
;
@Override
@Override
...
@@ -82,7 +85,7 @@ public class QueryLoanDetailsServiceImpl extends ServiceImpl<QueryLoanDetailsMap
...
@@ -82,7 +85,7 @@ public class QueryLoanDetailsServiceImpl extends ServiceImpl<QueryLoanDetailsMap
Object
result
=
jsonObject
.
get
(
"result"
);
Object
result
=
jsonObject
.
get
(
"result"
);
String
s
=
result
.
toString
();
String
s
=
result
.
toString
();
try
{
try
{
add
=
loanInterfaceWebapi
.
batchAdd
(
OAUtil
.
filter
(
s
));
add
=
loanInterfaceWebapi
.
batchAdd
(
OAUtil
.
filter
(
s
,
salwebapi
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
webApiCatch
=
false
;
webApiCatch
=
false
;
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/QueryOtherDetailsServiceImpl.java
浏览文件 @
ad45bbbc
...
@@ -11,6 +11,7 @@ import org.jeecg.modules.iost.API.service.IQueryOtherDetailsService;
...
@@ -11,6 +11,7 @@ import org.jeecg.modules.iost.API.service.IQueryOtherDetailsService;
import
org.jeecg.modules.iost.API.service.kingdeejournal.IKingdeeSaveJournalService
;
import
org.jeecg.modules.iost.API.service.kingdeejournal.IKingdeeSaveJournalService
;
import
org.jeecg.modules.iost.API.service.oajournal.IOaSelectJournalService
;
import
org.jeecg.modules.iost.API.service.oajournal.IOaSelectJournalService
;
import
org.jeecg.modules.iost.API.webapi.OtherReimbursementInterfaceWebapi
;
import
org.jeecg.modules.iost.API.webapi.OtherReimbursementInterfaceWebapi
;
import
org.jeecg.modules.iost.API.webapi.SALorderWebapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -29,6 +30,8 @@ public class QueryOtherDetailsServiceImpl extends ServiceImpl<QueryOtherDetailsM
...
@@ -29,6 +30,8 @@ public class QueryOtherDetailsServiceImpl extends ServiceImpl<QueryOtherDetailsM
private
IOaSelectJournalService
oaSelectJournalService
;
private
IOaSelectJournalService
oaSelectJournalService
;
@Autowired
@Autowired
private
IKingdeeSaveJournalService
KingdeeSaveJournalService
;
private
IKingdeeSaveJournalService
KingdeeSaveJournalService
;
@Autowired
private
SALorderWebapi
salwebapi
;
private
int
BusinessNo
=
9
;
private
int
BusinessNo
=
9
;
@Override
@Override
...
@@ -80,7 +83,7 @@ public class QueryOtherDetailsServiceImpl extends ServiceImpl<QueryOtherDetailsM
...
@@ -80,7 +83,7 @@ public class QueryOtherDetailsServiceImpl extends ServiceImpl<QueryOtherDetailsM
Object
result
=
jsonObject
.
get
(
"result"
);
Object
result
=
jsonObject
.
get
(
"result"
);
String
s
=
result
.
toString
();
String
s
=
result
.
toString
();
try
{
try
{
add
=
webapi
.
batchAdd
(
OAUtil
.
filter
(
s
));
add
=
webapi
.
batchAdd
(
OAUtil
.
filter
(
s
,
salwebapi
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
webApiCatch
=
false
;
webApiCatch
=
false
;
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/webapi/SALorderWebapi.java
浏览文件 @
ad45bbbc
package
org
.
jeecg
.
modules
.
iost
.
API
.
webapi
;
package
org
.
jeecg
.
modules
.
iost
.
API
.
webapi
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
org.jeecg.modules.iost.API.Dao.CategoryDao
;
import
org.jeecg.modules.iost.API.Dao.CategoryDao
;
import
org.jeecg.modules.iost.API.Dao.CategoryDaoSql
;
import
org.jeecg.modules.iost.API.Dao.CategoryDaoSql
;
import
org.jeecg.modules.iost.API.webapi.Interface.web_api
;
import
org.jeecg.modules.iost.API.webapi.Interface.web_api
;
...
@@ -32,6 +33,15 @@ public class SALorderWebapi implements web_api {
...
@@ -32,6 +33,15 @@ public class SALorderWebapi implements web_api {
return
null
;
return
null
;
}
}
public
List
checkFiled
(
String
filed
,
String
key
,
String
value
,
Map
<
String
,
K3CloudApiClient
>
clientMap
){
List
list
=
categoryDao
.
checkFiled
(
sFormId
,
new
HashMap
()
{{
put
(
filed
,
filed
);
}},
new
HashMap
()
{{
put
(
key
,
"'"
+
value
+
"'"
);
}},
clientMap
);
return
list
;
}
@Override
@Override
public
List
<
Map
<
String
,
String
>>
select
(
Map
<
String
,
String
>
whereIn
,
String
where
)
throws
ParseException
{
public
List
<
Map
<
String
,
String
>>
select
(
Map
<
String
,
String
>
whereIn
,
String
where
)
throws
ParseException
{
...
...
jeecg-boot-module-system/src/test/java/org/jeecg/QPOV_Base.java
0 → 100644
浏览文件 @
ad45bbbc
package
org
.
jeecg
;
import
lombok.Data
;
@Data
public
class
QPOV_Base
{
private
QPOV_Base_Fname
F_QPOV_Base
;
}
jeecg-boot-module-system/src/test/java/org/jeecg/QPOV_Base_Fname.java
0 → 100644
浏览文件 @
ad45bbbc
package
org
.
jeecg
;
import
lombok.Data
;
@Data
public
class
QPOV_Base_Fname
{
String
FName
;
}
jeecg-boot-module-system/src/test/java/org/jeecg/SecurityToolsTest.java
浏览文件 @
ad45bbbc
...
@@ -2,6 +2,7 @@ package org.jeecg;
...
@@ -2,6 +2,7 @@ package org.jeecg;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.parser.Feature
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
...
@@ -15,6 +16,7 @@ import org.jeecg.modules.iost.API.entity.LQKJ_t_IMSSyncDetails;
...
@@ -15,6 +16,7 @@ import org.jeecg.modules.iost.API.entity.LQKJ_t_IMSSyncDetails;
import
org.jeecg.modules.iost.API.vo.OaRequest
;
import
org.jeecg.modules.iost.API.vo.OaRequest
;
import
org.jeecg.modules.iost.API.webapi.LQKJ_t_IMSSyncDetailsWebapi
;
import
org.jeecg.modules.iost.API.webapi.LQKJ_t_IMSSyncDetailsWebapi
;
import
org.jeecg.modules.iost.API.webapi.LoanInterfaceWebapi
;
import
org.jeecg.modules.iost.API.webapi.LoanInterfaceWebapi
;
import
org.jeecg.modules.iost.API.webapi.SALorderWebapi
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
...
@@ -31,14 +33,14 @@ public class SecurityToolsTest {
...
@@ -31,14 +33,14 @@ public class SecurityToolsTest {
// static String uid = "Administrator";
// static String uid = "Administrator";
// static String pwd = "888888";
// static String pwd = "888888";
// static int lang = 2052;
// static int lang = 2052;
static
String
K3CloudURL
=
"http://192.168.2.
243
/k3cloud/"
;
//指定地址
static
String
K3CloudURL
=
"http://192.168.2.
190
/k3cloud/"
;
//指定地址
static
String
dbId
=
"61
36b7c51f0e4f
"
;
static
String
dbId
=
"61
a5ffe08bb8ba
"
;
static
String
uid
=
"
Administrator
"
;
static
String
uid
=
"
lt
"
;
static
String
pwd
=
"
888888
"
;
static
String
pwd
=
"
666666
"
;
static
int
lang
=
2052
;
static
int
lang
=
2052
;
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
@Test
//
@Test
public
void
Test
()
{
public
void
Test
()
{
MyKeyPair
mkeyPair
=
SecurityTools
.
generateKeyPair
();
MyKeyPair
mkeyPair
=
SecurityTools
.
generateKeyPair
();
...
@@ -79,7 +81,7 @@ public class SecurityToolsTest {
...
@@ -79,7 +81,7 @@ public class SecurityToolsTest {
// System.out.println(new JSONObject(securityResp).toStringPretty());
// System.out.println(new JSONObject(securityResp).toStringPretty());
}
}
@Test
//
@Test
public
void
request
()
{
public
void
request
()
{
List
<
Map
<
String
,
Object
>>
lists
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
lists
=
new
ArrayList
<
Map
<
String
,
Object
>>();
String
url
=
"http://192.168.1.19:8080/wmssystem/API/eip-prod-store/list"
;
String
url
=
"http://192.168.1.19:8080/wmssystem/API/eip-prod-store/list"
;
...
@@ -99,7 +101,7 @@ public class SecurityToolsTest {
...
@@ -99,7 +101,7 @@ public class SecurityToolsTest {
return
jsonObject
;
return
jsonObject
;
}
}
@Test
//
@Test
public
void
S
()
{
public
void
S
()
{
Random
r
=
new
Random
();
Random
r
=
new
Random
();
...
@@ -111,7 +113,20 @@ public class SecurityToolsTest {
...
@@ -111,7 +113,20 @@ public class SecurityToolsTest {
System
.
out
.
println
(
"a:"
+
a
);
System
.
out
.
println
(
"a:"
+
a
);
}
}
static
String
sFormId
=
"k2d1839c385a04b62983eb4183c4745fd"
;
public
List
sFormId
(
Map
<
String
,
K3CloudApiClient
>
clientMap
)
{
org
.
jeecg
.
Test
test
=
new
org
.
jeecg
.
Test
();
List
list
=
test
.
checkFiled
(
sFormId
,
new
HashMap
()
{{
put
(
"fnumber"
,
"fnumber"
);
}},
new
HashMap
()
{{
put
(
"fnumber"
,
"'XXDD202105200009'"
);
}},
clientMap
);
System
.
out
.
println
(
"1"
+
list
);
System
.
out
.
println
(
"1"
+
clientMap
);
return
list
;
}
/**
/**
* 测试定时
* 测试定时
*/
*/
...
@@ -133,16 +148,16 @@ public class SecurityToolsTest {
...
@@ -133,16 +148,16 @@ public class SecurityToolsTest {
List
execute
=
client
.
execute
(
servicenameMap
,
strings
,
List
.
class
);
List
execute
=
client
.
execute
(
servicenameMap
,
strings
,
List
.
class
);
System
.
out
.
println
(
execute
);
System
.
out
.
println
(
"dsads"
+
execute
);
for
(
Object
o
:
execute
)
{
//
for (Object o : execute) {
System
.
out
.
println
(
execute
);
//
System.out.println(execute);
}
//
}
if
(
null
==
execute
)
{
//
if (null == execute) {
System
.
out
.
println
(
"你好"
);
//
System.out.println("你好");
}
else
{
//
} else {
System
.
out
.
println
(
"你好2"
);
//
System.out.println("你好2");
}
//
}
System
.
out
.
println
(
execute
.
size
());
//
System.out.println(execute.size());
// for (Map o : execute) {
// for (Map o : execute) {
// System.out.println(o.get("F_LQKJ_SYNCCHECK"));
// System.out.println(o.get("F_LQKJ_SYNCCHECK"));
// }
// }
...
@@ -156,10 +171,10 @@ public class SecurityToolsTest {
...
@@ -156,10 +171,10 @@ public class SecurityToolsTest {
System
.
out
.
println
(
"end"
);
System
.
out
.
println
(
"end"
);
}
}
@Autowired
//
@Autowired
LoanInterfaceWebapi
loanInterfaceWebapi
;
//
LoanInterfaceWebapi loanInterfaceWebapi;
@Test
//
@Test
// @Scheduled(fixedDelay = 5000)
// @Scheduled(fixedDelay = 5000)
public
void
timdsaded
()
throws
InterruptedException
{
public
void
timdsaded
()
throws
InterruptedException
{
LoanInterfaceApi
queryLoanDetailsApi
=
new
LoanInterfaceApi
();
LoanInterfaceApi
queryLoanDetailsApi
=
new
LoanInterfaceApi
();
...
@@ -179,7 +194,7 @@ public class SecurityToolsTest {
...
@@ -179,7 +194,7 @@ public class SecurityToolsTest {
}
}
@Async
//
@Async
public
void
dassdadsdads
()
throws
InterruptedException
{
public
void
dassdadsdads
()
throws
InterruptedException
{
Thread
.
sleep
(
50000
);
Thread
.
sleep
(
50000
);
System
.
out
.
println
(
"nkklkjnlkkkkkkk"
);
System
.
out
.
println
(
"nkklkjnlkkkkkkk"
);
...
@@ -188,7 +203,7 @@ public class SecurityToolsTest {
...
@@ -188,7 +203,7 @@ public class SecurityToolsTest {
@Autowired
@Autowired
private
LQKJ_t_IMSSyncDetailsWebapi
webapi
;
private
LQKJ_t_IMSSyncDetailsWebapi
webapi
;
@Test
//
@Test
// @Scheduled(fixedDelay = 5000)
// @Scheduled(fixedDelay = 5000)
public
void
sadsad
()
{
public
void
sadsad
()
{
List
<
Map
>
objects
=
new
ArrayList
<>();
List
<
Map
>
objects
=
new
ArrayList
<>();
...
@@ -225,10 +240,41 @@ public class SecurityToolsTest {
...
@@ -225,10 +240,41 @@ public class SecurityToolsTest {
map
.
put
(
"F_LQKJ_SYNCBILL"
,
"PUR_Requisition"
);
map
.
put
(
"F_LQKJ_SYNCBILL"
,
"PUR_Requisition"
);
map
.
put
(
"F_LQKJ_SYNCCHECK"
,
"0"
);
map
.
put
(
"F_LQKJ_SYNCCHECK"
,
"0"
);
map
.
put
(
"FID"
,
"123456"
);
map
.
put
(
"FID"
,
"123456"
);
String
o
=
"[{\"fid\":\"123\",\"f_lqkj_syncdataid\":\"sda\",\"f_lqkj_syncbill\":\"123\",\"f_lqkj_synccheck\":\"123\"}]"
;
String
o
=
"[{\"fid\":\"123\",\"f_lqkj_syncdataid\":\"sda\",\"f_lqkj_syncbill\":\"123\",\"f_lqkj_synccheck\":\"123\"
,\"F_QPOV_BasE\":{\"FName\":\"QJFYQC001\"}
}]"
;
String
filter
=
OAUtil
.
filter
(
o
);
String
filter
=
filter
(
o
);
System
.
out
.
println
(
filter
);
System
.
out
.
println
(
filter
);
// LQKJ_t_IMSSyncDetails lqkj_t_imsSync = JSON.parseObject(JSON.toJSONString(map), LQKJ_t_IMSSyncDetails.class).setCreatetime(new Date());
// LQKJ_t_IMSSyncDetails lqkj_t_imsSync = JSON.parseObject(JSON.toJSONString(map), LQKJ_t_IMSSyncDetails.class).setCreatetime(new Date());
// System.out.println(lqkj_t_imsSync);
// System.out.println(lqkj_t_imsSync);
}
}
public
String
filter
(
String
s
)
{
//过滤掉不包含F_QPOV_Base字段的数据,并返回展示
// 那个默认值的代码是:XXDD202105200009,名称是:QJFYQC001
Map
QJFYQC001
=
new
HashMap
<>();
QJFYQC001
.
put
(
"FName"
,
"QJFYQC001"
);
List
list
=
JSON
.
parseObject
(
s
,
List
.
class
,
Feature
.
OrderedField
);
List
<
Map
>
returnResults
=
new
ArrayList
<
Map
>();
Map
<
String
,
K3CloudApiClient
>
clientMap
=
new
HashMap
()
{{
put
(
"clientTwo"
,
null
);
}};
for
(
Object
linkedHashMap
:
list
)
{
Map
map
=
JSON
.
parseObject
(
linkedHashMap
.
toString
(),
LinkedHashMap
.
class
);
QPOV_Base
pojo
=
JSON
.
parseObject
(
linkedHashMap
.
toString
(),
QPOV_Base
.
class
);
System
.
out
.
println
(
"QPOV_Base"
+
pojo
);
if
(
map
.
containsKey
(
"F_QPOV_Base"
))
{
if
(
null
!=
map
.
get
(
"F_QPOV_Base"
))
{
Map
F_QPOV_Base
=
JSON
.
parseObject
(
map
.
get
(
"F_QPOV_Base"
).
toString
(),
LinkedHashMap
.
class
);
String
fName
=
F_QPOV_Base
.
get
(
"FName"
).
toString
();
returnResults
.
add
(
map
);
}
else
{
map
.
put
(
"F_QPOV_Base"
,
QJFYQC001
);
returnResults
.
add
(
map
);
}
}
else
{
map
.
put
(
"F_QPOV_Base"
,
QJFYQC001
);
returnResults
.
add
(
map
);
}
}
// if (null != end && 0 < end.size()) returnResult.put("缺少立项号/合同号", JsonUtil.Listjson(end));
return
JsonUtil
.
Listjson
(
returnResults
);
}
}
}
jeecg-boot-module-system/src/test/java/org/jeecg/Test.java
0 → 100644
浏览文件 @
ad45bbbc
package
org
.
jeecg
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONObject
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.util.EntityUtils
;
import
org.jeecg.common.util.security.SecurityTools
;
import
org.jeecg.common.util.security.entity.*
;
import
org.jeecg.modules.iost.API.Util.HttpUtil
;
import
org.jeecg.modules.iost.API.Util.HttpUtils
;
import
org.jeecg.modules.iost.API.webapi.LQKJ_t_IMSSyncDetailsWebapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.stereotype.Service
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.text.ParseException
;
import
java.util.*
;
@Slf4j
@EnableScheduling
@Service
public
class
Test
{
// static String K3CloudURL = "http://116.62.129.2/K3Cloud/";
// static String dbId = "5b39dffef11ed4";
// static String uid = "administrator";
// static String pwd = "4009965012@lwkb";
// static int lang = 2052;
static
String
K3CloudURL
=
"https://cwxt.kingsware.cn:8090/k3cloud/"
;
//指定地址
// static String dbId = "613ef0b02c911d";//测试环境数据中心
static
String
dbId
=
"6017c3fce822bf"
;
static
String
uid
=
"kingdee"
;
static
String
pwd
=
"123456"
;
static
int
lang
=
2052
;
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
// static String K3CloudURL = "http://192.168.2.243/k3cloud/";//指定地址
// static String dbId = "6136b7c51f0e4f";
// static String uid = "Administrator";
// static String pwd = "888888";
// static int lang = 2052;
// K3CloudApiClient client = new K3CloudApiClient(K3CloudURL);
private
String
sFormId
=
"k2d1839c385a04b62983eb4183c4745fd"
;
@org
.
junit
.
Test
public
void
Test
()
{
Map
<
String
,
K3CloudApiClient
>
clientMap
=
new
HashMap
()
{{
put
(
"clientTwo"
,
null
);
}};
List
list
=
this
.
checkFiled
(
sFormId
,
new
HashMap
()
{{
put
(
"fnumber"
,
"fnumber"
);
}},
new
HashMap
()
{{
put
(
"fnumber"
,
"'XXDD202105200009'"
);
}},
clientMap
);
System
.
out
.
println
(
"1"
+
list
);
System
.
out
.
println
(
"1"
+
clientMap
);
List
lists
=
this
.
checkFiled
(
sFormId
,
new
HashMap
()
{{
put
(
"fnumber"
,
"fnumber"
);
}},
new
HashMap
()
{{
put
(
"fnumber"
,
"'XXDD202105200009'"
);
}},
clientMap
);
System
.
out
.
println
(
lists
);
}
public
List
<
Object
>
checkFiled
(
String
sFormId
,
Map
<
String
,
String
>
key
,
Map
<
String
,
String
>
where
,
Map
<
String
,
K3CloudApiClient
>
clientMap
)
{
List
<
List
<
Object
>>
list
=
null
;
List
<
Object
>
objects
=
null
;
Boolean
result
=
false
;
try
{
K3CloudApiClient
clientTwo
=
null
;
if
(
null
!=
clientMap
.
get
(
"clientTwo"
))
{
clientTwo
=
clientMap
.
get
(
"clientTwo"
);
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
(
"dsadsadsadsa"
+
clientMap
);
System
.
out
.
println
();
System
.
out
.
println
();
System
.
out
.
println
();
result
=
true
;
}
else
{
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
clientTwo
=
client
;
clientMap
.
put
(
"clientTwo"
,
client
);
}
if
(
result
)
{
String
content
;
if
(
where
!=
null
)
{
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
Stringkey
(
key
)
+
Stringwhere
(
where
)
+
"}"
;
}
else
{
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
Stringkey
(
key
)
+
"}"
;
}
list
=
clientTwo
.
executeBillQuery
(
content
);
}
if
(
list
.
size
()>
0
)
{
objects
=
list
.
get
(
0
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
objects
;
}
private
String
Stringwhere
(
Map
<
String
,
String
>
map
)
{
String
where
=
null
;
for
(
String
key
:
map
.
keySet
())
{
String
value
=
String
.
valueOf
(
map
.
get
(
key
));
if
(
value
!=
null
&&
value
!=
""
)
{
if
(
where
!=
null
)
{
where
=
where
+
" AND "
+
key
+
"="
+
value
;
}
else
{
where
=
key
+
"="
+
value
+
""
;
}
}
}
if
(
where
!=
null
)
{
return
",\"FilterString\":\""
+
where
+
"\""
;
}
return
""
;
}
private
String
Stringkey
(
Map
<
String
,
String
>
map
)
{
String
Keys
=
null
;
for
(
String
key
:
map
.
keySet
())
{
String
value
=
String
.
valueOf
(
map
.
get
(
key
));
if
(
value
!=
null
&&
value
!=
""
)
{
if
(
Keys
!=
null
)
{
Keys
=
Keys
+
" , "
+
key
;
}
else
{
Keys
=
key
;
}
}
}
if
(
Keys
!=
null
)
{
return
"\"FieldKeys\":\""
+
Keys
+
"\""
;
}
return
""
;
}
}
jeecg-boot-module-system/src/test/java/org/jeecg/ToolsTest.java
浏览文件 @
ad45bbbc
...
@@ -51,6 +51,16 @@ public class ToolsTest {
...
@@ -51,6 +51,16 @@ public class ToolsTest {
// static int lang = 2052;
// static int lang = 2052;
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
public
static
void
main
(
String
[]
args
)
{
Map
<
String
,
K3CloudApiClient
>
clientMap
=
new
HashMap
()
{{
put
(
"clientTwo"
,
null
);
}};
SecurityToolsTest
securityToolsTest
=
new
SecurityToolsTest
();
List
list
=
securityToolsTest
.
sFormId
(
clientMap
);
System
.
out
.
println
(
"f"
+
clientMap
);
Boolean
b
=
null
==
list
;
System
.
out
.
println
(
b
);
}
@Test
@Test
public
void
Test
()
{
public
void
Test
()
{
MyKeyPair
mkeyPair
=
SecurityTools
.
generateKeyPair
();
MyKeyPair
mkeyPair
=
SecurityTools
.
generateKeyPair
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论