Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 408d82c7
由
LN
编写于
2024-01-26 13:38:34 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
已完成放料的料架不再锁定新位置
1 个父辈
9f680fa2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
56 行增加
和
30 行删除
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/shelf/bean/ShelfInfo.java
src/main/java/com/neotel/smfcore/core/shelf/rest/TaskShelfController.java
src/main/java/com/neotel/smfcore/core/shelf/util/TaskShelfUtil.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
408d82c
...
@@ -333,10 +333,11 @@ public class LiteOrderCache {
...
@@ -333,10 +333,11 @@ public class LiteOrderCache {
liteOrderMap
.
put
(
orderNo
,
order
);
liteOrderMap
.
put
(
orderNo
,
order
);
}
else
{
}
else
{
//取消任务料架位置锁定
TaskShelfUtil
.
cancelReelTask
(
task
);
if
(!
orderNo
.
equalsIgnoreCase
(
"PN"
)){
if
(!
orderNo
.
equalsIgnoreCase
(
"PN"
)){
log
.
error
(
"完成任务时,未找到工单["
+
orderNo
+
"]信息"
);
log
.
error
(
"["
+
task
.
getBarcode
()+
"]完成任务时,未找到工单["
+
orderNo
+
"]信息"
);
}
else
{
//取消任务料架位置锁定
TaskShelfUtil
.
cancelReelTask
(
task
);
}
}
}
}
}
}
...
@@ -414,7 +415,9 @@ public class LiteOrderCache {
...
@@ -414,7 +415,9 @@ public class LiteOrderCache {
//设置颜色
//设置颜色
Set
<
String
>
currentColors
=
new
HashSet
<>();
Set
<
String
>
currentColors
=
new
HashSet
<>();
for
(
DataLog
dataLog
:
taskService
.
getQueueTasks
())
{
for
(
DataLog
dataLog
:
taskService
.
getQueueTasks
())
{
currentColors
.
add
(
dataLog
.
getLightColor
());
if
(
ObjectUtil
.
isNotEmpty
(
dataLog
.
getLightColor
()))
{
currentColors
.
add
(
dataLog
.
getLightColor
());
}
}
}
ORDER_COLOR
nextColor
=
ORDER_COLOR
.
nextColor
(
currentColors
);
ORDER_COLOR
nextColor
=
ORDER_COLOR
.
nextColor
(
currentColors
);
return
nextColor
;
return
nextColor
;
...
...
src/main/java/com/neotel/smfcore/core/shelf/bean/ShelfInfo.java
查看文件 @
408d82c
...
@@ -62,6 +62,10 @@ public class ShelfInfo {
...
@@ -62,6 +62,10 @@ public class ShelfInfo {
*/
*/
private
int
maxLocCount
=
0
;
private
int
maxLocCount
=
0
;
/**
* 如果已绑定任务都放完成,可以离开
*/
private
boolean
needLeave
=
false
;
/**
/**
* 是否所有位置都已扫码亮灯
* 是否所有位置都已扫码亮灯
...
@@ -233,6 +237,21 @@ public class ShelfInfo {
...
@@ -233,6 +237,21 @@ public class ShelfInfo {
boolean
putInResult
=
shelfLoc
.
putIn
(
barcode
);
boolean
putInResult
=
shelfLoc
.
putIn
(
barcode
);
locMap
.
put
(
loc
,
shelfLoc
);
locMap
.
put
(
loc
,
shelfLoc
);
//判断是否放完
// if (!orderNo.equals(TaskShelfUtil.DEFAULT_ORDERNO)) {
int
lCount
=
0
;
for
(
ShelfLoc
nLoc
:
locMap
.
values
())
{
if
(
nLoc
.
isEmpty
())
{
lCount
++;
}
}
if
(
lCount
==
0
)
{
needLeave
=
true
;
}
// }
log
.
info
(
"料盘["
+
barcode
+
"]放入位置"
+
rfid
+
"["
+
loc
+
"]成功,料架是否需要离开="
+
needLeave
);
return
putInResult
;
return
putInResult
;
}
else
{
}
else
{
log
.
error
(
"料盘["
+
barcode
+
"]放入位置"
+
rfid
+
"["
+
loc
+
"]失败,此位置料盘已放入"
);
log
.
error
(
"料盘["
+
barcode
+
"]放入位置"
+
rfid
+
"["
+
loc
+
"]失败,此位置料盘已放入"
);
...
...
src/main/java/com/neotel/smfcore/core/shelf/rest/TaskShelfController.java
查看文件 @
408d82c
...
@@ -246,30 +246,30 @@ public class TaskShelfController {
...
@@ -246,30 +246,30 @@ public class TaskShelfController {
int
bigEmpty
=
0
;
int
bigEmpty
=
0
;
if
(
shelfInfo
!=
null
)
{
if
(
shelfInfo
!=
null
)
{
if
(
shelfInfo
.
getOrderNo
().
equals
(
TaskShelfUtil
.
DEFAULT_ORDERNO
))
{
// if (shelfInfo.getOrderNo().equals(TaskShelfUtil.DEFAULT_ORDERNO)) {
//
List
<
DataLog
>
allTask
=
taskService
.
getAllTasks
();
// List<DataLog> allTask=taskService.getAllTasks();
for
(
DataLog
log
:
// for (DataLog log :
allTask
)
{
// allTask) {
if
(
log
.
isFinished
()||
log
.
isEnd
()||
log
.
isCancel
()){
// if(log.isFinished()|| log.isEnd()||log.isCancel()){
continue
;
// continue;
}
// }
if
(
shelfInfo
.
isSmallReel
(
log
)){
// if(shelfInfo.isSmallReel(log)){
smallEmpty
++;
// smallEmpty++;
}
else
{
// }else{
bigEmpty
++;
// bigEmpty++;
}
// }
}
// List<Integer> shelfEmpty=shelfInfo.getEmptySlot();
// if(smallEmpty>shelfEmpty.get(0)){
// smallEmpty=shelfEmpty.get(0);
// }
// if(bigEmpty>shelfEmpty.get(1)){
// bigEmpty=shelfEmpty.get(0);
// }
// }
//
}
else
{
//// List<Integer> shelfEmpty=shelfInfo.getEmptySlot();
//// if(smallEmpty>shelfEmpty.get(0)){
//// smallEmpty=shelfEmpty.get(0);
//// }
//// if(bigEmpty>shelfEmpty.get(1)){
//// bigEmpty=shelfEmpty.get(0);
//// }
//
// } else {
Map
<
Integer
,
ShelfLoc
>
locMap
=
shelfInfo
.
getLocMap
();
Map
<
Integer
,
ShelfLoc
>
locMap
=
shelfInfo
.
getLocMap
();
for
(
ShelfLoc
shelfLoc
:
locMap
.
values
())
{
for
(
ShelfLoc
shelfLoc
:
locMap
.
values
())
{
if
(
shelfLoc
.
isEmpty
())
{
if
(
shelfLoc
.
isEmpty
())
{
...
@@ -280,7 +280,7 @@ public class TaskShelfController {
...
@@ -280,7 +280,7 @@ public class TaskShelfController {
}
}
}
}
}
}
}
//
}
}
}
List
<
Integer
>
result
=
new
ArrayList
<>();
List
<
Integer
>
result
=
new
ArrayList
<>();
...
@@ -405,7 +405,7 @@ public class TaskShelfController {
...
@@ -405,7 +405,7 @@ public class TaskShelfController {
for
(
String
tempRfid
:
for
(
String
tempRfid
:
map2
.
keySet
())
{
map2
.
keySet
())
{
ShelfInfo
shelfInfo
=
map2
.
get
(
tempRfid
);
ShelfInfo
shelfInfo
=
map2
.
get
(
tempRfid
);
msg
+=
"hSerial="
+
hSerial
+
",tempRfid="
+
tempRfid
+
",realRfid="
+
shelfInfo
.
getRealRfid
()+
"\r\n"
;
msg
+=
"hSerial="
+
hSerial
+
",tempRfid="
+
tempRfid
+
",realRfid="
+
shelfInfo
.
getRealRfid
()+
"
,needLeave="
+
shelfInfo
.
isNeedLeave
()+
"
\r\n"
;
}
}
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/core/shelf/util/TaskShelfUtil.java
查看文件 @
408d82c
...
@@ -40,6 +40,7 @@ public class TaskShelfUtil {
...
@@ -40,6 +40,7 @@ public class TaskShelfUtil {
private
static
String
LINE_SHELF_MAP_KEY
=
"LINE_SHELF_MAP_KEY"
;
private
static
String
LINE_SHELF_MAP_KEY
=
"LINE_SHELF_MAP_KEY"
;
public
static
String
DEFAULT_ORDERNO
=
"1"
;
public
static
String
DEFAULT_ORDERNO
=
"1"
;
public
static
String
DEFAULT_PN
=
"PN"
;
public
static
String
ShelfSpilt
=
","
;
public
static
String
ShelfSpilt
=
","
;
...
@@ -171,6 +172,9 @@ public class TaskShelfUtil {
...
@@ -171,6 +172,9 @@ public class TaskShelfUtil {
int
maxIndex
=
0
;
int
maxIndex
=
0
;
if
(
shelfMap
!=
null
)
{
if
(
shelfMap
!=
null
)
{
for
(
ShelfInfo
shelfInfo
:
shelfMap
.
values
())
{
for
(
ShelfInfo
shelfInfo
:
shelfMap
.
values
())
{
if
(
shelfInfo
.
isNeedLeave
()){
continue
;
}
if
(
shelfInfo
.
getRfidIndex
()
>
maxIndex
)
{
if
(
shelfInfo
.
getRfidIndex
()
>
maxIndex
)
{
maxIndex
=
shelfInfo
.
getRfidIndex
();
maxIndex
=
shelfInfo
.
getRfidIndex
();
}
}
...
@@ -324,7 +328,7 @@ public class TaskShelfUtil {
...
@@ -324,7 +328,7 @@ public class TaskShelfUtil {
});
});
ShelfInfo
minIndexShelf
=
null
;
ShelfInfo
minIndexShelf
=
null
;
for
(
ShelfInfo
shelf
:
shelfList
)
{
for
(
ShelfInfo
shelf
:
shelfList
)
{
if
(
shelf
.
isFull
())
{
if
(
shelf
.
isFull
()
||
shelf
.
isNeedLeave
()
)
{
//已经放满,查找下一个
//已经放满,查找下一个
continue
;
continue
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论