Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
b9db508d
提交
b9db508d
authored
1月 20, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(装备模块,盘存模块): 新增了返回库房,以及状态的过滤
新增了返回库房,以及状态的过滤
上级
5bb2528c
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
8 行删除
+11
-8
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+8
-7
WarehouseInspectionServiceImpl.java
...evreadmachine/service/WarehouseInspectionServiceImpl.java
+3
-1
没有找到文件。
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
b9db508d
...
@@ -22,6 +22,7 @@ import com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo;
...
@@ -22,6 +22,7 @@ import com.tykj.dev.device.library.subject.model.vo.QueryTheWarehouseVo;
import
com.tykj.dev.device.library.subject.model.vo.UpdatePostionMessageVO
;
import
com.tykj.dev.device.library.subject.model.vo.UpdatePostionMessageVO
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.library.subject.vo.*
;
import
com.tykj.dev.device.library.utils.DeviceNumberUtils
;
import
com.tykj.dev.device.library.utils.DeviceNumberUtils
;
import
com.tykj.dev.device.user.cache.StoreCache
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.cache.UnitsCache
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
...
@@ -93,6 +94,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -93,6 +94,9 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Resource
@Resource
private
DeviceLibraryPositionService
deviceLibraryPositionService
;
private
DeviceLibraryPositionService
deviceLibraryPositionService
;
@Resource
private
StoreCache
storeCache
;
@Override
@Override
@UpdateCache
@UpdateCache
public
DeviceLibrary
addEntity
(
DeviceLibrary
deviceLibraryEntity
)
{
public
DeviceLibrary
addEntity
(
DeviceLibrary
deviceLibraryEntity
)
{
...
@@ -1304,13 +1308,6 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1304,13 +1308,6 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
DeviceLibrarySelectVo
deviceLibrarySelectVo
=
new
DeviceLibrarySelectVo
();
DeviceLibrarySelectVo
deviceLibrarySelectVo
=
new
DeviceLibrarySelectVo
();
BeanUtils
.
copyProperties
(
queryTheWarehouseVo
,
deviceLibrarySelectVo
);
BeanUtils
.
copyProperties
(
queryTheWarehouseVo
,
deviceLibrarySelectVo
);
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
getPredicateBuilder
(
deviceLibrarySelectVo
);
// Specification<DeviceLibrary> or = null;
// if (deviceLibrarySelectVo.getNonStorageLocationId()!=null){
//
// or = predicateBuilder.build().or(getPredicateBuilder2(deviceLibrarySelectVo).build());
// }else {
// or = predicateBuilder.build();
// }
StopWatch
stopWatch
=
new
StopWatch
(
"条件查询结果集"
);
StopWatch
stopWatch
=
new
StopWatch
(
"条件查询结果集"
);
stopWatch
.
start
();
stopWatch
.
start
();
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAll
(
predicateBuilder
.
build
());
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
findAll
(
predicateBuilder
.
build
());
...
@@ -1376,11 +1373,15 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -1376,11 +1373,15 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
collect
.
stream
().
map
(
DeviceLibrary:
:
getName
).
distinct
().
collect
(
Collectors
.
toList
());
collect
.
stream
().
map
(
DeviceLibrary:
:
getName
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
ownUnits
=
List
<
String
>
ownUnits
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getOwnUnit
).
distinct
().
collect
(
Collectors
.
toList
());
collect
.
stream
().
map
(
DeviceLibrary:
:
getOwnUnit
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Integer
>
storageLocationIds
=
collect
.
stream
().
map
(
DeviceLibrary:
:
getStorageLocationId
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Integer
,
String
>
idMap
=
storeCache
.
getIdMap
();
map
.
put
(
"allVOPage"
,
allVOPage
);
map
.
put
(
"allVOPage"
,
allVOPage
);
map
.
put
(
"models"
,
models
);
map
.
put
(
"models"
,
models
);
map
.
put
(
"seqNumberList"
,
seqNumberList
);
map
.
put
(
"seqNumberList"
,
seqNumberList
);
map
.
put
(
"names"
,
names
);
map
.
put
(
"names"
,
names
);
map
.
put
(
"ownUnits"
,
ownUnits
);
map
.
put
(
"ownUnits"
,
ownUnits
);
map
.
put
(
"storageLocation"
,
storageLocationIds
.
stream
().
map
(
integer
->
new
StorageLocationVo
(
integer
,
idMap
.
getOrDefault
(
integer
,
null
)))
.
collect
(
Collectors
.
toList
()));
return
map
;
return
map
;
}
}
...
...
dev-readmachine/src/main/java/com/tykj/dev/readmachine/devreadmachine/service/WarehouseInspectionServiceImpl.java
浏览文件 @
b9db508d
...
@@ -106,9 +106,11 @@ public class WarehouseInspectionServiceImpl implements WarehouseInspectionServic
...
@@ -106,9 +106,11 @@ public class WarehouseInspectionServiceImpl implements WarehouseInspectionServic
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
Specifications
.
and
();
PredicateBuilder
<
DeviceLibrary
>
predicateBuilder
=
Specifications
.
and
();
predicateBuilder
.
eq
(
"ownUnit"
,
currentUserUnitName
);
predicateBuilder
.
eq
(
"ownUnit"
,
currentUserUnitName
);
predicateBuilder
.
eq
(
"locationUnit"
,
currentUserUnitName
);
predicateBuilder
.
eq
(
"locationUnit"
,
currentUserUnitName
);
List
<
Integer
>
statusList
=
new
ArrayList
<>(
Arrays
.
asList
(
5
,
11
,
12
));
List
<
DeviceLibrary
>
allDevices
=
deviceLibraryService
.
findAllDevices
().
stream
()
List
<
DeviceLibrary
>
allDevices
=
deviceLibraryService
.
findAllDevices
().
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
currentUserUnitName
)
.
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
currentUserUnitName
)
&&
deviceLibrary
.
getLocationUnit
().
equals
(
currentUserUnitName
)).
collect
(
Collectors
.
toList
());
&&
deviceLibrary
.
getLocationUnit
().
equals
(
currentUserUnitName
)
&&
!
statusList
.
contains
(
deviceLibrary
.
getLifeStatus
())).
collect
(
Collectors
.
toList
());
allDevices
.
forEach
(
deviceLibrary
->
deviceLibrary
.
setStatus
(
0
));
allDevices
.
forEach
(
deviceLibrary
->
deviceLibrary
.
setStatus
(
0
));
return
allDevices
;
return
allDevices
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论