Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6d6187b8
由
LN
编写于
2024-08-05 20:00:17 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加库别验证
1 个父辈
6f439f44
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
33 行增加
和
8 行删除
src/main/java/com/neotel/smfcore/core/storage/rest/dto/StoragePosDto.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
src/main/java/com/neotel/smfcore/custom/luxsan_sp/service/manager/impl/SpBoxPutInManagerImpl.java
src/main/java/com/neotel/smfcore/custom/luxsan_sp/util/SpareNoCache.java
src/main/java/com/neotel/smfcore/core/storage/rest/dto/StoragePosDto.java
查看文件 @
6d6187b
...
@@ -90,4 +90,8 @@ public class StoragePosDto implements Serializable {
...
@@ -90,4 +90,8 @@ public class StoragePosDto implements Serializable {
@ApiModelProperty
(
"禁用信息"
)
@ApiModelProperty
(
"禁用信息"
)
private
String
msg
;
private
String
msg
;
@ApiModelProperty
(
"库别"
)
private
String
wareHouseCode
;
}
}
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
查看文件 @
6d6187b
...
@@ -99,7 +99,7 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
...
@@ -99,7 +99,7 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
StoragePos
findBoxPNInStorages
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
)
;
StoragePos
findBoxPNInStorages
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
)
;
StoragePos
findEmptyBoxToPutIn
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
boxType
,
int
maxCount
)
;
StoragePos
findEmptyBoxToPutIn
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
boxType
,
int
maxCount
,
String
wareHouseCode
)
;
StoragePos
findEmptyBoxToPut
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
);
StoragePos
findEmptyBoxToPut
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
wareHouseCode
);
}
}
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
6d6187b
...
@@ -928,7 +928,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -928,7 +928,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
}
}
@Override
@Override
public
StoragePos
findEmptyBoxToPutIn
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
boxType
,
int
maxCount
)
{
public
StoragePos
findEmptyBoxToPutIn
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
boxType
,
int
maxCount
,
String
wareHouseCode
)
{
String
regex
=
"^"
+
boxType
+
".*"
;
String
regex
=
"^"
+
boxType
+
".*"
;
...
@@ -940,6 +940,9 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -940,6 +940,9 @@ public class StoragePosManagerImpl implements IStoragePosManager {
c
.
and
(
"barcode"
).
exists
(
true
);
//已使用有料箱
c
.
and
(
"barcode"
).
exists
(
true
);
//已使用有料箱
c
.
and
(
"barcode.barcode"
).
regex
(
pattern
);
c
.
and
(
"barcode.barcode"
).
regex
(
pattern
);
c
.
and
(
"barcode.status"
).
is
(
BARCODE_STATUS
.
IN_STORE
);
c
.
and
(
"barcode.status"
).
is
(
BARCODE_STATUS
.
IN_STORE
);
if
(
ObjectUtil
.
isNotEmpty
(
wareHouseCode
)){
c
.
and
(
"wareHouseCode"
).
is
(
wareHouseCode
);
}
if
(
storageIdList
!=
null
)
{
if
(
storageIdList
!=
null
)
{
c
=
c
.
and
(
"storageId"
).
in
(
storageIdList
);
c
=
c
.
and
(
"storageId"
).
in
(
storageIdList
);
}
}
...
@@ -960,7 +963,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -960,7 +963,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
@Override
@Override
public
StoragePos
findEmptyBoxToPut
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
)
{
public
StoragePos
findEmptyBoxToPut
(
List
<
String
>
storageIdList
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
String
wareHouseCode
)
{
Criteria
c
=
Criteria
.
where
(
"id"
).
nin
(
excludePosIds
);
Criteria
c
=
Criteria
.
where
(
"id"
).
nin
(
excludePosIds
);
...
@@ -970,6 +973,9 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -970,6 +973,9 @@ public class StoragePosManagerImpl implements IStoragePosManager {
c
.
and
(
"barcode.maxSubNum"
).
gt
(
0
);
//最大格口大于0
c
.
and
(
"barcode.maxSubNum"
).
gt
(
0
);
//最大格口大于0
c
.
and
(
"barcode.status"
).
is
(
BARCODE_STATUS
.
IN_STORE
);
c
.
and
(
"barcode.status"
).
is
(
BARCODE_STATUS
.
IN_STORE
);
c
.
and
(
"barcode.subListNum"
).
lt
(
"barcode.maxSubNum"
);
// 添加判断条件
c
.
and
(
"barcode.subListNum"
).
lt
(
"barcode.maxSubNum"
);
// 添加判断条件
if
(
ObjectUtil
.
isNotEmpty
(
wareHouseCode
)){
c
.
and
(
"wareHouseCode"
).
is
(
wareHouseCode
);
}
if
(
storageIdList
!=
null
)
{
if
(
storageIdList
!=
null
)
{
c
=
c
.
and
(
"storageId"
).
in
(
storageIdList
);
c
=
c
.
and
(
"storageId"
).
in
(
storageIdList
);
...
...
src/main/java/com/neotel/smfcore/custom/luxsan_sp/service/manager/impl/SpBoxPutInManagerImpl.java
查看文件 @
6d6187b
...
@@ -176,6 +176,13 @@ public class SpBoxPutInManagerImpl implements ISpBoxPutInManager {
...
@@ -176,6 +176,13 @@ public class SpBoxPutInManagerImpl implements ISpBoxPutInManager {
if
(
spareNoDetail
==
null
)
{
if
(
spareNoDetail
==
null
)
{
throw
new
Exception
(
codeBarcode
.
getPartNumber
()
+
"没有入退库需求,请检查是否存在或者不符合入退库数量"
);
throw
new
Exception
(
codeBarcode
.
getPartNumber
()
+
"没有入退库需求,请检查是否存在或者不符合入退库数量"
);
}
}
}
else
{
//TODO 判断此料箱是否有posName,如果没有的话不能手动入库
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
boxBarcode
.
getBarcode
());
if
(
pos
==
null
){
throw
new
Exception
(
codeBarcode
.
getPartNumber
()
+
"无库别料箱不允许手动入库"
);
}
}
}
// 寻找空库位
// 寻找空库位
...
...
src/main/java/com/neotel/smfcore/custom/luxsan_sp/util/SpareNoCache.java
查看文件 @
6d6187b
...
@@ -183,6 +183,9 @@ public class SpareNoCache {
...
@@ -183,6 +183,9 @@ public class SpareNoCache {
}
}
log
.
info
(
"开始执行 入库单 ["
+
orderNo
+
"] "
);
log
.
info
(
"开始执行 入库单 ["
+
orderNo
+
"] "
);
if
(
ObjectUtil
.
isEmpty
(
baseNo
.
getWhCode
())){
baseNo
.
setWhCode
(
""
);
}
Map
<
String
,
StoragePos
>
needOutPos
=
new
HashMap
<>();
Map
<
String
,
StoragePos
>
needOutPos
=
new
HashMap
<>();
List
<
String
>
storageIdList
=
new
ArrayList
<>();
List
<
String
>
storageIdList
=
new
ArrayList
<>();
...
@@ -237,12 +240,17 @@ public class SpareNoCache {
...
@@ -237,12 +240,17 @@ public class SpareNoCache {
needOutPos
.
values
())
{
needOutPos
.
values
())
{
int
subCount
=
exPos
.
getBarcode
().
getMaxSubNum
();
int
subCount
=
exPos
.
getBarcode
().
getMaxSubNum
();
if
(
exPos
.
getBarcode
().
getSubCodeList
().
size
()
<
subCount
)
{
if
(
exPos
.
getBarcode
().
getSubCodeList
().
size
()
<
subCount
)
{
emptyPos
=
exPos
;
//验证库别
break
;
if
(
exPos
.
getWareHouseCode
().
equals
(
baseNo
.
getWhCode
())){
emptyPos
=
exPos
;
break
;
}
}
}
}
}
Barcode
emptyBox
=
null
;
Barcode
emptyBox
=
null
;
//TODO 查找空格口是必须要是同一个库别的
if
(
emptyPos
!=
null
)
{
if
(
emptyPos
!=
null
)
{
//使用此格口
//使用此格口
emptyBox
=
emptyPos
.
getBarcode
();
emptyBox
=
emptyPos
.
getBarcode
();
...
@@ -266,10 +274,10 @@ public class SpareNoCache {
...
@@ -266,10 +274,10 @@ public class SpareNoCache {
for
(
String
type
:
for
(
String
type
:
boxTypes
)
{
boxTypes
)
{
if
(
type
==
""
){
if
(
type
==
""
){
emptyPos
=
storagePosManager
.
findEmptyBoxToPut
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
());
emptyPos
=
storagePosManager
.
findEmptyBoxToPut
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
()
,
baseNo
.
getWhCode
().
trim
()
);
}
else
{
}
else
{
int
count
=
SpBoxUtil
.
GetBoxSubCount
(
type
);
int
count
=
SpBoxUtil
.
GetBoxSubCount
(
type
);
emptyPos
=
storagePosManager
.
findEmptyBoxToPutIn
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
type
,
count
);
emptyPos
=
storagePosManager
.
findEmptyBoxToPutIn
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
type
,
count
,
baseNo
.
getWhCode
().
trim
()
);
}
}
emptyBox
=
emptyPos
.
getBarcode
();
emptyBox
=
emptyPos
.
getBarcode
();
if
(
emptyPos
!=
null
)
{
if
(
emptyPos
!=
null
)
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论