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
2e2c0b53
提交
2e2c0b53
authored
10月 09, 2021
作者:
李炎
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改金蝶访问到测试环境,提供手动同步接口
上级
3aa0aacb
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
248 行增加
和
89 行删除
+248
-89
CategoryDao.java
...main/java/org/jeecg/modules/iost/API/Dao/CategoryDao.java
+9
-4
CategoryDaoSql.java
...n/java/org/jeecg/modules/iost/API/Dao/CategoryDaoSql.java
+9
-4
BusinessTripInterfaceApi.java
.../iost/API/ExternalInterface/BusinessTripInterfaceApi.java
+3
-2
OtherReimbursementInterfaceApi.java
...API/ExternalInterface/OtherReimbursementInterfaceApi.java
+3
-2
ApiTestContrller.java
...g/jeecg/modules/iost/API/controller/ApiTestContrller.java
+2
-2
ManualController.java
...g/jeecg/modules/iost/API/controller/ManualController.java
+50
-0
IQueryBusinessTripDetailsService.java
...es/iost/API/service/IQueryBusinessTripDetailsService.java
+1
-1
IQueryLoanDetailsService.java
...cg/modules/iost/API/service/IQueryLoanDetailsService.java
+1
-1
IQueryOtherDetailsService.java
...g/modules/iost/API/service/IQueryOtherDetailsService.java
+1
-1
QueryBusinessTripDetailsServiceImpl.java
...API/service/impl/QueryBusinessTripDetailsServiceImpl.java
+56
-21
QueryLoanDetailsServiceImpl.java
...es/iost/API/service/impl/QueryLoanDetailsServiceImpl.java
+51
-17
QueryOtherDetailsServiceImpl.java
...s/iost/API/service/impl/QueryOtherDetailsServiceImpl.java
+51
-20
ToolsTest.java
...boot-module-system/src/test/java/org/jeecg/ToolsTest.java
+11
-14
没有找到文件。
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/Dao/CategoryDao.java
浏览文件 @
2e2c0b53
...
...
@@ -13,10 +13,15 @@ import java.util.*;
@Slf4j
@Component
public
class
CategoryDao
{
static
String
K3CloudURL
=
"http://192.168.2.243/k3cloud/"
;
//指定地址
static
String
dbId
=
"6136b7c51f0e4f"
;
static
String
uid
=
"Administrator"
;
static
String
pwd
=
"888888"
;
// 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;
static
String
K3CloudURL
=
"https://cwxt.kingsware.cn/k3cloud/"
;
//指定地址
static
String
dbId
=
"613ef0b02c911d"
;
static
String
uid
=
"kingdee"
;
static
String
pwd
=
"123456"
;
static
int
lang
=
2052
;
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
private
String
Stringwhere
(
Map
<
String
,
String
>
map
){
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/Dao/CategoryDaoSql.java
浏览文件 @
2e2c0b53
...
...
@@ -12,10 +12,15 @@ 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 String K3CloudURL = "http://192.168.2.243/k3cloud/";//指定地址
// static String dbId = "6136b7c51f0e4f";
// static String uid = "Administrator";
// static String pwd = "888888";
// static int lang = 2052;
static
String
K3CloudURL
=
"https://cwxt.kingsware.cn/k3cloud/"
;
//指定地址
static
String
dbId
=
"613ef0b02c911d"
;
static
String
uid
=
"kingdee"
;
static
String
pwd
=
"123456"
;
static
int
lang
=
2052
;
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
String
servicenameTable
=
"LQKJ.WebApi.Stub.CustomWebApiService.ExecutDataSet,LQKJ.WebApi.Stub"
;
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/ExternalInterface/BusinessTripInterfaceApi.java
浏览文件 @
2e2c0b53
...
...
@@ -2,6 +2,7 @@ package org.jeecg.modules.iost.API.ExternalInterface;
import
org.jeecg.modules.iost.API.ExternalInterface.Interface.API
;
import
org.jeecg.modules.iost.API.Util.HttpUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
...
...
@@ -16,8 +17,8 @@ import java.util.Map;
@Component
public
class
BusinessTripInterfaceApi
implements
API
{
private
String
url
=
"http://test.qywx.kingsware.cn"
;
//正式接口
@Value
(
"${oa.url}"
)
private
String
url
;
// private String url = "https://b02ba329-ac3e-4144-a744-25abca96b290.mock.pstmn.io/";
private
Map
<
String
,
String
>
hreader
=
new
HashMap
<>();
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/ExternalInterface/OtherReimbursementInterfaceApi.java
浏览文件 @
2e2c0b53
...
...
@@ -2,6 +2,7 @@ package org.jeecg.modules.iost.API.ExternalInterface;
import
org.jeecg.modules.iost.API.ExternalInterface.Interface.API
;
import
org.jeecg.modules.iost.API.Util.HttpUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
...
...
@@ -15,8 +16,8 @@ import java.util.Map;
@Component
public
class
OtherReimbursementInterfaceApi
implements
API
{
private
String
url
=
"http://test.qywx.kingsware.cn"
;
//正式接口
@Value
(
"${oa.url}"
)
private
String
url
;
// private String url = "https://b02ba329-ac3e-4144-a744-25abca96b290.mock.pstmn.io/";
private
Map
<
String
,
String
>
hreader
=
new
HashMap
<>();
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/controller/ApiTestContrller.java
浏览文件 @
2e2c0b53
...
...
@@ -24,7 +24,7 @@ import java.util.*;
@Api
(
tags
=
""
)
@RestController
@RequestMapping
(
"/API/
test
"
)
@RequestMapping
(
"/API/
OA
"
)
@Slf4j
public
class
ApiTestContrller
{
@Autowired
...
...
@@ -34,7 +34,7 @@ public class ApiTestContrller {
@Autowired
LoanInterfaceWebapi
loanInterfaceWebapi
;
@GetMapping
(
"/
OA
"
)
@GetMapping
(
"/
test
"
)
public
Object
dtr
()
{
Map
returnResult
=
new
HashMap
();
Map
params
=
new
LinkedHashMap
()
{{
...
...
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/controller/ManualController.java
0 → 100644
浏览文件 @
2e2c0b53
package
org
.
jeecg
.
modules
.
iost
.
API
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.modules.iost.API.service.IQueryBusinessTripDetailsService
;
import
org.jeecg.modules.iost.API.service.IQueryLoanDetailsService
;
import
org.jeecg.modules.iost.API.service.IQueryOtherDetailsService
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Map
;
@Api
(
tags
=
"业务手动同步"
)
@RestController
@RequestMapping
(
"/API/manual"
)
@Slf4j
public
class
ManualController
{
@Autowired
private
IQueryLoanDetailsService
queryLoanDetailsService
;
@Autowired
private
IQueryBusinessTripDetailsService
queryBusinessTripDetailsService
;
@Autowired
private
IQueryOtherDetailsService
queryOtherDetailsService
;
@AutoLog
(
value
=
"查询借款接口"
)
@ApiOperation
(
value
=
"查询借款接口"
,
notes
=
"查询借款接口"
)
@GetMapping
(
"/queryLoan"
)
public
Map
QueryLoan
(
@RequestParam
Map
map
){
Map
manual
=
queryLoanDetailsService
.
manual
(
map
);
return
manual
;
}
@AutoLog
(
value
=
"查询差旅接口"
)
@ApiOperation
(
value
=
"查询差旅接口"
,
notes
=
"查询差旅接口"
)
@GetMapping
(
"/queryBusinessTrip"
)
public
Map
QueryBusinessTrip
(
@RequestParam
Map
map
){
Map
manual
=
queryBusinessTripDetailsService
.
manual
(
map
);
return
manual
;
}
@AutoLog
(
value
=
"查询其他接口"
)
@ApiOperation
(
value
=
"查询其他接口"
,
notes
=
"查询其他接口"
)
@GetMapping
(
"/queryOther"
)
public
Map
QueryOther
(
@RequestParam
Map
map
){
Map
manual
=
queryOtherDetailsService
.
manual
(
map
);
return
manual
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/IQueryBusinessTripDetailsService.java
浏览文件 @
2e2c0b53
...
...
@@ -10,5 +10,5 @@ import java.util.Map;
public
interface
IQueryBusinessTripDetailsService
extends
IService
<
QueryBusinessTripDetails
>
{
public
Map
synchronization
(
Map
object
)
throws
IOException
,
ParseException
;
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
;
public
Map
manual
(
Map
map
)
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/IQueryLoanDetailsService.java
浏览文件 @
2e2c0b53
...
...
@@ -12,5 +12,5 @@ public interface IQueryLoanDetailsService extends IService<QueryLoanDetails> {
public
Map
synchronization
(
Map
object
)
throws
IOException
,
ParseException
;
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
;
public
Map
manual
(
Map
map
)
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/IQueryOtherDetailsService.java
浏览文件 @
2e2c0b53
...
...
@@ -11,5 +11,5 @@ public interface IQueryOtherDetailsService extends IService<QueryOtherDetails> {
public
Map
synchronization
(
Map
object
)
throws
IOException
,
ParseException
;
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
;
public
Map
manual
(
Map
map
)
;
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/QueryBusinessTripDetailsServiceImpl.java
浏览文件 @
2e2c0b53
...
...
@@ -28,45 +28,72 @@ public class QueryBusinessTripDetailsServiceImpl extends ServiceImpl<QueryBusine
private
IOaSelectJournalService
oaSelectJournalService
;
@Autowired
private
IKingdeeSaveJournalService
KingdeeSaveJournalService
;
private
int
BusinessNo
=
5
;
private
int
BusinessNo
=
5
;
@Override
public
Map
synchronization
(
Map
object
)
throws
IOException
,
ParseException
{
Map
returnResult
=
new
HashMap
();
returnResult
.
put
(
"message"
,
"请求数据报错"
);
returnResult
.
put
(
"result"
,
"同步完成"
);
Map
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"queryConcludeData"
);
put
(
"type"
,
"ER_ExpReimbursement_Travel"
);
put
(
"type"
,
"ER_ExpReimbursement_Travel"
);
put
(
"date"
,
beforeDayByNowDay
());
}};
try
{
if
(
null
!=
object
&&
null
!=
object
.
get
(
"date"
))
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
date
=
sdf
.
format
(
sdf
.
parse
(
object
.
get
(
"date"
).
toString
()));
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"queryConcludeData"
);
put
(
"type"
,
"ER_ExpReimbursement_Travel"
);
put
(
"date"
,
date
);
}};
}
}
catch
(
Exception
e
){
returnResult
.
put
(
"message"
,
"手动同步失败"
);
returnResult
.
put
(
"result"
,
"参数无法解析"
);
return
returnResult
;
}
String
responsejson
=
""
;
String
requestJson
=
JsonUtil
.
Mapjson
(
params
);
boolean
faceApiCatch
=
true
;
boolean
webApiCatch
=
true
;
String
add
=
""
;
try
{
responsejson
=
businessTripInterfaceApi
.
getSelect
(
params
);
//获取差旅
oaSelectJournalService
.
setOaSelectJournal
(
requestJson
,
responsejson
,
BusinessNo
);
responsejson
=
businessTripInterfaceApi
.
getSelect
(
params
);
//获取借款
}
catch
(
Exception
e
)
{
faceApiCatch
=
false
;
responsejson
=
e
.
toString
();
oaSelectJournalService
.
setOaSelectJournalError
(
requestJson
,
responsejson
,
BusinessNo
);
returnResult
.
put
(
"message"
,
"请求数据报错"
);
returnResult
.
put
(
"result"
,
responsejson
);
return
returnResult
;
}
if
(
faceApiCatch
)
oaSelectJournalService
.
setOaSelectJournal
(
requestJson
,
responsejson
,
BusinessNo
);
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
responsejson
);
Object
result
=
jsonObject
.
get
(
"result"
);
returnResult
.
put
(
"result"
,
"同步完成"
);
String
s
=
result
.
toString
();
String
add
=
""
;
try
{
add
=
businessTripInterfaceWebapi
.
batchAdd
(
s
);
KingdeeSaveJournalService
.
setKingdeeSave
(
s
,
add
,
BusinessNo
);
}
catch
(
Exception
e
)
{
add
=
e
.
toString
();
KingdeeSaveJournalService
.
setKingdeeSaveError
(
s
,
add
,
BusinessNo
);
returnResult
.
put
(
"result"
,
"同步完成,部分数据未同步"
);
}
String
s
=
result
.
toString
();
try
{
add
=
businessTripInterfaceWebapi
.
batchAdd
(
s
);
}
catch
(
Exception
e
)
{
webApiCatch
=
false
;
e
.
printStackTrace
();
add
=
e
.
toString
();
KingdeeSaveJournalService
.
setKingdeeSaveError
(
s
,
add
,
BusinessNo
);
returnResult
.
put
(
"message"
,
"保存数据报错"
);
returnResult
.
put
(
"result"
,
add
);
}
if
(
webApiCatch
)
KingdeeSaveJournalService
.
setKingdeeSave
(
s
,
add
,
BusinessNo
);
return
returnResult
;
}
/**
* 获取当前日期的前一天
* 需要返回的日期格式,例如:yyyy-MM-dd HH:mm:ss
...
...
@@ -81,7 +108,15 @@ public class QueryBusinessTripDetailsServiceImpl extends ServiceImpl<QueryBusine
}
@Override
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
{
return
null
;
public
Map
manual
(
Map
map
)
{
Map
synchronization
=
null
;
try
{
synchronization
=
this
.
synchronization
(
map
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
synchronization
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/QueryLoanDetailsServiceImpl.java
浏览文件 @
2e2c0b53
...
...
@@ -30,40 +30,67 @@ public class QueryLoanDetailsServiceImpl extends ServiceImpl<QueryLoanDetailsMap
private
IOaSelectJournalService
oaSelectJournalService
;
@Autowired
private
IKingdeeSaveJournalService
KingdeeSaveJournalService
;
private
int
BusinessNo
=
1
;
private
int
BusinessNo
=
1
;
@Override
public
Map
synchronization
(
Map
object
)
throws
IOException
,
ParseException
{
Map
returnResult
=
new
HashMap
();
returnResult
.
put
(
"message"
,
"请求数据报错"
);
returnResult
.
put
(
"result"
,
"同步完成"
);
Map
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"queryConcludeData"
);
put
(
"type"
,
"ER_ExpenseRequest"
);
put
(
"date"
,
beforeDayByNowDay
());
}};
try
{
if
(
null
!=
object
&&
null
!=
object
.
get
(
"date"
))
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
date
=
sdf
.
format
(
sdf
.
parse
(
object
.
get
(
"date"
).
toString
()));
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"queryConcludeData"
);
put
(
"type"
,
"ER_ExpenseRequest"
);
put
(
"date"
,
date
);
}};
}
}
catch
(
Exception
e
){
returnResult
.
put
(
"message"
,
"手动同步失败"
);
returnResult
.
put
(
"result"
,
"参数无法解析"
);
return
returnResult
;
}
String
responsejson
=
""
;
String
requestJson
=
JsonUtil
.
Mapjson
(
params
);
boolean
faceApiCatch
=
true
;
boolean
webApiCatch
=
true
;
String
add
=
""
;
try
{
responsejson
=
loanInterfaceApi
.
getSelect
(
params
);
//获取借款
oaSelectJournalService
.
setOaSelectJournal
(
requestJson
,
responsejson
,
BusinessNo
);
}
catch
(
Exception
e
)
{
faceApiCatch
=
false
;
responsejson
=
e
.
toString
();
oaSelectJournalService
.
setOaSelectJournalError
(
requestJson
,
responsejson
,
BusinessNo
);
returnResult
.
put
(
"message"
,
"请求数据报错"
);
returnResult
.
put
(
"result"
,
responsejson
);
return
returnResult
;
}
if
(
faceApiCatch
)
oaSelectJournalService
.
setOaSelectJournal
(
requestJson
,
responsejson
,
BusinessNo
);
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
responsejson
);
Object
result
=
jsonObject
.
get
(
"result"
);
returnResult
.
put
(
"result"
,
"同步完成"
);
String
s
=
result
.
toString
();
String
add
=
""
;
try
{
add
=
loanInterfaceWebapi
.
batchAdd
(
s
)
;
KingdeeSaveJournalService
.
setKingdeeSave
(
s
,
add
,
BusinessNo
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
add
=
e
.
toString
(
);
KingdeeSaveJournalService
.
setKingdeeSaveError
(
s
,
add
,
BusinessNo
);
returnResult
.
put
(
"result"
,
"同步完成,部分数据未同步"
);
}
String
s
=
result
.
toString
(
);
try
{
add
=
loanInterfaceWebapi
.
batchAdd
(
s
)
;
}
catch
(
Exception
e
)
{
webApiCatch
=
false
;
e
.
printStackTrace
(
);
add
=
e
.
toString
();
KingdeeSaveJournalService
.
setKingdeeSaveError
(
s
,
add
,
BusinessNo
);
returnResult
.
put
(
"message"
,
"保存数据报错"
);
returnResult
.
put
(
"result"
,
add
);
}
if
(
webApiCatch
)
KingdeeSaveJournalService
.
setKingdeeSave
(
s
,
add
,
BusinessNo
);
return
returnResult
;
}
...
...
@@ -81,10 +108,17 @@ public class QueryLoanDetailsServiceImpl extends ServiceImpl<QueryLoanDetailsMap
}
@Override
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
{
return
null
;
public
Map
manual
(
Map
map
)
{
Map
synchronization
=
null
;
try
{
synchronization
=
this
.
synchronization
(
map
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
synchronization
;
}
}
jeecg-boot-module-system/src/main/java/org/jeecg/modules/iost/API/service/impl/QueryOtherDetailsServiceImpl.java
浏览文件 @
2e2c0b53
...
...
@@ -28,44 +28,67 @@ public class QueryOtherDetailsServiceImpl extends ServiceImpl<QueryOtherDetailsM
private
IOaSelectJournalService
oaSelectJournalService
;
@Autowired
private
IKingdeeSaveJournalService
KingdeeSaveJournalService
;
private
int
BusinessNo
=
9
;
private
int
BusinessNo
=
9
;
@Override
public
Map
synchronization
(
Map
object
)
throws
IOException
,
ParseException
{
Map
returnResult
=
new
HashMap
();
returnResult
.
put
(
"message"
,
"请求数据报错"
);
returnResult
.
put
(
"result"
,
"同步完成"
);
Map
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"queryConcludeData"
);
put
(
"type"
,
"ER_ExpReimbursement"
);
put
(
"type"
,
"ER_ExpReimbursement"
);
put
(
"date"
,
beforeDayByNowDay
());
}};
try
{
if
(
null
!=
object
&&
null
!=
object
.
get
(
"date"
))
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
date
=
sdf
.
format
(
sdf
.
parse
(
object
.
get
(
"date"
).
toString
()));
params
=
new
LinkedHashMap
()
{{
put
(
"method"
,
"queryConcludeData"
);
put
(
"type"
,
"ER_ExpReimbursement"
);
put
(
"date"
,
date
);
}};
}
}
catch
(
Exception
e
)
{
returnResult
.
put
(
"message"
,
"手动同步失败"
);
returnResult
.
put
(
"result"
,
"参数无法解析"
);
return
returnResult
;
}
String
responsejson
=
""
;
String
requestJson
=
JsonUtil
.
Mapjson
(
params
);
boolean
faceApiCatch
=
true
;
boolean
webApiCatch
=
true
;
String
add
=
""
;
try
{
responsejson
=
interfaceApi
.
getSelect
(
params
);
//获取借款
oaSelectJournalService
.
setOaSelectJournal
(
requestJson
,
responsejson
,
BusinessNo
);
}
catch
(
Exception
e
)
{
faceApiCatch
=
false
;
responsejson
=
e
.
toString
();
oaSelectJournalService
.
setOaSelectJournalError
(
requestJson
,
responsejson
,
BusinessNo
);
returnResult
.
put
(
"message"
,
"请求数据报错"
);
returnResult
.
put
(
"result"
,
responsejson
);
return
returnResult
;
}
if
(
faceApiCatch
)
oaSelectJournalService
.
setOaSelectJournal
(
requestJson
,
responsejson
,
BusinessNo
);
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
responsejson
);
Object
result
=
jsonObject
.
get
(
"result"
);
returnResult
.
put
(
"result"
,
"同步完成"
);
String
s
=
result
.
toString
();
String
add
=
""
;
try
{
add
=
webapi
.
batchAdd
(
s
);
KingdeeSaveJournalService
.
setKingdeeSave
(
s
,
add
,
BusinessNo
);
}
catch
(
Exception
e
)
{
add
=
e
.
toString
();
KingdeeSaveJournalService
.
setKingdeeSaveError
(
s
,
add
,
BusinessNo
);
returnResult
.
put
(
"result"
,
"同步完成,部分数据未同步"
);
}
String
s
=
result
.
toString
();
try
{
add
=
webapi
.
batchAdd
(
s
);
}
catch
(
Exception
e
)
{
webApiCatch
=
false
;
e
.
printStackTrace
();
add
=
e
.
toString
();
KingdeeSaveJournalService
.
setKingdeeSaveError
(
s
,
add
,
BusinessNo
);
returnResult
.
put
(
"message"
,
"保存数据报错"
);
returnResult
.
put
(
"result"
,
add
);
}
if
(
webApiCatch
)
KingdeeSaveJournalService
.
setKingdeeSave
(
s
,
add
,
BusinessNo
);
return
returnResult
;
}
...
...
@@ -84,7 +107,15 @@ public class QueryOtherDetailsServiceImpl extends ServiceImpl<QueryOtherDetailsM
@Override
public
Boolean
manual
(
Map
<
String
,
Object
>
map
,
String
ReturnProcessId
)
throws
ParseException
{
return
null
;
public
Map
manual
(
Map
map
)
{
Map
synchronization
=
null
;
try
{
synchronization
=
this
.
synchronization
(
map
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
synchronization
;
}
}
jeecg-boot-module-system/src/test/java/org/jeecg/ToolsTest.java
浏览文件 @
2e2c0b53
...
...
@@ -18,6 +18,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import
org.springframework.stereotype.Service
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -27,10 +28,10 @@ import java.util.*;
@Service
public
class
ToolsTest
{
static
String
K3CloudURL
=
"http
://192.168.2.243
/k3cloud/"
;
//指定地址
static
String
dbId
=
"613
6b7c51f0e4f
"
;
static
String
uid
=
"
Administrator
"
;
static
String
pwd
=
"
888888
"
;
static
String
K3CloudURL
=
"http
s://cwxt.kingsware.cn:8090
/k3cloud/"
;
//指定地址
static
String
dbId
=
"613
ef0b02c911d
"
;
static
String
uid
=
"
kingdee
"
;
static
String
pwd
=
"
123456
"
;
static
int
lang
=
2052
;
K3CloudApiClient
client
=
new
K3CloudApiClient
(
K3CloudURL
);
...
...
@@ -153,16 +154,12 @@ public class ToolsTest {
@Test
// @Scheduled(fixedDelay = 5000)
public
void
timdsaded
()
throws
InterruptedException
{
List
objects
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
objects
.
add
(
i
);
}
for
(
int
i
=
0
;
i
<
objects
.
size
();
i
++)
{
if
(
i
==
3
)
{
objects
.
remove
(
i
);
}
System
.
out
.
println
(
objects
.
get
(
i
));
public
void
timdsaded
()
throws
InterruptedException
,
ParseException
{
try
{
Boolean
result
=
client
.
login
(
dbId
,
uid
,
pwd
,
lang
);
System
.
out
.
println
(
result
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论