Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
maintain_service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘帅
maintain_service
Commits
cf54279f
Commit
cf54279f
authored
Jun 16, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化外部数据同步接口
parent
adf968e4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
SysUserController.java
...com/maintain/web/controller/system/SysUserController.java
+0
-1
SysDeptServiceImpl.java
.../com/maintain/system/service/impl/SysDeptServiceImpl.java
+6
-3
index.vue
maintain-ui/src/views/system/dept/index.vue
+1
-1
index.vue
maintain-ui/src/views/system/user/index.vue
+1
-1
No files found.
maintain-admin/src/main/java/com/maintain/web/controller/system/SysUserController.java
View file @
cf54279f
package
com
.
maintain
.
web
.
controller
.
system
;
import
cn.dev33.satoken.annotation.SaCheckPermission
;
import
cn.dev33.satoken.annotation.SaIgnore
;
import
cn.dev33.satoken.secure.BCrypt
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.tree.Tree
;
...
...
maintain-system/src/main/java/com/maintain/system/service/impl/SysDeptServiceImpl.java
View file @
cf54279f
...
...
@@ -337,11 +337,14 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
String
res
=
com
.
zxw
.
util
.
tm
.
HttpTmEncryptUtil
.
sendPostRequest
(
"http://10.100.102.67:22220/api/basis/deptInfoExtRepair"
,
null
,
null
);
Map
map
=
JSONUtil
.
toBean
(
res
,
Map
.
class
);
List
<
ExternalDept
>
departmentList
=
JSONUtil
.
toList
(
JSONUtil
.
toJsonStr
(
map
.
get
(
"data"
)),
ExternalDept
.
class
);
List
<
SysDept
>
sysDeptList
=
baseMapper
.
selectList
();
departmentList
.
forEach
(
department
->
{
SysDept
selectOne
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
SysDept
>().
eq
(
SysDept:
:
getExternalDeptCode
,
department
.
getDeptCode
()));
// 查询是否已存在系统
if
(
null
==
selectOne
)
{
SysDept
dept
=
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
SysDept
>().
eq
(
SysDept:
:
getExternalDeptCode
,
department
.
getUpperDeptCode
()));
System
.
out
.
println
(
"编号:"
+
department
.
getDeptCode
()+
",部门"
+
department
.
getDeptName
());
if
(
sysDeptList
.
stream
().
noneMatch
(
item
->
null
!=
item
.
getExternalDeptCode
()
&&
item
.
getExternalDeptCode
().
equals
(
department
.
getDeptCode
())))
{
SysDept
dept
=
sysDeptList
.
stream
().
filter
(
item
->
item
.
getExternalDeptCode
().
equals
(
department
.
getUpperDeptCode
()))
.
findFirst
()
.
orElseThrow
(()
->
new
RuntimeException
(
"未找到部门="
+
department
.
getUpperDeptCode
()));
if
(
dept
!=
null
)
{
SysDept
sysDept
=
new
SysDept
();
sysDept
.
setAncestors
(
dept
.
getAncestors
()
+
StringUtils
.
SEPARATOR
+
dept
.
getDeptId
());
...
...
maintain-ui/src/views/system/dept/index.vue
View file @
cf54279f
...
...
@@ -321,7 +321,7 @@ export default {
clickSync
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
数据同步中,预计需要5-
3
0秒
'
,
text
:
'
数据同步中,预计需要5-
1
0秒
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
});
...
...
maintain-ui/src/views/system/user/index.vue
View file @
cf54279f
...
...
@@ -658,7 +658,7 @@ export default {
clickSync
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'
数据同步中,预计需要5-
3
0秒
'
,
text
:
'
数据同步中,预计需要5-
1
0秒
'
,
spinner
:
'
el-icon-loading
'
,
background
:
'
rgba(0, 0, 0, 0.7)
'
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment