Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
项目统一框架
amos-boot-biz
Commits
430d40d5
Commit
430d40d5
authored
Jun 21, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员BUGFIX
parent
a121681f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
36 deletions
+66
-36
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+63
-34
unitTypeLimitUserType.json
...cm-biz/src/main/resources/json/unitTypeLimitUserType.json
+3
-2
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
430d40d5
...
...
@@ -238,7 +238,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
LambdaQueryWrapper
<
DataDictionary
>
lambda
=
new
QueryWrapper
<
DataDictionary
>().
lambda
();
lambda
.
in
(
DataDictionary:
:
getSequenceNbr
,
dictIds
);
List
<
DataDictionary
>
dataDictionaries
=
iDataDictionaryService
.
getByTypeAndDesc
(
QYRYGW
,
QYRYGW_NAME
);
List
<
DataDictionary
>
postDataList
=
dataDictionaries
.
stream
().
filter
(
d
->
dictIds
.
stream
().
anyMatch
(
id
->
id
.
toString
().
equals
(
d
.
get
SequenceNbr
().
toString
()))).
collect
(
Collectors
.
toList
());
List
<
DataDictionary
>
postDataList
=
dataDictionaries
.
stream
().
filter
(
d
->
dictIds
.
stream
().
anyMatch
(
id
->
id
.
toString
().
equals
(
d
.
get
Code
()))).
collect
(
Collectors
.
toList
());
return
postDataList
.
stream
().
map
(
DataDictionary:
:
getName
).
collect
(
Collectors
.
joining
(
","
));
}
...
...
@@ -316,12 +316,19 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
// 企业自查询 + 监管单位查看 都用到该接口
@Override
public
Map
<
String
,
Object
>
getDetail
(
Long
id
,
ReginParams
reginParams
)
{
// 为了处理以下场景
// 1:没有单位限制的时候添加了所有类型的人员,现在有了单位类型限制的情况下更新不了原先人员
// 2:多种单位类型的企业编辑另一种单位类型下的人员
List
<
String
>
unitTypeAllPostCode
=
this
.
postByUnitType
(
reginParams
.
getCompany
()).
stream
().
map
(
DataDictionary:
:
getCode
).
collect
(
Collectors
.
toList
());
// 监管机构查看所有
List
<
String
>
unitTypeAllPostCode
;
if
(!
reginParams
.
getCompany
().
getCompanyType
().
equals
(
"监管机构"
)){
unitTypeAllPostCode
=
this
.
postByUnitType
(
reginParams
.
getCompany
()).
stream
().
map
(
DataDictionary:
:
getCode
).
collect
(
Collectors
.
toList
());
}
else
{
unitTypeAllPostCode
=
this
.
getAllUserType
().
stream
().
map
(
DataDictionary:
:
getCode
).
collect
(
Collectors
.
toList
());
}
Map
<
String
,
Object
>
maps
=
new
HashMap
<>();
TzsUserInfo
tzsUserInfo
=
tzsUserInfoMapper
.
selectById
(
id
);
TzsUserInfoVo
tzsUserInfoVo
=
new
TzsUserInfoVo
();
...
...
@@ -1014,7 +1021,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
case
"qt"
:
return
Arrays
.
asList
(
"6549"
,
"6548"
,
"6547"
,
"6546"
,
"6551"
,
"6550"
,
"6616"
,
"6553"
,
"6617"
);
default
:
return
Arrays
.
asList
(
"6549"
,
"6548"
,
"6547"
,
"6546"
,
"6551"
,
"6550"
,
"6616"
,
"6553"
,
"6617"
,
"66151"
,
"66152"
,
"6552"
);
return
this
.
getAllUserType
().
stream
().
map
(
DataDictionary:
:
getCode
).
collect
(
Collectors
.
toList
()
);
}
}
...
...
@@ -1691,10 +1698,13 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
}
// 接口用于人员详情界面 企业 + 监管单位 都会看到
@Override
public
List
<
DataDictionary
>
postByUnitType
(
CompanyBo
company
)
{
ArrayList
<
String
>
postDictCodeList
=
new
ArrayList
<>();
if
(
company
.
getCompanyType
().
equals
(
"监管机构"
)){
return
this
.
getAllUserType
();
}
TzBaseEnterpriseInfo
enterpriseInfo
=
baseEnterpriseInfoService
.
lambdaQuery
()
.
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
company
.
getCompanyCode
())
.
one
();
...
...
@@ -1717,6 +1727,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
/**
* 根据单位类型和父类型查询对应的人员类型子类型
* * 接口用于人员详情界面 企业 + 监管单位 都会看到
* @param company 登录人公司信息
* @param parentCode 父人员类型code
* @return result
...
...
@@ -1726,41 +1737,59 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
ArrayList
<
String
>
parentCodeList
=
new
ArrayList
<>(
Arrays
.
asList
(
parentCode
.
split
(
","
)));
List
<
DataDictionary
>
result
=
new
ArrayList
<>();
if
(
company
.
getCompanyType
().
equals
(
"监管机构"
))
{
return
iDataDictionaryService
.
lambdaQuery
()
.
in
(
DataDictionary:
:
getParent
,
parentCodeList
)
.
like
(
DataDictionary:
:
getType
,
"QYRYGW"
)
.
orderByAsc
(
DataDictionary:
:
getSortNum
)
.
list
();
}
JsonNode
companyTypeNode
=
postData
.
get
(
company
.
getCompanyType
());
if
(
companyTypeNode
!=
null
&&
companyTypeNode
.
isObject
())
{
Iterator
<
Map
.
Entry
<
String
,
JsonNode
>>
fields
=
companyTypeNode
.
fields
();
while
(
fields
.
hasNext
())
{
Map
.
Entry
<
String
,
JsonNode
>
entry
=
fields
.
next
();
String
postCode
=
entry
.
getKey
();
if
(
parentCodeList
.
contains
(
postCode
))
{
ArrayList
<
String
>
subPostDictCodeList
=
new
ArrayList
<>();
JsonNode
subPosts
=
entry
.
getValue
();
// 子岗位数组
if
(
subPosts
.
isArray
())
{
for
(
JsonNode
subPost
:
subPosts
)
{
if
(!
subPost
.
isNull
())
{
subPostDictCodeList
.
add
(
subPost
.
asText
());
// 子岗位
}
List
<
DataDictionary
>
result
=
new
ArrayList
<>();
// 该注册单位所具有的所有的单位类型下的人员类型
Map
<
String
,
JsonNode
>
allPostUnderTheUnit
=
new
HashMap
<>();
TzBaseEnterpriseInfo
enterpriseInfo
=
baseEnterpriseInfoService
.
lambdaQuery
()
.
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
company
.
getCompanyCode
())
.
one
();
List
<
String
>
unitTypes
=
Arrays
.
asList
(
enterpriseInfo
.
getUnitType
().
split
(
"#"
));
unitTypes
.
forEach
(
unitType
->
{
JsonNode
companyTypeNode
=
postData
.
get
(
unitType
);
if
(
companyTypeNode
!=
null
&&
companyTypeNode
.
isObject
())
{
Iterator
<
Map
.
Entry
<
String
,
JsonNode
>>
fields
=
companyTypeNode
.
fields
();
while
(
fields
.
hasNext
())
{
Map
.
Entry
<
String
,
JsonNode
>
entry
=
fields
.
next
();
String
postCode
=
entry
.
getKey
();
// 主岗位
JsonNode
subPostCode
=
entry
.
getValue
();
// 子岗位
allPostUnderTheUnit
.
put
(
postCode
,
subPostCode
);
}
}
});
allPostUnderTheUnit
.
forEach
((
postCode
,
subPostCode
)
->
{
if
(
parentCodeList
.
contains
(
postCode
))
{
ArrayList
<
String
>
subPostDictCodeList
=
new
ArrayList
<>();
if
(
subPostCode
.
isArray
())
{
for
(
JsonNode
subPost
:
subPostCode
)
{
if
(!
subPost
.
isNull
())
{
subPostDictCodeList
.
add
(
subPost
.
asText
());
// 子岗位
}
}
// subPostDictCodeList 值不为空说明有限制,按照限制来 ,为空按照父类型code查询所有
if
(!
subPostDictCodeList
.
isEmpty
())
{
result
.
addAll
(
iDataDictionaryService
.
lambdaQuery
()
.
in
(
DataDictionary:
:
getCode
,
subPostDictCodeList
)
.
like
(
DataDictionary:
:
getType
,
"QYRYGW"
)
.
orderByAsc
(
DataDictionary:
:
getSortNum
)
.
list
());
}
else
{
result
.
addAll
(
iDataDictionaryService
.
lambdaQuery
()
.
in
(
DataDictionary:
:
getParent
,
postCode
)
.
like
(
DataDictionary:
:
getType
,
"QYRYGW"
)
.
orderByAsc
(
DataDictionary:
:
getSortNum
)
.
list
());
}
}
// subPostDictCodeList 值不为空说明有限制,按照限制来 ,为空按照父类型code查询所有
if
(!
subPostDictCodeList
.
isEmpty
())
{
result
.
addAll
(
iDataDictionaryService
.
lambdaQuery
(
)
.
in
(
DataDictionary:
:
getCode
,
subPostDictCodeList
)
.
like
(
DataDictionary:
:
getType
,
"QYRYGW"
)
.
orderByAsc
(
DataDictionary:
:
getSortNum
)
.
list
());
}
else
{
result
.
addAll
(
iDataDictionaryService
.
lambdaQuery
(
)
.
in
(
DataDictionary:
:
getParent
,
postCode
)
.
like
(
DataDictionary:
:
getType
,
"QYRYGW"
)
.
orderByAsc
(
DataDictionary:
:
getSortNum
)
.
list
());
}
}
}
}
);
return
result
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/resources/json/unitTypeLimitUserType.json
View file @
430d40d5
...
...
@@ -38,7 +38,7 @@
"6548"
:
[],
"6616"
:
[],
"6763"
:
[],
""
:
[]
"
6549
"
:
[]
},
"安装改造维修单位"
:
{
"6660"
:
[],
...
...
@@ -63,6 +63,7 @@
"6550"
:
[],
"6548"
:
[],
"6616"
:
[],
"6617"
:
[]
"6617"
:
[],
"6549"
:
[]
}
}
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