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
70c27a5f
Commit
70c27a5f
authored
Jan 27, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
c9c7670e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
10 deletions
+40
-10
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+5
-0
EquipmentDetailController.java
...oin/equipmanage/controller/EquipmentDetailController.java
+22
-0
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+13
-10
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
70c27a5f
...
...
@@ -4,6 +4,7 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -362,4 +363,8 @@ public interface EquipFeignClient {
@RequestMapping
(
value
=
"equipment-category/list-tree"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Object
>
list
()
;
//获取消防装备权限
@RequestMapping
(
value
=
"/equipment-detail/permissions/export"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
ReginParams
>
getPermissions
()
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
70c27a5f
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentDetailDownloadVO
;
...
...
@@ -38,6 +42,7 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -654,4 +659,21 @@ public class EquipmentDetailController extends AbstractBaseController {
return
ResponseHelper
.
buildResponse
(
iEquipmentDetailService
.
companyDeptTree
());
}
/**
* 消防装备权限获取
*
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/permissions/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取权限"
,
notes
=
"获取权限"
)
public
ResponseModel
<
ReginParams
>
getPermissions
()
{
// 导出模板增加权限
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
"fire_equip_info"
);
return
ResponseHelper
.
buildResponse
(
reginParams
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
70c27a5f
...
...
@@ -178,6 +178,9 @@ public class DataSourcesImpl implements DataSources {
case
"getKeySiteCompanyDetailTree"
:
str
=
getKeySiteCompanyDetailTree
();
break
;
case
"getFireTeamContactUser"
:
str
=
getFireTeamContactUser
();
break
;
}
}
return
str
;
...
...
@@ -251,10 +254,9 @@ public class DataSourcesImpl implements DataSources {
// IPage<FireTeamCardDto> fireTeamCardDtoIPage = fireTeamService.listFireTeamByPage(pageBean,
// new FireTeamListDto());
// List<FireTeamCardDto> records = fireTeamCardDtoIPage.getRecords();
// 导出模板增加权限
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
"fire_equip_info"
);
ResponseModel
<
ReginParams
>
result
=
equipFeignClient
.
getPermissions
();
ReginParams
reginParams
=
result
.
getResult
();
List
<
FireTeam
>
records
=
fireTeamService
.
getFireTeamList
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
List
<
String
>
names
=
records
.
stream
().
map
(
item
->
{
return
item
.
getName
()
+
"@"
+
item
.
getSequenceNbr
();
...
...
@@ -489,6 +491,7 @@ public class DataSourcesImpl implements DataSources {
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
"fire_fighters_info"
);
List
<
OrgUsr
>
menus
=
iOrgUsrService
.
companyTreeByUserAndTypeNoTree
(
reginParams
,
null
);
List
<
String
>
names
=
menus
.
stream
().
map
(
item
->
{
return
item
.
getBizOrgName
()
+
"@"
+
item
.
getSequenceNbr
()
+
"@"
+
item
.
getBizOrgCode
();
...
...
@@ -498,17 +501,17 @@ public class DataSourcesImpl implements DataSources {
}
/**
* 消防
队员
模板获取所属部门
* 消防
装备
模板获取所属部门
*
* @return
*/
private
String
[]
getEquipCompany
()
{
//List<OrgMenuDto> menus = OrgUsrServiceImpl.buildTreeParallel(iOrgUsrService.selectCompanyDepartmentMsg()
);
// 导出模板增加权限
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
"fire_equip_info"
);
// List<OrgUsr> menus = iOrgUsrService.selectCompanyDepartmentMsg(
);
ResponseModel
<
ReginParams
>
result
=
equipFeignClient
.
getPermissions
();
ReginParams
reginParams
=
result
.
getResult
(
);
List
<
OrgUsr
>
menus
=
iOrgUsrService
.
companyTreeByUserAndTypeNoTree
(
reginParams
,
null
);
List
<
String
>
names
=
menus
.
stream
().
map
(
item
->
{
return
item
.
getBizOrgName
()
+
"@"
+
item
.
getSequenceNbr
()
+
"@"
+
item
.
getBizOrgCode
();
...
...
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