Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ebdea481
由
LN
编写于
2025-03-12 17:23:40 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加13/15尺寸兼容
1 个父辈
23047cfc
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
51 行增加
和
5 行删除
src/main/java/com/neotel/smfcore/core/storage/enums/COMPATIBLE_TYPE.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
src/main/java/com/neotel/smfcore/core/storage/service/po/Storage.java
src/main/java/com/neotel/smfcore/core/storage/enums/COMPATIBLE_TYPE.java
查看文件 @
ebdea48
...
...
@@ -16,7 +16,11 @@ public enum COMPATIBLE_TYPE {
/**
* 同尺寸兼容
*/
SIZE_COMPATIBLE
(
"storage.match.sizeCompatible"
);
SIZE_COMPATIBLE
(
"storage.match.sizeCompatible"
),
/**
* 13/15寸兼容
*/
W13_15_COMPATIBLE
(
"storage.match.w13_15Compatible"
);
COMPATIBLE_TYPE
(
String
key
)
{
...
...
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
ebdea48
...
...
@@ -75,9 +75,14 @@ public class StoragePosManagerImpl implements IStoragePosManager {
private
List
<
InventoryItem
>
lockInventory
(
int
type
,
String
...
storageIds
){
//被锁定的仓位
//TODO:这里还需要去掉被指定批次锁定的,因为出错,暂时不加了..
Criteria
c
=
Criteria
.
where
(
"barcode"
).
exists
(
true
).
and
(
"storageId"
).
in
(
storageIds
)
.
andOperator
(
Criteria
.
where
(
"canCheckOutTime"
).
gt
(
System
.
currentTimeMillis
()));
// //TODO:这里还需要去掉被指定批次锁定的,因为出错,暂时不加了..
// Criteria c = Criteria.where("barcode").exists(true).and("storageId").in(storageIds)
// .andOperator(Criteria.where("canCheckOutTime").gt(System.currentTimeMillis()));
Criteria
newC
=
Criteria
.
where
(
"barcode.lockId"
).
exists
(
true
).
ne
(
""
);
Criteria
c
=
Criteria
.
where
(
"barcode"
).
exists
(
true
)
.
and
(
"storageId"
).
in
(
storageIds
)
// .andOperator(Criteria.where("canCheckOutTime").gt(System.currentTimeMillis()))
.
andOperator
(
newC
);
if
(
type
!=
-
1
){
c
=
c
.
and
(
"barcode.type"
).
is
(
type
);
}
...
...
@@ -412,6 +417,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
c
=
c
.
and
(
"w"
).
gte
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//宽度大于等于料盘宽度,高度大于等于料盘高度
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
SIZE_COMPATIBLE
){
//同尺寸兼容
c
=
c
.
and
(
"w"
).
is
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
W13_15_COMPATIBLE
){
//13/15寸兼容,如果是13寸盘,可以放15寸,其他按照同尺寸兼容
if
(
barcode
.
getPlateSize
()==
13
){
c
=
c
.
and
(
"w"
).
in
(
barcode
.
getPlateSize
(),
15
).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
}
else
{
c
=
c
.
and
(
"w"
).
is
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c
=
c
.
and
(
"enabled"
).
is
(
true
)
//可用
...
...
@@ -449,6 +461,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
SIZE_COMPATIBLE
)
{
//同尺寸兼容
c
=
c
.
and
(
"w"
).
is
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
W13_15_COMPATIBLE
){
//13/15寸兼容,如果是13寸盘,可以放15寸,其他按照同尺寸兼容
if
(
barcode
.
getPlateSize
()==
13
){
c
=
c
.
and
(
"w"
).
in
(
barcode
.
getPlateSize
(),
15
).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
}
else
{
c
=
c
.
and
(
"w"
).
is
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c
=
c
.
and
(
"enabled"
).
is
(
true
)
//可用
...
...
@@ -492,6 +511,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
SIZE_COMPATIBLE
)
{
//同尺寸兼容
c
=
c
.
and
(
"w"
).
is
(
size
).
and
(
"h"
).
gte
(
height
);
//宽度等于料盘宽度,高度大于等于料盘高度
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
W13_15_COMPATIBLE
)
{
//13/15寸兼容,如果是13寸盘,可以放15寸,其他同尺寸兼容
if
(
size
==
13
)
{
c
=
c
.
and
(
"w"
).
in
(
size
,
15
).
and
(
"h"
).
gte
(
height
);
}
else
{
c
=
c
.
and
(
"w"
).
is
(
size
).
and
(
"h"
).
gte
(
height
);
//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c
=
c
.
and
(
"enabled"
).
is
(
true
)
//可用
...
...
@@ -557,7 +583,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
@Override
public
void
clearLockPos
(
String
lockId
)
{
Query
query
=
new
Query
(
Criteria
.
where
(
"barcode.lockId"
).
is
(
lockId
));
storagePosDao
.
updateMulti
(
query
,
Update
.
update
(
"barcode.lockId"
,
""
));
storagePosDao
.
updateMulti
(
query
,
Update
.
update
(
"barcode.lockId"
,
null
));
}
...
...
@@ -576,6 +602,13 @@ public class StoragePosManagerImpl implements IStoragePosManager {
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
SIZE_COMPATIBLE
)
{
//同尺寸兼容
c
=
c
.
and
(
"w"
).
is
(
currentPos
.
getW
()).
and
(
"h"
).
gte
(
currentPos
.
getH
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
W13_15_COMPATIBLE
)
{
//13/15寸兼容,如果是13寸盘,可以放15寸,其他同尺寸兼容
if
(
currentPos
.
getW
()
==
13
)
{
c
=
c
.
and
(
"w"
).
in
(
currentPos
.
getW
(),
15
).
and
(
"h"
).
gte
(
currentPos
.
getH
());
}
else
{
c
=
c
.
and
(
"w"
).
is
(
currentPos
.
getW
()).
and
(
"h"
).
gte
(
currentPos
.
getH
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
}
c
=
c
.
and
(
"enabled"
).
is
(
true
)
//可用
...
...
src/main/java/com/neotel/smfcore/core/storage/service/po/Storage.java
查看文件 @
ebdea48
...
...
@@ -231,6 +231,15 @@ public class Storage extends BasePo implements Serializable {
if
(
w
==
PosW
&&
h
<=
posH
){
return
true
;
}
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
W13_15_COMPATIBLE
)
{
//13,15寸兼容
if
(
w
==
13
)
{
if
((
w
==
PosW
||
15
==
PosW
)
&&
h
<=
posH
)
{
return
true
;
}
}
else
if
(
w
==
PosW
&&
h
<=
posH
){
//默认同尺寸兼容
return
true
;
}
}
return
false
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论