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
b79105e9
Commit
b79105e9
authored
Jan 05, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.别人删除代码恢复
parent
f555a466
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
3 deletions
+63
-3
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+63
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
b79105e9
...
...
@@ -15,6 +15,8 @@ import java.util.stream.Collectors;
import
javax.annotation.Resource
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
...
...
@@ -113,6 +115,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
IMaintenanceCompanyService
maintenanceCompanyService
;
@Autowired
FireStationServiceImpl
fireStationServiceImpl
;
@Value
(
"${jcs.company.topic.add}"
)
private
String
airportAddTopic
;
...
...
@@ -121,7 +124,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Autowired
AmosTrainingFeignClient
amosTrainingFeignClient
;
@Value
(
"${auth-key-org-user:org_user_info}"
)
private
String
authKey
;
public
static
List
<
OrgMenuDto
>
buildTreeParallel
(
List
<
OrgUsr
>
list
)
{
...
...
@@ -2058,8 +2063,6 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
jsonObject
;
}
public
Object
getOrgUserByAmosUserId
(
String
amosUserId
)
throws
Exception
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<
OrgUsr
>();
wrapper
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
...
...
@@ -2067,4 +2070,61 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
wrapper
.
like
(
StringUtils
.
isNotBlank
(
amosUserId
),
OrgUsr:
:
getAmosOrgId
,
amosUserId
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
@Override
public
UserDto
getUserParentInfo
(
String
userId
)
{
UserDto
userDto
=
new
UserDto
();
if
(
StringUtils
.
isNotEmpty
(
userId
))
{
OrgUsr
orgUsr
=
orgUsrMapper
.
queryByUserId
(
Long
.
parseLong
(
userId
));
if
(!
ObjectUtils
.
isEmpty
(
orgUsr
))
{
String
parentId
=
orgUsr
.
getParentId
();
userDto
.
setPersonSeq
(
String
.
valueOf
(
orgUsr
.
getSequenceNbr
()));
userDto
.
setPersonName
(
orgUsr
.
getBizOrgName
());
OrgUsr
bizOrg
=
orgUsrMapper
.
queryBySequenceNbr
(
parentId
);
if
(!
ObjectUtils
.
isEmpty
(
bizOrg
))
{
userDto
.
setBizOrgType
(
bizOrg
.
getBizOrgType
());
userDto
.
setBizOrgCode
(
bizOrg
.
getBizOrgCode
());
userDto
.
setCompanyId
(
String
.
valueOf
(
bizOrg
.
getSequenceNbr
()));
userDto
.
setCompanyName
(
bizOrg
.
getBizOrgName
());
}
}
}
return
userDto
;
}
@Override
public
List
<
OrgUsr
>
getListByBizOrgTypeCode
(
String
orgTypes
,
String
orgCode
)
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
if
(!
StringUtils
.
isEmpty
(
orgTypes
))
{
List
<
String
>
orgUserIdList
=
Lists
.
newArrayList
(
orgTypes
.
split
(
","
));
wrapper
.
in
(
OrgUsr:
:
getBizOrgType
,
orgUserIdList
);
}
if
(!
StringUtils
.
isEmpty
(
orgCode
))
{
wrapper
.
likeRight
(
OrgUsr:
:
getBizOrgCode
,
orgCode
);
}
wrapper
.
orderByAsc
(
BaseEntity:
:
getRecDate
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
@Override
public
List
<
OrgMenuDto
>
companyTreeByUserNumber
(
ReginParams
reginParams
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
param
.
put
(
"bizOrgCode"
,
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
List
<
OrgUsr
>
list
=
orgUsrMapper
.
companyDeptListWithPersonCount
(
param
);
return
buildTreeParallel
(
list
);
}
@Override
public
List
<
OrgMenuDto
>
companyTreeByUserAndType
(
ReginParams
reginParams
,
String
type
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"bizOrgCode"
,
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
param
.
put
(
"type"
,
type
);
List
<
OrgUsr
>
list
=
orgUsrMapper
.
companyTreeByUserAndType
(
param
);
return
buildTreeParallel
(
list
);
}
}
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