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
f834145f
Commit
f834145f
authored
Mar 14, 2023
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改八大类树接口
parent
6a5302c8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
13 deletions
+67
-13
EquipmentClassifityEnum.java
...os/boot/module/tzs/api/enums/EquipmentClassifityEnum.java
+4
-2
IEquipmentCategoryService.java
...oot/module/tzs/api/service/IEquipmentCategoryService.java
+1
-1
EquipmentCategoryController.java
...odule/tzs/biz/controller/EquipmentCategoryController.java
+3
-2
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+13
-8
equipCategory.json
...module-tzs-biz/src/main/resources/json/equipCategory.json
+46
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/EquipmentClassifityEnum.java
View file @
f834145f
...
...
@@ -22,9 +22,11 @@ public enum EquipmentClassifityEnum {
YLGDYJ
(
"压力管道元件"
,
"7000"
),
YLGD
(
"压力管道"
,
"8000"
),
//树类型
BDLS
(
"八大类树"
,
"eightCategory"
),
//设备认领状态
SBRLZT
(
"设备认领状态"
,
"rlzt"
);
SBRLZT
(
"设备认领状态"
,
"rlzt"
),
BDLS
(
"八大类树"
,
"eightCategory"
),
RENLING
(
"认领"
,
"renLing"
);
private
String
name
;
private
String
code
;
public
static
Map
<
String
,
String
>
getName
=
new
HashMap
<>();
...
...
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IEquipmentCategoryService.java
View file @
f834145f
...
...
@@ -14,7 +14,7 @@ import java.util.Map;
*/
public
interface
IEquipmentCategoryService
{
List
<
Map
<
String
,
Object
>>
equipTree
();
List
<
Map
<
String
,
Object
>>
equipTree
(
String
type
);
Page
equipClaimOverview
();
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/EquipmentCategoryController.java
View file @
f834145f
...
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.tzs.api.service.IEquipmentCategoryService;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.EquipmentCategoryServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
liquibase.pro.packaged.S
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -161,8 +162,8 @@ public class EquipmentCategoryController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备八大类列表树"
,
notes
=
"设备八大类列表树"
)
@GetMapping
(
value
=
"/equipTree"
)
public
ResponseModel
<
Object
>
equipTree
()
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
equipTree
());
public
ResponseModel
<
Object
>
equipTree
(
String
type
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
equipTree
(
type
));
}
/**
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
f834145f
...
...
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.*
;
...
...
@@ -60,15 +61,19 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
@Override
public
List
<
Map
<
String
,
Object
>>
equipTree
()
{
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
equipCategory
);
List
<
Map
<
String
,
Object
>>
mapList
=
resourceJson
.
get
(
EquipmentClassifityEnum
.
BDLS
.
getCode
());
public
List
<
Map
<
String
,
Object
>>
equipTree
(
String
type
)
{
List
<
Map
<
String
,
Object
>>
menus
=
new
ArrayList
<>();
for
(
Map
map
:
mapList
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"instanceName"
,
map
.
get
(
"name"
));
resultMap
.
put
(
"instanceId"
,
map
.
get
(
"code"
));
menus
.
add
(
resultMap
);
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
equipCategory
);
Map
<
String
,
String
>
getCode
=
EquipmentClassifityEnum
.
getCode
;
if
(!
ValidationUtil
.
isEmpty
(
type
))
{
String
code
=
getCode
.
get
(
type
);
List
<
Map
<
String
,
Object
>>
mapList
=
resourceJson
.
get
(
code
);
for
(
Map
map
:
mapList
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"instanceName"
,
map
.
get
(
"name"
));
resultMap
.
put
(
"instanceId"
,
map
.
get
(
"code"
));
menus
.
add
(
resultMap
);
}
}
return
menus
;
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/json/equipCategory.json
View file @
f834145f
...
...
@@ -40,5 +40,50 @@
"code"
:
"9000"
,
"image"
:
"upload/tzs/common/image/总览索道.png"
}
],
"renLing"
:
[
{
"name"
:
"电梯"
,
"code"
:
"3000"
},
{
"name"
:
"起重机械"
,
"code"
:
"4000"
},
{
"name"
:
"场内机动车辆"
,
"code"
:
"5000"
},
{
"name"
:
"锅炉"
,
"code"
:
"1000"
},
{
"name"
:
"压力容器"
,
"code"
:
"2000"
},
{
"name"
:
"压力管道"
,
"code"
:
"8000"
},
{
"name"
:
"大型游乐设施"
,
"code"
:
"6000"
},
{
"name"
:
"客运索道"
,
"code"
:
"9000"
}
]
}
\ No newline at end of file
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