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
59eeb082
提交
59eeb082
authored
9月 24, 2021
作者:
李炎
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
流程完成
上级
cf43e2bc
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
782 行增加
和
127 行删除
+782
-127
API.sql
db/API.sql
+0
-0
CategoryDao.java
...main/java/org/jeecg/modules/iost/API/Dao/CategoryDao.java
+42
-4
CategoryDaoSql.java
...n/java/org/jeecg/modules/iost/API/Dao/CategoryDaoSql.java
+209
-0
LoanInterfaceApi.java
.../modules/iost/API/ExternalInterface/LoanInterfaceApi.java
+11
-7
ApiTestContrller.java
...g/jeecg/modules/iost/API/controller/ApiTestContrller.java
+51
-0
LQKJ_t_IMSSyncDetails.java
.../jeecg/modules/iost/API/entity/LQKJ_t_IMSSyncDetails.java
+50
-0
LoanDiscardDetails.java
...org/jeecg/modules/iost/API/entity/LoanDiscardDetails.java
+44
-0
LQKJ_t_IMSSyncDetailsMapper.java
.../modules/iost/API/mapper/LQKJ_t_IMSSyncDetailsMapper.java
+7
-0
LoanDiscardDetailsMapper.java
...ecg/modules/iost/API/mapper/LoanDiscardDetailsMapper.java
+8
-0
LQKJ_t_IMSSyncDetailsMapper.xml
...dules/iost/API/mapper/xml/LQKJ_t_IMSSyncDetailsMapper.xml
+6
-0
LoanDiscardDetailsMapper.xml
.../modules/iost/API/mapper/xml/LoanDiscardDetailsMapper.xml
+6
-0
ILQKJ_t_IMSSyncDetailsService.java
...dules/iost/API/service/ILQKJ_t_IMSSyncDetailsService.java
+13
-0
ILoanDiscardDetailsService.java
.../modules/iost/API/service/ILoanDiscardDetailsService.java
+14
-0
LQKJ_t_IMSSyncDetailsServiceImpl.java
...st/API/service/impl/LQKJ_t_IMSSyncDetailsServiceImpl.java
+47
-0
LoanDiscardDetailsServiceImpl.java
.../iost/API/service/impl/LoanDiscardDetailsServiceImpl.java
+86
-0
KingdeeSelectJournalServiceImpl.java
.../kingdeejournal/impl/KingdeeSelectJournalServiceImpl.java
+2
-0
LQKJ_t_IMSSync.java
...in/java/org/jeecg/modules/iost/API/vo/LQKJ_t_IMSSync.java
+25
-0
LQKJ_t_IMSSyncDetailsWebapi.java
.../modules/iost/API/webapi/LQKJ_t_IMSSyncDetailsWebapi.java
+75
-0
LoanInterfaceWebapi.java
...rg/jeecg/modules/iost/API/webapi/LoanInterfaceWebapi.java
+30
-5
ConditionalSplicing.java
...ecg/modules/iost/API/webapi/Util/ConditionalSplicing.java
+0
-91
SecurityToolsTest.java
...ule-system/src/test/java/org/jeecg/SecurityToolsTest.java
+56
-20
没有找到文件。
db/API.sql
浏览文件 @
59eeb082
差异被折叠。
点击展开。
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/Dao/CategoryDao.java
浏览文件 @
59eeb082
...
@@ -3,11 +3,8 @@ package org.jeecg.modules.iost.API.Dao;
...
@@ -3,11 +3,8 @@ package org.jeecg.modules.iost.API.Dao;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.formula.functions.Today
;
import
org.jeecg.modules.iost.API.webapi.Util.ConditionalSplicing
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -30,7 +27,7 @@ public class CategoryDao {
...
@@ -30,7 +27,7 @@ public class CategoryDao {
if
(
where
!=
null
){
if
(
where
!=
null
){
where
=
where
+
" AND "
+
key
+
"="
+
value
;
where
=
where
+
" AND "
+
key
+
"="
+
value
;
}
else
{
}
else
{
where
=
key
+
"=
'"
+
value
+
"'
"
;
where
=
key
+
"=
"
+
value
+
"
"
;
}
}
}
}
}
}
...
@@ -94,5 +91,46 @@ public class CategoryDao {
...
@@ -94,5 +91,46 @@ public class CategoryDao {
}
}
return
list
;
return
list
;
}
}
public
Map
<
String
,
List
<
List
<
Object
>>>
selectMapWhereMap
(
String
sFormId
,
Map
<
String
,
String
>
key
,
Map
<
String
,
String
>
where
){
List
<
List
<
Object
>>
list
=
null
;
Map
<
String
,
List
<
List
<
Object
>>>
stringListHashMap
=
new
HashMap
<
String
,
List
<
List
<
Object
>>>();
try
{
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
if
(
result
){
String
content
;
if
(
where
!=
null
){
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
Stringkey
(
key
)+
Stringwhere
(
where
)+
"}"
;
}
else
{
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
Stringkey
(
key
)+
"}"
;
}
list
=
client
.
executeBillQuery
(
content
);
stringListHashMap
.
put
(
content
,
list
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
stringListHashMap
;
}
public
Map
<
String
,
List
<
List
<
Object
>>>
selectMapWhereString
(
String
sFormId
,
Map
<
String
,
String
>
key
,
String
where
){
List
<
List
<
Object
>>
list
=
null
;
Map
<
String
,
List
<
List
<
Object
>>>
stringListHashMap
=
new
HashMap
<
String
,
List
<
List
<
Object
>>>();
try
{
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
if
(
result
){
String
content
;
if
(
where
!=
null
){
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
Stringkey
(
key
)+
",\"FilterString\":\""
+
where
+
"\""
+
"}"
;
}
else
{
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
Stringkey
(
key
)+
"}"
;
}
list
=
client
.
executeBillQuery
(
content
);
stringListHashMap
.
put
(
content
,
list
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
stringListHashMap
;
}
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/Dao/CategoryDaoSql.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
Dao
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.modules.iost.API.Util.HttpUtil
;
import
org.jeecg.modules.iost.API.Util.HttpUtils
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Slf4j
@Component
public
class
CategoryDaoSql
{
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
);
String
servicenameTable
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecutDataSet,LQKJ.WebApi.Stub"
;
String
servicenameMap
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecuteDynamicObject,LQKJ.WebApi.Stub"
;
String
updateService
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecutBatch,LQKJ.WebApi.Stub"
;
private
String
StringkeyMap
(
Map
<
String
,
String
>
map
)
{
String
Keys
=
null
;
for
(
String
key
:
map
.
keySet
())
{
String
value
=
String
.
valueOf
(
key
);
if
(
value
!=
null
&&
value
!=
""
)
{
if
(
Keys
!=
null
)
{
Keys
=
Keys
+
" , "
+
key
;
}
else
{
Keys
=
key
;
}
}
}
if
(
Keys
!=
null
)
{
return
Keys
;
}
return
""
;
}
private
String
StringWhereCompare
(
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
" where "
+
where
+
""
;
}
return
""
;
}
private
String
StringOrCompare
(
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
+
" OR "
+
key
+
value
;
}
else
{
where
=
key
+
""
+
value
+
""
;
}
}
}
if
(
where
!=
null
)
{
return
" where "
+
where
+
""
;
}
return
""
;
}
private
String
StringCompareIn
(
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
+
","
+
value
;
}
else
{
where
=
key
+
" in ("
+
value
+
""
;
}
}
}
if
(
where
!=
null
)
{
return
" where "
+
where
+
")"
;
}
return
""
;
}
private
String
updateSetMap
(
Map
<
String
,
String
>
map
)
{
String
Keys
=
null
;
for
(
String
key
:
map
.
keySet
())
{
String
value
=
String
.
valueOf
(
key
);
if
(
value
!=
null
&&
value
!=
""
)
{
if
(
Keys
!=
null
)
{
Keys
=
Keys
+
" , "
+
key
+
" = "
+
"'"
+
map
.
get
(
key
)
+
"'"
;
}
else
{
Keys
=
key
+
" = "
+
"'"
+
map
.
get
(
key
)
+
"'"
;
}
}
}
if
(
Keys
!=
null
)
{
return
Keys
;
}
return
""
;
}
public
Map
<
String
,
List
<
Map
>>
selectInMap
(
String
f_sFormId
,
Map
<
String
,
String
>
key
,
Map
<
String
,
String
>
where
)
{
Map
<
String
,
List
<
Map
>>
log
=
new
HashMap
<>();
//返回k请求v相应
String
content
=
null
;
//请求
List
<
Map
>
list
=
null
;
//响应
try
{
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
if
(
result
)
{
if
(
where
!=
null
)
{
content
=
"SELECT top 100 "
+
StringkeyMap
(
key
)
+
" FROM "
+
f_sFormId
+
StringWhereCompare
(
where
)
+
";"
;
}
else
{
content
=
"SELECT top 100 "
+
StringkeyMap
(
key
)
+
" FROM "
+
f_sFormId
+
";"
;
}
String
[]
strings
=
new
String
[]{
content
};
System
.
out
.
println
(
"content "
+
content
);
list
=
client
.
execute
(
servicenameMap
,
strings
,
List
.
class
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
log
.
put
(
content
,
list
);
//请求数据做key,返回做value
}
return
log
;
}
public
Map
<
String
,
List
<
Map
>>
selectInMapOR
(
String
f_sFormId
,
Map
<
String
,
String
>
key
,
Map
<
String
,
String
>
where
)
{
Map
<
String
,
List
<
Map
>>
log
=
new
HashMap
<>();
//返回k请求v相应
String
content
=
null
;
//请求
List
<
Map
>
list
=
null
;
//响应
try
{
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
if
(
result
)
{
if
(
where
!=
null
)
{
content
=
"SELECT "
+
StringkeyMap
(
key
)
+
" FROM "
+
f_sFormId
+
StringOrCompare
(
where
)
+
";"
;
}
else
{
content
=
"SELECT "
+
StringkeyMap
(
key
)
+
" FROM "
+
f_sFormId
+
";"
;
}
String
[]
strings
=
new
String
[]{
content
};
list
=
client
.
execute
(
servicenameMap
,
strings
,
List
.
class
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
log
.
put
(
content
,
list
);
//请求数据做key,返回做value
}
return
log
;
}
public
Map
<
String
,
List
<
Map
>>
selectMapIn
(
String
f_sFormId
,
Map
<
String
,
String
>
key
,
Map
<
String
,
String
>
where
)
{
Map
<
String
,
List
<
Map
>>
log
=
new
HashMap
<>();
//返回k请求v相应
String
content
=
null
;
//请求
List
<
Map
>
list
=
null
;
//响应
try
{
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
if
(
result
)
{
if
(
where
!=
null
)
{
content
=
"SELECT top 100 "
+
StringkeyMap
(
key
)
+
" FROM "
+
f_sFormId
+
StringCompareIn
(
where
)
+
";"
;
}
else
{
content
=
"SELECT top 100 "
+
StringkeyMap
(
key
)
+
" FROM "
+
f_sFormId
+
";"
;
}
String
[]
strings
=
new
String
[]{
content
};
list
=
client
.
execute
(
servicenameMap
,
strings
,
List
.
class
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
log
.
put
(
content
,
list
);
//请求数据做key,返回做value
}
return
log
;
}
public
Map
<
String
,
Object
>
updateInMap
(
String
f_sFormId
,
Map
<
String
,
String
>
set
,
Map
<
String
,
String
>
where
)
{
Map
<
String
,
Object
>
log
=
new
HashMap
<>();
//返回k请求v相应
String
content
=
null
;
//请求
Object
list
=
null
;
//响应
try
{
content
=
"UPDATE "
+
f_sFormId
+
" SET "
+
updateSetMap
(
set
)
+
" "
+
StringCompareIn
(
where
);
Map
<
String
,
String
>
hreader
=
new
HashMap
<>();
hreader
.
put
(
"Cookie"
,
"ASP.NET_SessionId=w1um3b2stpbkovaacfz55oh1; kdservice-sessionid=fb84160d-d8e3-4d21-bcf7-3fc9e2851837"
);
String
finalContent
=
content
;
String
url
=
"http://192.168.2.243/k3cloud/LQKJ.WebApi.Stub.CustomWebApiService.ExecutBatch,LQKJ.WebApi.Stub.common.kdsvc"
;
list
=
HttpUtil
.
postForm
(
url
,
new
HashMap
<
String
,
String
>()
{{
put
(
"sql"
,
finalContent
);
}},
hreader
);
System
.
out
.
println
(
"list"
+
list
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
log
.
put
(
content
,
list
);
//请求数据做key,返回做value
}
return
log
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/ExternalInterface/
QueryLoanDetails
Api.java
→
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/ExternalInterface/
LoanInterface
Api.java
浏览文件 @
59eeb082
...
@@ -11,30 +11,34 @@ import java.io.IOException;
...
@@ -11,30 +11,34 @@ import java.io.IOException;
import
java.util.*
;
import
java.util.*
;
/**
/**
* @Description:
供应商重点原材料库存
* @Description:
OA借款接口
*/
*/
@Service
@Service
public
class
QueryLoanDetails
Api
implements
API
{
public
class
LoanInterface
Api
implements
API
{
// private String url = "http://test.qywx.kingsware.cn/OA/erpBorrowAction.do/";//正式接口
// private String url = "http://test.qywx.kingsware.cn/OA/erpBorrowAction.do/";//正式接口
private
String
url
=
"https://b02ba329-ac3e-4144-a744-25abca96b290.mock.pstmn.io/"
;
private
String
url
=
"https://b02ba329-ac3e-4144-a744-25abca96b290.mock.pstmn.io/"
;
private
List
<
Map
<
String
,
Object
>>
lists
=
new
ArrayList
<
Map
<
String
,
Object
>>();
private
List
<
Map
<
String
,
Object
>>
lists
=
new
ArrayList
<
Map
<
String
,
Object
>>();
Map
<
String
,
String
>
hreader
=
new
HashMap
<>();
private
Map
<
String
,
String
>
hreader
=
new
HashMap
<>();
public
QueryLoanDetails
Api
()
{
public
LoanInterface
Api
()
{
// hreader.put("Content-Type", "application/json");
// hreader.put("Content-Type", "application/json");
}
}
@Override
@Override
public
String
add
(
Map
<
String
,
String
>
map
)
{
public
String
add
(
Map
<
String
,
String
>
map
)
{
return
null
;
Map
params
=
map
;
String
result
=
HttpUtils
.
getRequest
(
url
+
"/OA/erpBorrowAction.do"
,
hreader
,
params
);
return
result
;
}
}
@Override
@Override
public
String
select
()
{
public
String
select
()
{
Map
params
=
new
HashMap
(){{
put
(
"method"
,
"getBorrow"
);}};
Map
params
=
new
HashMap
()
{{
String
result
=
HttpUtils
.
getRequest
(
url
+
"/OA/erpBorrowAction.do"
,
hreader
,
params
);
put
(
"method"
,
"getBorrow"
);
}};
String
result
=
HttpUtils
.
getRequest
(
url
+
"/OA/erpBorrowAction.do"
,
hreader
,
params
);
return
result
;
return
result
;
}
}
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/controller/ApiTestContrller.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
controller
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.modules.iost.API.entity.LQKJ_t_IMSSyncDetails
;
import
org.jeecg.modules.iost.API.service.ILQKJ_t_IMSSyncDetailsService
;
import
org.jeecg.modules.iost.API.vo.LQKJ_t_IMSSync
;
import
org.jeecg.modules.iost.API.webapi.LQKJ_t_IMSSyncDetailsWebapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.*
;
@Api
(
tags
=
""
)
@RestController
@RequestMapping
(
"/API/test"
)
@Slf4j
public
class
ApiTestContrller
{
@Autowired
private
LQKJ_t_IMSSyncDetailsWebapi
webapi
;
@GetMapping
(
"/s"
)
public
Object
tes
()
throws
IOException
,
ParseException
{
System
.
out
.
println
(
123456456
);
Map
<
String
,
List
<
Map
>>
synchronization
=
webapi
.
synchronization
(
new
HashMap
(){{
put
(
"F_LQKJ_SyncCheck = "
,
0
);}});
if
(
synchronization
!=
null
)
for
(
String
key
:
synchronization
.
keySet
())
{
List
<
Map
>
lists
=
synchronization
.
get
(
key
);
List
<
LQKJ_t_IMSSyncDetails
>
SyncDetails
=
new
ArrayList
<>();
Map
<
String
,
String
>
fidMap
=
new
IdentityHashMap
<
String
,
String
>();
for
(
Map
o
:
lists
)
{
if
(
o
.
containsKey
(
"F_LQKJ_Syncbill"
))
//判断是否有字段
if
(
o
.
get
(
"F_LQKJ_Syncbill"
).
equals
(
"ER_ExpenseRequest"
))
{
//判断收费单
LQKJ_t_IMSSyncDetails
lqkj_t_imsSync
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
),
LQKJ_t_IMSSyncDetails
.
class
).
setCreatetime
(
new
Date
());
SyncDetails
.
add
(
lqkj_t_imsSync
);
//收费单保存到本地同步记录
fidMap
.
put
(
"FID"
,
"'"
+
o
.
get
(
"FID"
)
+
"'"
);
//修改同步状态拼接 in语句
continue
;
}
}
System
.
out
.
println
(
"lists.size() "
+
lists
.
size
());
System
.
out
.
println
(
"fidMap.size() "
+
fidMap
.
size
());
// if (0<fidMap.size()) webapi.updateMap(fidMap);//修改同步状态
}
return
synchronization
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/entity/LQKJ_t_IMSSyncDetails.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@TableName
(
"LQKJ_t_IMSSync_Details"
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"对象"
,
description
=
"Ims同步记录"
)
public
class
LQKJ_t_IMSSyncDetails
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 实体主键:FID
* 同步记录数据内码:F_LQKJ_SyncDataId
* 同步记录表单:F_LQKJ_Syncbill
* 同步日期:F_LQKJ_SyndDatetime
* 创建人:FCreatorId
* 修改人:FModifierId
* 创建日期:FCreateDate
* 修改日期:FModifyDate
* 同步:F_LQKJ_SyncCheck
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ApiModelProperty
(
value
=
"主键"
)
private
String
FID
;
//实体主键
@ApiModelProperty
(
value
=
"同步记录数据内码"
)
private
String
F_LQKJ_SyncDataId
;
//F_LQKJ_SyncDataId
@ApiModelProperty
(
value
=
"同步记录表单"
)
private
String
F_LQKJ_Syncbill
;
//F_LQKJ_Syncbill
@ApiModelProperty
(
value
=
"同步"
)
private
Integer
F_LQKJ_SyncCheck
;
//F_LQKJ_SyncCheck
/**创建日期*/
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"创建日期"
)
private
Date
createtime
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/entity/LoanDiscardDetails.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
/**
* @Description: 借款废弃
* @Author: jeecg-boot
* @Date: 2021-07-09
* @Version: V1.0
*/
@Data
@TableName
(
""
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@ApiModel
(
value
=
"对象"
,
description
=
"借款废弃信息-明细"
)
public
class
LoanDiscardDetails
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ApiModelProperty
(
value
=
"主键"
)
private
String
id
;
/**同步到金蝶费用申请单后金蝶返回的实体主键
* 实体主键
*/
private
String
fid
;
// /**同步到金蝶费用申请单后金蝶返回的单据编号
// *单据编号
// */
// private String fbillno ;
@ApiModelProperty
(
value
=
"工单号"
)
private
String
worknumber
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/mapper/LQKJ_t_IMSSyncDetailsMapper.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.iost.API.entity.LQKJ_t_IMSSyncDetails
;
public
interface
LQKJ_t_IMSSyncDetailsMapper
extends
BaseMapper
<
LQKJ_t_IMSSyncDetails
>
{
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/mapper/LoanDiscardDetailsMapper.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.iost.API.entity.LoanDiscardDetails
;
public
interface
LoanDiscardDetailsMapper
extends
BaseMapper
<
LoanDiscardDetails
>
{
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/mapper/xml/LQKJ_t_IMSSyncDetailsMapper.xml
0 → 100644
浏览文件 @
59eeb082
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.iost.API.mapper.LQKJ_t_IMSSyncDetailsMapper"
>
</mapper>
\ No newline at end of file
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/mapper/xml/LoanDiscardDetailsMapper.xml
0 → 100644
浏览文件 @
59eeb082
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.iost.API.mapper.LoanDiscardDetailsMapper"
>
</mapper>
\ No newline at end of file
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/ILQKJ_t_IMSSyncDetailsService.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.iost.API.entity.LQKJ_t_IMSSyncDetails
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.Map
;
public
interface
ILQKJ_t_IMSSyncDetailsService
extends
IService
<
LQKJ_t_IMSSyncDetails
>
{
public
Object
synchronization
()
throws
IOException
,
ParseException
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/ILoanDiscardDetailsService.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.iost.API.entity.LoanDiscardDetails
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.Map
;
public
interface
ILoanDiscardDetailsService
extends
IService
<
LoanDiscardDetails
>
{
public
Object
synchronization
(
Map
object
)
throws
IOException
,
ParseException
;
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/LQKJ_t_IMSSyncDetailsServiceImpl.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.iost.API.entity.LQKJ_t_IMSSyncDetails
;
import
org.jeecg.modules.iost.API.mapper.LQKJ_t_IMSSyncDetailsMapper
;
import
org.jeecg.modules.iost.API.service.ILQKJ_t_IMSSyncDetailsService
;
import
org.jeecg.modules.iost.API.service.ILoanDiscardDetailsService
;
import
org.jeecg.modules.iost.API.vo.LQKJ_t_IMSSync
;
import
org.jeecg.modules.iost.API.webapi.LQKJ_t_IMSSyncDetailsWebapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.*
;
@Service
public
class
LQKJ_t_IMSSyncDetailsServiceImpl
extends
ServiceImpl
<
LQKJ_t_IMSSyncDetailsMapper
,
LQKJ_t_IMSSyncDetails
>
implements
ILQKJ_t_IMSSyncDetailsService
{
@Autowired
private
LQKJ_t_IMSSyncDetailsWebapi
webapi
;
//限制一百条
public
Object
synchronization
()
{
Map
<
String
,
List
<
Map
>>
synchronization
=
webapi
.
synchronization
(
new
HashMap
(){{
put
(
"F_LQKJ_SyncCheck = "
,
0
);}});
if
(
synchronization
!=
null
)
for
(
String
key
:
synchronization
.
keySet
())
{
List
<
Map
>
lists
=
synchronization
.
get
(
key
);
List
<
LQKJ_t_IMSSyncDetails
>
SyncDetails
=
new
ArrayList
<>();
Map
<
String
,
String
>
fidMap
=
new
IdentityHashMap
<
String
,
String
>();
for
(
Map
o
:
lists
)
{
if
(
o
.
containsKey
(
"F_LQKJ_Syncbill"
))
//判断是否有字段
if
(
o
.
get
(
"F_LQKJ_Syncbill"
).
equals
(
"ER_ExpenseRequest"
))
{
//判断收费单
LQKJ_t_IMSSyncDetails
lqkj_t_imsSync
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
),
LQKJ_t_IMSSyncDetails
.
class
).
setCreatetime
(
new
Date
());
SyncDetails
.
add
(
lqkj_t_imsSync
);
//收费单保存到本地同步记录
fidMap
.
put
(
"FID"
,
"'"
+
o
.
get
(
"FID"
)
+
"'"
);
//修改同步状态拼接 in语句
continue
;
}
}
if
(
0
<
fidMap
.
size
())
webapi
.
updateMap
(
fidMap
);
//修改同步状态
if
(
0
<
SyncDetails
.
size
())
this
.
saveBatch
(
SyncDetails
);
//数据保存到本地用作同步
}
return
synchronization
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/LoanDiscardDetailsServiceImpl.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.modules.iost.API.ExternalInterface.LoanInterfaceApi
;
import
org.jeecg.modules.iost.API.entity.LQKJ_t_IMSSyncDetails
;
import
org.jeecg.modules.iost.API.entity.LoanDiscardDetails
;
import
org.jeecg.modules.iost.API.mapper.LoanDiscardDetailsMapper
;
import
org.jeecg.modules.iost.API.service.ILQKJ_t_IMSSyncDetailsService
;
import
org.jeecg.modules.iost.API.service.ILoanDiscardDetailsService
;
import
org.jeecg.modules.iost.API.webapi.LQKJ_t_IMSSyncDetailsWebapi
;
import
org.jeecg.modules.iost.API.webapi.LoanInterfaceWebapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.*
;
@Service
public
class
LoanDiscardDetailsServiceImpl
extends
ServiceImpl
<
LoanDiscardDetailsMapper
,
LoanDiscardDetails
>
implements
ILoanDiscardDetailsService
{
@Autowired
private
LoanInterfaceWebapi
loanInterfaceWebapi
;
@Autowired
private
LoanInterfaceApi
loanInterfaceApi
;
@Autowired
private
ILQKJ_t_IMSSyncDetailsService
t_imsSyncDetailsService
;
public
void
getExpenseRequest
()
throws
IOException
,
ParseException
{
QueryWrapper
<
LQKJ_t_IMSSyncDetails
>
queryWrapper
=
new
QueryWrapper
<
LQKJ_t_IMSSyncDetails
>();
queryWrapper
.
eq
(
"F_LQKJ_Syncbill"
,
"ER_ExpenseRequest"
).
and
(
wq
->
wq
.
eq
(
"F_LQKJ_SyncCheck"
,
0
));
//get本地记录筛选收费单,未同步
List
<
LQKJ_t_IMSSyncDetails
>
lqkj_t_imsSyncDetails
=
t_imsSyncDetailsService
.
getBaseMapper
().
selectList
(
queryWrapper
);
List
<
LQKJ_t_IMSSyncDetails
>
SyncDetails
=
new
ArrayList
<>();
Map
<
String
,
String
>
fidMap
=
new
IdentityHashMap
<
String
,
String
>();
for
(
LQKJ_t_IMSSyncDetails
lqkj_t_imsSyncDetail
:
lqkj_t_imsSyncDetails
)
{
//遍历同步
String
f_lqkj_syncDataId
=
lqkj_t_imsSyncDetail
.
getF_LQKJ_SyncDataId
();
//获取未同步收费单的fid
SyncDetails
.
add
(
lqkj_t_imsSyncDetail
.
setF_LQKJ_SyncCheck
(
1
));
//设置同步状态为已同步
fidMap
.
put
(
new
String
(
"FID"
),
"'"
+
f_lqkj_syncDataId
+
"'"
);
//允许同key的map做in语句
}
t_imsSyncDetailsService
.
updateBatchById
(
SyncDetails
);
//更新收费单同步状态
Object
synchronization
=
synchronization
(
fidMap
);
}
@Override
public
Object
synchronization
(
Map
object
){
Map
<
String
,
List
<
Map
>>
synchronization
=
null
;
if
(
0
<
object
.
size
())
{
synchronization
=
loanInterfaceWebapi
.
synchronization
(
object
);
}
if
(
null
!=
synchronization
)
for
(
String
key
:
synchronization
.
keySet
())
{
List
<
Map
>
lists
=
synchronization
.
get
(
key
);
for
(
Map
list
:
lists
)
{
if
(
list
.
get
(
"FCancelStatus"
).
toString
().
equals
(
"B"
))
{
//判断废弃状态 -已废弃
Map
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"discardWorknumber"
);
put
(
"worknumber"
,
list
.
get
(
"FBillNo"
));
}};
String
select
=
loanInterfaceApi
.
add
(
params
);
continue
;
}
if
(
list
.
get
(
"FDocumentStatus"
).
toString
().
equals
(
"C"
))
{
//判断付款状态 -已付款
Map
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"paymentStatus"
);
put
(
"worknumber"
,
list
.
get
(
"FBillNo"
).
toString
());
put
(
"status"
,
"已付款"
);
}};
String
select
=
loanInterfaceApi
.
add
(
params
);
}
}
}
return
synchronization
;
}
@Override
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
{
return
null
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/kingdeejournal/impl/KingdeeSelectJournalServiceImpl.java
浏览文件 @
59eeb082
...
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
org.jeecg.modules.iost.API.entity.kingdeejournal.KingdeeSelectJournal
;
import
org.jeecg.modules.iost.API.entity.kingdeejournal.KingdeeSelectJournal
;
import
org.jeecg.modules.iost.API.mapper.kingdeejournal.KingdeeSelectJournalMapper
;
import
org.jeecg.modules.iost.API.mapper.kingdeejournal.KingdeeSelectJournalMapper
;
import
org.jeecg.modules.iost.API.service.kingdeejournal.IKingdeeSelectJournalService
;
import
org.jeecg.modules.iost.API.service.kingdeejournal.IKingdeeSelectJournalService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
@Service
@Service
public
class
KingdeeSelectJournalServiceImpl
extends
ServiceImpl
<
KingdeeSelectJournalMapper
,
KingdeeSelectJournal
>
implements
IKingdeeSelectJournalService
{
public
class
KingdeeSelectJournalServiceImpl
extends
ServiceImpl
<
KingdeeSelectJournalMapper
,
KingdeeSelectJournal
>
implements
IKingdeeSelectJournalService
{
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/vo/LQKJ_t_IMSSync.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
vo
;
import
lombok.Data
;
@Data
public
class
LQKJ_t_IMSSync
{
/**
* 实体主键:FID
* 同步记录数据内码:F_LQKJ_SyncDataId
* 同步记录表单:F_LQKJ_Syncbill
* 同步日期:F_LQKJ_SyndDatetime
* 创建人:FCreatorId
* 修改人:FModifierId
* 创建日期:FCreateDate
* 修改日期:FModifyDate
* 同步:F_LQKJ_SyncCheck
*/
private
String
FID
;
//实体主键
private
String
F_LQKJ_SyncDataId
;
//F_LQKJ_SyncDataId
private
String
F_LQKJ_Syncbill
;
//F_LQKJ_Syncbill
private
String
F_LQKJ_SyncCheck
;
//F_LQKJ_SyncCheck
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/webapi/LQKJ_t_IMSSyncDetailsWebapi.java
0 → 100644
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
webapi
;
import
org.jeecg.modules.iost.API.Dao.CategoryDao
;
import
org.jeecg.modules.iost.API.Dao.CategoryDaoSql
;
import
org.jeecg.modules.iost.API.webapi.Interface.web_api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.text.ParseException
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
@Component
public
class
LQKJ_t_IMSSyncDetailsWebapi
implements
web_api
{
/**
* 操作的单据体名称
* ims同步记录
*/
private
String
sFormId
=
"LQKJ_IMSSync"
;
private
String
sFormId_t
=
"LQKJ_t_IMSSync"
;
private
Map
<
String
,
String
>
key
=
new
LinkedHashMap
<>();
@Autowired
private
CategoryDao
categoryDao
;
@Autowired
private
CategoryDaoSql
categoryDaoSql
;
/**
* 实体主键:FID
* 同步记录数据内码:F_LQKJ_SyncDataId
* 同步记录表单:F_LQKJ_Syncbill
* 同步日期:F_LQKJ_SyndDatetime
* 创建人:FCreatorId
* 修改人:FModifierId
* 创建日期:FCreateDate
* 修改日期:FModifyDate
* 同步:F_LQKJ_SyncCheck
*/
public
LQKJ_t_IMSSyncDetailsWebapi
()
{
key
.
put
(
"FID"
,
"FID"
);
//实体主键0
key
.
put
(
"F_LQKJ_SyncDataId"
,
"F_LQKJ_SyncDataId"
);
//同步记录数据内码1
key
.
put
(
"F_LQKJ_Syncbill"
,
"F_LQKJ_Syncbill"
);
//同步记录表单2
key
.
put
(
"F_LQKJ_SyncCheck"
,
"F_LQKJ_SyncCheck"
);
//同步3 否为0 ,是为1
}
@Override
public
String
add
(
Object
object
)
{
return
null
;
}
@Override
public
List
<
Map
<
String
,
String
>>
select
(
Map
<
String
,
String
>
map
,
String
where
)
throws
ParseException
{
return
null
;
}
@Override
public
String
update
(
Object
object
)
{
return
null
;
}
public
Map
<
String
,
List
<
Object
>>
updateMap
(
Map
where
)
{
Map
<
String
,
String
>
set
=
new
LinkedHashMap
(){{
put
(
"F_LQKJ_SyncCheck"
,
"1"
);}};
Map
<
String
,
List
<
Object
>>
map
=
categoryDaoSql
.
updateInMap
(
sFormId_t
,
set
,
where
);
return
map
;
}
public
Map
<
String
,
List
<
List
<
Object
>>>
synchronization
(
String
where
)
{
//手动同步用
Map
<
String
,
List
<
List
<
Object
>>>
stringListMap
=
categoryDao
.
selectMapWhereString
(
sFormId
,
key
,
where
);
return
stringListMap
;
}
public
Map
<
String
,
List
<
Map
>>
synchronization
(
Map
where
)
{
//自动同步用
// Map<String, List<List<Object>>> stringListMap = categoryDaoSql.selectInMap(sFormId_t, key, where);
Map
<
String
,
List
<
Map
>>
stringListMap
=
categoryDaoSql
.
selectInMap
(
sFormId_t
,
key
,
where
);
return
stringListMap
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/webapi/
QueryLoanDetailsr
Webapi.java
→
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/webapi/
LoanInterface
Webapi.java
浏览文件 @
59eeb082
package
org
.
jeecg
.
modules
.
iost
.
API
.
webapi
;
package
org
.
jeecg
.
modules
.
iost
.
API
.
webapi
;
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.Util.JsonUtil
;
import
org.jeecg.modules.iost.API.Util.JsonUtil
;
import
org.jeecg.modules.iost.API.webapi.Interface.web_api
;
import
org.jeecg.modules.iost.API.webapi.Interface.web_api
;
import
org.jeecg.modules.iost.API.webapi.Util.FieldConversion
;
import
org.jeecg.modules.iost.API.webapi.Util.FieldConversion
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* @Description: 采购订单
* @Description: 采购订单
*/
*/
public
class
QueryLoanDetailsrWebapi
implements
web_api
{
@Component
public
class
LoanInterfaceWebapi
implements
web_api
{
/**
/**
* 操作的单据体名称
* 操作的单据体名称
* 费用申请单
* 费用申请单
*
*
/
*/
private
String
sFormId
=
"ER_ExpenseRequest"
;
private
String
sFormId
=
"ER_ExpenseRequest"
;
private
String
sFormId_t
=
"T_ER_ExpenseRequest"
;
private
Map
<
String
,
String
>
key
=
new
LinkedHashMap
<>();
@Autowired
@Autowired
private
CategoryDao
categoryDao
;
private
CategoryDao
categoryDao
;
@Autowired
private
CategoryDaoSql
categoryDaoSql
;
LoanInterfaceWebapi
()
{
key
.
put
(
"FID"
,
"FID"
);
//实体主键0
key
.
put
(
"FBillNo"
,
"FBillNo"
);
//单据编号1 -worknumber
key
.
put
(
"FDocumentStatus"
,
"FDocumentStatus"
);
//单据状态2
key
.
put
(
"FCancelStatus"
,
"FCancelStatus"
);
//作废状态 3
}
@Override
@Override
public
String
add
(
Object
object
)
{
public
String
add
(
Object
object
)
{
String
json
=
categoryDao
.
add
(
sFormId
,
JsonUtil
.
Objectjson
(
object
));
return
json
;
return
null
;
}
}
@Override
@Override
public
List
<
Map
<
String
,
String
>>
select
(
Map
<
String
,
String
>
map
,
String
where
)
{
public
List
<
Map
<
String
,
String
>>
select
(
Map
<
String
,
String
>
map
,
String
where
)
{
return
null
;
return
null
;
}
}
...
@@ -36,4 +51,14 @@ public class QueryLoanDetailsrWebapi implements web_api {
...
@@ -36,4 +51,14 @@ public class QueryLoanDetailsrWebapi implements web_api {
public
String
update
(
Object
object
)
{
public
String
update
(
Object
object
)
{
return
null
;
return
null
;
}
}
public
Map
<
String
,
List
<
List
<
Object
>>>
synchronization
(
String
where
)
{
//手动同步用
Map
<
String
,
List
<
List
<
Object
>>>
stringListMap
=
categoryDao
.
selectMapWhereString
(
sFormId
,
key
,
where
);
return
stringListMap
;
}
public
Map
<
String
,
List
<
Map
>>
synchronization
(
Map
where
)
{
//自动同步用
Map
<
String
,
List
<
Map
>>
stringListMap
=
categoryDaoSql
.
selectMapIn
(
sFormId_t
,
key
,
where
);
return
stringListMap
;
}
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/webapi/Util/ConditionalSplicing.java
deleted
100644 → 0
浏览文件 @
cf43e2bc
package
org
.
jeecg
.
modules
.
iost
.
API
.
webapi
.
Util
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Component
public
class
ConditionalSplicing
{
public
String
selectInList
(
String
sFormId
,
List
<
String
>
lists
,
Map
<
String
,
String
>
where
)
{
String
content
=
null
;
//请求
if
(
where
!=
null
)
{
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
StringkeyByList
(
lists
)
+
StringWhereCompare
(
where
)
+
"}"
;
}
else
{
content
=
"{\"FormId\":\""
+
sFormId
+
"\","
+
StringkeyByList
(
lists
)
+
"}"
;
}
return
content
;
}
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
""
;
}
public
static
String
StringWhereCompare
(
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
StringkeyByList
(
List
<
String
>
list
)
{
String
Keys
=
null
;
for
(
String
key
:
list
)
{
String
value
=
String
.
valueOf
(
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/SecurityToolsTest.java
浏览文件 @
59eeb082
...
@@ -4,25 +4,26 @@ package org.jeecg;
...
@@ -4,25 +4,26 @@ package org.jeecg;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
kingdee.bos.webapi.client.K3CloudApiClient
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.val
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.jeecg.common.util.security.SecurityTools
;
import
org.jeecg.common.util.security.SecurityTools
;
import
org.jeecg.common.util.security.entity.*
;
import
org.jeecg.common.util.security.entity.*
;
import
org.jeecg.modules.iost.API.ExternalInterface.
QueryLoanDetails
Api
;
import
org.jeecg.modules.iost.API.ExternalInterface.
LoanInterface
Api
;
import
org.jeecg.modules.iost.API.Util.HttpUtils
;
import
org.jeecg.modules.iost.API.Util.HttpUtils
;
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.junit.Test
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
@Slf4j
@Slf4j
@EnableScheduling
@EnableScheduling
public
class
SecurityToolsTest
{
public
class
SecurityToolsTest
{
static
String
K3CloudURL
=
"http://192.168.2.243/k3cloud/"
;
//指定地址
static
String
K3CloudURL
=
"http://192.168.2.243/k3cloud/"
;
//指定地址
static
String
dbId
=
"6
08102e4df263c
"
;
static
String
dbId
=
"6
136b7c51f0e4f
"
;
static
String
uid
=
"Administrator"
;
static
String
uid
=
"Administrator"
;
static
String
pwd
=
"888888"
;
static
String
pwd
=
"888888"
;
static
int
lang
=
2052
;
static
int
lang
=
2052
;
...
@@ -91,12 +92,12 @@ public class SecurityToolsTest {
...
@@ -91,12 +92,12 @@ public class SecurityToolsTest {
public
void
S
()
{
public
void
S
()
{
Random
r
=
new
Random
();
Random
r
=
new
Random
();
// 第一种方法
// 第一种方法
// int num = (int) (Math.random() * 5 + 1);
// int num = (int) (Math.random() * 5 + 1);
// System.out.println("num:" + num);
// System.out.println("num:" + num);
// 第二种方法
// 第二种方法
int
a
=
r
.
nextInt
(
5
)
+
1
;
int
a
=
r
.
nextInt
(
5
)
+
1
;
System
.
out
.
println
(
"a:"
+
a
);
System
.
out
.
println
(
"a:"
+
a
);
}
}
...
@@ -108,23 +109,21 @@ public class SecurityToolsTest {
...
@@ -108,23 +109,21 @@ public class SecurityToolsTest {
public
void
timed
()
{
public
void
timed
()
{
String
servicenameTable
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecutDataSet,LQKJ.WebApi.Stub"
;
String
servicenameTable
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecutDataSet,LQKJ.WebApi.Stub"
;
String
servicenameMap
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecuteDynamicObject,LQKJ.WebApi.Stub"
;
String
servicenameMap
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecuteDynamicObject,LQKJ.WebApi.Stub"
;
String
sFormId
=
"PRD_INSTOCK"
;
log
.
info
(
"123"
);
log
.
info
(
"123"
);
List
<
List
<
Object
>>
list
=
null
;
List
<
List
<
Object
>>
list
=
null
;
try
{
try
{
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
if
(
result
){
if
(
result
){
String
content
;
String
sql
=
"SELECT * FROM LQKJ_t_IMSSync where F_LQKJ_SyncCheck = 1;"
;
System
.
out
.
println
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss.SSS"
).
format
(
new
Date
()));
String
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss.SSS"
).
format
(
new
Date
());
// FBILLNO,FDATE,FMaterialId,FDESCRIPTION,FCreateDate,FApproveDate,FID
String
sql
=
"SELECT * FROM T_PRD_INSTOCKENTRY;"
;
System
.
out
.
println
(
sql
);
System
.
out
.
println
(
sql
);
String
[]
strings
=
new
String
[]{
sql
};
String
[]
strings
=
new
String
[]{
sql
};
Object
execute
=
client
.
execute
(
servicenameMap
,
strings
,
Object
.
class
);
List
<
Map
>
execute
=
client
.
execute
(
servicenameMap
,
strings
,
List
.
class
);
for
(
Map
o
:
execute
)
{
System
.
out
.
println
(
o
.
get
(
"F_LQKJ_SYNCCHECK"
));
}
System
.
out
.
println
();
System
.
out
.
println
(
execute
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -133,11 +132,48 @@ public class SecurityToolsTest {
...
@@ -133,11 +132,48 @@ public class SecurityToolsTest {
@Test
@Test
// @Scheduled(fixedDelay = 5000)
// @Scheduled(fixedDelay = 5000)
public
void
timdsaded
()
{
public
void
timdsaded
()
{
QueryLoanDetailsApi
queryLoanDetailsApi
=
new
QueryLoanDetails
Api
();
LoanInterfaceApi
queryLoanDetailsApi
=
new
LoanInterface
Api
();
String
select
=
queryLoanDetailsApi
.
select
(
);
String
select
=
queryLoanDetailsApi
.
add
(
null
);
System
.
out
.
println
(
select
);
System
.
out
.
println
(
select
);
OaRequest
<
List
>
listOaRequest
=
com
.
alibaba
.
fastjson
.
JSONObject
.
parseObject
(
select
,
OaRequest
.
class
);
OaRequest
<
List
<
Map
>>
listOaRequest
=
com
.
alibaba
.
fastjson
.
JSONObject
.
parseObject
(
select
,
OaRequest
.
class
);
List
<
Map
>
result
=
listOaRequest
.
getResult
();
System
.
out
.
println
(
listOaRequest
);
System
.
out
.
println
(
listOaRequest
);
System
.
out
.
println
(
result
.
get
(
0
).
size
());
}
}
@Autowired
private
LQKJ_t_IMSSyncDetailsWebapi
webapi
;
@Test
// @Scheduled(fixedDelay = 5000)
public
void
sadsad
()
{
Map
<
String
,
String
>
fid
=
new
IdentityHashMap
<
String
,
String
>();
for
(
int
i1
=
0
;
i1
<
10
;
i1
++)
{
fid
.
put
(
new
String
(
"fid"
),
String
.
valueOf
(
i1
));
}
if
(
0
<
fid
.
size
())
{
Map
Obj
=
fid
;
String
s
=
StringCompareIn
(
Obj
);
System
.
out
.
println
(
s
);
}
}
// fid in ('0fb6a3a7-9c09-4720-820e-8c64618b7cbe','16cde038-2101-4eea-a05c-78becc60f0a9')
private
String
StringCompareIn
(
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
+
","
+
value
;
}
else
{
where
=
key
+
" in ("
+
value
+
""
;
}
}
}
if
(
where
!=
null
)
{
return
" where "
+
where
+
")"
;
}
return
""
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论