Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7de555d2
由
zshaohui
编写于
2025-05-27 16:12:00 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.虚拟仓设备和库位展示bug修改
1 个父辈
d9d16f41
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
53 行增加
和
41 行删除
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
查看文件 @
7de555d
...
...
@@ -6,10 +6,7 @@ import com.neotel.smfcore.common.bean.PageData;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.csv.CsvReader
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.FileUtil
;
import
com.neotel.smfcore.common.utils.PointUtil
;
import
com.neotel.smfcore.common.utils.QueryHelp
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.common.utils.*
;
import
com.neotel.smfcore.core.barcode.enums.BARCODE_SOURCE
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.util.DataCache
;
...
...
@@ -88,9 +85,8 @@ public class StorageController {
@GetMapping
@PreAuthorize
(
"@el.check('storage:list')"
)
public
PageData
<
StorageDto
>
query
(
StorageQueryCriteria
criteria
,
Pageable
pageable
){
List
<
String
>
storageIdList
=
new
ArrayList
<>();
Collection
<
Storage
>
storages
=
dataCache
.
getAllStorage
().
values
();
String
pageType
=
criteria
.
getPageType
();
/*List<String> storageIdList = new ArrayList<>();
for (Storage storage : storages) {
if (BARCODE_SOURCE.VIRTUAL.equals(pageType)){
if (!storage.isVirtual()){
...
...
@@ -103,8 +99,30 @@ public class StorageController {
}
storageIdList.add(storage.getId());
}
criteria
.
setStorageIdList
(
storageIdList
);
Query
query
=
QueryHelp
.
getQuery
(
criteria
);
criteria.setStorageIdList(storageIdList);*/
Query
query
=
QueryHelp
.
getQuery
(
criteria
);
List
<
String
>
storageIdList
=
criteria
.
getStorageIdList
();
if
(
storageIdList
==
null
||
storageIdList
.
isEmpty
())
{
List
<
String
>
notFindStorageId
=
new
ArrayList
<>();
Collection
<
Storage
>
storages
=
dataCache
.
getAllStorage
().
values
();
String
pageType
=
criteria
.
getPageType
();
for
(
Storage
storage
:
storages
)
{
if
(
BARCODE_SOURCE
.
VIRTUAL
.
equals
(
pageType
))
{
if
(!
storage
.
isVirtual
())
{
notFindStorageId
.
add
(
storage
.
getId
());
}
}
else
{
if
(
storage
.
isVirtual
())
{
notFindStorageId
.
add
(
storage
.
getId
());
}
}
}
if
(!
notFindStorageId
.
isEmpty
())
{
query
.
addCriteria
(
Criteria
.
where
(
"id"
).
nin
(
notFindStorageId
));
}
}
PageData
<
Storage
>
pages
=
storageManager
.
findByPage
(
query
,
pageable
);
List
<
StorageDto
>
StorageDtos
=
storageMapper
.
toDto
(
pages
.
getContent
());
StorageDtos
=
updateDtos
(
StorageDtos
);
...
...
@@ -179,8 +197,7 @@ public class StorageController {
List
<
Storage
>
allStorages
=
storageManager
.
findAll
();
List
<
Storage
>
myStorages
=
new
ArrayList
<>();
for
(
Storage
s
:
allStorages
)
{
for
(
Storage
s
:
allStorages
)
{
if
(
BARCODE_SOURCE
.
VIRTUAL
.
equals
(
type
)){
if
(!
s
.
isVirtual
()){
continue
;
...
...
@@ -190,8 +207,9 @@ public class StorageController {
continue
;
}
}
if
(
mygroups
!=
null
&&
!
mygroups
.
isEmpty
())
{
if
(
mygroups
.
contains
(
s
.
getGroupId
()))
{
String
storageGroupId
=
s
.
getGroupId
();
if
(
StringUtils
.
isNotEmpty
(
storageGroupId
)){
if
(
mygroups
.
contains
(
storageGroupId
))
{
myStorages
.
add
(
s
);
}
}
else
{
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
查看文件 @
7de555d
...
...
@@ -84,44 +84,38 @@ public class StoragePosController {
@GetMapping
@PreAuthorize
(
"@el.check('storagePos:list')"
)
public
PageData
<
StoragePosDto
>
query
(
StoragePosQueryCriteria
criteria
,
Pageable
pageable
)
{
// if(criteria.getBlurry().startsWith("test1")){
// String mid=criteria.getBlurry().replace("test1","");
// SiemensApi.getMaterialLot(1,"1","storage1",mid);
// }else if(criteria.getBlurry().startsWith("test2")){
// String mid=criteria.getBlurry().replace("test2","");
// SiemensApi.processMaterialLot(1,"1","storage1",mid);
// }
// SiemensApi.getMaterialLot(1,"1","aaa","maid");
if
(
criteria
.
getStorageIdList
()
!=
null
&&
criteria
.
getStorageIdList
().
contains
(
"0"
))
{
criteria
.
setStorageIdList
(
null
);
}
List
<
String
>
storageIdList
=
new
ArrayList
<>();
List
<
String
>
groupStorageIdList
=
QueryHelp
.
getGroupStorageIdList
(
criteria
.
getStorageIdList
());
if
(
groupStorageIdList
!=
null
&&
!
groupStorageIdList
.
isEmpty
()){
for
(
String
groupId
:
groupStorageIdList
)
{
Storage
storage
=
dataCache
.
getStorageById
(
groupId
);
if
(
BARCODE_SOURCE
.
VIRTUAL
.
equals
(
criteria
.
getType
())){
if
(
storage
.
isVirtual
()){
storageIdList
.
add
(
groupId
);
}
}
else
{
if
(!
storage
.
isVirtual
()){
storageIdList
.
add
(
groupId
);
}
}
}
}
criteria
.
setStorageIdList
(
storageIdList
);
String
blurry
=
criteria
.
getBlurry
();
if
(!
Strings
.
isNullOrEmpty
(
blurry
)){
//去除库位中的SOxxxx
blurry
=
blurry
.
substring
(
blurry
.
indexOf
(
"-"
)+
1
);
criteria
.
setBlurry
(
blurry
);
}
Query
query
=
QueryHelp
.
getQuery
(
criteria
);
List
<
String
>
storageIdList
=
criteria
.
getStorageIdList
();
if
(
storageIdList
==
null
||
storageIdList
.
isEmpty
())
{
List
<
String
>
notFindStorageId
=
new
ArrayList
<>();
Collection
<
Storage
>
storages
=
dataCache
.
getAllStorage
().
values
();
String
pageType
=
criteria
.
getType
();
for
(
Storage
storage
:
storages
)
{
if
(
BARCODE_SOURCE
.
VIRTUAL
.
equals
(
pageType
))
{
if
(!
storage
.
isVirtual
())
{
notFindStorageId
.
add
(
storage
.
getId
());
}
}
else
{
if
(
storage
.
isVirtual
())
{
notFindStorageId
.
add
(
storage
.
getId
());
}
}
}
if
(!
notFindStorageId
.
isEmpty
())
{
query
.
addCriteria
(
Criteria
.
where
(
"storageId"
).
nin
(
notFindStorageId
));
}
}
PageData
<
StoragePos
>
pages
=
storagePosManager
.
findByPage
(
query
,
pageable
);
List
<
StoragePosDto
>
StoragePosDtos
=
storagePosMapper
.
toDto
(
pages
.
getContent
());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论