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
f4b84b1f
Commit
f4b84b1f
authored
Aug 19, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):设备管理页面左侧树调整
parent
dbd649f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
27 deletions
+79
-27
ZLDPStatisticsController.java
...le/statistcs/biz/controller/ZLDPStatisticsController.java
+12
-0
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+29
-0
JsonUtils.java
...ejoin/amos/boot/module/statistcs/biz/utils/JsonUtils.java
+22
-0
equipCategory.json
...statistics-biz/src/main/resources/json/equipCategory.json
+0
-0
equipCategory.json
...module-ymt-biz/src/main/resources/json/equipCategory.json
+16
-27
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/ZLDPStatisticsController.java
View file @
f4b84b1f
...
...
@@ -136,4 +136,16 @@ public class ZLDPStatisticsController {
public
ResponseModel
<
List
<
EquCategoryVo
>>
getEquCategoryTree
(
@RequestBody
DPFilterParamForDetailDto
paramDto
){
return
ResponseHelper
.
buildResponse
(
statisticsService
.
getEquCategoryList
(
paramDto
.
getTreeValue
()));
}
/**
* 设备八大类列表树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备八大类列表树"
,
notes
=
"设备八大类列表树"
)
@GetMapping
(
value
=
"/equipTree"
)
public
ResponseModel
<
Object
>
equipTree
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticsService
.
equipTree
(
type
));
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
View file @
f4b84b1f
...
...
@@ -12,12 +12,14 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import
com.yeejoin.amos.boot.module.common.api.entity.AlertStatistics
;
import
com.yeejoin.amos.boot.module.common.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.UserPostEnum
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.vo.EquCategoryVo
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.compress.utils.Lists
;
...
...
@@ -37,6 +39,8 @@ import org.elasticsearch.search.aggregations.Aggregations;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.sort.SortOrder
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -71,6 +75,9 @@ public class ZLDPStatisticsServiceImpl {
// 设备纳管 纳管:true 未纳管:false
public
static
final
String
IS_INTO_MANAGEMENT
=
"IS_INTO_MANAGEMENT"
;
@Value
(
"classpath:/json/equipCategory.json"
)
private
Resource
equipCategory
;
public
ZLDPStatisticsServiceImpl
(
ZLStatisticsMapper
screenMapper
,
DataDictionaryServiceImpl
iDataDictionaryService
,
AlertStatisticsMapper
alertStatisticsMapper
,
RestHighLevelClient
restHighLevelClient
,
StCommonServiceImpl
stCommonService
,
EquipmentCategoryMapper
equipmentCategoryMapper
)
{
this
.
screenMapper
=
screenMapper
;
this
.
iDataDictionaryService
=
iDataDictionaryService
;
...
...
@@ -1036,4 +1043,26 @@ public class ZLDPStatisticsServiceImpl {
.
map
(
dto
->
new
EquCategoryVo
(
dto
.
getName
(),
dto
.
getCode
(),
null
))
.
collect
(
Collectors
.
toList
());
}
public
List
<
Map
<
String
,
Object
>>
equipTree
(
String
type
)
{
List
<
Map
<
String
,
Object
>>
menus
=
new
ArrayList
<>();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
equipCategory
);
List
<
Map
<
String
,
Object
>>
mapList
;
if
(
ValidationUtil
.
isEmpty
(
type
))
{
mapList
=
resourceJson
.
get
(
EquipmentClassifityEnum
.
BDLS
.
getCode
());
}
else
{
if
(
"QTBF"
.
equals
(
type
))
{
type
=
"superviseBusiness"
;
}
mapList
=
resourceJson
.
get
(
type
)
==
null
?
resourceJson
.
get
(
EquipmentClassifityEnum
.
BDLS
.
getCode
())
:
resourceJson
.
get
(
type
);
}
for
(
Map
map
:
mapList
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"instanceName"
,
map
.
get
(
"name"
));
resultMap
.
put
(
"instanceId"
,
map
.
get
(
"code"
));
resultMap
.
put
(
"image"
,
map
.
get
(
"imageUrl"
));
menus
.
add
(
resultMap
);
}
return
menus
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/utils/JsonUtils.java
0 → 100644
View file @
f4b84b1f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
utils
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.core.io.Resource
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.Map
;
public
class
JsonUtils
{
//将json文件转化为Map<list<Map<>>>
public
static
Map
getResourceJson
(
Resource
resource
)
{
String
json
=
null
;
try
{
json
=
IOUtils
.
toString
(
resource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
resource
+
"json文件转化失败"
);
}
return
JSONObject
.
parseObject
(
json
,
Map
.
class
);
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/equipCategory.json
0 → 100644
View file @
f4b84b1f
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/resources/json/equipCategory.json
View file @
f4b84b1f
...
...
@@ -35,28 +35,6 @@
"type"
:
"vehicle"
},
{
"name"
:
"大型游乐设施"
,
"code"
:
"6000"
,
"image"
:
"upload/tzs/common/image/总览游乐设施.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管游乐设施.png"
,
"waitClaim"
:
"0"
,
"alreadyClaim"
:
"0"
,
"refuseClaim"
:
"0"
,
"sum"
:
"0"
,
"type"
:
"rides"
},
{
"name"
:
"客运索道"
,
"code"
:
"9000"
,
"image"
:
"upload/tzs/common/image/总览索道.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管索道.png"
,
"waitClaim"
:
"0"
,
"alreadyClaim"
:
"0"
,
"refuseClaim"
:
"0"
,
"sum"
:
"0"
,
"type"
:
"ropeway"
},
{
"name"
:
"锅炉"
,
"code"
:
"1000"
,
"image"
:
"upload/tzs/common/image/总览锅炉.png"
,
...
...
@@ -90,15 +68,26 @@
"type"
:
"pipeline"
},
{
"name"
:
"气瓶"
,
"code"
:
"2300"
,
"image"
:
"upload/tzs/common/image/总览压力容器.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管压力容器.png"
,
"name"
:
"大型游乐设施"
,
"code"
:
"6000"
,
"image"
:
"upload/tzs/common/image/总览游乐设施.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管游乐设施.png"
,
"waitClaim"
:
"0"
,
"alreadyClaim"
:
"0"
,
"refuseClaim"
:
"0"
,
"sum"
:
"0"
,
"type"
:
"rides"
},
{
"name"
:
"客运索道"
,
"code"
:
"9000"
,
"image"
:
"upload/tzs/common/image/总览索道.png"
,
"imageUrl"
:
"upload/tzs/common/image/监管索道.png"
,
"waitClaim"
:
"0"
,
"alreadyClaim"
:
"0"
,
"refuseClaim"
:
"0"
,
"sum"
:
"0"
,
"type"
:
"
cylinder
"
"type"
:
"
ropeway
"
}
],
"__other__"
:
"监管业务使用"
,
...
...
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