Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 48ad9aed
由
LN
编写于
2026-04-09 09:41:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.入料任务放到up后上传出入口信息。
2.增加ml5so
1 个父辈
54eb7048
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
341 行增加
和
25 行删除
src/main/java/com/neotel/smfcore/core/device/enums/OP_STATUS.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
src/main/java/com/neotel/smfcore/core/equipment/enums/EquipmentType.java
src/main/java/com/neotel/smfcore/core/equipment/service/po/Equipment.java
src/main/java/com/neotel/smfcore/core/inList/service/po/InListItem.java
src/main/java/com/neotel/smfcore/core/language/util/LanguageMsgService.java
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
src/main/java/com/neotel/smfcore/custom/micron1551/bean/SPutInfo.java
src/main/java/com/neotel/smfcore/custom/micron1551/bean/dto/InReelDto.java
src/main/java/com/neotel/smfcore/custom/micron1551/bean/dto/ML5OViewDto.java
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5ODeviceController.java
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5SDeviceController.java
src/main/java/com/neotel/smfcore/core/device/enums/OP_STATUS.java
查看文件 @
48ad9ae
...
...
@@ -60,6 +60,12 @@ public enum OP_STATUS {
/**
* 已放到料仓门口无料盘
*/
BOXDOOR_NOREEL
BOXDOOR_NOREEL
,
/**
* 入库任务,已经放在UP料串上,ML5S机构放到UP料串后更新此状态
*/
INSHELF
;
}
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
查看文件 @
48ad9ae
...
...
@@ -1054,6 +1054,15 @@ public class RobotBoxHandler extends BaseDeviceHandler {
if
(
opTask
.
isPutInTask
())
{
if
(
opTask
.
isInShelf
()){
String
input
=
request
.
getParameter
(
"input"
);
String
output
=
request
.
getParameter
(
"output"
);
String
gantry
=
request
.
getParameter
(
"gantry"
);
opTask
.
updateAppendData
(
"input"
,
input
);
opTask
.
updateAppendData
(
"output"
,
output
);
opTask
.
updateAppendData
(
"gantry"
,
gantry
);
loadingUtil
.
updateReelLoc
(
opTask
.
getBarcode
(),
opTask
.
getPosName
(),
input
,
output
,
gantry
);
}
taskService
.
updateQueueTask
(
opTask
);
}
else
{
if
(
opTask
.
isFinished
())
{
...
...
src/main/java/com/neotel/smfcore/core/equipment/enums/EquipmentType.java
查看文件 @
48ad9ae
...
...
@@ -92,6 +92,6 @@ public enum EquipmentType {
}
public
static
List
<
String
>
otherList
(){
return
Lists
.
newArrayList
(
ML5S
.
name
(),
ML5O
.
name
());
return
Lists
.
newArrayList
(
ML5S
.
name
()
,
ML5O
.
name
());
}
}
src/main/java/com/neotel/smfcore/core/equipment/service/po/Equipment.java
查看文件 @
48ad9ae
...
...
@@ -46,6 +46,9 @@ public class Equipment extends BasePo implements Serializable {
public
boolean
isML5S
()
{
return
EquipmentType
.
ML5S
.
name
().
equals
(
type
);
}
public
boolean
isML5O
()
{
return
EquipmentType
.
ML5O
.
name
().
equals
(
type
);
}
/**
* 是否是接口设备
* @return
...
...
src/main/java/com/neotel/smfcore/core/inList/service/po/InListItem.java
查看文件 @
48ad9ae
...
...
@@ -12,7 +12,10 @@ import lombok.NoArgsConstructor;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Document
@AllArgsConstructor
...
...
@@ -152,5 +155,36 @@ public class InListItem extends BasePo implements Serializable {
inReelCount
+=
1
;
}
/**
* 自定义的附加信息
*/
private
Map
<
String
,
Object
>
appendData
=
new
HashMap
<>();
/**
* 添加或更新自定义附加信息
* @param appendKey
* @param appendValue
*/
public
void
updateAppendData
(
String
appendKey
,
Object
appendValue
){
if
(
appendData
==
null
){
appendData
=
new
HashMap
<>();
}
appendData
.
put
(
appendKey
,
appendValue
);
}
/**
* 获取自定义附加信息
* @param appendKey
* @param <T>
* @return
*/
public
<
T
>
T
getAppendData
(
String
appendKey
)
{
if
(
appendData
!=
null
)
{
Object
value
=
appendData
.
get
(
appendKey
);
if
(
value
!=
null
)
{
return
(
T
)
value
;
}
}
return
null
;
}
}
src/main/java/com/neotel/smfcore/core/language/util/LanguageMsgService.java
查看文件 @
48ad9ae
...
...
@@ -433,32 +433,37 @@ public class LanguageMsgService {
String
msg
=
""
;
List
<
LanguageMsg
>
list
=
new
ArrayList
<>();
while
(
csvRead
.
readRecord
())
{
row
++;
String
[]
lineValues
=
csvRead
.
getValues
();
LanguageMsg
languageMsg
=
new
LanguageMsg
();
String
code
=
lineValues
[
codeIndex
];
String
type
=
lineValues
[
typeIndex
];
String
msgStr
=
lineValues
[
msgIndex
];
if
(
code
.
isEmpty
()
||
type
.
isEmpty
()
||
msgStr
.
isEmpty
())
{
log
.
warn
(
"第"
+
row
+
"行中有空白内容,此行忽略"
);
EnLog
.
warn
(
"Row "
+
row
+
" has blank content, ignore this row"
);
continue
;
}
languageMsg
.
setMsg
(
msgStr
);
languageMsg
.
setCode
(
code
);
languageMsg
.
setType
(
type
);
for
(
String
lan
:
lanCodeIndex
.
keySet
())
{
int
lanIndex
=
lanCodeIndex
.
get
(
lan
);
if
(
lineValues
.
length
>
lanIndex
)
{
String
lanMsg
=
lineValues
[
lanIndex
];
if
(!
lanMsg
.
isEmpty
())
{
languageMsg
.
setContent
(
lan
,
lanMsg
);
try
{
row
++;
String
[]
lineValues
=
csvRead
.
getValues
();
LanguageMsg
languageMsg
=
new
LanguageMsg
();
String
code
=
lineValues
[
codeIndex
];
String
type
=
lineValues
[
typeIndex
];
String
msgStr
=
lineValues
[
msgIndex
];
if
(
code
.
isEmpty
()
||
type
.
isEmpty
()
||
msgStr
.
isEmpty
())
{
log
.
warn
(
"第"
+
row
+
"行中有空白内容,此行忽略"
);
EnLog
.
warn
(
"Row "
+
row
+
" has blank content, ignore this row"
);
continue
;
}
languageMsg
.
setMsg
(
msgStr
);
languageMsg
.
setCode
(
code
);
languageMsg
.
setType
(
type
);
for
(
String
lan
:
lanCodeIndex
.
keySet
())
{
int
lanIndex
=
lanCodeIndex
.
get
(
lan
);
if
(
lineValues
.
length
>
lanIndex
)
{
String
lanMsg
=
lineValues
[
lanIndex
];
if
(!
lanMsg
.
isEmpty
())
{
languageMsg
.
setContent
(
lan
,
lanMsg
);
}
}
}
}
list
.
add
(
languageMsg
);
list
.
add
(
languageMsg
);
}
catch
(
Exception
exception
)
{
log
.
error
(
"解析资源失败第"
+
row
+
"行,"
);
}
}
return
list
;
}
...
...
src/main/java/com/neotel/smfcore/core/system/service/po/DataLog.java
查看文件 @
48ad9ae
...
...
@@ -15,7 +15,9 @@ import org.springframework.data.mongodb.core.mapping.Document;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Document
...
...
@@ -305,6 +307,9 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
public
boolean
isBoxdoor
(){
return
OP_STATUS
.
BOXDOOR
.
name
().
equals
(
status
)
||
OP_STATUS
.
BOXDOOR_NOREEL
.
equals
(
status
);
}
public
boolean
isInShelf
(){
return
OP_STATUS
.
INSHELF
.
equals
(
status
);
}
/**
* 是否是入库任务
*/
...
...
@@ -466,4 +471,38 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
public
int
compareTo
(
DataLog
o
)
{
return
this
.
getId
().
compareTo
(
o
.
getId
());
}
/**
* 自定义的附加信息
*/
private
Map
<
String
,
Object
>
appendData
=
new
HashMap
<>();
/**
* 添加或更新自定义附加信息
* @param appendKey
* @param appendValue
*/
public
void
updateAppendData
(
String
appendKey
,
Object
appendValue
){
if
(
appendData
==
null
){
appendData
=
new
HashMap
<>();
}
appendData
.
put
(
appendKey
,
appendValue
);
}
/**
* 获取自定义附加信息
* @param appendKey
* @param <T>
* @return
*/
public
<
T
>
T
getAppendData
(
String
appendKey
)
{
if
(
appendData
!=
null
)
{
Object
value
=
appendData
.
get
(
appendKey
);
if
(
value
!=
null
)
{
return
(
T
)
value
;
}
}
return
null
;
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
查看文件 @
48ad9ae
...
...
@@ -249,6 +249,35 @@ public class LoadingUtil {
EnLog
.
error
(
"IsInlistReel, barcode="
+
barcode
+
", error: "
+
exception
.
toString
(),
exception
);
}
return
false
;
}
public
InListItem
updateReelLoc
(
String
barcode
,
String
posName
,
String
input
,
String
output
,
String
gantry
)
{
InList
inList
=
getInlist
();
if
(
inList
==
null
)
{
return
null
;
}
InListItem
result
=
null
;
boolean
update
=
false
;
List
<
InListItem
>
inListItems
=
new
ArrayList
<>();
for
(
InListItem
item
:
inList
.
getInListItems
())
{
if
(
item
.
getRi
().
equals
(
barcode
))
{
item
.
updateAppendData
(
"input"
,
input
);
item
.
updateAppendData
(
"output"
,
output
);
item
.
updateAppendData
(
"gantry"
,
gantry
);
update
=
true
;
}
inListItems
.
add
(
item
);
}
if
(
update
)
{
inList
.
setInListItems
(
inListItems
);
inList
=
inListManager
.
save
(
inList
);
inListCache
.
addInListToMap
(
inList
);
}
return
result
;
}
public
InListItem
AddOrUpdateItemState
(
String
rfid
,
Barcode
barcode
,
String
posName
,
String
s
,
String
ngMsg
)
{
InListItem
item
=
updateItemState
(
barcode
.
getBarcode
(),
posName
,
s
,
ngMsg
);
...
...
src/main/java/com/neotel/smfcore/custom/micron1551/bean/SPutInfo.java
查看文件 @
48ad9ae
...
...
@@ -52,4 +52,11 @@ public class SPutInfo implements Serializable {
*/
private
int
putQty
;
/**
* 料串目的地,目标料仓CID,Output用
*/
public
String
targetP
;
//料串操作状态:0=无,1=等待将料串从小车推入滚筒线。2=等待将料串从滚筒线放行到小车
public
int
shelfOperateS
=
0
;
}
src/main/java/com/neotel/smfcore/custom/micron1551/bean/dto/InReelDto.java
0 → 100644
查看文件 @
48ad9ae
package
com
.
neotel
.
smfcore
.
custom
.
micron1551
.
bean
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
InReelDto
implements
Serializable
{
@ApiModelProperty
(
"物料编号"
)
private
String
PN
;
@ApiModelProperty
(
"RI"
)
private
String
ri
;
@ApiModelProperty
(
"状态, 成功=Success,PutIn,PutEnd,Wait, Xray=Xray,XRayEnd, NG=API001NG,NG,Cancel, Failure=Faile,XRayFail"
)
private
String
status
;
@ApiModelProperty
(
"Mode"
)
private
String
mode
;
@ApiModelProperty
(
"Input"
)
private
String
input
;
@ApiModelProperty
(
"output"
)
private
String
output
;
@ApiModelProperty
(
"gantry"
)
private
String
gantry
;
}
src/main/java/com/neotel/smfcore/custom/micron1551/bean/dto/ML5OViewDto.java
0 → 100644
查看文件 @
48ad9ae
package
com
.
neotel
.
smfcore
.
custom
.
micron1551
.
bean
.
dto
;
import
com.neotel.smfcore.core.equipment.bean.EquipMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Data
public
class
ML5OViewDto
implements
Serializable
{
@ApiModelProperty
(
"名称"
)
private
String
name
;
@ApiModelProperty
(
"CID"
)
private
String
cid
;
@ApiModelProperty
(
"设备状态,0=离线,1=正常运行中, 2=急停,3=故障,4=警告,5=调试,6=忙碌中"
)
//1=设备联机 2=急停,3=故障,4=警告,5=调试,6=忙碌中
private
int
status
=
0
;
@ApiModelProperty
(
"文字显示"
)
private
String
msg
=
""
;
@ApiModelProperty
(
"仅显示的日志消息集合"
)
private
List
<
EquipMsg
>
showLogs
=
new
ArrayList
<>();
/**
* 发上来的数据
*
* ml5s定义:
* key=LP1,value=入口1
* key=LP2,value=入口2
* key=TP1,value=龙门架1
* kty=TP2,value=龙门架2
* key=UP1,value=出口1
* key=UP2,value=出口2
* key=UP3,value=出口3
* key=UP4,value=出口4
*/
private
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
}
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5ODeviceController.java
0 → 100644
查看文件 @
48ad9ae
package
com
.
neotel
.
smfcore
.
custom
.
micron1551
.
controller
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.core.equipment.bean.EquipStatusBean
;
import
com.neotel.smfcore.core.equipment.enums.EquipmentType
;
import
com.neotel.smfcore.core.equipment.service.po.Equipment
;
import
com.neotel.smfcore.core.equipment.util.EquipmentCache
;
import
com.neotel.smfcore.core.system.util.EquipStatusUtil
;
import
com.neotel.smfcore.custom.micron1551.bean.dto.ML5OViewDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
@Slf4j
@RestController
@Api
(
tags
=
"1551:ML5O"
)
@RequestMapping
(
"/rest/micron/ml5o"
)
public
class
ML5ODeviceController
{
@Autowired
private
EquipmentCache
equipmentCache
;
@ApiOperation
(
"获取ML5O信息"
)
@GetMapping
(
"ml5oView"
)
@PreAuthorize
(
"@el.check('equipmentView:info')"
)
public
ML5OViewDto
ml5oView
(
String
cid
,
HttpServletRequest
servletRequest
){
Equipment
equip
=
null
;
if
(
ObjectUtil
.
isEmpty
(
cid
)){
equip
=
equipmentCache
.
findEquipByType
(
EquipmentType
.
ML5O
.
name
());
}
else
{
equip
=
equipmentCache
.
getEquipment
(
cid
);
}
if
(
equip
==
null
||(!
equip
.
isML5S
()))
{
throw
new
ValidateException
(
"smfcore.equip.notExist"
,
"设备不存在"
);
}
ML5OViewDto
dto
=
new
ML5OViewDto
();
dto
.
setCid
(
cid
);
dto
.
setName
(
equip
.
getName
());
EquipStatusBean
bean
=
EquipStatusUtil
.
getStatusBean
(
equip
.
getCid
());
if
(
bean
!=
null
){
if
(
bean
.
timeOut
()){
dto
.
setStatus
(
0
);
}
else
{
dto
.
setStatus
(
bean
.
getStatus
());
dto
.
setMsg
(
bean
.
getShowMsg
(
servletRequest
.
getLocale
()));
dto
.
setData
(
bean
.
getData
());
dto
.
setShowLogs
(
bean
.
getShowLogs
());
}
}
return
dto
;
}
}
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5SDeviceController.java
查看文件 @
48ad9ae
...
...
@@ -8,8 +8,11 @@ import com.neotel.smfcore.core.equipment.enums.EquipmentType;
import
com.neotel.smfcore.core.equipment.service.po.Equipment
;
import
com.neotel.smfcore.core.equipment.util.EquipmentCache
;
import
com.neotel.smfcore.core.inList.service.po.InList
;
import
com.neotel.smfcore.core.inList.service.po.InListItem
;
import
com.neotel.smfcore.core.system.util.EquipStatusUtil
;
import
com.neotel.smfcore.custom.micron1053.api.MicronApi
;
import
com.neotel.smfcore.custom.micron1053.loading.util.LoadingUtil
;
import
com.neotel.smfcore.custom.micron1551.bean.dto.InReelDto
;
import
com.neotel.smfcore.custom.micron1551.bean.dto.ML5SViewDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -21,6 +24,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
@RestController
...
...
@@ -74,4 +79,39 @@ public class ML5SDeviceController {
}
return
dto
;
}
@ApiOperation
(
"获取INPUT页面物料列表信息"
)
@GetMapping
(
"inReelList"
)
@PreAuthorize
(
"@el.check('equipmentView:info')"
)
public
List
<
InReelDto
>
inReelList
(
HttpServletRequest
servletRequest
){
List
<
InReelDto
>
dtoList
=
new
ArrayList
<>();
InList
inList
=
loadingUtil
.
getInlist
();
if
(
inList
==
null
){
//返回普通入库信息
}
else
{
for
(
InListItem
item
:
inList
.
getInListItems
())
{
InReelDto
dto
=
new
InReelDto
();
dto
.
setRi
(
item
.
getRi
());
dto
.
setPN
(
item
.
getPN
());
dto
.
setMode
(
inList
.
getMode
());
dto
.
setStatus
(
item
.
getState
());
dto
.
setInput
(
item
.
getAppendData
(
"input"
));
dto
.
setOutput
(
item
.
getAppendData
(
"output"
));
dto
.
setGantry
(
item
.
getAppendData
(
"gantry"
));
}
}
if
(
dtoList
.
size
()<=
0
&&
MicronApi
.
Debug
)
{
dtoList
.
add
(
new
InReelDto
(
"PN1"
,
"RI1"
,
"Wait"
,
"MBR"
,
"LP1"
,
"UP1"
,
"G1"
));
dtoList
.
add
(
new
InReelDto
(
"PN2"
,
"RI2"
,
"Wait"
,
"MBR"
,
"LP2"
,
"UP3"
,
"G1"
));
dtoList
.
add
(
new
InReelDto
(
"PN3"
,
"RI3"
,
"Wait"
,
"MBR"
,
"LP1"
,
"UP1"
,
"G2"
));
dtoList
.
add
(
new
InReelDto
(
"PN4"
,
"RI4"
,
"Wait"
,
"MBR"
,
"LP2"
,
"UP3"
,
"G1"
));
dtoList
.
add
(
new
InReelDto
(
"PN5"
,
"RI5"
,
"Wait"
,
"MBR"
,
"LP1"
,
"UP1"
,
"G1"
));
}
return
dtoList
;
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论