Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
279685fd
提交
279685fd
authored
7月 25, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[装备vo]新增存储位置,以及模糊字段
[装备controller]新增了所属所在单位的排序
上级
a380226e
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
42 行增加
和
11 行删除
+42
-11
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+34
-11
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+2
-0
DeviceLibrarySelectVo.java
.../dev/device/library/subject/vo/DeviceLibrarySelectVo.java
+6
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
279685fd
...
...
@@ -173,8 +173,15 @@ public class DeviceLibraryController {
.
collect
(
Collectors
.
toList
());
deviceLibraries
.
removeAll
(
deviceLibraryEntities
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"stockDevices"
,
deviceLibraryEntities
);
map
.
put
(
"notInStockDevices"
,
deviceLibraries
);
// map.put("stockDevices",deviceLibraryEntities);
// map.put("notInStockDevices",deviceLibraries);
//在库排序
List
<
DeviceLibrary
>
stockDevices
=
deviceLibraries
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getModel
)).
collect
(
Collectors
.
toList
());
// map.put("stockDevices",deviceLibraryEntities);
map
.
put
(
"stockDevices"
,
stockDevices
);
//不在库排序
List
<
DeviceLibrary
>
notInStockDevices
=
deviceLibraries
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getModel
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"notInStockDevices"
,
notInStockDevices
);
return
ResultUtil
.
success
(
map
);
}
...
...
@@ -221,8 +228,10 @@ public class DeviceLibraryController {
List
<
String
>
models
=
new
ArrayList
<>();
List
<
String
>
names
=
new
ArrayList
<>();
// Set<String> names = new HashSet<>();
Set
<
String
>
ownUnits
=
new
HashSet
<>();
Set
<
String
>
locationUnits
=
new
HashSet
<>();
List
<
String
>
ownUnits
=
new
ArrayList
<>();
// Set<String> ownUnits = new HashSet<>();
List
<
String
>
locationUnits
=
new
ArrayList
<>();
// Set<String> locationUnits = new HashSet<>();
Set
<
String
>
storageLocation
=
new
HashSet
<>();
resultList
.
forEach
(
deviceVo
->
{
deviceVo
.
setConfigName
();
...
...
@@ -242,8 +251,12 @@ public class DeviceLibraryController {
map
.
put
(
"models"
,
modelToSort
);
List
<
String
>
nameList
=
names
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
s
->
s
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"names"
,
nameList
);
map
.
put
(
"ownUnits"
,
ownUnits
);
map
.
put
(
"locationUnits"
,
locationUnits
);
// map.put("ownUnits",ownUnits);
// map.put("locationUnits",locationUnits);
List
<
String
>
finalOwnUnits
=
ownUnits
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
String:
:
toString
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"ownUnits"
,
finalOwnUnits
);
List
<
String
>
finalLocationUnits
=
locationUnits
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
String:
:
toString
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"locationUnits"
,
finalLocationUnits
);
map
.
put
(
"lifeStatus"
,
status
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
lifeStatusMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
map
.
put
(
"storageLocation"
,
storageLocation
);
// System.out.println("222");
...
...
@@ -259,8 +272,11 @@ public class DeviceLibraryController {
Boolean
hasLocationUnitDim
=
deviceLibrarySelectVo
.
getLocationUnitDim
()!=
null
;
Boolean
hasOwnUnitDim
=
deviceLibrarySelectVo
.
getOwnUnitDim
()!=
null
;
Boolean
hasLifeStatusDim
=
deviceLibrarySelectVo
.
getLifeStatusDim
()!=
null
;
//添加存储位置的查询
Boolean
hasStorageLocationDim
=
deviceLibrarySelectVo
.
getStorageLocationDim
()
!=
null
;
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
DeviceLibrary
>
resultList
=
deviceLibraryService
.
getList
(
deviceLibrarySelectVo
);
resultList
.
forEach
(
DeviceLibrary:
:
setConfigName
);
if
(
hasModelDim
||
hasLifeStatusDim
||
hasLocationUnitDim
||
hasNameDim
||
hasOwnUnitDim
||
hasSeqDim
)
{
resultList
=
resultList
.
stream
().
filter
(
deviceLibrary
->
{
...
...
@@ -270,7 +286,9 @@ public class DeviceLibraryController {
Boolean
containLocationUnitDim
=
!
hasLocationUnitDim
||
deviceLibrary
.
getLocationUnit
().
contains
(
deviceLibrarySelectVo
.
getLocationUnitDim
());
Boolean
containOwnUnitDim
=
!
hasOwnUnitDim
||
deviceLibrary
.
getOwnUnit
().
contains
(
deviceLibrarySelectVo
.
getOwnUnitDim
());
Boolean
containLifeStatusDim
=
!
hasLifeStatusDim
||
deviceLibrary
.
getLifeStatusName
().
contains
(
deviceLibrarySelectVo
.
getLifeStatusDim
());
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containLocationUnitDim
&&
containOwnUnitDim
&&
containLifeStatusDim
;
Boolean
containStorageLocationDim
=
!
hasStorageLocationDim
||
deviceLibrary
.
getStorageLocation
().
contains
(
deviceLibrarySelectVo
.
getStorageLocationDim
());
return
containModelDim
&&
containNameDim
&&
containSeqDim
&&
containLocationUnitDim
&&
containOwnUnitDim
&&
containLifeStatusDim
&&
containStorageLocationDim
;
}).
collect
(
Collectors
.
toList
());
}
Map
<
Integer
,
DeviceLibrary
>
nodeCollect
=
...
...
@@ -318,8 +336,11 @@ public class DeviceLibraryController {
//排序
List
<
String
>
names
=
new
ArrayList
<>();
// Set<String> names = new HashSet<>();
Set
<
String
>
ownUnits
=
new
HashSet
<>();
Set
<
String
>
locationUnits
=
new
HashSet
<>();
List
<
String
>
ownUnits
=
new
ArrayList
<>();
// Set<String> ownUnits = new HashSet<>();
List
<
String
>
locationUnits
=
new
ArrayList
<>();
// Set<String> locationUnits = new HashSet<>();
Set
<
Integer
>
matchingRanges
=
new
HashSet
<>();
resultList
.
forEach
(
deviceVo
->
{
deviceVo
.
setConfigName
();
...
...
@@ -335,8 +356,10 @@ public class DeviceLibraryController {
map
.
put
(
"models"
,
modelToSort
);
List
<
String
>
nameList
=
names
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
String:
:
toString
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"names"
,
nameList
);
map
.
put
(
"ownUnits"
,
ownUnits
);
map
.
put
(
"locationUnits"
,
locationUnits
);
List
<
String
>
finalOwnUnits
=
ownUnits
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
String:
:
toString
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"ownUnits"
,
finalOwnUnits
);
List
<
String
>
finalLocationUnits
=
locationUnits
.
stream
().
distinct
().
sorted
(
Comparator
.
comparing
(
String:
:
toString
)).
collect
(
Collectors
.
toList
());
map
.
put
(
"locationUnits"
,
finalLocationUnits
);
map
.
put
(
"lifeStatus"
,
status
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
lifeStatusMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
map
.
put
(
"matchingRanges"
,
matchingRanges
.
stream
().
map
(
integer
->
new
LifeStatusVo
(
integer
,
matchingRangeMap
.
get
(
integer
))).
collect
(
Collectors
.
toList
()));
Page
<
DeviceLibrary
>
deviceLibraryEntities
=
PageUtil
.
getPerPage
(
deviceLibrarySelectVo
.
getPage
(),
deviceLibrarySelectVo
.
getSize
(),
containList
,
deviceLibrarySelectVo
.
getPageable
());
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
279685fd
...
...
@@ -792,6 +792,8 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
if
(
deviceLibrarySelectVo
.
getSeqInterval
()!=
null
&&
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceLibrarySelectVo
.
getSeqInterval
()).
size
()>
0
){
predicateBuilder
.
in
(
"seqNumber"
,
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceLibrarySelectVo
.
getSeqInterval
()));
}
//新增库房位置
predicateBuilder
.
eq
(
deviceLibrarySelectVo
.
getStorageLocation
()
!=
null
,
"storageLocation"
,
deviceLibrarySelectVo
.
getStorageLocation
());
}
return
predicateBuilder
;
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibrarySelectVo.java
浏览文件 @
279685fd
...
...
@@ -116,4 +116,10 @@ public class DeviceLibrarySelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"查询是否打印标签(有没有表面号)装备"
)
private
Integer
isPrint
;
@ApiModelProperty
(
value
=
"存储位置"
)
private
String
storageLocation
;
@ApiModelProperty
(
value
=
"存储位置的模糊查询字段"
)
private
String
storageLocationDim
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论