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
1a89ecfb
Commit
1a89ecfb
authored
Feb 28, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):添加返回设备品种树第一个节点接口
parent
ee643c89
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+24
-6
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/EquipmentCategoryController.java
View file @
1a89ecfb
...
@@ -52,12 +52,7 @@ import java.io.File;
...
@@ -52,12 +52,7 @@ import java.io.File;
import
java.io.FileNotFoundException
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -182,6 +177,29 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -182,6 +177,29 @@ public class EquipmentCategoryController extends BaseController {
tree
.
add
(
menu
);
tree
.
add
(
menu
);
return
ResponseHelper
.
buildResponse
(
tree
);
return
ResponseHelper
.
buildResponse
(
tree
);
}
}
/**
* 返回设备品种树第一个节点
*
* @return
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类列表全部数据查询"
,
notes
=
"装备分类列表全部数据查询"
)
@GetMapping
(
value
=
"/firstNode"
)
public
ResponseModel
<
Object
>
firstNode
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
throws
Exception
{
if
(
ObjectUtils
.
isEmpty
(
code
)){
return
ResponseHelper
.
buildResponse
(
new
ArrayList
<>());
}
EquipmentCategory
root
=
equipmentCategoryServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
EquipmentCategory
>().
eq
(
EquipmentCategory:
:
getCode
,
code
));
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
Collection
<
EquipmentCategory
>
list
=
equipmentCategoryServiceImpl
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
root
.
getId
(),
list
,
EquipmentCategory
.
class
.
getName
(),
"getId"
,
0
,
"getName"
,
"getParentId"
,
null
,
"getCode"
);
return
ResponseHelper
.
buildResponse
(
menus
.
get
(
0
));
}
/**
/**
* 设备分类八大类
* 设备分类八大类
*
*
...
...
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