Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit cd65a629
由
zshaohui
编写于
2023-09-15 16:50:23 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.入库时,记录没验证成功的
1 个父辈
07e645ec
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
53 行增加
和
3 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
查看文件 @
cd65a62
...
...
@@ -20,6 +20,7 @@ import com.neotel.smfcore.core.device.enums.BOX_STATUS;
import
com.neotel.smfcore.core.device.enums.OP
;
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.enums.INLIST_STATUS
;
import
com.neotel.smfcore.core.inList.service.po.InList
;
import
com.neotel.smfcore.core.inList.service.po.InListItem
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
...
...
@@ -353,6 +354,11 @@ public class RobotBoxHandler extends BaseDeviceHandler {
// lineMsg = "系统更新中,暂停出入库";
lineMsg
=
"System update in progress, suspend the inlet and outlet"
;
DeviceMessageUtil
.
updateLineMsg
(
lineMsg
,
code
,
cids
,
""
,
"smfcore.linemsg.update"
,
null
);
Barcode
barcode
=
new
Barcode
();
barcode
.
setBarcode
(
code
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
lineMsg
);
resultMap
.
put
(
"result"
,
"100"
);
resultMap
.
put
(
"msg"
,
lineMsg
);
return
resultMap
;
...
...
@@ -395,6 +401,11 @@ public class RobotBoxHandler extends BaseDeviceHandler {
//无可用的料仓
resultMap
.
put
(
"result"
,
"99"
);
errorMsg
=
"No Available Storage Equipment"
;
Barcode
barcode
=
new
Barcode
();
barcode
.
setBarcode
(
code
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"msg"
,
errorMsg
);
}
else
{
try
{
...
...
@@ -406,6 +417,9 @@ public class RobotBoxHandler extends BaseDeviceHandler {
errorMsg
=
"["
+
barcode
.
getBarcode
()+
"]"
+
MessageUtils
.
getText
(
"smfcore.error.barcode.expired"
,
new
Locale
(
"en"
,
"US"
),
"物料已过期,无法入库"
);
resultMap
.
put
(
"msg"
,
errorMsg
);
log
.
error
(
"物料["
+
barcode
.
getBarcode
()+
"]已过期,无法入库"
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
return
resultMap
;
}
...
...
@@ -457,6 +471,8 @@ public class RobotBoxHandler extends BaseDeviceHandler {
errorMsg
=
"Serial No.(S)["
+
barcode
.
getBarcode
()
+
"] already have storage task"
;
resultMap
.
put
(
"msg"
,
errorMsg
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
//判断原任务是否需要NG
Integer
barcodeSet
=
dataCache
.
getCache
(
Constants
.
CACHE_SAME_BARCODE_SETTINGS
);
if
(
barcodeSet
==
null
||
barcodeSet
==
1
)
{
...
...
@@ -484,6 +500,8 @@ public class RobotBoxHandler extends BaseDeviceHandler {
resultMap
.
put
(
"result"
,
"98"
);
resultMap
.
put
(
"msg"
,
errorMsg
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"posId"
,
dataLog
.
getPosName
());
resultMap
.
put
(
"plateW"
,
barcode
.
getPlateSize
());
resultMap
.
put
(
"plateH"
,
barcode
.
getHeight
());
...
...
@@ -516,6 +534,9 @@ public class RobotBoxHandler extends BaseDeviceHandler {
//已有待完成的入库任务,直接NG
resultMap
.
put
(
"result"
,
"108"
);
errorMsg
=
"Serial No.(S)["
+
barcode
.
getBarcode
()
+
"] already have task =["
+
dataLog
.
getInOutType
()+
"] ["
+
dataLog
.
getStatus
()+
"]"
;
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"msg"
,
errorMsg
);
log
.
info
(
"获取["
+
code
+
"]的入库库位,条码已有入库任务posname["
+
dataLog
.
getPosName
()
+
"],的入库任务,任务状态["
+
dataLog
.
getStatus
()+
"],直接NG"
);
return
resultMap
;
...
...
@@ -523,6 +544,9 @@ public class RobotBoxHandler extends BaseDeviceHandler {
//已有待完成的出库任务,直接NG
resultMap
.
put
(
"result"
,
"108"
);
errorMsg
=
"Serial No.(S)["
+
barcode
.
getBarcode
()
+
"] already have task =["
+
dataLog
.
getInOutType
()+
"] ["
+
dataLog
.
getStatus
()+
"]"
;
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"msg"
,
errorMsg
);
log
.
info
(
"获取["
+
code
+
"]的入库库位,条码已有入库任务posname["
+
dataLog
.
getPosName
()
+
"],的出库任务,任务状态["
+
dataLog
.
getStatus
()+
"],直接NG"
);
return
resultMap
;
...
...
@@ -568,6 +592,9 @@ public class RobotBoxHandler extends BaseDeviceHandler {
resultMap
.
put
(
"result"
,
"110"
);
resultMap
.
put
(
"barcode"
,
barcode
.
getBarcode
());
errorMsg
=
MessageUtils
.
getText
(
"smfcore.api.toXray"
,
new
String
[]{
barcode
.
getBarcode
()},
new
Locale
(
"en"
,
"US"
),
"{0}需要去点料"
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"msg"
,
errorMsg
);
}
else
{
...
...
@@ -625,6 +652,11 @@ public class RobotBoxHandler extends BaseDeviceHandler {
}
catch
(
ValidateException
ve
)
{
errorMsg
=
ve
.
getMessage
();
log
.
info
(
"Failed to find empty storage space:"
+
errorMsg
);
Barcode
barcode
=
new
Barcode
();
barcode
.
setBarcode
(
code
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"result"
,
"105"
);
errorMsg
=
MessageUtils
.
getText
(
ve
.
getMsgKey
(),
ve
.
getMsgParam
(),
new
Locale
(
"en"
,
"US"
),
ve
.
getDefaultMsg
());
resultMap
.
put
(
"msg"
,
errorMsg
);
...
...
@@ -636,11 +668,21 @@ public class RobotBoxHandler extends BaseDeviceHandler {
if
(
ObjectUtil
.
isEmpty
(
errorMsg
)
&&
ObjectUtil
.
isNotEmpty
(
apiException
.
getMessage
())){
errorMsg
=
apiException
.
getMessage
();
}
Barcode
barcode
=
new
Barcode
();
barcode
.
setBarcode
(
code
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"msg"
,
errorMsg
);
}
catch
(
Exception
e
)
{
errorMsg
=
e
.
getMessage
();
log
.
info
(
"Failed to find empty storage space,"
,
e
);
Barcode
barcode
=
new
Barcode
();
barcode
.
setBarcode
(
code
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
API001NG
,
errorMsg
);
resultMap
.
put
(
"result"
,
"105"
);
resultMap
.
put
(
"msg"
,
errorMsg
);
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
查看文件 @
cd65a62
...
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.custom.micron1053.loading.util;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.inList.enums.INITEM.INITEM_STATUS
;
...
...
@@ -84,7 +85,11 @@ public class LoadingUtil {
}
//获取库位号成功,增加一个正在入库的
public
void
AddInListItem
(
String
rfid
,
Barcode
barcode
,
String
posName
,
String
s
)
{
public
void
AddInListItem
(
String
rfid
,
Barcode
barcode
,
String
posName
,
String
state
){
AddInListItem
(
rfid
,
barcode
,
posName
,
state
,
""
);
}
public
void
AddInListItem
(
String
rfid
,
Barcode
barcode
,
String
posName
,
String
state
,
String
ngMsg
)
{
InList
inList
=
getInlist
();
if
(
inList
==
null
)
{
...
...
@@ -95,12 +100,15 @@ public class LoadingUtil {
String
mtype
=
MicronDataCache
.
GetReelType
(
barcode
.
getPlateSize
(),
barcode
.
getHeight
());
log
.
info
(
"为入库单["
+
inList
.
getName
()
+
"]增加一条入库信息:barcode["
+
barcode
.
getBarcode
()
+
"],mtype["
+
mtype
+
"],pn["
+
barcode
.
getPartNumber
()
+
"],rfid["
+
rfid
+
"],posName["
+
posName
+
"],s["
+
s
+
"]"
);
log
.
info
(
"为入库单["
+
inList
.
getName
()
+
"]增加一条入库信息:barcode["
+
barcode
.
getBarcode
()
+
"],mtype["
+
mtype
+
"],pn["
+
barcode
.
getPartNumber
()
+
"],rfid["
+
rfid
+
"],posName["
+
posName
+
"],s["
+
s
tate
+
"]"
);
InListItem
item
=
InListItem
.
newMItem
(
inList
.
getName
(),
barcode
,
rfid
,
posName
,
s
,
mtype
);
InListItem
item
=
InListItem
.
newMItem
(
inList
.
getName
(),
barcode
,
rfid
,
posName
,
s
tate
,
mtype
);
if
(
inList
.
getEndRfidList
()
!=
null
&&
inList
.
getEndRfidList
().
contains
(
rfid
))
{
item
.
setRfidEnd
(
true
);
}
if
(
StringUtils
.
isNotBlank
(
ngMsg
)){
item
.
setNgMsg
(
ngMsg
);
}
item
=
inListItemManager
.
save
(
item
);
List
<
InListItem
>
items
=
inList
.
getInListItems
();
items
.
add
(
item
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论