Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
ab9f7b9c
提交
ab9f7b9c
authored
1月 11, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(装备模块,3D模块): 修改查询不到库房id为null的bug
修改查询不到库房id为null的bug
上级
8267e085
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
26 行增加
和
7 行删除
+26
-7
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+20
-7
QueryTheWarehouseVo.java
.../device/library/subject/model/vo/QueryTheWarehouseVo.java
+3
-0
DeviceLibrarySelectVo.java
.../dev/device/library/subject/vo/DeviceLibrarySelectVo.java
+3
-0
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
ab9f7b9c
...
...
@@ -1184,7 +1184,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
if
(!
CollectionUtils
.
isEmpty
(
deviceIds
)){
//添加装备日志
deviceIds
.
forEach
(
integer
->
{
if
(
updateStorageLocationVo
.
getStorageLocationId
()
!=
getOne
(
integer
).
getStorageLocationId
(
)){
if
(
!
updateStorageLocationVo
.
getStorageLocationId
().
equals
(
getOne
(
integer
).
getStorageLocationId
()
)){
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
integer
,
"将存放位置修改为"
+
updateStorageLocationVo
.
getStorageLocation
(),
null
,
userId
);
deviceLogDtos
.
add
(
deviceLogDto
);
...
...
@@ -1284,7 +1284,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
DeviceLibrarySelectVo
deviceLibrarySelectVo
=
new
DeviceLibrarySelectVo
();
BeanUtils
.
copyProperties
(
queryTheWarehouseVo
,
deviceLibrarySelectVo
);
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAll
(
predicateBuilder
.
build
());
Specification
<
DeviceLibrary
>
or
=
predicateBuilder
.
build
().
or
(
getPredicateBuilder2
(
deviceLibrarySelectVo
.
getNonStorageLocationId
()).
build
());
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAll
(
or
);
deviceLibraries
.
forEach
(
DeviceLibrary:
:
setConfigName
);
//拿到所有的装备id
List
<
Integer
>
deviceIds
=
deviceLibraries
.
stream
().
map
(
DeviceLibrary:
:
getId
).
collect
(
Collectors
.
toList
());
...
...
@@ -1520,15 +1522,26 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
//新增装备的形态
predicateBuilder
.
eq
(
deviceLibrarySelectVo
.
getType
()
!=
null
,
"type"
,
deviceLibrarySelectVo
.
getType
());
//新增库房集合查询
if
(
deviceLibrarySelectVo
.
getStorageLocationIds
()
!=
null
){
predicateBuilder
.
notIn
(
"storageLocationId"
,
deviceLibrarySelectVo
.
getStorageLocationIds
().
toArray
(
new
Integer
[]{}));
}
//
if (deviceLibrarySelectVo.getStorageLocationIds() != null){
//
predicateBuilder.notIn("storageLocationId",
//
deviceLibrarySelectVo.getStorageLocationIds().toArray(new Integer[]{}));
//
}
predicateBuilder
.
ne
(
deviceLibrarySelectVo
.
getNonStorageLocationId
()
!=
null
,
"storageLocationId"
,
deviceLibrarySelectVo
.
getNonStorageLocationId
());
}
return
predicateBuilder
;
}
/**
* 查询库房id为null 取反
* @param nonStorageLocationId 库房id
* @return PredicateBuilder
*/
private
PredicateBuilder
<
DeviceLibrary
>
getPredicateBuilder2
(
Integer
nonStorageLocationId
)
{
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
Specifications
.
and
();
predicateBuilder
.
eq
(
nonStorageLocationId
!=
null
,
"storageLocationId"
,
null
);
return
predicateBuilder
;
}
private
List
<
String
>
getAllModel
()
{
List
<
DeviceLibrary
>
list
=
deviceLibraryDao
.
findAll
();
Set
<
String
>
s
=
new
HashSet
<>();
...
...
dev-library/src/main/java/com/tykj/dev/device/library/subject/model/vo/QueryTheWarehouseVo.java
浏览文件 @
ab9f7b9c
...
...
@@ -36,4 +36,7 @@ public class QueryTheWarehouseVo extends CustomPage {
@ApiModelProperty
(
value
=
"出库"
)
private
Integer
out
;
@ApiModelProperty
(
value
=
"库房id"
)
private
Integer
nonStorageLocationId
;
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibrarySelectVo.java
浏览文件 @
ab9f7b9c
...
...
@@ -140,4 +140,7 @@ public class DeviceLibrarySelectVo extends CustomPage {
@ApiModelProperty
(
value
=
"库房ids"
)
private
List
<
Integer
>
storageLocationIds
;
@ApiModelProperty
(
value
=
"库房id"
)
private
Integer
nonStorageLocationId
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论