Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b23370b2
由
LN
编写于
2026-04-19 09:41:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
msg显示修改
1 个父辈
e641fc58
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
52 行增加
和
21 行删除
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
src/main/java/com/neotel/smfcore/core/equipment/bean/EquipStatusBean.java
src/main/java/com/neotel/smfcore/core/device/rest/DeviceController.java
查看文件 @
b23370b
...
...
@@ -25,6 +25,7 @@ import com.neotel.smfcore.core.device.bean.PosInfo;
import
com.neotel.smfcore.core.device.enums.OP_STATUS
;
import
com.neotel.smfcore.core.inList.enums.INITEM.INITEM_STATUS
;
import
com.neotel.smfcore.core.inList.service.po.InList
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
import
com.neotel.smfcore.core.message.util.DeviceMessageUtil
;
import
com.neotel.smfcore.core.order.service.po.LiteOrder
;
import
com.neotel.smfcore.core.storage.service.manager.IStorageManager
;
...
...
@@ -170,6 +171,7 @@ public class DeviceController {
return
barcodeSave
;
}
/**
* 流水线入库查找空的料格
*/
...
...
@@ -186,11 +188,11 @@ public class DeviceController {
lineMsg
=
""
;
log
.
info
(
"流水线["
+
cids
+
"]获取["
+
rfid
+
"]["
+
code
+
"]的入库库位"
);
EnLog
.
info
(
"Pipeline ["
+
cids
+
"] gets inbound position for ["
+
rfid
+
"]["
+
code
+
"]"
);
Map
<
String
,
Object
>
resultMap
=
Maps
.
newHashMap
();
if
(
dataCache
.
getCache
(
Constants
.
CACHE_StopOut
))
{
lineMsg
=
"系统更新中,暂停出入库"
;
Boolean
stopOut
=
dataCache
.
getCache
(
Constants
.
CACHE_StopOut
);
if
(
stopOut
)
{
lineMsg
=
MessageUtils
.
getText
(
"smfcore.linemsg.update"
,
MessageUtils
.
getDefaultLocal
(),
"系统更新中,暂停出入库"
);
DeviceMessageUtil
.
updateLineMsg
(
lineMsg
,
code
,
cids
,
""
,
"smfcore.linemsg.update"
,
null
);
resultMap
.
put
(
"result"
,
"100"
);
resultMap
.
put
(
"msg"
,
lineMsg
);
...
...
@@ -201,7 +203,8 @@ public class DeviceController {
String
errorMsg
=
""
;
if
(
Strings
.
isNullOrEmpty
(
cids
))
{
resultMap
.
put
(
"result"
,
"101"
);
resultMap
.
put
(
"msg"
,
"未指定料仓 cids "
);
String
msg
=
MessageUtils
.
getText
(
"smfcore.storage.noCids"
,
MessageUtils
.
getDefaultLocal
(),
"未指定料仓CID"
);
resultMap
.
put
(
"msg"
,
msg
);
}
else
{
List
<
Storage
>
storageList
=
Lists
.
newArrayList
();
List
<
String
>
cidList
=
Lists
.
newArrayList
();
...
...
@@ -210,7 +213,6 @@ public class DeviceController {
if
(
notIntoCids
!=
null
)
{
if
(
notIntoCids
.
contains
(
cid
))
{
log
.
info
(
"料仓["
+
cid
+
"]已被屏蔽入库"
);
EnLog
.
info
(
"Storage ["
+
cid
+
"] is blocked for inbound"
);
continue
;
}
}
...
...
@@ -222,7 +224,7 @@ public class DeviceController {
}
if
(
storageList
.
isEmpty
())
{
resultMap
.
put
(
"result"
,
"99"
);
errorMsg
=
"无可用的料仓"
;
errorMsg
=
MessageUtils
.
getText
(
"smfcore.storage.noCanUseStorage"
,
MessageUtils
.
getDefaultLocal
(),
"无可用的料仓"
)
;
resultMap
.
put
(
"msg"
,
errorMsg
);
}
else
{
try
{
...
...
@@ -245,8 +247,7 @@ public class DeviceController {
resultMap
.
put
(
"cid"
,
dataLog
.
getCid
());
return
resultMap
;
}
else
{
//已有出库任务
errorMsg
=
"物料["
+
dataLog
.
getBarcode
()
+
"]已有出库任务,需继续执行出库动作"
;
errorMsg
=
MessageUtils
.
getText
(
"smfcore.barcode.hasOutTask"
,
new
String
[]{
dataLog
.
getBarcode
()},
MessageUtils
.
getDefaultLocal
(),
"物料[{0}]已有出库任务,需继续执行出库动作"
);
resultMap
.
put
(
"result"
,
"98"
);
resultMap
.
put
(
"msg"
,
errorMsg
);
...
...
@@ -306,20 +307,18 @@ public class DeviceController {
if
(
oldLockInfo
!=
null
)
{
if
(!
oldLockInfo
.
getBarcode
().
equals
(
barcode
.
getBarcode
()))
{
String
result
=
"-1"
;
okMsg
=
rfid
+
"["
+
rfidLoc
+
"]["
+
barcode
.
getBarcode
()
+
"]锁定库位["
+
pos
.
getPosName
()
+
"],清理旧有锁定信息"
;
okMsg
=
MessageUtils
.
getText
(
"smfcore.barcode.clearOldLock"
,
new
String
[]{
rfid
,
rfidLoc
,
barcode
.
getBarcode
(),
pos
.
getPosName
()},
MessageUtils
.
getDefaultLocal
(),
"{0}[{1}][{2}]锁定库位[{3}],清理旧有锁定信息"
)
;
resultMap
.
put
(
"result"
,
result
);
resultMap
.
put
(
"msg"
,
okMsg
);
//已经锁定过库位,但不是同一个条码,需要把对应位置的锁定信息清理掉
ReelLockPosUtil
.
removeReelLockPosInfo
(
oldLockInfo
.
getBarcode
());
log
.
info
(
"清理锁定库位:库位号["
+
oldLockInfo
.
getLockPosName
()
+
"]上物料["
+
oldLockInfo
.
getBarcode
()
+
"]锁定的库位"
);
EnLog
.
info
(
"Clean lock position: Position ["
+
oldLockInfo
.
getLockPosName
()
+
"] Material ["
+
oldLockInfo
.
getBarcode
()
+
"] locked position"
);
}
}
log
.
info
(
okMsg
+
oldLockInfo
);
EnLog
.
info
(
"Lock position success info: "
+
oldLockInfo
);
ReelLockPosInfo
reelLocInfo
=
new
ReelLockPosInfo
();
reelLocInfo
.
setBarcode
(
barcode
.
getBarcode
());
...
...
@@ -329,7 +328,7 @@ public class DeviceController {
reelLocInfo
=
ReelLockPosUtil
.
addReelLockPosInfo
(
reelLocInfo
,
cidList
);
if
(
reelLocInfo
==
null
)
{
errorMsg
=
"["
+
barcode
.
getBarcode
()
+
"]库位["
+
reelLocInfo
.
getLockPosName
()+
"]已被锁定,暂停入库"
;
errorMsg
=
MessageUtils
.
getText
(
"smfcore.linemsg.posLock"
,
new
String
[]{
barcode
.
getBarcode
(),
reelLocInfo
.
getLockPosName
()},
MessageUtils
.
getDefaultLocal
(),
"[{0}]库位[{1}]已被锁定,暂停入库"
)
;
lineMsg
=
errorMsg
;
DeviceMessageUtil
.
updateLineMsg
(
lineMsg
,
code
,
cids
,
reelLocInfo
.
getLockPosName
(),
"smfcore.linemsg.posLock"
,
new
String
[]{
barcode
.
getBarcode
(),
reelLocInfo
.
getLockPosName
()});
...
...
@@ -344,16 +343,17 @@ public class DeviceController {
}
else
{
resultMap
.
put
(
"result"
,
"104"
);
errorMsg
=
"["
+
barcode
.
getBarcode
()
+
"]未找到可用的["
+
barcode
.
getPlateSize
()
+
"x"
+
barcode
.
getHeight
()
+
"]仓位"
;
errorMsg
=
MessageUtils
.
getText
(
"smfcore.barcode.noPutInPos"
,
new
String
[]{
barcode
.
getBarcode
(),
barcode
.
getPlateSize
()+
""
,
barcode
.
getHeight
()+
""
},
MessageUtils
.
getDefaultLocal
(),
"[{0}]未找到[{1}x{2}]仓位"
)
;
resultMap
.
put
(
"msg"
,
errorMsg
);
}
}
catch
(
ValidateException
ve
)
{
errorMsg
=
ve
.
getMessage
();
errorMsg
=
MessageUtils
.
getText
(
ve
.
getMsgKey
(),
ve
.
getMsgParam
(),
MessageUtils
.
getDefaultLocal
(),
ve
.
getDefaultMsg
());
log
.
info
(
"查找空库位失败:"
+
errorMsg
);
EnLog
.
info
(
"Find empty position failed: "
+
errorMsg
);
resultMap
.
put
(
"result"
,
"105"
);
resultMap
.
put
(
"msg"
,
errorMsg
);
resultMap
.
put
(
"msg"
,
errorMsg
);
}
catch
(
Exception
e
)
{
errorMsg
=
e
.
getMessage
();
log
.
info
(
"查找空库位失败,"
,
e
);
...
...
src/main/java/com/neotel/smfcore/core/equipment/bean/EquipStatusBean.java
查看文件 @
b23370b
package
com
.
neotel
.
smfcore
.
core
.
equipment
.
bean
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.base.Strings
;
import
com.neotel.smfcore.core.equipment.enums.EquipmentType
;
import
com.neotel.smfcore.core.message.enums.MessageType
;
...
...
@@ -134,17 +135,47 @@ public class EquipStatusBean implements Serializable {
return
null
;
}
public
String
getShowMsg
(
Locale
locale
){
MessageType
[]
types
=
new
MessageType
[]{
MessageType
.
ERROR
,
MessageType
.
WARNING
,
MessageType
.
INFO
,
MessageType
.
SHOW
};
for
(
MessageType
type
:
types
)
{
EquipMsg
showMsg
=
getMsgByType
(
type
.
name
());
if
(
showMsg
!=
null
){
public
String
getShowMsg
(
Locale
locale
)
{
if
(
ObjectUtil
.
isEmpty
(
this
.
msgList
))
{
return
""
;
}
String
returnMsg
=
""
;
for
(
EquipMsg
msg
:
msgList
)
{
String
mMsg
=
msg
.
getMsg
();
if
(
ObjectUtil
.
isEmpty
(
returnMsg
))
{
returnMsg
=
mMsg
;
}
else
{
returnMsg
+=
";"
+
mMsg
;
}
}
return
returnMsg
;
}
public
String
getErrorMsg
(
Locale
locale
)
{
if
(
ObjectUtil
.
isEmpty
(
this
.
msgList
))
{
return
""
;
}
for
(
EquipMsg
msg
:
msgList
)
{
return
showMsg
.
getShowMsg
(
locale
);
if
(
msg
.
getType
().
toUpperCase
().
equals
(
MessageType
.
ERROR
.
name
()))
{
return
msg
.
getMsg
();
}
}
return
""
;
}
// public String getShowMsg(Locale locale){
// MessageType[] types=new MessageType[]{MessageType.ERROR,MessageType.WARNING,MessageType.INFO,MessageType.SHOW };
// for (MessageType type :
// types) {
// EquipMsg showMsg= getMsgByType(type.name());
// if(showMsg!=null){
//
// return showMsg.getShowMsg(locale);
// }
// }
// return "";
// }
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论