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
d7e19c1a
Commit
d7e19c1a
authored
Sep 28, 2022
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加获取监管机构接口
parent
07232074
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
18 deletions
+46
-18
InspectionController.java
.../boot/module/tzs/biz/controller/InspectionController.java
+1
-1
TzsAuthController.java
...mos/boot/module/tzs/biz/controller/TzsAuthController.java
+45
-17
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/InspectionController.java
View file @
d7e19c1a
...
...
@@ -135,7 +135,7 @@ public class InspectionController {
FeignClientResult
<
CompanyModel
>
company
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
selectValue
));
FeignClientResult
<
Page
<
AgencyUserModel
>>
result
=
new
FeignClientResult
<
Page
<
AgencyUserModel
>>();
if
(
company
.
getResult
()
!=
null
)
{
result
=
Privilege
.
agencyUserClient
.
queryForPageByCompany
(
company
.
getResult
().
getOrgCode
(),
"county"
,
result
=
Privilege
.
agencyUserClient
.
queryForPageByCompany
(
company
.
getResult
().
getOrgCode
(),
"
headquarter,prefecture-level,
county"
,
mobile
,
realName
,
current
,
size
);
}
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzsAuthController.java
View file @
d7e19c1a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.service.TzsAuthService
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
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.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -17,14 +12,16 @@ 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
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
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
;
/**
* 特种设备权限controller
...
...
@@ -79,5 +76,36 @@ public class TzsAuthController extends BaseController {
}
/**
* 获取用户监管机构
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserRegulator"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户组织机构树"
,
notes
=
"获取用户组织机构树"
)
public
ResponseModel
<
String
>
getUserRegulator
()
{
String
name
=
""
;
FeignClientResult
<
AgencyUserModel
>
result
=
Privilege
.
agencyUserClient
.
getme
();
if
(
result
.
getResult
()!=
null
)
{
List
<
CompanyModel
>
list
=
result
.
getResult
().
getCompanys
();
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
)
{
name
=
cResult
.
getResult
().
getCompanyName
();
}
}
else
{
name
=
company
.
getCompanyName
();
}
}
}
result
.
getResult
().
getCompanys
();
return
ResponseHelper
.
buildResponse
(
name
);
}
}
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