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
6ae028f9
Commit
6ae028f9
authored
Mar 28, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
16176
parent
9adf7e63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
32 deletions
+29
-32
TzsAuthController.java
...mos/boot/module/tzs/biz/controller/TzsAuthController.java
+29
-32
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzsAuthController.java
View file @
6ae028f9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsCitInfoServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -19,16 +23,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 特种设备权限controller
...
...
@@ -99,31 +97,30 @@ public class TzsAuthController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserRegulator"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户组织机构树"
,
notes
=
"获取用户组织机构树"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserRegulator
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
FeignClientResult
<
AgencyUserModel
>
result
=
Privilege
.
agencyUserClient
.
getme
();
if
(
result
.
getResult
()!=
null
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserRegulator
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
FeignClientResult
<
AgencyUserModel
>
result
=
Privilege
.
agencyUserClient
.
getme
();
if
(
result
.
getResult
()
!=
null
)
{
List
<
CompanyModel
>
list
=
result
.
getResult
().
getCompanys
();
if
(
list
!=
null
&&!
list
.
isEmpty
())
{
if
(
list
!=
null
&&
!
list
.
isEmpty
())
{
CompanyModel
company
=
list
.
get
(
0
);
if
(
"company"
.
equals
(
company
.
getLevel
()))
{
FeignClientResult
<
CompanyModel
>
cResult
=
Privilege
.
companyClient
.
seleteOne
(
company
.
getParentId
());
if
(
cResult
.
getResult
()!=
null
)
{
if
(
"company"
.
equals
(
company
.
getLevel
()))
{
FeignClientResult
<
CompanyModel
>
cResult
=
Privilege
.
companyClient
.
seleteOne
(
company
.
getParentId
());
if
(
cResult
.
getResult
()
!=
null
)
{
map
.
put
(
"regulator"
,
cResult
.
getResult
().
getCompanyName
());
}
}
else
{
map
.
put
(
"regulator"
,
company
.
getCompanyName
());
map
.
put
(
"orgCode"
,
cResult
.
getResult
().
getOrgCode
()
+
"_"
+
cResult
.
getResult
().
getCompanyName
());
}
else
{
map
.
put
(
"regulator"
,
company
.
getCompanyName
());
map
.
put
(
"orgCode"
,
list
.
get
(
0
).
getOrgCode
()
+
"_"
+
list
.
get
(
0
).
getCompanyName
());
}
map
.
put
(
"company"
,
company
.
getCompanyName
());
map
.
put
(
"companyId"
,
company
.
getParentId
()!=
0L
?
company
.
getParentId
():
company
.
getSequenceNbr
());
map
.
put
(
"companyId"
,
company
.
getParentId
()
!=
0L
?
company
.
getParentId
()
:
company
.
getSequenceNbr
());
map
.
put
(
"USE_UNIT_NAME"
,
list
.
get
(
0
).
getCompanyName
());
map
.
put
(
"USE_UNIT_CREDIT_CODE"
,
list
.
get
(
0
).
getCompanyCode
());
}
map
.
put
(
"userName"
,
result
.
getResult
().
getRealName
());
map
.
put
(
"userPhoto"
,
userPhoto
);
map
.
put
(
"userPhoto"
,
userPhoto
);
}
return
ResponseHelper
.
buildResponse
(
map
);
}
...
...
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