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
8d3a985c
Commit
8d3a985c
authored
Aug 02, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消防系统树和消防建筑树接口修改、新加单位部门树API接口
parent
22ce226c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
110 additions
and
2 deletions
+110
-2
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+24
-2
FormInstanceMapper.java
...va/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
+8
-0
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+7
-0
IFormInstanceService.java
...com/yeejoin/equipmanage/service/IFormInstanceService.java
+9
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+22
-0
FormInstanceServiceImpl.java
...oin/equipmanage/service/impl/FormInstanceServiceImpl.java
+5
-0
FormInstanceMapper.xml
...em-equip/src/main/resources/mapper/FormInstanceMapper.xml
+35
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
8d3a985c
...
@@ -9,6 +9,7 @@ import java.util.concurrent.ConcurrentHashMap;
...
@@ -9,6 +9,7 @@ import java.util.concurrent.ConcurrentHashMap;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.entity.*
;
import
com.yeejoin.equipmanage.common.utils.SpringUtils
;
import
com.yeejoin.equipmanage.common.utils.SpringUtils
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
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
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
...
@@ -28,6 +29,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -28,6 +29,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -112,6 +114,11 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -112,6 +114,11 @@ public class FireFightingSystemController extends AbstractBaseController {
@Value
(
"${firefightingsystem.equip.alarms.url}"
)
@Value
(
"${firefightingsystem.equip.alarms.url}"
)
private
String
ffsEquipAlarmsUrl
;
private
String
ffsEquipAlarmsUrl
;
@Autowired
private
JcsFeign
jcsFeign
;
@Value
(
"${auth-key-fire-system}"
)
private
String
systemAuthKey
;
@Autowired
@Autowired
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
...
@@ -585,11 +592,12 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -585,11 +592,12 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"消防系统树和消防建筑树"
,
notes
=
"树菜单"
)
@ApiOperation
(
value
=
"消防系统树和消防建筑树"
,
notes
=
"树菜单"
)
@GetMapping
(
value
=
"/getBuildingTreeAndSystemTree"
)
@GetMapping
(
value
=
"/getBuildingTreeAndSystemTree"
)
public
Map
<
String
,
List
>
getBuildingTreeAndSystemTree
()
{
public
Map
<
String
,
List
>
getBuildingTreeAndSystemTree
(
@RequestParam
String
bizOrgCode
)
{
Map
<
String
,
List
>
map
=
new
HashMap
<>();
Map
<
String
,
List
>
map
=
new
HashMap
<>();
List
<
BuildingTreeVo
>
buildingTrees
=
buildService
.
getBuildingTree
(
);
List
<
BuildingTreeVo
>
buildingTrees
=
buildService
.
getBuildingTree
ByBizOrgCode
(
bizOrgCode
);
LambdaQueryWrapper
<
FireFightingSystemEntity
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FireFightingSystemEntity
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
orderByAsc
(
FireFightingSystemEntity:
:
getRecDate
);
lambdaQueryWrapper
.
orderByAsc
(
FireFightingSystemEntity:
:
getRecDate
);
lambdaQueryWrapper
.
likeRight
(
StringUtil
.
isNotEmpty
(
bizOrgCode
),
FireFightingSystemEntity:
:
getBizOrgCode
,
bizOrgCode
);
List
<
FireFightingSystemEntity
>
systemTree
=
fireFightingSystemService
.
list
(
lambdaQueryWrapper
);
List
<
FireFightingSystemEntity
>
systemTree
=
fireFightingSystemService
.
list
(
lambdaQueryWrapper
);
systemTree
.
forEach
(
action
->
{
systemTree
.
forEach
(
action
->
{
action
.
setDetailListPaneApi
(
ffsEquipAlarmsUrl
);
action
.
setDetailListPaneApi
(
ffsEquipAlarmsUrl
);
...
@@ -601,6 +609,20 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -601,6 +609,20 @@ public class FireFightingSystemController extends AbstractBaseController {
}
}
/**
/**
* 消防装备单位部门树
*
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/companyTreeBySystem"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防系统单位部门树"
,
notes
=
"消防系统单位部门树"
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
companyTreeByUserAndType
()
{
return
ResponseHelper
.
buildResponse
(
jcsFeign
.
getCompanyDeptTreeWithAuth
(
systemAuthKey
,
null
).
getResult
());
}
/**
* 装备卡片删除
* 装备卡片删除
*
*
* @return
* @return
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
View file @
8d3a985c
...
@@ -48,6 +48,14 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
...
@@ -48,6 +48,14 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
* @return
* @return
*/
*/
List
<
Map
<
String
,
Object
>>
querySpecialChildrenList
(
String
parentId
);
List
<
Map
<
String
,
Object
>>
querySpecialChildrenList
(
String
parentId
);
/**
* 查询指定节点的子
* @param parentId
* @return
*/
List
<
Map
<
String
,
Object
>>
querySpecialChildrenListByBizOrgCode
(
@Param
(
"parentId"
)
String
parentId
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
/**
/**
* @Description 分页查询
* @Description 分页查询
* @param dto 查询参数
* @param dto 查询参数
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
8d3a985c
...
@@ -77,6 +77,13 @@ public interface IBuilldService extends IService<Building> {
...
@@ -77,6 +77,13 @@ public interface IBuilldService extends IService<Building> {
List
<
BuildingTreeVo
>
getBuildingTree
();
List
<
BuildingTreeVo
>
getBuildingTree
();
/**
/**
* 消防建筑树查询接口(带条件bizOrgCode)
*
* @return List<BuildingTreeVo>
*/
List
<
BuildingTreeVo
>
getBuildingTreeByBizOrgCode
(
String
bizOrgCode
);
/**
* 消防建筑层级树查询接口
* 消防建筑层级树查询接口
*
*
* @return List<BuildingTreeVo>
* @return List<BuildingTreeVo>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFormInstanceService.java
View file @
8d3a985c
...
@@ -71,6 +71,15 @@ public interface IFormInstanceService extends IService<FormInstance> {
...
@@ -71,6 +71,15 @@ public interface IFormInstanceService extends IService<FormInstance> {
* @return List<Map < String, Object>>
* @return List<Map < String, Object>>
*/
*/
List
<
Map
<
String
,
Object
>>
getSpecialChildrenList
(
String
parentId
);
List
<
Map
<
String
,
Object
>>
getSpecialChildrenList
(
String
parentId
);
/**
* 查询指定节点的下降
*
* @param parentId 父节点
* @return List<Map < String, Object>>
*/
List
<
Map
<
String
,
Object
>>
getSpecialChildrenListByBizOrgCode
(
String
parentId
,
String
bizOrgCode
);
/**
/**
* @Description 分页查询
* @Description 分页查询
* @param dto 查询参数
* @param dto 查询参数
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
8d3a985c
...
@@ -464,6 +464,28 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -464,6 +464,28 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
}
@Override
@Override
public
List
<
BuildingTreeVo
>
getBuildingTreeByBizOrgCode
(
String
bizOrgCode
)
{
List
<
BuildingTreeVo
>
allListVo
=
getBuildingTreeVosByBizOrgCode
(
true
,
bizOrgCode
);
return
allListVo
.
stream
().
filter
(
s
->
"-1"
.
equals
(
s
.
getParentId
())).
map
(
s
->
{
BuildingTreeVo
t
=
new
BuildingTreeVo
();
Bean
.
copyExistPropertis
(
s
,
t
);
t
.
setChildren
(
this
.
getChildren
(
t
.
getInstanceId
(),
allListVo
));
t
.
setDetailPaneApi
(
address
);
t
.
setApiUrl
(
apiUrl
);
return
t
;
}).
collect
(
Collectors
.
toList
());
}
private
List
<
BuildingTreeVo
>
getBuildingTreeVosByBizOrgCode
(
Boolean
isContainRootNode
,
String
bizOrgCode
)
{
FormGroup
formGroup
=
iFormGroupService
.
getByUniqueKey
(
GroupCodeEnum
.
ALL_BUILDING
.
getGroupCode
());
List
<
Map
<
String
,
Object
>>
allList
=
iFormInstanceService
.
getSpecialChildrenListByBizOrgCode
(
null
,
bizOrgCode
);
List
<
BuildingTreeVo
>
allListVo
=
buildBuildingData
(
formGroup
,
allList
,
isContainRootNode
);
Map
<
Long
,
String
>
absolutePositionMap
=
getBuildingAbsolutePosition
(
allListVo
);
allListVo
.
forEach
(
s
->
s
.
setAbsolutePosition
(
absolutePositionMap
.
get
(
s
.
getId
())));
return
allListVo
;
}
@Override
public
List
<
Map
<
String
,
Object
>>
getBuildingDetaiList
()
{
public
List
<
Map
<
String
,
Object
>>
getBuildingDetaiList
()
{
return
iFormInstanceService
.
getSpecialChildrenList
(
null
);
return
iFormInstanceService
.
getSpecialChildrenList
(
null
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FormInstanceServiceImpl.java
View file @
8d3a985c
...
@@ -436,6 +436,11 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
...
@@ -436,6 +436,11 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
return
this
.
baseMapper
.
querySpecialChildrenList
(
parentId
);
return
this
.
baseMapper
.
querySpecialChildrenList
(
parentId
);
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getSpecialChildrenListByBizOrgCode
(
String
parentId
,
String
bizOrgCode
)
{
return
this
.
baseMapper
.
querySpecialChildrenListByBizOrgCode
(
parentId
,
bizOrgCode
);
}
private
String
fillCode
(
String
groupCode
,
String
fieldName
,
String
value
,
String
companyCode
)
{
private
String
fillCode
(
String
groupCode
,
String
fieldName
,
String
value
,
String
companyCode
)
{
if
(
CODE
.
equals
(
fieldName
)
&&
StringUtils
.
isEmpty
(
value
))
{
if
(
CODE
.
equals
(
fieldName
)
&&
StringUtils
.
isEmpty
(
value
))
{
return
RandomUtil
.
buildNo
(
GroupCodeEnum
.
getInstance
(
groupCode
).
getSequenceType
(),
companyCode
);
return
RandomUtil
.
buildNo
(
GroupCodeEnum
.
getInstance
(
groupCode
).
getSequenceType
(),
companyCode
);
...
...
amos-boot-system-equip/src/main/resources/mapper/FormInstanceMapper.xml
View file @
8d3a985c
...
@@ -562,4 +562,39 @@ AND field_name =#{name}
...
@@ -562,4 +562,39 @@ AND field_name =#{name}
WHERE c.field_value = #{id})
WHERE c.field_value = #{id})
</select>
</select>
<select
id=
"querySpecialChildrenListByBizOrgCode"
resultType=
"java.util.Map"
>
SELECT
*
FROM
(
SELECT
a.instance_id as id,
a.instance_id AS instanceId,
a.group_code AS groupCode,
a.group_type AS groupType,
wlss.scene_id as sceneId,
MAX( CASE WHEN a.field_name = 'parentId' THEN a.field_value END ) AS parentId,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS instanceName,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS name,
MAX( CASE WHEN a.field_name = 'code' THEN a.field_value END ) AS code,
MAX( CASE WHEN a.field_name = 'isRisk' THEN a.field_value END ) AS isRisk,
MAX( CASE WHEN a.field_name = 'address' THEN a.field_value END ) AS address,
MAX( CASE WHEN a.field_name = 'bizOrgCode' THEN a.field_value END ) AS bizOrgCode,
MAX( CASE WHEN a.field_name = 'bizOrgName' THEN a.field_value END ) AS bizOrgName
FROM
`wl_form_instance` a
LEFT JOIN wl_source_scene wlss ON wlss.source_id = a.instance_id
GROUP BY
a.instance_id
) sa
<where>
<if
test=
"parentId != null and parentId !=''"
>
sa.parentId = #{parentId}
</if>
<if
test=
"bizOrgCode != null and bizOrgCode !=''"
>
and sa.bizOrgCode LIKE CONCAT(#{bizOrgCode},'%')
</if>
</where>
</select>
</mapper>
</mapper>
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