Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
1845c80c
由
张雷
编写于
2023-02-08 10:36:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
资产列表接口
1 个父辈
0d2b123c
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
9 行增加
和
5 行删除
fm-product/src/main/java/com/skua/modules/business/controller/AssetsController.java
fm-product/src/main/java/com/skua/modules/business/mapper/xml/AssetsMapper.xml
fm-product/src/main/java/com/skua/modules/business/vo/EquipmentTreeVO.java
fm-product/src/main/java/com/skua/modules/business/controller/AssetsController.java
查看文件 @
1845c80
...
...
@@ -81,9 +81,9 @@ public class AssetsController {
Result
<
List
<
EquipmentTreeVO
>>
result
=
new
Result
<>();
List
<
EquipmentTreeVO
>
resultData
=
new
LinkedList
<>();
for
(
TreeData
treeData
:
treeList
)
{
EquipmentTreeVO
vo
=
new
EquipmentTreeVO
(
treeData
.
getTitle
(),
treeData
.
getTitle
(),
"md-settings"
);
EquipmentTreeVO
vo
=
new
EquipmentTreeVO
(
treeData
.
getTitle
(),
treeData
.
getTitle
(),
"md-settings"
,
treeData
.
getExt
().
get
(
"code"
)
);
resultData
.
add
(
vo
);
vo
.
setChildren
(
treeData
.
getChildren
().
stream
().
map
(
v
->
new
EquipmentTreeVO
(
v
.
getTitle
(),
v
.
getKey
(),
"md-settings"
)).
collect
(
Collectors
.
toList
()));
vo
.
setChildren
(
treeData
.
getChildren
().
stream
().
map
(
v
->
new
EquipmentTreeVO
(
v
.
getTitle
(),
v
.
getKey
(),
"md-settings"
,
v
.
getExt
().
get
(
"code"
)
)).
collect
(
Collectors
.
toList
()));
}
result
.
setResult
(
resultData
);
result
.
setSuccess
(
true
);
...
...
fm-product/src/main/java/com/skua/modules/business/mapper/xml/AssetsMapper.xml
查看文件 @
1845c80
...
...
@@ -43,7 +43,7 @@
'0' AS parent_id,
ss.struct_name AS title,
'0' AS nodeType,
ss.struct_code
AS code,
''
AS code,
ss.sort_num AS sno
FROM
fm_twin_equip fe
...
...
@@ -70,7 +70,7 @@
e.struct_id AS parent_id,
e.equip_name AS title,
'1' AS nodeType,
e.equip_unit
AS code,
t.twin_id
AS code,
'1' AS sno
FROM
fm_twin_equip t
...
...
fm-product/src/main/java/com/skua/modules/business/vo/EquipmentTreeVO.java
查看文件 @
1845c80
...
...
@@ -17,12 +17,16 @@ public class EquipmentTreeVO {
@ApiModelProperty
(
value
=
"icon"
)
private
String
icon
;
@ApiModelProperty
(
value
=
"twinId"
)
private
String
twinId
;
@ApiModelProperty
(
value
=
"children"
)
private
List
<
EquipmentTreeVO
>
children
;
public
EquipmentTreeVO
(
String
name
,
String
value
,
String
icon
)
{
public
EquipmentTreeVO
(
String
name
,
String
value
,
String
icon
,
String
twinId
)
{
this
.
name
=
name
;
this
.
value
=
value
;
this
.
icon
=
icon
;
this
.
twinId
=
twinId
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论