Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 37544f10
由
LN
编写于
2023-04-14 10:28:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.取消任务时不禁用库位。2.麦康尼料仓入库增加容量验证
1 个父辈
2029703b
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
56 行增加
和
4 行删除
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
src/main/java/com/neotel/smfcore/core/system/rest/TaskController.java
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronStatusController.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
查看文件 @
37544f1
...
@@ -428,8 +428,11 @@ public class RobotBoxHandler extends BaseDeviceHandler {
...
@@ -428,8 +428,11 @@ public class RobotBoxHandler extends BaseDeviceHandler {
storages
.
add
(
storage
);
storages
.
add
(
storage
);
}
}
}
else
if
(
inStorageType
==
2
){
}
else
if
(
inStorageType
==
2
){
if
(
storage
.
isTHIRDBox
()){
if
(
storage
.
isTHIRDBox
())
{
storages
.
add
(
storage
);
//麦康尼料仓需要判断 当前剩余空库位是否可以放下料盘
if
(
dataCache
.
thirdBoxCanPutIn
(
storage
,
barcode
.
getPlateSize
(),
barcode
.
getHeight
()))
{
storages
.
add
(
storage
);
}
}
}
}
else
{
}
else
{
storages
.
add
(
storage
);
storages
.
add
(
storage
);
...
...
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
查看文件 @
37544f1
package
com
.
neotel
.
smfcore
.
core
.
device
.
util
;
package
com
.
neotel
.
smfcore
.
core
.
device
.
util
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
...
@@ -10,6 +11,7 @@ import com.neotel.smfcore.core.barcode.service.manager.IComponentManager;
...
@@ -10,6 +11,7 @@ import com.neotel.smfcore.core.barcode.service.manager.IComponentManager;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Component
;
import
com.neotel.smfcore.core.barcode.service.po.Component
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.barcode.utils.CodeResolve
;
import
com.neotel.smfcore.core.device.bean.BoxStatusBean
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.inList.util.InListCache
;
import
com.neotel.smfcore.core.inList.util.InListCache
;
import
com.neotel.smfcore.core.inout.service.manager.IInOutDataManager
;
import
com.neotel.smfcore.core.inout.service.manager.IInOutDataManager
;
...
@@ -776,6 +778,47 @@ public class DataCache {
...
@@ -776,6 +778,47 @@ public class DataCache {
}
}
return
availableStorageIds
;
return
availableStorageIds
;
}
}
public
boolean
thirdBoxCanPutIn
(
Storage
storage
,
int
plateW
,
int
plateH
)
{
try
{
StatusBean
bean
=
DevicesStatusUtil
.
getStatusBean
(
storage
.
getCid
());
if
(
bean
==
null
||
bean
.
timeOut
()
||
!
bean
.
isAvailable
())
{
return
false
;
}
Map
<
String
,
Integer
>
posCapMap
=
null
;
for
(
BoxStatusBean
boxStatus
:
bean
.
getBoxStatus
().
values
()
)
{
posCapMap
=
boxStatus
.
getCapacity
();
if
(
posCapMap
!=
null
&&
posCapMap
.
size
()
>
0
)
{
break
;
}
}
if
(
posCapMap
!=
null
&&
posCapMap
.
size
()
>
0
)
{
for
(
String
key
:
posCapMap
.
keySet
()
)
{
int
count
=
posCapMap
.
get
(
key
);
if
(
count
>
0
)
{
String
[]
array
=
key
.
split
(
"x"
);
if
(
array
.
length
==
2
)
{
int
w
=
Convert
.
toInt
(
array
[
0
]);
int
h
=
Convert
.
toInt
(
array
[
1
]);
if
(
storage
.
canPutInPos
(
plateW
,
plateH
,
w
,
h
))
{
return
true
;
}
}
}
}
}
else
{
//未找到容量也返回true
return
true
;
}
}
catch
(
Exception
ex
)
{
log
.
error
(
"thirdBoxCanPutIn ["
+
storage
.
getCid
()
+
"] ["
+
plateW
+
"] ["
+
plateH
+
"]出错:"
+
ex
.
getMessage
());
}
return
false
;
}
public
Storage
AutoCreateStorage
(
String
cid
,
String
deviceType
)
{
public
Storage
AutoCreateStorage
(
String
cid
,
String
deviceType
)
{
//判断cid存在
//判断cid存在
Storage
storage
=
null
;
Storage
storage
=
null
;
...
...
src/main/java/com/neotel/smfcore/core/system/rest/TaskController.java
查看文件 @
37544f1
...
@@ -234,7 +234,8 @@ public class TaskController {
...
@@ -234,7 +234,8 @@ public class TaskController {
if
(
task
.
isCancel
()||
task
.
isFinished
()||
task
.
isEnd
()){
if
(
task
.
isCancel
()||
task
.
isFinished
()||
task
.
isEnd
()){
throw
new
ValidateException
(
"smfcore.taskHasEnd"
,
"任务{0}已取消或已结束"
,
new
String
[]{
task
.
getPosName
()}
);
throw
new
ValidateException
(
"smfcore.taskHasEnd"
,
"任务{0}已取消或已结束"
,
new
String
[]{
task
.
getPosName
()}
);
}
}
taskService
.
cancelTaskAndDisPos
(
taskId
);
//取消任务不需要屏蔽库位
taskService
.
cancelTask
(
taskId
);
}
}
return
new
ResponseEntity
<>(
HttpStatus
.
OK
);
return
new
ResponseEntity
<>(
HttpStatus
.
OK
);
}
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronStatusController.java
查看文件 @
37544f1
...
@@ -223,10 +223,15 @@ public class MicronStatusController {
...
@@ -223,10 +223,15 @@ public class MicronStatusController {
}
}
Map
<
String
,
String
>
msgMap
=
s
.
getMsgMap
();
Map
<
String
,
String
>
msgMap
=
s
.
getMsgMap
();
if
(
msgMap
!=
null
&&
msgMap
.
size
()>
0
)
{
if
(
msgMap
!=
null
&&
msgMap
.
size
()>
0
)
{
String
name
=
cid
;
Storage
storage
=
dataCache
.
getStorage
(
cid
);
if
(
storage
!=
null
){
name
=
storage
.
getName
();
}
for
(
String
msg
:
for
(
String
msg
:
msgMap
.
keySet
())
{
msgMap
.
keySet
())
{
String
type
=
msgMap
.
getOrDefault
(
msg
,
""
);
String
type
=
msgMap
.
getOrDefault
(
msg
,
""
);
dto
.
getMsgList
().
add
(
new
EquipMsg
(
cid
,
s
.
getStatus
(),
msg
,
new
Date
(
s
.
getTime
()),
type
.
toUpperCase
(),
""
,
""
,
new
String
[]{}));
dto
.
getMsgList
().
add
(
new
EquipMsg
(
name
,
s
.
getStatus
(),
msg
,
new
Date
(
s
.
getTime
()),
type
.
toUpperCase
(),
""
,
""
,
new
String
[]{}));
}
}
}
}
// String msg=s.getErrorMsg(locale);
// String msg=s.getErrorMsg(locale);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论