Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
Z
zhxf_java
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
葛齐林
zhxf_java
Commits
cd0126f0
Commit
cd0126f0
authored
May 20, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收藏夹接口调整
parent
90f2175f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
387 deletions
+38
-387
LiResourceController.java
...n/modules/liresource/controller/LiResourceController.java
+1
-1
LiEnshrineServiceImpl.java
...odules/lienshrine/service/impl/LiEnshrineServiceImpl.java
+30
-23
SysDictionary.java
...m/equipment/modules/sysdictionary/bean/SysDictionary.java
+4
-186
SysDictionaryModel.java
...pment/modules/sysdictionary/model/SysDictionaryModel.java
+2
-175
SysDictionaryMapper.xml
...in/resources/mapper/sysDictionary/SysDictionaryMapper.xml
+1
-2
No files found.
microservice-admin/src/main/java/com/devplatform/admin/modules/liresource/controller/LiResourceController.java
View file @
cd0126f0
...
...
@@ -471,7 +471,7 @@ public class LiResourceController extends AbstractController {
LiStationMapModel
mapModel
=
new
LiStationMapModel
();
List
<
LiStationMap
>
mapList
=
liStationMapService
.
getTreeList
(
mapModel
);
// 查询
子系统
字典项
// 查询
资源点类型
字典项
List
<
SysDictionary
>
dicList
=
sysDictionaryService
.
queryByPid
(
Constants
.
RESOURCE_TYPE
,
null
);
// 查询所有资源点
...
...
microservice-equipment/src/main/java/com/devplatform/equipment/modules/lienshrine/service/impl/LiEnshrineServiceImpl.java
View file @
cd0126f0
...
...
@@ -10,6 +10,7 @@ import com.devplatform.equipment.modules.liresource.bean.LiResource;
import
com.devplatform.equipment.modules.liresource.model.LiResourceModel
;
import
com.devplatform.equipment.modules.liresource.service.LiResourceService
;
import
com.devplatform.equipment.modules.listation.bean.LiStation
;
import
com.devplatform.equipment.modules.listation.model.LiStationModel
;
import
com.devplatform.equipment.modules.listation.service.LiStationService
;
import
com.devplatform.equipment.modules.listationmap.bean.LiStationMap
;
import
com.devplatform.equipment.modules.listationmap.model.LiStationMapModel
;
...
...
@@ -125,39 +126,42 @@ public class LiEnshrineServiceImpl extends MyBaseServiceImpl<LiEnshrineDao, LiEn
public
List
<
Map
<
String
,
Object
>>
queryDzdtByTreeList
(
LiStationMapModel
model
,
String
userId
)
{
// 电子地图首页,查询所有收藏夹----------
List
<
Map
<
String
,
Object
>>
nodes
=
new
ArrayList
<>();
LiStation
station
=
liStationService
.
getById
(
model
.
getStationId
());
Map
<
String
,
Object
>
root
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
station
),
Map
.
class
);
root
.
put
(
"name"
,
station
.
getStationName
());
root
.
put
(
"key"
,
UUID
.
randomUUID
());
root
.
put
(
"level"
,
3
);
List
<
Map
<
String
,
Object
>>
rootChild
=
new
ArrayList
<>();
LiStationModel
stationModel
=
new
LiStationModel
();
List
<
LiStation
>
stationList
=
liStationService
.
getTreeList
(
stationModel
);
// 查询该站点下站层地图
LiStationMapModel
mapModel
=
new
LiStationMapModel
();
mapModel
.
setStationId
(
model
.
getStationId
());
List
<
LiStationMap
>
list
=
liStationMapService
.
getTreeList
(
mapModel
);
// 查询资源点类型字典项
List
<
SysDictionary
>
dicList
=
sysDictionaryService
.
queryByPid
(
Constants
.
RESOURCE_TYPE
,
null
);
LiResourceModel
lrm
=
new
LiResourceModel
();
// 查出当前用户收藏的所有资源点
lrm
.
setCreateUserId
(
userId
);
// 当前站点的
lrm
.
setStationId
(
model
.
getStationId
());
// 模糊查询过滤资源点名字
lrm
.
setName
(
model
.
getResourceName
());
// 查出收藏的所有资源点
List
<
LiResource
>
resourceList
=
liResourceService
.
queryByEnshrine
(
lrm
);
// 查询子系统字典项
List
<
SysDictionary
>
dicList
=
new
ArrayList
<>();
dicList
=
sysDictionaryService
.
queryByPid
(
Constants
.
SUB_SYSTEM_ID
,
model
.
getStationId
());
stationList
.
forEach
((
liStation
)
->
{
Map
<
String
,
Object
>
root
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
liStation
),
Map
.
class
);
root
.
put
(
"name"
,
liStation
.
getStationName
());
root
.
put
(
"key"
,
UUID
.
randomUUID
());
root
.
put
(
"level"
,
3
);
List
<
Map
<
String
,
Object
>>
rootChild
=
new
ArrayList
<>();
for
(
LiStationMap
liStationMap
:
list
)
{
if
(
liStationMap
.
getStationId
().
equals
(
liStation
.
getId
())){
rootChild
=
setChildren
(
rootChild
,
liStationMap
,
dicList
,
resourceList
);
}
}
root
.
put
(
"children"
,
rootChild
);
for
(
LiStationMap
liStationMap
:
list
)
{
rootChild
=
setChildren
(
rootChild
,
liStationMap
,
dicList
,
resourceList
);
}
root
.
put
(
"children"
,
rootChild
);
if
(
rootChild
!=
null
&&
rootChild
.
size
()
>
0
)
{
nodes
.
add
(
root
);
}
if
(
rootChild
!=
null
&&
rootChild
.
size
()
>
0
)
{
nodes
.
add
(
root
);
}
});
return
nodes
;
}
...
...
@@ -182,9 +186,13 @@ public class LiEnshrineServiceImpl extends MyBaseServiceImpl<LiEnshrineDao, LiEn
mapDic
.
put
(
"level"
,
5
);
List
<
Map
<
String
,
Object
>>
childrenDic
=
new
ArrayList
<>();
for
(
LiResource
liResource
:
resourceList
){
if
(
dic
.
getValue
().
equals
(
liResource
.
getSubCode
())
&&
liStationMap
.
getId
().
equals
(
liResource
.
getTierId
()))
{
childrenDic
=
setDicChildren2
(
childrenDic
,
liResource
,(
liStationMap
.
getId
()
+
dic
.
getId
()));
Iterator
<
LiResource
>
iterator
=
resourceList
.
iterator
();
while
(
iterator
.
hasNext
())
{
LiResource
resource
=
iterator
.
next
();
if
(
dic
.
getId
().
equals
(
resource
.
getType
())
&&
liStationMap
.
getId
().
equals
(
resource
.
getTierId
()))
{
childrenDic
=
setDicChildren2
(
childrenDic
,
resource
,(
liStationMap
.
getId
()
+
dic
.
getId
()));
iterator
.
remove
();
}
}
num
+=
childrenDic
.
size
();
...
...
@@ -195,7 +203,6 @@ public class LiEnshrineServiceImpl extends MyBaseServiceImpl<LiEnshrineDao, LiEn
childrenStationMap
.
add
(
mapDic
);
}
}
mapStationMap
.
put
(
"children"
,
childrenStationMap
);
// 该站层下有收藏资源点才会显示
if
(
num
>
0
)
{
...
...
microservice-equipment/src/main/java/com/devplatform/equipment/modules/sysdictionary/bean/SysDictionary.java
View file @
cd0126f0
...
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
...
...
@@ -12,17 +14,13 @@ import java.util.List;
*/
@ApiModel
(
value
=
"数据字典表对象"
,
description
=
"数据字典表对象"
)
@TableName
(
"sys_dictionary"
)
@Data
public
class
SysDictionary
implements
Serializable
{
/** */
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键ID"
,
name
=
"keyId"
)
@TableId
/** 主键id*/
private
java
.
lang
.
String
keyId
;
@ApiModelProperty
(
value
=
"下拉框id"
,
name
=
"id"
)
/** 下拉框id*/
@TableId
private
java
.
lang
.
String
id
;
@ApiModelProperty
(
value
=
"字典项名称"
,
name
=
"name"
)
...
...
@@ -91,184 +89,4 @@ public class SysDictionary implements Serializable {
@TableField
(
exist
=
false
)
private
List
<
SysDictionary
>
children
;
public
String
getKeyId
()
{
return
keyId
;
}
public
void
setKeyId
(
String
keyId
)
{
this
.
keyId
=
keyId
;
}
/** 主键id的getter方法 */
public
String
getId
()
{
return
id
;
}
/** 主键id的setter方法 */
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/** 字典项名称的getter方法 */
public
String
getName
()
{
return
name
;
}
/** 字典项名称的setter方法 */
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/** 字典项值的getter方法 */
public
String
getValue
()
{
return
value
;
}
/** 字典项值的setter方法 */
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
/** 父id的getter方法 */
public
String
getParentId
()
{
return
parentId
;
}
/** 父id的setter方法 */
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
/** 备注的getter方法 */
public
String
getRemark
()
{
return
remark
;
}
/** 备注的setter方法 */
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/** 状态(1正常,0不可用)的getter方法 */
public
Integer
getStatus
()
{
return
status
;
}
/** 状态(1正常,0不可用)的setter方法 */
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/** 是否已删除(0未删除,1已删除)的getter方法 */
public
Integer
getDeleted
()
{
return
deleted
;
}
/** 是否已删除(0未删除,1已删除)的setter方法 */
public
void
setDeleted
(
Integer
deleted
)
{
this
.
deleted
=
deleted
;
}
/** 创建人的getter方法 */
public
String
getCreateUserId
()
{
return
createUserId
;
}
/** 创建人的setter方法 */
public
void
setCreateUserId
(
String
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
/** 创建时间的getter方法 */
public
java
.
util
.
Date
getCreateTime
()
{
return
createTime
;
}
/** 创建时间的setter方法 */
public
void
setCreateTime
(
java
.
util
.
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/** 修改人的getter方法 */
public
String
getUpdateUserId
()
{
return
updateUserId
;
}
/** 修改人的setter方法 */
public
void
setUpdateUserId
(
String
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
/** 修改时间的getter方法 */
public
java
.
util
.
Date
getUpdateTime
()
{
return
updateTime
;
}
/** 修改时间的setter方法 */
public
void
setUpdateTime
(
java
.
util
.
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/** 备用项1的getter方法 */
public
String
getByx1
()
{
return
byx1
;
}
/** 备用项1的setter方法 */
public
void
setByx1
(
String
byx1
)
{
this
.
byx1
=
byx1
;
}
/** 备用项2的getter方法 */
public
String
getByx2
()
{
return
byx2
;
}
/** 备用项2的setter方法 */
public
void
setByx2
(
String
byx2
)
{
this
.
byx2
=
byx2
;
}
/** 备用项3的getter方法 */
public
String
getByx3
()
{
return
byx3
;
}
/** 备用项3的setter方法 */
public
void
setByx3
(
String
byx3
)
{
this
.
byx3
=
byx3
;
}
public
String
getSysSign
()
{
return
sysSign
;
}
public
void
setSysSign
(
String
sysSign
)
{
this
.
sysSign
=
sysSign
;
}
public
Integer
getSortValue
()
{
return
sortValue
;
}
public
void
setSortValue
(
Integer
sortValue
)
{
this
.
sortValue
=
sortValue
;
}
public
List
<
SysDictionary
>
getChildren
()
{
return
children
;
}
public
void
setChildren
(
List
<
SysDictionary
>
children
)
{
this
.
children
=
children
;
}
public
String
getStationId
()
{
return
stationId
;
}
public
void
setStationId
(
String
stationId
)
{
this
.
stationId
=
stationId
;
}
}
microservice-equipment/src/main/java/com/devplatform/equipment/modules/sysdictionary/model/SysDictionaryModel.java
View file @
cd0126f0
package
com
.
devplatform
.
equipment
.
modules
.
sysdictionary
.
model
;
import
com.devplatform.equipment.common.model.BaseModel
;
import
lombok.Data
;
/**
* 数据字典表的Model <br>
*
* @author 代码生成器产生
*/
@Data
public
class
SysDictionaryModel
extends
BaseModel
{
/** 主键id*/
private
java
.
lang
.
String
keyId
;
/** 下拉框id*/
private
String
id
;
/** 字典项名称*/
private
String
name
;
...
...
@@ -45,176 +44,4 @@ public class SysDictionaryModel extends BaseModel {
private
Integer
sortValue
;
/** 线路id*/
private
String
stationId
;
public
String
getStationId
()
{
return
stationId
;
}
public
void
setStationId
(
String
stationId
)
{
this
.
stationId
=
stationId
;
}
public
String
getKeyId
()
{
return
keyId
;
}
public
void
setKeyId
(
String
keyId
)
{
this
.
keyId
=
keyId
;
}
/** 主键id的getter方法 */
public
String
getId
()
{
return
id
;
}
/** 主键id的setter方法 */
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/** 字典项名称的getter方法 */
public
String
getName
()
{
return
name
;
}
/** 字典项名称的setter方法 */
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/** 字典项值的getter方法 */
public
String
getValue
()
{
return
value
;
}
/** 字典项值的setter方法 */
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
/** 父id的getter方法 */
public
String
getParentId
()
{
return
parentId
;
}
/** 父id的setter方法 */
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
/** 备注的getter方法 */
public
String
getRemark
()
{
return
remark
;
}
/** 备注的setter方法 */
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/** 状态(1正常,0不可用)的getter方法 */
public
Integer
getStatus
()
{
return
status
;
}
/** 状态(1正常,0不可用)的setter方法 */
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/** 是否已删除(0未删除,1已删除)的getter方法 */
public
Integer
getDeleted
()
{
return
deleted
;
}
/** 是否已删除(0未删除,1已删除)的setter方法 */
public
void
setDeleted
(
Integer
deleted
)
{
this
.
deleted
=
deleted
;
}
/** 创建人的getter方法 */
public
String
getCreateUserId
()
{
return
createUserId
;
}
/** 创建人的setter方法 */
public
void
setCreateUserId
(
String
createUserId
)
{
this
.
createUserId
=
createUserId
;
}
/** 创建时间的getter方法 */
public
java
.
util
.
Date
getCreateTime
()
{
return
createTime
;
}
/** 创建时间的setter方法 */
public
void
setCreateTime
(
java
.
util
.
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/** 修改人的getter方法 */
public
String
getUpdateUserId
()
{
return
updateUserId
;
}
/** 修改人的setter方法 */
public
void
setUpdateUserId
(
String
updateUserId
)
{
this
.
updateUserId
=
updateUserId
;
}
/** 修改时间的getter方法 */
public
java
.
util
.
Date
getUpdateTime
()
{
return
updateTime
;
}
/** 修改时间的setter方法 */
public
void
setUpdateTime
(
java
.
util
.
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/** 备用项1的getter方法 */
public
String
getByx1
()
{
return
byx1
;
}
/** 备用项1的setter方法 */
public
void
setByx1
(
String
byx1
)
{
this
.
byx1
=
byx1
;
}
/** 备用项2的getter方法 */
public
String
getByx2
()
{
return
byx2
;
}
/** 备用项2的setter方法 */
public
void
setByx2
(
String
byx2
)
{
this
.
byx2
=
byx2
;
}
/** 备用项3的getter方法 */
public
String
getByx3
()
{
return
byx3
;
}
/** 备用项3的setter方法 */
public
void
setByx3
(
String
byx3
)
{
this
.
byx3
=
byx3
;
}
public
String
getSysSign
()
{
return
sysSign
;
}
public
void
setSysSign
(
String
sysSign
)
{
this
.
sysSign
=
sysSign
;
}
public
Integer
getSortValue
()
{
return
sortValue
;
}
public
void
setSortValue
(
Integer
sortValue
)
{
this
.
sortValue
=
sortValue
;
}
}
microservice-equipment/src/main/resources/mapper/sysDictionary/SysDictionaryMapper.xml
View file @
cd0126f0
...
...
@@ -3,7 +3,6 @@
<mapper
namespace=
"com.devplatform.equipment.modules.sysdictionary.dao.SysDictionaryDao"
>
<!-- Result Map -->
<resultMap
id=
"BaseResultMap"
type=
"com.devplatform.equipment.modules.sysdictionary.bean.SysDictionary"
>
<result
column=
"key_id"
property=
"keyId"
/>
<result
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"value"
property=
"value"
/>
...
...
@@ -25,7 +24,7 @@
<!-- sys_dictionary table all fields -->
<sql
id=
"Base_Column_List"
>
key_id,
id,name,value,parent_id,remark,status,deleted,create_user_id,create_time,update_user_id,update_time,byx1,byx2,byx3,sys_sign,sort_value,station_id
id,name,value,parent_id,remark,status,deleted,create_user_id,create_time,update_user_id,update_time,byx1,byx2,byx3,sys_sign,sort_value,station_id
</sql>
<!-- 公共查询条件 -->
...
...
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