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
222a74d9
Commit
222a74d9
authored
Apr 18, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
e1a1c3a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
5 deletions
+41
-5
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+41
-5
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/controller/OrgUsrController.java
View file @
222a74d9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.biz.common.controller.DataDictionaryController
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
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.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -71,6 +75,9 @@ import io.swagger.annotations.ApiOperation;
...
@@ -71,6 +75,9 @@ import io.swagger.annotations.ApiOperation;
public
class
OrgUsrController
extends
BaseController
{
public
class
OrgUsrController
extends
BaseController
{
@Autowired
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
@Autowired
...
@@ -83,6 +90,9 @@ public class OrgUsrController extends BaseController {
...
@@ -83,6 +90,9 @@ public class OrgUsrController extends BaseController {
FireTeamMapper
fireTeamMapper
;
FireTeamMapper
fireTeamMapper
;
@Autowired
@Autowired
OrgUsrMapper
orgUsrMapper
;
@Autowired
EmqKeeper
emqKeeper
;
EmqKeeper
emqKeeper
;
@Value
(
"${jcs.company.topic.delete:jcs/company/topic/delete}"
)
@Value
(
"${jcs.company.topic.delete:jcs/company/topic/delete}"
)
private
String
airportDeleteTopic
;
private
String
airportDeleteTopic
;
...
@@ -90,6 +100,12 @@ public class OrgUsrController extends BaseController {
...
@@ -90,6 +100,12 @@ public class OrgUsrController extends BaseController {
@Autowired
@Autowired
EquipFeignClient
equipFeignClient
;
EquipFeignClient
equipFeignClient
;
@Autowired
DataDictionaryController
dataDictionaryController
;
@Value
(
"special-dept"
)
String
deptKey
;
@Value
(
"special-deptType"
)
String
deptTypeKey
;
/**
/**
* 新增单位信息
* 新增单位信息
*
*
...
@@ -742,15 +758,35 @@ public class OrgUsrController extends BaseController {
...
@@ -742,15 +758,35 @@ public class OrgUsrController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据机构类型(逗号分割),机构编码获取列表不分页"
,
notes
=
"根据机构类型(逗号分割),机构编码获取列表不分页"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据机构类型(逗号分割),机构编码获取列表不分页"
,
notes
=
"根据机构类型(逗号分割),机构编码获取列表不分页"
)
@GetMapping
(
value
=
"/{authKey}/listWithAuth"
)
@GetMapping
(
value
=
"/{authKey}/listWithAuth"
)
public
ResponseModel
<
List
<
OrgUsr
>>
getListWithAuth
(
@RequestParam
(
required
=
false
)
String
orgTypes
,
public
ResponseModel
<
List
<
OrgUsr
>>
getListWithAuth
(
@RequestParam
(
required
=
false
)
String
orgTypes
,
@PathVariable
String
authKey
)
{
@PathVariable
String
authKey
)
throws
Exception
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
String
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
String
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
//拿到数据字典中存储的 特殊类型 特殊部门
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
"01"
).
or
().
eq
(
"type"
,
"02"
);
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
ArrayList
<
String
>
objects
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
e
->
objects
.
add
(
e
.
getName
()));
if
(
objects
.
contains
(
authKey
)){
if
(
objects
.
contains
(
personIdentity
.
getCompanyId
()))
{
LambdaQueryWrapper
<
OrgUsr
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
OrgUsr:
:
getParentId
,
personIdentity
.
getCompanyId
());
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
false
);
OrgUsr
orgUsr
=
orgUsrMapper
.
selectOne
(
wrapper
);
personIdentity
.
setBizOrgCode
(
orgUsr
.
getBizOrgCode
()
!=
null
?
orgUsr
.
getBizOrgCode
()
:
personIdentity
.
getBizOrgCode
());
}
}
// 权限处理
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getListByBizOrgTypeCode
(
orgTypes
,
bizOrgCode
));
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
getListByBizOrgTypeCode
(
orgTypes
,
bizOrgCode
));
}
}
@PersonIdentify
@PersonIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{authKey}/treeWithAuth"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{authKey}/treeWithAuth"
,
method
=
RequestMethod
.
GET
)
...
...
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