Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b1a8f668
由
LN
编写于
2021-11-15 14:43:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
批量出库提示修改。
暂时去掉入库就近查找逻辑。
1 个父辈
467d776e
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
36 行增加
和
23 行删除
src/main/java/com/neotel/smfcore/core/barcode/bean/BarcodeRule.java
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.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/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/barcode/bean/BarcodeRule.java
查看文件 @
b1a8f66
...
...
@@ -700,6 +700,10 @@ public class BarcodeRule {
codeStr
=
"327203324369301963"
;
rule
=
"PN[-1_32:0:-1_3]RI[-1:0:-1]"
;
codeStr
=
"TJM210215000771&10446507326&15000&2021-01-18&NAUK11263MAB&&10446&&R107920210124A13OG"
;
rule
=
"RI&PN&QTY&PRODATEyyyy-MM-dd&5&6&7&8&9"
;
BarcodeRule
br
=
BarcodeRule
.
newRule
(
rule
);
Barcode
b
=
br
.
toCodeBean
(
codeStr
).
getBarcode
();
if
(
b
!=
null
){
...
...
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
b1a8f66
...
...
@@ -214,20 +214,21 @@ public class DeviceController {
resultMap
.
put
(
"result"
,
"0"
);
resultMap
.
put
(
"msg"
,
""
);
okMsg
=
"["
+
rfid
+
"]["
+
barcode
.
getBarcode
()+
"]锁定库位["
+
pos
.
getPosName
()+
"]"
;
okMsg
=
"["
+
rfid
+
"]["
+
barcode
.
getBarcode
()+
"]锁定库位["
+
pos
.
getPosName
()+
"]优先级["
+
pos
.
getPriority
()+
"] 上个库位号["
+
lastPosId
+
"]"
;
ReelLockPosInfo
oldLockInfo
=
ReelLockPosUtil
.
getLockPosInfoByCode
(
barcode
.
getBarcode
());
if
(
oldLockInfo
!=
null
){
if
(!
oldLockInfo
.
getBarcode
().
equals
(
barcode
.
getBarcode
()))
{
if
(
oldLockInfo
!=
null
)
{
if
(!
oldLockInfo
.
getBarcode
().
equals
(
barcode
.
getBarcode
()))
{
String
result
=
"-1"
;
okMsg
=
rfid
+
"["
+
rfidLoc
+
"]["
+
barcode
.
getBarcode
()+
"]锁定库位["
+
pos
.
getPosName
()+
"],清理旧有锁定信息"
;
resultMap
.
put
(
"result"
,
result
);
resultMap
.
put
(
"msg"
,
okMsg
);
okMsg
=
rfid
+
"["
+
rfidLoc
+
"]["
+
barcode
.
getBarcode
()
+
"]锁定库位["
+
pos
.
getPosName
()
+
"],清理旧有锁定信息"
;
resultMap
.
put
(
"result"
,
result
);
resultMap
.
put
(
"msg"
,
okMsg
);
//已经锁定过库位,但不是同一个条码,需要把对应位置的锁定信息清理掉
ReelLockPosUtil
.
removeReelLockPosInfo
(
oldLockInfo
.
getBarcode
());
log
.
info
(
"清理锁定库位:库位号["
+
oldLockInfo
.
getLockPosName
()+
"]上物料["
+
oldLockInfo
.
getBarcode
()+
"]锁定的库位"
);
ReelLockPosUtil
.
removeReelLockPosInfo
(
oldLockInfo
.
getBarcode
());
log
.
info
(
"清理锁定库位:库位号["
+
oldLockInfo
.
getLockPosName
()
+
"]上物料["
+
oldLockInfo
.
getBarcode
()
+
"]锁定的库位"
);
}
}
...
...
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
b1a8f66
package
com
.
neotel
.
smfcore
.
core
.
storage
.
service
.
manager
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Maps
;
import
com.neotel.smfcore.common.bean.PageData
;
...
...
@@ -330,12 +331,12 @@ public class StoragePosManagerImpl implements IStoragePosManager {
COMPATIBLE_TYPE
compatibleType
=
storage
.
getCompatibleType
();
if
(
compatibleType
==
COMPATIBLE_TYPE
.
EXACT_MATCH
)
{
//完全匹配
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
)
{
//同厚度兼容
}
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
)
{
//同尺寸兼容
}
else
if
(
compatibleType
==
COMPATIBLE_TYPE
.
SIZE_COMPATIBLE
)
{
//同尺寸兼容
c
=
c
.
and
(
"w"
).
is
(
barcode
.
getPlateSize
()).
and
(
"h"
).
gte
(
barcode
.
getHeight
());
//宽度等于料盘宽度,高度大于等于料盘高度
}
...
...
@@ -343,18 +344,25 @@ public class StoragePosManagerImpl implements IStoragePosManager {
.
and
(
"used"
).
is
(
false
);
//未使用
//去除的仓位
if
(
excludePosIds
!=
null
&&
!
excludePosIds
.
isEmpty
())
{
if
(
excludePosIds
!=
null
&&
!
excludePosIds
.
isEmpty
())
{
c
=
c
.
and
(
"id"
).
nin
(
excludePosIds
);
}
Query
query
=
new
Query
(
c
);
if
(
lastPosId
==
null
||
lastPosId
.
equals
(
""
)){
String
msg
=
""
;
// if (lastPosId == null || lastPosId.equals("")) {
//优先放入最合适的位置(根据尺寸),相同尺寸按优先级排序
query
.
with
(
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"w"
).
and
(
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"h"
)).
and
(
Sort
.
by
(
Sort
.
Direction
.
DESC
,
"priority"
)));
}
else
{
Point
point
=
PointUtil
.
getPosPoint
(
lastPosId
,
false
);
query
.
addCriteria
(
Criteria
.
where
(
"coordinate"
).
nearSphere
(
point
));
}
// } else {
// Point point = PointUtil.getPosPoint(lastPosId, false);
// query.addCriteria(Criteria.where("coordinate").nearSphere(point));
// msg += "getEmptyPosByStorage 根据就近坐标查询[" + lastPosId + "][" + point.getX() + "," + point.getY() + "]";
// }
StoragePos
pos
=
storagePosDao
.
findOne
(
query
);
if
((!
ObjectUtil
.
isNotEmpty
(
msg
)
)&&
(
pos
!=
null
))
{
Point
targetP
=
PointUtil
.
getPosPoint
(
lastPosId
,
false
);
log
.
info
(
msg
+
"结果:["
+
pos
.
getPosName
()
+
"]["
+
targetP
.
getX
()
+
","
+
targetP
.
getY
()
+
"]"
);
}
return
pos
;
}
@Override
...
...
src/main/java/com/neotel/smfcore/core/system/util/TaskService.java
查看文件 @
b1a8f66
...
...
@@ -107,7 +107,7 @@ public class TaskService {
if
(
pos
.
getBarcode
()
==
null
)
{
String
msg
=
"库位["
+
pos
.
getPosName
()
+
"]中已无物料,忽略"
;
log
.
info
(
msg
);
throw
new
ValidateException
(
"smfcore.allBoxView.noReel"
,
"库位
中无物料"
);
throw
new
ValidateException
(
"smfcore.allBoxView.noReel"
,
"库位
{0}中无物料"
,
new
String
[]{
pos
.
getPosName
()}
);
}
DataLog
task
=
new
DataLog
(
storage
,
pos
.
getBarcode
(),
pos
);
...
...
src/main/resources/messages.properties
查看文件 @
b1a8f66
...
...
@@ -29,7 +29,7 @@ smfcore.notFindPos=\u672A\u627E\u5230\u9501\u5B9A\u5E93\u4F4D
smfcore.error.barcode.empty
=
\u
672A
\u
626B
\u5230\u6761\u7801
smfcore.error.barcode.many
=
\u
627E
\u5230\u
591A
\u
4E2A
\u6709\u6548\u6761\u7801
,
\u
65E0
\u
6CD5
\u5165\u
5E93
smfcore.error.barcode.expired
=
\u7269\u6599\u
5DF2
\u
8FC7
\u
671F,
\u
65E0
\u
6CD5
\u5165\u
5E93.
smfcore.allBoxView.noReel
=
\u
5E93
\u
4F4D
\u
4E2D
\u
65E0
\u7269\u6599
smfcore.allBoxView.noReel
=
\u
5E93
\u
4F4D
{0}
\u
4E2D
\u
65E0
\u7269\u6599
smfcode.error.barcode.many
=
\u
627E
\u5230\u
591A
\u
4E2A
\u6709\u6548\u7684\u6761\u7801
smfcode.error.barcode.noValidCode
=
\u
65E0
\u6548\u7684\u6761\u7801
smfcore.error.barcode.noValidCode
=
{0}
\u
4E0D
\u
662F
\u6709\u6548\u7684\u6761\u7801
...
...
src/main/resources/messages_en_US.properties
查看文件 @
b1a8f66
...
...
@@ -29,7 +29,7 @@ smfcore.notFindPos=Locked position not found
smfcore.error.barcode.empty
=
Barcode empty
smfcore.error.barcode.many
=
Found several barcodes, storage failed
smfcore.error.barcode.expired
=
Reel expired, storage failed
smfcore.allBoxView.noReel
=
No reel in position
smfcore.allBoxView.noReel
=
No reel in position
{0}
smfcode.error.barcode.many
=
Found several barcodes
smfcode.error.barcode.noValidCode
=
Invalid barcode
smfcore.error.barcode.noValidCode
=
Invalid barcode {0}
...
...
src/main/resources/messages_ja_JP.properties
查看文件 @
b1a8f66
...
...
@@ -29,7 +29,7 @@ smfcore.notFindPos=\u30ED\u30C3\u30AF\u3055\u308C\u305F\u30B9\u30C8\u30EC\u30FC\
smfcore.error.barcode.empty
=
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
\u
304C
\u
30B9
\u
30AD
\u
30E3
\u
30F3
\u3055\u
308C
\u
306A
\u3044
smfcore.error.barcode.many
=
\u8907\u6570\u
306E
\u6709\u
52B9
\u
306A
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
\u
304C
\u
898B
\u3064\u
304B
\u
308A
\u
307E
\u3057\u
305F
\u
304C
\u3001\u5728\u
5EAB
\u
306F
\u3042\u
308A
\u
307E
\u
305B
\u3093
smfcore.error.barcode.expired
=
\u6750\u6599\u
304C
\u
53E4
\u
304F
\u3066\u5728\u
5EAB
\u
304C
\u
306A
\u3044
smfcore.allBoxView.noReel
=
\u
4FDD
\u
7BA1
\u
4E2D
\u
306E
\u
7D20
\u6750\u
304C
\u
306A
\u3044
smfcore.allBoxView.noReel
=
\u
4FDD
\u
7BA1
\u
4E2D
\u
306E
\u
7D20
\u6750\u
304C
\u
306A
\u3044
{0}
smfcode.error.barcode.many
=
\u8907\u6570\u
306E
\u6709\u
52B9
\u
306A
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
\u
306E
\u
691C
\u
7D22
smfcode.error.barcode.noValidCode
=
\u7121\u
52B9
\u
306A
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
smfcore.error.barcode.noValidCode
=
{0}
\u
306F
\u6709\u
52B9
\u
306A
\u
30D0
\u
30FC
\u
30B3
\u
30FC
\u
30C9
\u3067\u
306F
\u3042\u
308A
\u
307E
\u
305B
\u3093
...
...
src/main/resources/messages_zh_CN.properties
查看文件 @
b1a8f66
...
...
@@ -29,7 +29,7 @@ smfcore.notFindPos=\u672A\u627E\u5230\u9501\u5B9A\u5E93\u4F4D
smfcore.error.barcode.empty
=
\u
672A
\u
626B
\u5230\u6761\u7801
smfcore.error.barcode.many
=
\u
627E
\u5230\u
591A
\u
4E2A
\u6709\u6548\u6761\u7801
,
\u
65E0
\u
6CD5
\u5165\u
5E93
smfcore.error.barcode.expired
=
\u7269\u6599\u
5DF2
\u
8FC7
\u
671F,
\u
65E0
\u
6CD5
\u5165\u
5E93.
smfcore.allBoxView.noReel
=
\u
5E93
\u
4F4D
\u
4E2D
\u
65E0
\u7269\u6599
smfcore.allBoxView.noReel
=
\u
5E93
\u
4F4D
{0}
\u
4E2D
\u
65E0
\u7269\u6599
smfcode.error.barcode.many
=
\u
627E
\u5230\u
591A
\u
4E2A
\u6709\u6548\u7684\u6761\u7801
smfcode.error.barcode.noValidCode
=
\u
65E0
\u6548\u7684\u6761\u7801
smfcore.error.barcode.noValidCode
=
{0}
\u
4E0D
\u
662F
\u6709\u6548\u7684\u6761\u7801
...
...
src/main/resources/messages_zh_TW.properties
查看文件 @
b1a8f66
...
...
@@ -29,7 +29,7 @@ smfcore.notFindPos=\u672A\u627E\u5230\u9396\u5B9A\u5EAB\u4F4D
smfcore.error.barcode.empty
=
\u
672A
\u6383\u5230\u
689D
\u
78BC
smfcore.error.barcode.many
=
\u
627E
\u5230\u
591A
\u
500B
\u6709\u6548\u
689D
\u
78BC,
\u7121\u
6CD5
\u5165\u
5EAB
smfcore.error.barcode.expired
=
\u7269\u6599\u
5DF2
\u
904E
\u
671F,
\u7121\u
6CD5
\u5165\u
5EAB.
smfcore.allBoxView.noReel
=
\u
5EAB
\u
4F4D
\u
4E2D
\u7121\u7269\u6599
smfcore.allBoxView.noReel
=
\u
5EAB
\u
4F4D
{0}
\u
4E2D
\u7121\u7269\u6599
smfcode.error.barcode.many
=
\u
627E
\u5230\u
591A
\u
500B
\u6709\u6548\u7684\u
689D
\u
78BC
smfcode.error.barcode.noValidCode
=
\u7121\u6548\u7684\u
689D
\u
78BC
smfcore.error.barcode.noValidCode
=
{0}
\u
4E0D
\u
662F
\u6709\u6548\u7684\u
689D
\u
78BC
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论