Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5314df7b
由
zshaohui
编写于
2025-04-22 14:16:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.每个料仓的尺寸 外侧库位预留5个能用的
1 个父辈
7e7b300f
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
81 行增加
和
27 行删除
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/core/system/util/TaskService.java
src/main/java/com/neotel/smfcore/custom/Jkem21481/controller/JkemController.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/core/storage/service/manager/IStoragePosManager.java
查看文件 @
5314df7
...
...
@@ -34,10 +34,11 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
StoragePos
findPartNumberInStorages
(
List
<
String
>
storageIdList
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
);
StoragePos
findPartNumberInStorages
(
List
<
String
>
storageIdList
,
String
labelId
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
);
StoragePos
findPartNumberInStorages
(
List
<
String
>
storageIdList
,
String
labelId
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
Map
<
String
,
String
>
appendDate
);
StoragePos
findPartNumberInStorages
(
List
<
String
>
storageIdList
,
String
labelId
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
);
StoragePos
findPartNumberInStoragesBox
(
List
<
String
>
storageIdList
,
String
labelId
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
Map
<
String
,
String
>
appendDate
);
StoragePos
findPartNumberInStorages
(
List
<
String
>
storageIdList
,
String
labelId
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
Map
<
String
,
String
>
appendDate
);
StoragePos
findPartNumberInStoragesBox
(
List
<
String
>
storageIdList
,
String
labelId
,
String
pn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkOutType
,
Map
<
String
,
String
>
appendDate
);
List
<
StoragePos
>
findByQuery
(
Query
query
,
Pageable
pageable
);
...
...
@@ -49,7 +50,7 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
,
String
lastPosId
)
throws
ValidateException
;
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
,
String
lastPosId
,
String
needMovePosName
,
String
endStr
)
throws
ValidateException
;
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
,
String
lastPosId
,
String
needMovePosName
,
String
endStr
)
throws
ValidateException
;
StoragePos
getEmptyPosByStorage
(
Storage
storage
,
int
size
,
int
height
,
Collection
<
String
>
excludePosIds
)
throws
ValidateException
;
...
...
@@ -65,13 +66,13 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
void
clearStoragePosLabel
(
String
id
);
void
updatePosLabel
(
String
[]
posIds
,
String
labelId
,
String
labelName
);
void
updatePosLabel
(
String
[]
posIds
,
String
labelId
,
String
labelName
);
void
clearLockPos
(
String
lockId
);
StoragePos
autoFindNextEmptyPos
(
Storage
storage
,
Collection
<
String
>
excludePosIds
,
StoragePos
currentPos
);
StoragePos
autoFindNextEmptyPos
(
Storage
storage
,
Collection
<
String
>
excludePosIds
,
StoragePos
currentPos
);
public
void
updateBarcodeMsd
(
String
pn
,
String
msl
,
String
thickness
);
public
void
updateBarcodeMsd
(
String
pn
,
String
msl
,
String
thickness
);
List
<
StoragePos
>
findPosList
(
String
storageId
,
List
<
String
>
posNames
);
...
...
@@ -87,17 +88,19 @@ public interface IStoragePosManager extends IBaseManager<StoragePos> {
List
<
StoragePos
>
findPosByIdList
(
List
<
String
>
idList
);
StoragePos
findMpnInStorages
(
List
<
String
>
availableStorageIds
,
String
mpn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkoutType
,
Map
<
String
,
String
>
appendData
);
StoragePos
findMpnInStorages
(
List
<
String
>
availableStorageIds
,
String
mpn
,
Collection
<
String
>
excludePosIds
,
CHECKOUT_TYPE
checkoutType
,
Map
<
String
,
String
>
appendData
);
List
<
StoragePos
>
findExpiredOrSluggishBarcode
(
Date
date
,
int
type
);
List
<
StoragePos
>
findExpiredOrSluggishBarcode
(
Date
date
,
int
type
);
List
<
StoragePos
>
findExistPosList
(
String
id
,
List
<
String
>
list
);
StoragePos
getAndCreatePos
(
String
storageId
,
String
posName
);
StoragePos
getAndCreatePos
(
String
storageId
,
String
posName
);
StoragePos
findByStorageName
(
String
code
);
StoragePos
findOne
(
Query
query
);
Sort
getSortByCheckOutType
(
CHECKOUT_TYPE
checkoutType
);
Sort
getSortByCheckOutType
(
CHECKOUT_TYPE
checkoutType
);
int
getRemainPosCountByStorage
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
,
String
lastPosId
,
String
endStr
)
throws
ValidateException
;
}
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
5314df7
...
...
@@ -885,4 +885,39 @@ public class StoragePosManagerImpl implements IStoragePosManager {
public
StoragePos
findOne
(
Query
query
)
{
return
storagePosDao
.
findOne
(
query
);
}
@Override
public
int
getRemainPosCountByStorage
(
Storage
storage
,
Barcode
barcode
,
Collection
<
String
>
excludePosIds
,
String
lastPosId
,
String
endStr
)
throws
ValidateException
{
Criteria
c
=
Criteria
.
where
(
"storageId"
).
is
(
storage
.
getId
());
COMPATIBLE_TYPE
compatibleType
=
storage
.
getCompatibleType
();
if
(
compatibleType
==
COMPATIBLE_TYPE
.
EXACT_MATCH
)
{
//完全匹配
c
=
c
.
and
(
"w"
).
is
(
barcode
.
getPlateSize
()).
and
(
"h"
).
is
(
barcode
.
getHeight
());
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
FULLY_COMPATIBLE
)
{
//同厚度兼容
c
=
c
.
and
(
"w"
).
gte
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//除7寸外,完全兼容
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
SIZE_COMPATIBLE
)
{
//同尺寸兼容
c
=
c
.
and
(
"w"
).
is
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
c
=
c
.
and
(
"enabled"
).
is
(
true
)
//可用
.
and
(
"used"
).
is
(
false
);
//未使用
//去除的仓位
if
(
excludePosIds
!=
null
&&
!
excludePosIds
.
isEmpty
())
{
c
=
c
.
and
(
"id"
).
nin
(
excludePosIds
);
}
if
(
StringUtils
.
isNotEmpty
(
endStr
))
{
String
regex
=
""
+
endStr
+
"$"
;
c
.
and
(
"posName"
).
regex
(
Pattern
.
compile
(
regex
));
}
Query
query
=
new
Query
(
c
);
query
.
with
(
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"w"
).
and
(
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"h"
)).
and
(
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"priority"
)));
return
storagePosDao
.
countByQuery
(
query
);
}
}
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
查看文件 @
5314df7
...
...
@@ -799,7 +799,7 @@ public class TaskService {
}
if
(
availbleStorageList
.
isEmpty
())
{
throw
new
ValidateException
(
"smfcore.noValidStorage"
,
"
料仓列表中未找到可用的料仓"
);
throw
new
ValidateException
(
"smfcore.noValidStorage"
,
"
[{0}]料仓列表中未找到可用的料仓"
,
new
String
[]{
barcode
.
getBarcode
()}
);
}
availbleStorageList
.
sort
(
new
Comparator
<
Storage
>()
{
...
...
@@ -916,7 +916,7 @@ public class TaskService {
}
if
(
availbleStorageList
.
isEmpty
())
{
throw
new
ValidateException
(
"smfcore.noValidStorage"
,
"
料仓列表中未找到可用的料仓"
);
throw
new
ValidateException
(
"smfcore.noValidStorage"
,
"
[{0}]料仓列表中未找到可用的料仓"
,
new
String
[]{
barcode
.
getBarcode
()}
);
}
availbleStorageList
.
sort
(
new
Comparator
<
Storage
>()
{
...
...
src/main/java/com/neotel/smfcore/custom/Jkem21481/controller/JkemController.java
查看文件 @
5314df7
...
...
@@ -166,19 +166,19 @@ public class JkemController {
List
<
String
>
newCidList
=
new
ArrayList
<>();
List
<
Storage
>
newStorageList
=
new
ArrayList
<>();
MJPartNumber
mjPartNumber
=
partNumberManager
.
findByJkemPartNumber
(
barcode
.
getPartNumber
());
if
(
mjPartNumber
!=
null
){
log
.
info
(
barcode
.
getBarcode
()
+
"查询到的信息为:"
+
JSON
.
toJSONString
(
mjPartNumber
));
if
(
mjPartNumber
!=
null
)
{
log
.
info
(
barcode
.
getBarcode
()
+
"查询到的信息为:"
+
JSON
.
toJSONString
(
mjPartNumber
));
int
msd
=
mjPartNumber
.
getMsd
();
if
(
msd
==
1
){
if
(
msd
==
1
)
{
for
(
String
cid
:
cidList
)
{
if
(
msdCidList
.
contains
(
cid
)){
if
(
msdCidList
.
contains
(
cid
))
{
newCidList
.
add
(
cid
);
Storage
storage
=
dataCache
.
getStorage
(
cid
);
newStorageList
.
add
(
storage
);
}
}
if
(
newCidList
==
null
||
newCidList
.
isEmpty
()){
throw
new
ValidateException
(
"smf.barcode.msd.validate"
,
"该物料需要MSD管控不能在本料仓入库"
);
if
(
newCidList
==
null
||
newCidList
.
isEmpty
())
{
throw
new
ValidateException
(
"smf.barcode.msd.validate"
,
"该物料需要MSD管控不能在本料仓入库"
);
}
}
else
{
newCidList
.
addAll
(
cidList
);
...
...
@@ -189,6 +189,22 @@ public class JkemController {
newStorageList
.
addAll
(
storageList
);
}
//判断对应的尺寸,外侧的库位,是否保留5个
List
<
String
>
findCidList
=
new
ArrayList
<>();
List
<
Storage
>
findNewStorageList
=
new
ArrayList
<>();
for
(
Storage
storage
:
newStorageList
)
{
int
count
=
storagePosManager
.
getRemainPosCountByStorage
(
storage
,
barcode
,
taskService
.
excludePosIds
(),
""
,
"_F"
);
if
(
count
>
5
)
{
findCidList
.
add
(
storage
.
getCid
());
findNewStorageList
.
add
(
storage
);
}
else
{
log
.
info
(
storage
.
getCid
()+
"对应的尺寸:"
+
barcode
.
getPlateSize
()+
"x"
+
barcode
.
getHeight
()+
"外侧库位数量小于等于5个,忽略不入库"
);
}
}
if
(
findNewStorageList
==
null
||
findNewStorageList
.
isEmpty
()){
throw
new
ValidateException
(
"smfcore.noValidStorage"
,
"[{0}]料仓列表中未找到可用的料仓"
,
new
String
[]{
barcode
.
getBarcode
()});
}
for
(
DataLog
dataLog
:
taskService
.
getQueueTasks
())
{
// if(!dataLog.isPackageReel()){
...
...
@@ -242,7 +258,7 @@ public class JkemController {
if
(
loopCount
>=
10
)
{
log
.
info
(
barcode
.
getBarcode
()
+
"已循环查找10次 直接跳出循环"
);
}
pos
=
taskService
.
findEmptyPosForPutIn
(
n
ewStorageList
,
barcode
,
rfid
,
lastPosId
);
pos
=
taskService
.
findEmptyPosForPutIn
(
findN
ewStorageList
,
barcode
,
rfid
,
lastPosId
);
if
(
pos
==
null
)
{
break
;
}
...
...
@@ -265,7 +281,7 @@ public class JkemController {
reelLocInfo
.
setCid
(
dataCache
.
getStorageById
(
pos
.
getStorageId
()).
getCid
());
reelLocInfo
.
setLockPosName
(
pos
.
getPosName
());
reelLocInfo
.
setLockPosId
(
pos
.
getId
());
ReelLockPosUtil
.
addReelLockPosInfo
(
reelLocInfo
,
new
CidList
);
ReelLockPosUtil
.
addReelLockPosInfo
(
reelLocInfo
,
find
CidList
);
// needRemoveReelLockPosIdList.add(pos.getId());
pos
=
null
;
}
...
...
@@ -301,7 +317,7 @@ public class JkemController {
reelLocInfo
.
setCid
(
theStorage
.
getCid
());
reelLocInfo
.
setLockPosName
(
pos
.
getPosName
());
reelLocInfo
.
setLockPosId
(
pos
.
getId
());
reelLocInfo
=
ReelLockPosUtil
.
addReelLockPosInfo
(
reelLocInfo
,
new
CidList
);
reelLocInfo
=
ReelLockPosUtil
.
addReelLockPosInfo
(
reelLocInfo
,
find
CidList
);
if
(
reelLocInfo
==
null
)
{
errorMsg
=
"["
+
barcode
.
getBarcode
()
+
"]库位["
+
reelLocInfo
.
getLockPosName
()
+
"]已被锁定,暂停入库"
;
lineMsg
=
errorMsg
;
...
...
src/main/resources/messages.properties
查看文件 @
5314df7
...
...
@@ -79,7 +79,7 @@ smfcore.user=\u7528\u6237\u7BA1\u7406
smfcore.peoples
=
\u7528\u6237\u
7BA1
\u7406
smfcore.role
=
\u
89D2
\u8272\u
7BA1
\u7406
smfcore.menuNotExist
=
\u
83DC
\u5355
{0}
\u
4E0D
\u
5B58
\u5728
smfcore.noValidStorage
=
\u6599\u
4ED3
\u5217\u8868\u
4E2D
\u
672A
\u
627E
\u5230\u
53EF
\u7528\u7684\u6599\u
4ED3
smfcore.noValidStorage
=
[{0}]
\u6599\u
4ED3
\u5217\u8868\u
4E2D
\u
672A
\u
627E
\u5230\u
53EF
\u7528\u7684\u6599\u
4ED3
smfcore.error.barcode.exist
=
[{0}}]
\u
5DF2
\u5728
{1}}[{2}}]
\u
4E2D
smfcore.barcodeSetting
=
\u6761\u7801\u
8BBE
\u
7F6E
smfcore.posNotExist
=
\u
4ED3
\u
4F4D
\u
4E0D
\u
5B58
\u5728
...
...
src/main/resources/messages_en_US.properties
查看文件 @
5314df7
...
...
@@ -80,7 +80,7 @@ smfcore.user=Users
smfcore.peoples
=
Users
smfcore.role
=
Authority
smfcore.menuNotExist
=
Menu{0} does not exist
smfcore.noValidStorage
=
No available bin found in bin list
smfcore.noValidStorage
=
[{0}]
No available bin found in bin list
smfcore.error.barcode.exist
=
[{0}}] is already in {1}}[{2}}]
smfcore.barcodeSetting
=
MA.ID Setting
smfcore.posNotExist
=
Positions do not exist
...
...
src/main/resources/messages_ja_JP.properties
查看文件 @
5314df7
...
...
@@ -77,7 +77,7 @@ smfcore.user=\u30E6\u30FC\u30B6\u30FC\u7BA1\u7406
smfcore.peoples
=
\u
30E6
\u
30FC
\u
30B6
\u
30FC
\u
7BA1
\u7406
smfcore.role
=
\u
5F79
\u5272\u
7BA1
\u7406
smfcore.menuNotExist
=
\u
30E1
\u
30CB
\u
30E5
\u
30FC{0}
\u
304C
\u
5B58
\u5728\u3057\u
306A
\u3044
smfcore.noValidStorage
=
\u
30D3
\u
30F3
\u
30EA
\u
30B9
\u
30C8
\u
306B
\u5229\u7528\u
53EF
\u
80FD
\u
306A
\u
30D3
\u
30F3
\u
304C
\u
898B
\u3064\u
304B
\u3089\u
306A
\u3044
smfcore.noValidStorage
=
[{0}]
\u
30D3
\u
30F3
\u
30EA
\u
30B9
\u
30C8
\u
306B
\u5229\u7528\u
53EF
\u
80FD
\u
306A
\u
30D3
\u
30F3
\u
304C
\u
898B
\u3064\u
304B
\u3089\u
306A
\u3044
smfcore.error.barcode.exist
=
[0}}]
\u
306F
\u3059\u3067\u
306B{1}[{2}}
\u
306B
\u5165\u3063\u3066\u3044\u
307E
\u3059\u3002
smfcore.barcodeSetting
=
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
\u
8A2D
\u
5B9A
smfcore.posNotExist
=
\u
30E9
\u
30A4
\u
30D6
\u
30E9
\u
30EA
\u
30FC
\u
30B9
\u
30DA
\u
30FC
\u
30B9
\u
304C
\u
5B58
\u5728\u3057\u
306A
\u3044
...
...
src/main/resources/messages_zh_CN.properties
查看文件 @
5314df7
...
...
@@ -79,7 +79,7 @@ smfcore.user=\u7528\u6237\u7BA1\u7406
smfcore.peoples
=
\u7528\u6237\u
7BA1
\u7406
smfcore.role
=
\u
89D2
\u8272\u
7BA1
\u7406
smfcore.menuNotExist
=
\u
83DC
\u5355
{0}
\u
4E0D
\u
5B58
\u5728
smfcore.noValidStorage
=
\u6599\u
4ED3
\u5217\u8868\u
4E2D
\u
672A
\u
627E
\u5230\u
53EF
\u7528\u7684\u6599\u
4ED3
smfcore.noValidStorage
=
[{0}]
\u6599\u
4ED3
\u5217\u8868\u
4E2D
\u
672A
\u
627E
\u5230\u
53EF
\u7528\u7684\u6599\u
4ED3
smfcore.error.barcode.exist
=
[{0}}]
\u
5DF2
\u5728
{1}}[{2}}]
\u
4E2D
smfcore.barcodeSetting
=
\u6761\u7801\u
8BBE
\u
7F6E
smfcore.posNotExist
=
\u
4ED3
\u
4F4D
\u
4E0D
\u
5B58
\u5728
...
...
src/main/resources/messages_zh_TW.properties
查看文件 @
5314df7
...
...
@@ -78,7 +78,7 @@ smfcore.user=\u7528\u6236\u7BA1\u7406
smfcore.peoples
=
\u7528\u6236\u
7BA1
\u7406
smfcore.role
=
\u
89D2
\u8272\u
7BA1
\u7406
smfcore.menuNotExist
=
\u
83DC
\u
55AE{0}
\u
4E0D
\u
5B58
\u5728
smfcore.noValidStorage
=
\u6599\u5009\u5217\u8868\u
4E2D
\u
672A
\u
627E
\u5230\u
53EF
\u7528\u7684\u6599\u5009
smfcore.noValidStorage
=
[{0}]
\u6599\u5009\u5217\u8868\u
4E2D
\u
672A
\u
627E
\u5230\u
53EF
\u7528\u7684\u6599\u5009
smfcore.error.barcode.exist
=
[{0}}]
\u
5DF2
\u5728
{1}}[{2}}]
\u
4E2D
smfcore.barcodeSetting
=
\u
689D
\u
78BC
\u
8A2D
\u
7F6E
smfcore.posNotExist
=
\u
5EAB
\u
4F4D
\u
4E0D
\u
5B58
\u5728
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论