Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 76483319
由
LN
编写于
2023-08-29 10:56:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
需要点料时如果CI在线,返回需要点料。点料完成更新状态=XrayEnd,再次获取库位号时不需要验证。
1 个父辈
032cf221
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
82 行增加
和
19 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
src/main/java/com/neotel/smfcore/core/inList/enums/INITEM/INITEM_STATUS.java
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronDeviceController.java
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
src/main/java/com/neotel/smfcore/custom/micron1053/util/MicronDataCache.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
查看文件 @
7648331
...
...
@@ -21,6 +21,7 @@ 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.service.po.InList
;
import
com.neotel.smfcore.core.inList.service.po.InListItem
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
import
com.neotel.smfcore.core.materialLog.service.manager.IMaterialLogManager
;
import
com.neotel.smfcore.core.materialLog.service.po.MaterialLog
;
...
...
@@ -562,6 +563,15 @@ public class RobotBoxHandler extends BaseDeviceHandler {
barcode
=
ApiCheck
(
rfid
,
barcode
);
if
(
barcode
.
isToXray
()){
log
.
info
(
"物料["
+
barcode
.
getBarcode
()+
"]需要先去点料"
);
resultMap
.
put
(
"result"
,
"110"
);
errorMsg
=
MessageUtils
.
getText
(
"smfcore.api.toXray"
,
new
String
[]{
barcode
.
getBarcode
()},
new
Locale
(
"en"
,
"US"
),
"{0}需要去点料"
);
resultMap
.
put
(
"msg"
,
errorMsg
);
}
else
{
StoragePos
pos
=
taskService
.
findEmptyPosForPutIn
(
storages
,
barcode
,
""
,
lastPosId
);
if
(
pos
!=
null
)
{
...
...
@@ -610,6 +620,7 @@ public class RobotBoxHandler extends BaseDeviceHandler {
resultMap
.
put
(
"msg"
,
errorMsg
);
}
}
}
catch
(
ValidateException
ve
)
{
errorMsg
=
ve
.
getMessage
();
log
.
info
(
"Failed to find empty storage space:"
+
errorMsg
);
...
...
@@ -663,6 +674,17 @@ public class RobotBoxHandler extends BaseDeviceHandler {
if
(!
MicronApi
.
isEnable
())
{
return
barcode
;
}
InListItem
item
=
loadingUtil
.
GetInlistItem
(
barcode
.
getBarcode
());
if
(
item
!=
null
){
log
.
info
(
"条码["
+
barcode
.
getBarcode
()
+
"]获取库位号,已存在inListItem, 状态="
+
item
.
getState
());
if
(
item
.
getState
()==
INITEM_STATUS
.
XRayEnd
){
//更改状态为入库中
loadingUtil
.
updateItemState
(
barcode
.
getBarcode
(),
""
,
INITEM_STATUS
.
PutIn
);
return
barcode
;
}
}
barcode
.
setToXray
(
false
);
barcode
.
setInListName
(
""
);
String
operationId
=
""
;
...
...
@@ -673,6 +695,8 @@ public class RobotBoxHandler extends BaseDeviceHandler {
if
(!
inList
.
isValidRfid
(
rfid
))
{
return
barcode
;
}
operationId
=
inList
.
getOperationId
();
if
(
ObjectUtil
.
isEmpty
(
operationId
))
{
log
.
info
(
"条码["
+
barcode
.
getBarcode
()
+
"]获取库位号,operationId 为空,不需要接口验证"
);
...
...
@@ -694,13 +718,20 @@ public class RobotBoxHandler extends BaseDeviceHandler {
log
.
info
(
"条码["
+
barcode
.
getBarcode
()
+
"]获取库位号,需要去点料, 勾选了 Xray Bypass,继续入库 "
);
barcode
.
setInListName
(
inList
.
getName
());
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
PutIn
);
}
else
{
}
else
{
//判断点料机是否在线
if
(
MicronDataCache
.
DeviceOnLine
(
"CI"
))
{
barcode
.
setToXray
(
true
);
barcode
.
setInListName
(
inList
.
getName
());
barcodeManager
.
saveBarcode
(
barcode
);
loadingUtil
.
AddInListItem
(
rfid
,
barcode
,
""
,
INITEM_STATUS
.
XRay
);
log
.
info
(
"条码["
+
barcode
.
getBarcode
()
+
"]获取库位号,需要去点料,点料机CI当前在线,返回需要点料"
);
}
else
{
log
.
info
(
"条码["
+
barcode
.
getBarcode
()
+
"]获取库位号,需要去点料,点料机未连接,直接异常"
);
throw
new
ApiException
(
"smfcore.micron.xray.offline"
,
"{0}需要点料,点料机不在线"
,
new
String
[]{
barcode
.
getBarcode
()});
// barcode.setToXray(true);
// barcode.setInListName(inList.getName());
// loadingUtil.AddInListItem(rfid,barcode,"", INITEM_STATUS.XRay);
log
.
error
(
"条码["
+
barcode
.
getBarcode
()
+
"]获取库位号,需要去点料,点料机CI未连接,直接异常"
);
throw
new
ApiException
(
"smfcore.micron.xray.offline"
,
"{0}需要点料,点料机不在线"
,
new
String
[]{
barcode
.
getBarcode
()});
}
}
}
else
{
barcode
.
setInListName
(
inList
.
getName
());
...
...
src/main/java/com/neotel/smfcore/core/inList/enums/INITEM/INITEM_STATUS.java
查看文件 @
7648331
...
...
@@ -23,5 +23,7 @@ public class INITEM_STATUS {
public
static
int
Success
=
6
;
/**入库通知失败*/
public
static
int
Fail
=
7
;
/**已点料完成,等待获取库位号*/
public
static
int
XRayEnd
=
8
;
}
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronDeviceController.java
查看文件 @
7648331
...
...
@@ -376,8 +376,8 @@ public class MicronDeviceController {
//上传数量
boolean
result
=
MicronApi
.
Api008
(
barcode
.
getBarcode
(),
qty
,
oldQty
);
if
(
result
)
{
//
TODO 重新
获取库位号
loadingUtil
.
xRayEndUpdateItem
(
barcode
.
getBarcode
(),
qty
,
INITEM_STATUS
.
PutIn
);
//
点料已完成,等待
获取库位号
loadingUtil
.
xRayEndUpdateItem
(
barcode
.
getBarcode
(),
qty
,
INITEM_STATUS
.
XRayEnd
);
return
ResultBean
.
newOkResult
(
"ok"
);
}
else
{
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
查看文件 @
7648331
...
...
@@ -32,10 +32,10 @@ import java.util.stream.Collectors;
public
class
LoadingUtil
{
@Autowired
private
DataCache
dataCache
;
private
DataCache
dataCache
;
@Autowired
private
InListCache
inListCache
;
private
InListCache
inListCache
;
@Autowired
private
IInListManager
inListManager
;
...
...
@@ -51,14 +51,14 @@ public class LoadingUtil {
if
(
loadingInfo
==
null
||
ObjectUtil
.
isEmpty
(
loadingInfo
.
operationId
))
{
}
else
{
InList
inlist
=
inListCache
.
getInList
(
loadingInfo
.
getInlistName
());
InList
inlist
=
inListCache
.
getInList
(
loadingInfo
.
getInlistName
());
return
inlist
;
}
return
null
;
}
//获取库位号成功,增加一个正在入库的
public
void
AddInListItem
(
String
rfid
,
Barcode
barcode
,
String
posName
,
int
s
)
{
public
void
AddInListItem
(
String
rfid
,
Barcode
barcode
,
String
posName
,
int
s
)
{
InList
inList
=
getInlist
();
if
(
inList
==
null
)
{
...
...
@@ -67,12 +67,12 @@ public class LoadingUtil {
inList
.
addRfid
(
rfid
);
inList
.
setStatus
(
INLIST_STATUS
.
ABNORMAL
);
String
mtype
=
MicronDataCache
.
GetReelType
(
barcode
.
getPlateSize
(),
barcode
.
getHeight
());
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
+
"]"
);
InListItem
item
=
InListItem
.
newMItem
(
inList
.
getName
(),
barcode
,
rfid
,
posName
,
s
,
mtype
);
if
(
inList
.
getEndRfidList
()!=
null
&&
inList
.
getEndRfidList
().
contains
(
rfid
))
{
InListItem
item
=
InListItem
.
newMItem
(
inList
.
getName
(),
barcode
,
rfid
,
posName
,
s
,
mtype
);
if
(
inList
.
getEndRfidList
()
!=
null
&&
inList
.
getEndRfidList
().
contains
(
rfid
))
{
item
.
setRfidEnd
(
true
);
}
item
=
inListItemManager
.
save
(
item
);
...
...
@@ -83,9 +83,26 @@ public class LoadingUtil {
inListCache
.
addInListToMap
(
inList
);
}
public
InListItem
GetInlistItem
(
String
barcode
)
{
InList
inList
=
getInlist
();
if
(
inList
==
null
)
{
return
null
;
}
for
(
InListItem
item
:
inList
.
getInListItems
())
{
if
(
item
.
getRi
().
equals
(
barcode
))
{
return
item
;
}
}
return
null
;
}
public
void
xRayEndUpdateItem
(
String
barcode
,
int
count
,
int
s
)
{
updateItemState
(
barcode
,
""
,
INITEM_STATUS
.
XRayFail
);
updateItemState
(
barcode
,
""
,
INITEM_STATUS
.
XRayFail
);
}
public
InListItem
updateItemState
(
String
barcode
,
String
posName
,
int
s
)
{
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/util/MicronDataCache.java
查看文件 @
7648331
...
...
@@ -81,7 +81,18 @@ public class MicronDataCache {
}
return
new
MicronEquipStatus
();
}
public
static
boolean
DeviceOnLine
(
String
name
)
{
if
(
ObjectUtil
.
isEmpty
(
name
))
{
name
=
"CI"
;
}
MicronEquipStatus
s
=
MicronDataCache
.
getStatus
(
name
);
if
(!
s
.
timeOut
())
{
if
(
s
.
getStatus
()
>=
1
)
{
return
true
;
}
}
return
false
;
}
public
static
String
GetReelType
(
int
w
,
int
h
)
{
// 310*80 = pcb 330*120= tray 386*86 =shoe box 400X70 Pizza box 其他的都是料盘
// PizzaBOX料格 62 400
...
...
src/main/resources/messages.properties
查看文件 @
7648331
...
...
@@ -354,6 +354,7 @@ smfcore.micron.nodata=\u672A\u627E\u5230\u4FE1\u606F
smfcore.api.fail
=
{0} Failed to get data
smfcore.micron.apiClose
=
Not yet open
smfcore.api.error
=
api.error: error={0},message={1},detial={2}
smfcore.api.toXray
=
{0}
\u9700\u8981\u
53BB
\u
70B9
\u6599
#smfclient.nlp.onlyOneTray=\u4E0D\u53EF\u540C\u65F6\u653E\u5165\u591A\u76D8\u7269\u6599:{0}
#smfclient.nlp.cannotFindPos={0}\u672A\u627E\u5230\u5E93\u4F4D:{1}
#smfclient.nlp.inputOk={0}\u5165\u5E93\u5230{1}\u6210\u529F
...
...
src/main/resources/messages_en_US.properties
查看文件 @
7648331
...
...
@@ -352,4 +352,5 @@ smfcore.expiration.notExist=expiration date config[{0}]does not exist
smfcore.micron.xray.offline
=
{0}Need to go to the count
\u
FF0CThe ordering machine is not online.
smfcore.micron.nodata
=
No information found
smfcore.api.fail
=
{0} Failed to get data
smfcore.micron.apiClose
=
Not yet open
\ No newline at end of file
smfcore.micron.apiClose
=
Not yet open
smfcore.api.toXray
=
{0}Need to Xray
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论