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
2b3c072b
Commit
2b3c072b
authored
Dec 07, 2022
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消防视图建筑树和系统树添加权限
parent
b1ef8b88
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
78 additions
and
20 deletions
+78
-20
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+40
-0
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+2
-2
EquipmentDetailController.java
...oin/equipmanage/controller/EquipmentDetailController.java
+2
-2
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+5
-3
JcsFeign.java
...src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
+5
-1
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+1
-1
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+1
-1
AreaServiceImpl.java
...com/yeejoin/equipmanage/service/impl/AreaServiceImpl.java
+1
-1
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+5
-5
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+9
-2
JCSRemoteService.java
...om/yeejoin/equipmanage/service/impl/JCSRemoteService.java
+7
-2
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 @
2b3c072b
...
@@ -777,10 +777,22 @@ public class OrgUsrController extends BaseController {
...
@@ -777,10 +777,22 @@ 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
,
@RequestParam
(
required
=
false
)
String
type
,
@PathVariable
String
authKey
)
throws
Exception
{
@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
();
if
(
"dl"
.
equals
(
type
)){
LambdaQueryWrapper
<
OrgUsr
>
lambda
=
new
QueryWrapper
<
OrgUsr
>().
lambda
();
lambda
.
eq
(
OrgUsr:
:
getBizOrgCode
,
bizOrgCode
);
lambda
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
OrgUsr
orgUsr
=
orgUsrMapper
.
selectList
(
lambda
).
get
(
0
);
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
orgUsr
.
getBizOrgType
())
&&
"COMPANY"
.
equals
(
orgUsr
.
getBizOrgType
()))
{
bizOrgCode
=
orgUsr
.
getBizOrgCode
();
}
else
{
bizOrgCode
=
getCompanyNameById
(
orgUsr
.
getParentId
());
}
}
//拿到数据字典中存储的 特殊类型 特殊部门
//拿到数据字典中存储的 特殊类型 特殊部门
...
@@ -969,4 +981,31 @@ public class OrgUsrController extends BaseController {
...
@@ -969,4 +981,31 @@ public class OrgUsrController extends BaseController {
return
ResponseHelper
.
buildResponse
(
orgUsr
.
getBizOrgCode
());
return
ResponseHelper
.
buildResponse
(
orgUsr
.
getBizOrgCode
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询公司bizOrgCode"
,
notes
=
"查询公司bizOrgCode"
)
@GetMapping
(
value
=
"/getCompany"
)
public
ResponseModel
<
String
>
getBizByAmos
(
@RequestParam
(
"bizOrgCode"
)
String
bizOrgCode
)
{
LambdaQueryWrapper
<
OrgUsr
>
lambda
=
new
QueryWrapper
<
OrgUsr
>().
lambda
();
lambda
.
eq
(
OrgUsr:
:
getBizOrgCode
,
bizOrgCode
);
lambda
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
OrgUsr
orgUsr
=
orgUsrMapper
.
selectList
(
lambda
).
get
(
0
);
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
orgUsr
.
getBizOrgType
())
&&
"COMPANY"
.
equals
(
orgUsr
.
getBizOrgType
()))
{
return
ResponseHelper
.
buildResponse
(
orgUsr
.
getBizOrgCode
());
}
else
{
return
ResponseHelper
.
buildResponse
(
getCompanyNameById
(
orgUsr
.
getParentId
()));
}
}
private
String
getCompanyNameById
(
String
id
)
{
LambdaQueryWrapper
<
OrgUsr
>
lambda
=
new
QueryWrapper
<
OrgUsr
>().
lambda
();
lambda
.
eq
(
OrgUsr:
:
getSequenceNbr
,
id
);
lambda
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
OrgUsr
orgUsr
=
orgUsrMapper
.
selectList
(
lambda
).
get
(
0
);
if
(!
org
.
apache
.
commons
.
lang3
.
ObjectUtils
.
isEmpty
(
orgUsr
.
getBizOrgType
())
&&
"COMPANY"
.
equals
(
orgUsr
.
getBizOrgType
()))
{
return
orgUsr
.
getBizOrgCode
();
}
else
{
return
getCompanyNameById
(
orgUsr
.
getParentId
());
}
}
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
2b3c072b
...
@@ -353,8 +353,8 @@ public class BuildingController extends AbstractBaseController {
...
@@ -353,8 +353,8 @@ public class BuildingController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"公司消防建筑树"
)
@ApiOperation
(
"公司消防建筑树"
)
@GetMapping
(
value
=
"/companyBuildingTree"
)
@GetMapping
(
value
=
"/companyBuildingTree"
)
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
()
{
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
@RequestParam
(
required
=
false
,
value
=
"type"
)
String
type
)
{
return
buildService
.
getCompanyBuildingTree
(
null
);
return
buildService
.
getCompanyBuildingTree
(
null
,
type
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentDetailController.java
View file @
2b3c072b
...
@@ -242,13 +242,13 @@ public class EquipmentDetailController extends AbstractBaseController {
...
@@ -242,13 +242,13 @@ public class EquipmentDetailController extends AbstractBaseController {
@RequestParam
(
required
=
false
)
Long
stockDetailId
)
{
@RequestParam
(
required
=
false
)
Long
stockDetailId
)
{
EquipmentDate
equipmentDate
=
new
EquipmentDate
();
EquipmentDate
equipmentDate
=
new
EquipmentDate
();
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificSerivce
.
getBaseMapper
().
selectOne
(
new
QueryWrapper
<
EquipmentSpecific
>().
eq
(
"code"
,
code
));
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificSerivce
.
getBaseMapper
().
selectOne
(
new
QueryWrapper
<
EquipmentSpecific
>().
eq
(
"code"
,
code
));
FireFightingSystemEntity
fightingSystemEntity
=
new
FireFightingSystemEntity
();
if
(!
ObjectUtils
.
isEmpty
(
equipmentSpecific
.
getSystemId
())){
if
(!
ObjectUtils
.
isEmpty
(
equipmentSpecific
.
getSystemId
())){
FireFightingSystemEntity
fightingSystemEntity
=
fireFightingSystemService
.
getOneById
(
Long
.
valueOf
(
equipmentSpecific
.
getSystemId
()));
fightingSystemEntity
=
fireFightingSystemService
.
getOneById
(
Long
.
valueOf
(
equipmentSpecific
.
getSystemId
()));
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
}
else
{
}
else
{
equipmentSpecific
.
setSystemId
(
""
);
equipmentSpecific
.
setSystemId
(
""
);
}
}
FireFightingSystemEntity
fightingSystemEntity
=
fireFightingSystemService
.
getOneById
(
Long
.
valueOf
(
equipmentSpecific
.
getSystemId
()));
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
equipmentSpecific
.
setSystemId
(
fightingSystemEntity
.
getName
());
equipmentSpecific
.
setFullqrCode
(
"01#"
+
equipmentSpecific
.
getQrCode
());
equipmentSpecific
.
setFullqrCode
(
"01#"
+
equipmentSpecific
.
getQrCode
());
EquipmentDetail
equipmentDetail
=
iEquipmentDetailService
.
getOneById
(
equipmentSpecific
.
getEquipmentDetailId
());
EquipmentDetail
equipmentDetail
=
iEquipmentDetailService
.
getOneById
(
equipmentSpecific
.
getEquipmentDetailId
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
2b3c072b
...
@@ -814,8 +814,10 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -814,8 +814,10 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取点位图,区域树数据"
,
notes
=
"消防系统点位图使用"
)
@ApiOperation
(
value
=
"获取点位图,区域树数据"
,
notes
=
"消防系统点位图使用"
)
@GetMapping
(
value
=
"/point/tree"
)
@GetMapping
(
value
=
"/point/tree"
)
public
List
<
PointTreeVo
>
getPointTree
(
@RequestParam
(
required
=
false
)
String
systemId
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
List
<
PointTreeVo
>
getPointTree
(
@RequestParam
(
required
=
false
)
String
systemId
,
return
fireFightingSystemService
.
getPointTree
(
systemId
,
bizOrgCode
);
@RequestParam
(
required
=
false
)
String
bizOrgCode
,
@RequestParam
(
required
=
false
)
String
type
)
{
return
fireFightingSystemService
.
getPointTree
(
systemId
,
bizOrgCode
,
type
);
}
}
@RequestMapping
(
value
=
"/{systemCode}/system/detail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/{systemCode}/system/detail"
,
method
=
RequestMethod
.
GET
)
...
@@ -829,7 +831,7 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -829,7 +831,7 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统分类树"
,
notes
=
"获取系统分类树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取系统分类树"
,
notes
=
"获取系统分类树"
)
@GetMapping
(
value
=
"/systemAndEquipmentTreeByBziOrgCode"
)
@GetMapping
(
value
=
"/systemAndEquipmentTreeByBziOrgCode"
)
public
List
<
OrgMenuDto
>
systemAndEquipmentTreeByBziOrgCode
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
public
List
<
OrgMenuDto
>
systemAndEquipmentTreeByBziOrgCode
()
{
return
fireFightingSystemService
.
systemAndEquipmentTreeByBziOrgCode
(
bizOrgCode
);
return
fireFightingSystemService
.
systemAndEquipmentTreeByBziOrgCode
(
bizOrgCode
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/fegin/JcsFeign.java
View file @
2b3c072b
...
@@ -143,7 +143,7 @@ public interface JcsFeign {
...
@@ -143,7 +143,7 @@ public interface JcsFeign {
* @return ResponseModel<OrgUsrDto>
* @return ResponseModel<OrgUsrDto>
*/
*/
@GetMapping
(
value
=
"/org-usr/{authKey}/listWithAuth"
)
@GetMapping
(
value
=
"/org-usr/{authKey}/listWithAuth"
)
FeignClientResult
<
List
<
OrgUsrDto
>>
getCompanyDeptListWithAuth
(
@PathVariable
(
value
=
"authKey"
)
String
authKey
,
@RequestParam
(
value
=
"orgTypes"
,
required
=
false
)
String
orgTypes
);
FeignClientResult
<
List
<
OrgUsrDto
>>
getCompanyDeptListWithAuth
(
@PathVariable
(
value
=
"authKey"
)
String
authKey
,
@RequestParam
(
value
=
"orgTypes"
,
required
=
false
)
String
orgTypes
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
);
/**
/**
* 获取机场人员
* 获取机场人员
...
@@ -190,4 +190,8 @@ public interface JcsFeign {
...
@@ -190,4 +190,8 @@ public interface JcsFeign {
@GetMapping
(
value
=
"/org-person/getUser/{id}"
)
@GetMapping
(
value
=
"/org-person/getUser/{id}"
)
FeignClientResult
selectById
(
@PathVariable
String
id
);
FeignClientResult
selectById
(
@PathVariable
String
id
);
@GetMapping
(
value
=
"/org-usr/getCompany"
)
FeignClientResult
getCompany
(
@RequestParam
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
2b3c072b
...
@@ -310,7 +310,7 @@ public interface IBuilldService extends IService<Building> {
...
@@ -310,7 +310,7 @@ public interface IBuilldService extends IService<Building> {
* @return list
* @return list
* @param authKey
* @param authKey
*/
*/
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
String
authKey
);
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
String
authKey
,
String
type
);
/**
/**
* 获取单位树
* 获取单位树
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
2b3c072b
...
@@ -90,7 +90,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -90,7 +90,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* @param orgCode
* @param orgCode
* @return
* @return
*/
*/
List
<
PointTreeVo
>
getPointTree
(
String
systemId
,
String
orgCode
);
List
<
PointTreeVo
>
getPointTree
(
String
systemId
,
String
orgCode
,
String
type
);
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/AreaServiceImpl.java
View file @
2b3c072b
...
@@ -238,7 +238,7 @@ public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements IA
...
@@ -238,7 +238,7 @@ public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements IA
@Override
@Override
public
List
<
UnitAreaTreeVo
>
getAreaTreeListVo
()
{
public
List
<
UnitAreaTreeVo
>
getAreaTreeListVo
()
{
// 获取公司list
// 获取公司list
List
<
OrgUsrDto
>
orgCompanyLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
List
<
OrgUsrDto
>
orgCompanyLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
,
null
);
if
(
orgCompanyLists
.
isEmpty
())
{
if
(
orgCompanyLists
.
isEmpty
())
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
2b3c072b
...
@@ -1307,9 +1307,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1307,9 +1307,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
}
@Override
@Override
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
String
authKey
)
{
public
List
<
BuildingTreeVo
>
getCompanyBuildingTree
(
String
authKey
,
String
type
)
{
//1.组装数据
//1.组装数据
List
<
BuildingTreeVo
>
companyBuildingList
=
buildBuildingAndCompanyListVos
(
authKey
);
List
<
BuildingTreeVo
>
companyBuildingList
=
buildBuildingAndCompanyListVos
(
authKey
,
type
);
//2.list to tree
//2.list to tree
List
<
BuildingTreeVo
>
buildingTreeVos
=
companyBuildingList
.
stream
().
filter
(
a
->
companyBuildingList
.
stream
().
noneMatch
(
c
->
c
.
getId
().
toString
().
equals
(
a
.
getParentId
()))).
peek
(
b
->
b
.
setChildren
(
getCompanyBuildingChildrenTree
(
b
.
getId
().
toString
(),
companyBuildingList
))).
collect
(
Collectors
.
toList
());
List
<
BuildingTreeVo
>
buildingTreeVos
=
companyBuildingList
.
stream
().
filter
(
a
->
companyBuildingList
.
stream
().
noneMatch
(
c
->
c
.
getId
().
toString
().
equals
(
a
.
getParentId
()))).
peek
(
b
->
b
.
setChildren
(
getCompanyBuildingChildrenTree
(
b
.
getId
().
toString
(),
companyBuildingList
))).
collect
(
Collectors
.
toList
());
// 任务 7481
// 任务 7481
...
@@ -1369,13 +1369,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1369,13 +1369,13 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
}
private
List
<
BuildingTreeVo
>
buildBuildingAndCompanyListVos
(
String
authKey
)
{
private
List
<
BuildingTreeVo
>
buildBuildingAndCompanyListVos
(
String
authKey
,
String
type
)
{
if
(
StringUtils
.
isEmpty
(
authKey
))
{
if
(
StringUtils
.
isEmpty
(
authKey
))
{
authKey
=
this
.
authKey
;
authKey
=
this
.
authKey
;
}
}
List
<
BuildingTreeVo
>
buildingTreeVos
=
getBuildingTreeVos
(
false
,
null
);
List
<
BuildingTreeVo
>
buildingTreeVos
=
getBuildingTreeVos
(
false
,
null
);
// 1.获取公司list
// 1.获取公司list
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
);
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
,
type
);
if
(
orgUsrLists
.
isEmpty
()){
if
(
orgUsrLists
.
isEmpty
()){
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
...
@@ -1415,7 +1415,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1415,7 +1415,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
@Override
public
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
()
{
public
List
<
BuildingTreeVo
>
getBuildingVideoTreeNew
()
{
//1.组装数据
//1.组装数据
List
<
BuildingTreeVo
>
companyBuildingList
=
buildBuildingAndCompanyListVos
(
buildVideoAuthKey
);
List
<
BuildingTreeVo
>
companyBuildingList
=
buildBuildingAndCompanyListVos
(
buildVideoAuthKey
,
null
);
List
<
Map
<
String
,
Long
>>
countList
=
iFormInstanceService
.
getBuildVideoCount
();
List
<
Map
<
String
,
Long
>>
countList
=
iFormInstanceService
.
getBuildVideoCount
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
2b3c072b
...
@@ -30,6 +30,7 @@ import com.yeejoin.equipmanage.common.utils.ChartsUtils;
...
@@ -30,6 +30,7 @@ import com.yeejoin.equipmanage.common.utils.ChartsUtils;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.utils.WordTemplateUtils
;
import
com.yeejoin.equipmanage.common.utils.WordTemplateUtils
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.*
;
import
com.yeejoin.equipmanage.service.*
;
...
@@ -106,6 +107,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -106,6 +107,8 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
private
Resource
systemIndex
;
private
Resource
systemIndex
;
@Autowired
@Autowired
JcsFeign
jcsFeignClient
;
@Autowired
private
IEqDynamicFormGroupService
iEqDynamicFormGroupService
;
private
IEqDynamicFormGroupService
iEqDynamicFormGroupService
;
@Autowired
@Autowired
...
@@ -397,7 +400,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -397,7 +400,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
}
@Override
@Override
public
List
<
PointTreeVo
>
getPointTree
(
String
id
,
String
orgCode
)
{
public
List
<
PointTreeVo
>
getPointTree
(
String
id
,
String
orgCode
,
String
type
)
{
// CommonResponse se = riskModelFeign.getRiskSourceList(orgCode);
// CommonResponse se = riskModelFeign.getRiskSourceList(orgCode);
// List<Map<String, Object>> list = (List<Map<String, Object>>) se.getDataList();
// List<Map<String, Object>> list = (List<Map<String, Object>>) se.getDataList();
// List<PointTreeVo> responses = new ArrayList<>();
// List<PointTreeVo> responses = new ArrayList<>();
...
@@ -412,6 +415,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -412,6 +415,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// responses.add(p);
// responses.add(p);
// });
// });
// List<PointTreeVo> regionList = responses.stream().filter(r -> "TRUE".equals(r.getIsRegion())).collect(Collectors.toList());
// List<PointTreeVo> regionList = responses.stream().filter(r -> "TRUE".equals(r.getIsRegion())).collect(Collectors.toList());
if
(
"dl"
.
equals
(
type
)){
FeignClientResult
<
List
<
OrgUsrDto
>>
feignClientResult
=
jcsFeignClient
.
getCompanyDeptListWithAuth
(
authKey
,
"COMPANY"
,
"dl"
);
orgCode
=
feignClientResult
.
getResult
().
get
(
0
).
getBizOrgCode
();
}
List
<
PointTreeVo
>
buildList
=
buildingMapper
.
getBuildList
(
orgCode
,
null
);
List
<
PointTreeVo
>
buildList
=
buildingMapper
.
getBuildList
(
orgCode
,
null
);
return
transferListToPointTree
(
buildList
,
id
,
null
);
return
transferListToPointTree
(
buildList
,
id
,
null
);
}
}
...
@@ -1061,7 +1068,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1061,7 +1068,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
@Override
public
List
<
FireFightingSystemTreeVo
>
getSystemTreeByOrgCode
(
String
bizOrgCode
)
{
public
List
<
FireFightingSystemTreeVo
>
getSystemTreeByOrgCode
(
String
bizOrgCode
)
{
// 获取公司部门list
// 获取公司部门list
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
"COMPANY,DEPARTMENT"
,
bizOrgCode
);
List
<
OrgUsrDto
>
orgUsrLists
=
jcsRemoteService
.
getCompanyDeptListWithAuth
(
"COMPANY,DEPARTMENT"
,
bizOrgCode
,
null
);
List
<
FireFightingSystemTreeVo
>
fireFightingSystemTreeList
=
orgUsrLists
.
stream
().
map
(
key
->
{
List
<
FireFightingSystemTreeVo
>
fireFightingSystemTreeList
=
orgUsrLists
.
stream
().
map
(
key
->
{
FireFightingSystemTreeVo
vo
=
new
FireFightingSystemTreeVo
();
FireFightingSystemTreeVo
vo
=
new
FireFightingSystemTreeVo
();
vo
.
setId
(
valueOf
(
key
.
getSequenceNbr
()));
vo
.
setId
(
valueOf
(
key
.
getSequenceNbr
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/JCSRemoteService.java
View file @
2b3c072b
...
@@ -36,8 +36,8 @@ public class JCSRemoteService {
...
@@ -36,8 +36,8 @@ public class JCSRemoteService {
* @param orgTypes(多个逗号分隔) 为空默认查询公司和部门,COMPANY: 公司树 DEPARTMENT部门树
* @param orgTypes(多个逗号分隔) 为空默认查询公司和部门,COMPANY: 公司树 DEPARTMENT部门树
* @return List<OrgUsrDto>
* @return List<OrgUsrDto>
*/
*/
public
List
<
OrgUsrDto
>
getCompanyDeptListWithAuth
(
String
authKey
,
String
orgTypes
)
{
public
List
<
OrgUsrDto
>
getCompanyDeptListWithAuth
(
String
authKey
,
String
orgTypes
,
String
type
)
{
FeignClientResult
<
List
<
OrgUsrDto
>>
feignClientResult
=
jcsFeignClient
.
getCompanyDeptListWithAuth
(
authKey
,
orgTypes
);
FeignClientResult
<
List
<
OrgUsrDto
>>
feignClientResult
=
jcsFeignClient
.
getCompanyDeptListWithAuth
(
authKey
,
orgTypes
,
type
);
return
feignClientResult
.
getResult
();
return
feignClientResult
.
getResult
();
}
}
...
@@ -52,4 +52,9 @@ public class JCSRemoteService {
...
@@ -52,4 +52,9 @@ public class JCSRemoteService {
FeignClientResult
<
List
<
OrgUsrDto
>>
feignClientResult
=
jcsFeignClient
.
getlistCompanyTree
(
orgType
);
FeignClientResult
<
List
<
OrgUsrDto
>>
feignClientResult
=
jcsFeignClient
.
getlistCompanyTree
(
orgType
);
return
feignClientResult
.
getResult
();
return
feignClientResult
.
getResult
();
}
}
public
String
getCompany
(
String
bizOrgCode
)
{
FeignClientResult
<
String
>
feignClientResult
=
jcsFeignClient
.
getCompany
(
bizOrgCode
);
return
feignClientResult
.
getResult
();
}
}
}
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