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
c442cabe
Commit
c442cabe
authored
Oct 23, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
两个规定-通过组id查询组及组内人员信息接口优化
parent
1c709d65
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
IDataDictionaryService.java
.../amos/boot/biz/common/service/IDataDictionaryService.java
+2
-0
DataDictionaryServiceImpl.java
...ot/biz/common/service/impl/DataDictionaryServiceImpl.java
+10
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+7
-7
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/IDataDictionaryService.java
View file @
c442cabe
...
...
@@ -29,4 +29,6 @@ public interface IDataDictionaryService {
List
<
DataDictionary
>
getByParent
(
String
parent
);
List
<
DataDictionary
>
getByTypeAndDesc
(
String
type
,
String
group
);
DataDictionary
getByExtend
(
String
groupId
,
String
type
);
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/DataDictionaryServiceImpl.java
View file @
c442cabe
...
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.biz.common.utils.*;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.Collection
;
...
...
@@ -184,4 +185,13 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
wrapper
.
likeRight
(
DataDictionary:
:
getTypeDesc
,
typeDesc
);
return
this
.
list
(
wrapper
);
}
@Override
public
DataDictionary
getByExtend
(
String
groupId
,
String
type
)
{
LambdaQueryWrapper
<
DataDictionary
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
DataDictionary:
:
getExtend
,
groupId
);
wrapper
.
likeRight
(
DataDictionary:
:
getType
,
type
);
DataDictionary
dataDictionary
=
dataDictionaryMapper
.
selectOne
(
wrapper
);
return
ObjectUtils
.
isEmpty
(
dataDictionary
)
?
new
DataDictionary
()
:
dataDictionary
;
}
}
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 @
c442cabe
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
service
.
impl
;
import
cn.hutool.json.ObjectMapper
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -11,7 +10,6 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
...
...
@@ -22,8 +20,6 @@ import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserInfoService
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserInfoVo
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserQualificationsVo
;
import
com.yeejoin.amos.boot.module.tcm.flc.biz.service.impl.RegUnitInfoServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
...
@@ -68,8 +64,11 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
private
final
String
USER_ROLE
=
"QYRYJS"
;
//企业人员用户组
private
final
String
ROLE_GROUP
=
"QYRYYHZ"
;
//两个规定用户组-对应企业人员的人员类型
//两个规定用户组-对应企业人员的人员类型
前缀
private
final
String
QYRYGW
=
"QYRYGW"
;
//两个规定用户组-对应企业人员的人员类型前缀
private
final
String
QYRYGW_NAME
=
"两员配备-企业人员类型"
;
//平台用户锁定状态
private
final
String
UNLOCK
=
"UNLOCK"
;
private
final
String
LOCK
=
"LOCK"
;
...
...
@@ -102,7 +101,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"
,
"两员配备"
);
List
<
DataDictionary
>
dataDictionaries
=
iDataDictionaryService
.
getByTypeAndDesc
(
QYRYGW
,
QYRYGW_NAME
);
List
<
DataDictionary
>
postDataList
=
dataDictionaries
.
stream
().
filter
(
d
->
dictIds
.
stream
().
anyMatch
(
id
->
id
.
toString
().
equals
(
d
.
getSequenceNbr
().
toString
()))).
collect
(
Collectors
.
toList
());
return
postDataList
.
stream
().
map
(
DataDictionary:
:
getName
).
collect
(
Collectors
.
joining
(
","
));
}
...
...
@@ -435,12 +434,13 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
public
List
<
GroupAndPersonInfoDto
>
getGroupAndPersonInfo
(
Long
groupId
)
{
List
<
GroupAndPersonInfoDto
>
result
=
new
ArrayList
<>();
List
<
AgencyUserModel
>
agencyUserModelList
=
Privilege
.
groupUserClient
.
queryForList
(
groupId
).
getResult
();
DataDictionary
dataDictionary
=
iDataDictionaryService
.
getByExtend
(
groupId
.
toString
(),
QYRYGW
);
if
(!
ObjectUtils
.
isEmpty
(
agencyUserModelList
)
&&
agencyUserModelList
.
size
()
>
0
)
{
for
(
AgencyUserModel
agencyUserModel
:
agencyUserModelList
)
{
GroupAndPersonInfoDto
groupAndPersonInfoDto
=
tzsUserInfoMapper
.
getUnitInfoByUserId
(
agencyUserModel
.
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
groupAndPersonInfoDto
))
{
groupAndPersonInfoDto
.
setGroupId
(
groupId
);
String
groupName
=
Privilege
.
groupClient
.
seleteOne
(
groupId
).
getResult
().
getGroup
Name
();
String
groupName
=
ObjectUtils
.
isEmpty
(
dataDictionary
)
?
null
:
dataDictionary
.
get
Name
();
groupAndPersonInfoDto
.
setGroupName
(
groupName
);
groupAndPersonInfoDto
.
setUserId
(
agencyUserModel
.
getUserId
());
groupAndPersonInfoDto
.
setUserName
(
agencyUserModel
.
getRealName
());
...
...
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