Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f6ad602a
由
zshaohui
编写于
2023-11-28 14:02:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.下架任务创建时,如果当前库位有异常,返回ng
2.出库时,逻辑修改
1 个父辈
1f4d9263
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
10 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLPShelfHandler.java
src/main/java/com/neotel/smfcore/hikvision_mobile/HikVisionController.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/NLPShelfHandler.java
查看文件 @
f6ad602
...
@@ -377,13 +377,13 @@ public class NLPShelfHandler extends BaseDeviceHandler{
...
@@ -377,13 +377,13 @@ public class NLPShelfHandler extends BaseDeviceHandler{
outResult
=
noReelPosName
;
outResult
=
noReelPosName
;
boolean
accept
=
hikVisionApi
.
acceptTaskStatus
(
queueTask
);
boolean
accept
=
hikVisionApi
.
acceptTaskStatus
(
queueTask
);
if
(
accept
){
if
(
accept
){
super
.
finishedOutPos
(
storage
.
getCid
(),
noReelPosName
);
super
.
finishedOutPos
(
queueTask
.
getCid
(),
noReelPosName
);
String
msg
=
queueTask
.
getBarcode
()+
"从"
+
noReelPosName
+
"出库成功"
;
String
msg
=
queueTask
.
getBarcode
()+
"从"
+
noReelPosName
+
"出库成功"
;
log
.
info
(
msg
);
log
.
info
(
msg
);
break
;
break
;
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"库位:"
+
noReelPosName
+
"出库出错"
,
e
);
log
.
error
(
"库位:"
+
noReelPosName
+
"出库出错"
,
e
.
getMessage
()
);
break
;
break
;
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/hikvision_mobile/HikVisionController.java
查看文件 @
f6ad602
...
@@ -103,7 +103,7 @@ public class HikVisionController {
...
@@ -103,7 +103,7 @@ public class HikVisionController {
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
"smfcore.shelfNotExist"
,
new
String
[]{
shelfCode
},
"{0}对应的料架不存在"
);
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
"smfcore.shelfNotExist"
,
new
String
[]{
shelfCode
},
"{0}对应的料架不存在"
);
}
}
boolean
hasErrorPos
=
hasErrorPos
(
storage
.
getCid
());
boolean
hasErrorPos
=
hasErrorPos
(
storage
.
getCid
()
,
""
);
if
(
hasErrorPos
){
if
(
hasErrorPos
){
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
""
,
new
String
[]{},
"当前货架状态异常,无法发起上架任务"
);
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
""
,
new
String
[]{},
"当前货架状态异常,无法发起上架任务"
);
}
}
...
@@ -220,12 +220,6 @@ public class HikVisionController {
...
@@ -220,12 +220,6 @@ public class HikVisionController {
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
"smfcore.shelfNotExist"
,
new
String
[]{
info
.
getShelfCode
()},
"{0}对应的料架不存在"
);
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
"smfcore.shelfNotExist"
,
new
String
[]{
info
.
getShelfCode
()},
"{0}对应的料架不存在"
);
}
}
boolean
hasErrorPos
=
hasErrorPos
(
storage
.
getCid
());
if
(
hasErrorPos
){
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
""
,
new
String
[]{},
"当前物料唯一码货位异常,无法发起下架任务"
);
}
//判断是否已经生成任务
//判断是否已经生成任务
int
count
=
dataLogManager
.
countByReqCode
(
reqCode
);
int
count
=
dataLogManager
.
countByReqCode
(
reqCode
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
...
@@ -237,6 +231,12 @@ public class HikVisionController {
...
@@ -237,6 +231,12 @@ public class HikVisionController {
if
(
pos
==
null
)
{
if
(
pos
==
null
)
{
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
""
,
null
,
info
.
getUniqueCode
()
+
"不在库位中"
);
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
""
,
null
,
info
.
getUniqueCode
()
+
"不在库位中"
);
}
}
boolean
hasErrorPos
=
hasErrorPos
(
storage
.
getCid
(),
pos
.
getPosName
());
if
(
hasErrorPos
){
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
""
,
new
String
[]{},
info
.
getUniqueCode
()+
":当前物料唯一码货位异常,无法发起下架任务"
);
}
//判断
//判断
if
(!
storage
.
getId
().
equals
(
pos
.
getStorageId
()))
{
if
(!
storage
.
getId
().
equals
(
pos
.
getStorageId
()))
{
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
"smfcore.shelfNotExist"
,
new
String
[]{
info
.
getUniqueCode
()},
"{0}对应的料架不存在"
);
return
ApiResponse
.
apiResponse
(
reqCode
,
ResponseCode
.
REQUEST_ERROR
.
getCode
(),
""
,
"smfcore.shelfNotExist"
,
new
String
[]{
info
.
getUniqueCode
()},
"{0}对应的料架不存在"
);
...
@@ -511,7 +511,7 @@ public class HikVisionController {
...
@@ -511,7 +511,7 @@ public class HikVisionController {
}
}
private
boolean
hasErrorPos
(
String
cid
)
{
private
boolean
hasErrorPos
(
String
cid
,
String
posName
)
{
List
<
List
<
String
>>
deviceData
=
DevicesStatusUtil
.
getDeviceData
(
cid
);
List
<
List
<
String
>>
deviceData
=
DevicesStatusUtil
.
getDeviceData
(
cid
);
if
(
deviceData
!=
null
&&
deviceData
.
size
()
==
2
)
{
if
(
deviceData
!=
null
&&
deviceData
.
size
()
==
2
)
{
List
<
String
>
hasReelPosErrorList
=
deviceData
.
get
(
0
);
List
<
String
>
hasReelPosErrorList
=
deviceData
.
get
(
0
);
...
@@ -525,8 +525,16 @@ public class HikVisionController {
...
@@ -525,8 +525,16 @@ public class HikVisionController {
if
(
pos
.
isUsed
())
{
if
(
pos
.
isUsed
())
{
continue
;
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
posName
))
{
if
(
posName
.
equals
(
pos
.
getPosName
()))
{
log
.
info
(
posName
+
"对应的货架位异常"
);
return
true
;
return
true
;
}
}
}
else
{
log
.
info
(
posName
+
"对应的货架位异常"
);
return
true
;
}
}
}
}
List
<
String
>
noReelPosErrorList
=
deviceData
.
get
(
1
);
List
<
String
>
noReelPosErrorList
=
deviceData
.
get
(
1
);
...
@@ -540,8 +548,16 @@ public class HikVisionController {
...
@@ -540,8 +548,16 @@ public class HikVisionController {
if
(!
pos
.
isUsed
())
{
if
(!
pos
.
isUsed
())
{
continue
;
continue
;
}
}
if
(
StringUtils
.
isNotBlank
(
posName
))
{
if
(
posName
.
equals
(
pos
.
getPosName
()))
{
log
.
info
(
posName
+
"对应的货架位异常"
);
return
true
;
return
true
;
}
}
}
else
{
log
.
info
(
posName
+
"对应的货架位异常"
);
return
true
;
}
}
}
}
}
}
return
false
;
return
false
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论