Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 59765f11
由
zshaohui
编写于
2023-02-15 15:18:33 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'master' of
http://106.15.194.121:8083/sunke/smf-core
2 个父辈
6ae91781
c4a633b0
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
106 行增加
和
36 行删除
src/main/java/com/neotel/smfcore/core/device/bean/BoxStatusBean.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/ThirdBoxHandler.java
src/main/java/com/neotel/smfcore/core/storage/service/po/Storage.java
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronML5Controller.java
src/main/java/com/neotel/smfcore/custom/micron1053/util/MicronDataCache.java
src/main/java/com/neotel/smfcore/core/device/bean/BoxStatusBean.java
查看文件 @
59765f1
package
com
.
neotel
.
smfcore
.
core
.
device
.
bean
;
package
com
.
neotel
.
smfcore
.
core
.
device
.
bean
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.core.device.enums.BOX_STATUS
;
import
com.neotel.smfcore.core.device.enums.BOX_STATUS
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -148,6 +149,30 @@ public class BoxStatusBean {
...
@@ -148,6 +149,30 @@ public class BoxStatusBean {
return
data
.
get
(
"barcode"
);
return
data
.
get
(
"barcode"
);
}
}
public
Map
<
String
,
Integer
>
getCapacity
()
{
String
capacity
=
data
.
get
(
"capacity"
);
Map
<
String
,
Integer
>
caMap
=
new
HashMap
<>();
try
{
if
(
ObjectUtil
.
isNotEmpty
(
capacity
))
{
String
[]
arr
=
capacity
.
split
(
";"
);
for
(
String
ar
:
arr
)
{
if
(
ObjectUtil
.
isNotEmpty
(
ar
))
{
String
[]
ar2
=
ar
.
split
(
"="
);
if
(
ar2
.
length
==
2
)
{
caMap
.
put
(
ar2
[
0
],
Integer
.
valueOf
(
ar2
[
1
]));
}
}
}
}
}
catch
(
Exception
ex
)
{
}
return
caMap
;
// boxStatus.data.Add("capacity", "7X8=1000;7X12=345;13X32=100;");
}
/**
/**
* 从data中获取值
* 从data中获取值
*/
*/
...
...
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
查看文件 @
59765f1
...
@@ -228,9 +228,9 @@ public class RobotBoxHandler extends BaseDeviceHandler {
...
@@ -228,9 +228,9 @@ public class RobotBoxHandler extends BaseDeviceHandler {
String
code
=
request
.
getParameter
(
"code"
);
String
code
=
request
.
getParameter
(
"code"
);
String
cids
=
request
.
getParameter
(
"cids"
);
String
cids
=
request
.
getParameter
(
"cids"
);
String
lastPosId
=
""
;
String
lastPosId
=
""
;
String
lineMsg
=
""
;
String
lineMsg
=
""
;
log
.
info
(
"流水线["
+
cids
+
"]获取["
+
code
+
"]的入库库位"
);
log
.
info
(
"流水线["
+
cids
+
"]获取["
+
code
+
"]的入库库位"
);
String
[]
cidArray
=
cids
.
split
(
","
);
Map
<
String
,
Object
>
resultMap
=
Maps
.
newHashMap
();
Map
<
String
,
Object
>
resultMap
=
Maps
.
newHashMap
();
String
okMsg
=
""
;
String
okMsg
=
""
;
String
errorMsg
=
""
;
String
errorMsg
=
""
;
...
@@ -238,19 +238,22 @@ public class RobotBoxHandler extends BaseDeviceHandler {
...
@@ -238,19 +238,22 @@ public class RobotBoxHandler extends BaseDeviceHandler {
List
<
String
>
cidList
=
dataCache
.
getAvailableStorageIds
(
this
.
getDeviceType
());
List
<
String
>
cidList
=
dataCache
.
getAvailableStorageIds
(
this
.
getDeviceType
());
List
<
String
>
thirdList
=
dataCache
.
getAvailableStorageIds
(
DeviceType
.
SMDBOX_THIRD
);
List
<
String
>
thirdList
=
dataCache
.
getAvailableStorageIds
(
DeviceType
.
SMDBOX_THIRD
);
cidList
.
addAll
(
thirdList
);
cidList
.
addAll
(
thirdList
);
for
(
String
cid
:
cidList
)
{
// for (String cid : cidList) {
String
notIntoCids
=
dataCache
.
getSettings
().
getNotIntoCids
();
for
(
String
cid:
cidArray
)
{
if
(
notIntoCids
!=
null
)
{
if
(
cidList
.
contains
(
cid
))
{
if
(
notIntoCids
.
contains
(
cid
))
{
String
notIntoCids
=
dataCache
.
getSettings
().
getNotIntoCids
();
log
.
info
(
"料仓["
+
cid
+
"]已被屏蔽入库"
);
if
(
notIntoCids
!=
null
)
{
continue
;
if
(
notIntoCids
.
contains
(
cid
))
{
log
.
info
(
"料仓["
+
cid
+
"]已被屏蔽入库"
);
continue
;
}
}
Storage
storage
=
dataCache
.
getStorage
(
cid
);
if
(
storage
!=
null
)
{
storageList
.
add
(
storage
);
}
}
}
}
}
Storage
storage
=
dataCache
.
getStorage
(
cid
);
if
(
storage
!=
null
)
{
storageList
.
add
(
storage
);
}
}
if
(
storageList
.
isEmpty
())
{
if
(
storageList
.
isEmpty
())
{
resultMap
.
put
(
"result"
,
"99"
);
resultMap
.
put
(
"result"
,
"99"
);
errorMsg
=
"无可用的料仓"
;
errorMsg
=
"无可用的料仓"
;
...
@@ -305,7 +308,36 @@ public class RobotBoxHandler extends BaseDeviceHandler {
...
@@ -305,7 +308,36 @@ public class RobotBoxHandler extends BaseDeviceHandler {
return resultMap;
return resultMap;
}*/
}*/
StoragePos
pos
=
taskService
.
findEmptyPosForPutIn
(
storageList
,
barcode
,
""
,
lastPosId
);
//根据尺寸获取指定的料仓
// 13*44,13*56,13*72这三个料入到我们的料仓,其他的13寸,15寸都入迈康尼的料仓
int
inStorageType
=
0
;
//0=所有料仓都可以,1=只能入我们料仓。2=只能入麦康尼料仓
if
(
barcode
.
getPlateSize
()==
13
){
if
(
barcode
.
getHeight
()==
44
||
barcode
.
getHeight
()==
56
||
barcode
.
getHeight
()==
72
){
//只能入robot
inStorageType
=
1
;
}
else
{
inStorageType
=
2
;
}
}
else
if
(
barcode
.
getPlateSize
()==
15
){
inStorageType
=
2
;
}
List
<
Storage
>
storages
=
new
ArrayList
<>();
for
(
Storage
storage
:
storageList
)
{
if
(
inStorageType
==
1
){
if
(
storage
.
isRobotBox
())
{
storages
.
add
(
storage
);
}
}
else
if
(
inStorageType
==
2
){
if
(
storage
.
isTHIRDBox
()){
storages
.
add
(
storage
);
}
}
else
{
storages
.
add
(
storage
);
}
}
StoragePos
pos
=
taskService
.
findEmptyPosForPutIn
(
storages
,
barcode
,
""
,
lastPosId
);
if
(
pos
!=
null
)
{
if
(
pos
!=
null
)
{
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
...
...
src/main/java/com/neotel/smfcore/core/device/handler/impl/ThirdBoxHandler.java
查看文件 @
59765f1
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/storage/service/po/Storage.java
查看文件 @
59765f1
...
@@ -312,4 +312,7 @@ public class Storage extends BasePo implements Serializable {
...
@@ -312,4 +312,7 @@ public class Storage extends BasePo implements Serializable {
public
boolean
isRobotBox
()
{
public
boolean
isRobotBox
()
{
return
DeviceType
.
ROBOT_BOX
.
name
().
equals
(
type
);
return
DeviceType
.
ROBOT_BOX
.
name
().
equals
(
type
);
}
}
public
boolean
isTHIRDBox
()
{
return
DeviceType
.
SMDBOX_THIRD
.
name
().
equals
(
type
);
}
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/controller/MicronML5Controller.java
查看文件 @
59765f1
...
@@ -33,11 +33,11 @@ public class MicronML5Controller {
...
@@ -33,11 +33,11 @@ public class MicronML5Controller {
@GetMapping
(
"/status"
)
@GetMapping
(
"/status"
)
@AnonymousAccess
@AnonymousAccess
public
ML5StatusDto
ml5Status
(
)
{
public
ML5StatusDto
ml5Status
(
)
{
ML5StatusDto
dto
=
new
ML5StatusDto
();
ML5StatusDto
dto
=
new
ML5StatusDto
();
MicronEquipStatus
r1
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_R1
.
getName
());
MicronEquipStatus
r1
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_R1
.
getName
());
MicronEquipStatus
r2
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_R2
.
getName
());
MicronEquipStatus
r2
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_R2
.
getName
());
MicronEquipStatus
l1
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_L1
.
getName
());
MicronEquipStatus
l1
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_L1
.
getName
());
MicronEquipStatus
l2
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_L2
.
getName
());
MicronEquipStatus
l2
=
MicronDataCache
.
getStatus
(
MicronEquipName
.
ML5_L2
.
getName
());
dto
.
setL1Status
(
l1
.
getStatus
());
dto
.
setL1Status
(
l1
.
getStatus
());
dto
.
setL2Status
(
l2
.
getStatus
());
dto
.
setL2Status
(
l2
.
getStatus
());
...
@@ -46,27 +46,37 @@ public class MicronML5Controller {
...
@@ -46,27 +46,37 @@ public class MicronML5Controller {
dto
.
setNg1Count
(
l1
.
getNgCount
());
dto
.
setNg1Count
(
l1
.
getNgCount
());
dto
.
setNg2Count
(
r1
.
getNgCount
());
dto
.
setNg2Count
(
r1
.
getNgCount
());
List
<
EquipMsg
>
msgs
=
new
ArrayList
<>();
List
<
EquipMsg
>
msgs
=
new
ArrayList
<>();
msgs
.
addAll
(
r1
.
getMsgList
());
if
(
r1
.
getMsgList
()
!=
null
&&
r1
.
getMsgList
().
size
()
>
0
)
{
msgs
.
addAll
(
r2
.
getMsgList
());
msgs
.
addAll
(
r1
.
getMsgList
());
msgs
.
addAll
(
l1
.
getMsgList
());
}
msgs
.
addAll
(
l2
.
getMsgList
());
if
(
r2
.
getMsgList
()
!=
null
&&
r2
.
getMsgList
().
size
()
>
0
)
{
dto
.
setMsgList
(
msgs
);
msgs
.
addAll
(
r2
.
getMsgList
());
}
if
(
l1
.
getMsgList
()
!=
null
&&
l1
.
getMsgList
().
size
()
>
0
)
{
msgs
.
addAll
(
l1
.
getMsgList
());
}
if
(
l2
.
getMsgList
()
!=
null
&&
l2
.
getMsgList
().
size
()
>
0
)
{
msgs
.
addAll
(
l2
.
getMsgList
());
}
if
(
msgs
.
size
()
>
0
)
{
dto
.
setMsgList
(
msgs
);
}
Map
<
String
,
Integer
>
needShelfs
=
new
HashMap
<>();
Map
<
String
,
Integer
>
needShelfs
=
new
HashMap
<>();
List
<
DataLog
>
dataLogs
=
taskService
.
getAllTasks
();
List
<
DataLog
>
dataLogs
=
taskService
.
getAllTasks
();
for
(
DataLog
task
:
dataLogs
for
(
DataLog
task
:
dataLogs
)
{
)
{
String
taskType
=
MicronDataCache
.
GetMaterialType
(
task
);
String
taskType
=
MicronDataCache
.
GetMaterialType
(
task
);
String
shelf
=
MicronDataCache
.
getShelfType
(
taskType
);
String
shelf
=
MicronDataCache
.
getShelfType
(
taskType
);
if
(
needShelfs
.
containsKey
(
shelf
))
{
if
(
needShelfs
.
containsKey
(
shelf
))
{
int
newCount
=
needShelfs
.
get
(
shelf
)+
1
;
int
newCount
=
needShelfs
.
get
(
shelf
)
+
1
;
needShelfs
.
put
(
shelf
,
newCount
);
needShelfs
.
put
(
shelf
,
newCount
);
}
else
{
}
else
{
needShelfs
.
put
(
shelf
,
1
);
needShelfs
.
put
(
shelf
,
1
);
}
}
}
}
if
(
needShelfs
.
size
()>
0
)
{
if
(
needShelfs
.
size
()
>
0
)
{
dto
.
setNeedShelfs
(
needShelfs
);
dto
.
setNeedShelfs
(
needShelfs
);
}
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/util/MicronDataCache.java
查看文件 @
59765f1
...
@@ -94,7 +94,7 @@ public class MicronDataCache {
...
@@ -94,7 +94,7 @@ public class MicronDataCache {
}
else
if
(
materialType
.
equals
(
TRAY
)){
}
else
if
(
materialType
.
equals
(
TRAY
)){
return
"M03"
;
return
"M03"
;
}
}
return
""
;
return
"
S007
"
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论