Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2ef4cf7e
由
LN
编写于
2026-04-09 12:23:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
ml5s使用新的获取库位号接口
1 个父辈
48ad9aed
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
68 行增加
和
19 行删除
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
src/main/java/com/neotel/smfcore/custom/micron1551/bean/TPMoveInfo.java
src/main/java/com/neotel/smfcore/custom/micron1551/bean/dto/ML5SViewDto.java
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5DeviceController.java
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5SDeviceController.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
查看文件 @
2ef4cf7
...
@@ -36,7 +36,7 @@ public class MicronApi {
...
@@ -36,7 +36,7 @@ public class MicronApi {
public
static
boolean
Debug
=
fals
e
;
public
static
boolean
Debug
=
tru
e
;
private
static
MicronConfig
config
;
private
static
MicronConfig
config
;
@Autowired
@Autowired
...
@@ -90,6 +90,10 @@ public class MicronApi {
...
@@ -90,6 +90,10 @@ public class MicronApi {
public
static
Barcode
API001
(
String
operationId
,
String
rfid
,
Barcode
barcode
)
throws
ApiException
{
public
static
Barcode
API001
(
String
operationId
,
String
rfid
,
Barcode
barcode
)
throws
ApiException
{
if
(
Debug
){
log
.
info
(
"调用API001,调试状态直接返回"
);
return
barcode
;
}
String
url
=
config
.
getUrl
(
config
.
api_name_001
);
String
url
=
config
.
getUrl
(
config
.
api_name_001
);
String
errorMsg
=
""
;
String
errorMsg
=
""
;
if
(
ObjectUtil
.
isEmpty
(
url
))
{
if
(
ObjectUtil
.
isEmpty
(
url
))
{
...
@@ -254,6 +258,20 @@ public class MicronApi {
...
@@ -254,6 +258,20 @@ public class MicronApi {
public
static
Map
<
String
,
String
>
API002
(
String
rfid
,
String
operationId
,
List
<
StoragePos
>
storagePos
)
{
public
static
Map
<
String
,
String
>
API002
(
String
rfid
,
String
operationId
,
List
<
StoragePos
>
storagePos
)
{
if
(
Debug
){
log
.
info
(
"调用API002,提示状态直接返回"
);
Map
<
String
,
String
>
result
=
new
HashMap
<>();
for
(
StoragePos
pos
:
storagePos
)
{
if
(
pos
.
getBarcode
()==
null
){
continue
;
}
result
.
put
(
pos
.
getBarcode
().
getBarcode
(),
"true"
);
}
return
result
;
}
String
jobId
=
operationId
+
"_"
+
rfid
;
String
jobId
=
operationId
+
"_"
+
rfid
;
String
url
=
config
.
getUrl
(
config
.
api_name_002
);
String
url
=
config
.
getUrl
(
config
.
api_name_002
);
...
@@ -580,6 +598,18 @@ public class MicronApi {
...
@@ -580,6 +598,18 @@ public class MicronApi {
public
static
Map
<
String
,
String
>
Api007
(
String
operationId
,
String
rfid
,
List
<
DataLog
>
dataLogList
)
{
public
static
Map
<
String
,
String
>
Api007
(
String
operationId
,
String
rfid
,
List
<
DataLog
>
dataLogList
)
{
if
(
Debug
){
Map
<
String
,
String
>
result
=
new
HashMap
<>();
for
(
DataLog
dataLog:
dataLogList
)
{
result
.
put
(
dataLog
.
getBarcode
(),
"OK"
);
}
log
.
info
(
"调用MES接口 API007: 调试状态直接返回"
);
return
result
;
}
String
url
=
config
.
getUrl
(
config
.
api_name_007
);
String
url
=
config
.
getUrl
(
config
.
api_name_007
);
String
errMsg
=
""
;
String
errMsg
=
""
;
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
...
@@ -874,7 +904,7 @@ public class MicronApi {
...
@@ -874,7 +904,7 @@ public class MicronApi {
//出库前预扣
//出库前预扣
List
<
TrackStatus
>
statusList
=
new
ArrayList
<>();
List
<
TrackStatus
>
statusList
=
new
ArrayList
<>();
if
(
Debug
)
{
if
(
Debug
)
{
long
v
=
retryCount
*
(
retryInterval
+
60
)
*
10
00
;
long
v
=
retryCount
*
(
retryInterval
+
60
)
*
10
;
try
{
try
{
Thread
.
sleep
(
v
);
Thread
.
sleep
(
v
);
log
.
info
(
"调用MES接口 API010 Debug 模式,sleep="
+
v
);
log
.
info
(
"调用MES接口 API010 Debug 模式,sleep="
+
v
);
...
@@ -1039,9 +1069,7 @@ public class MicronApi {
...
@@ -1039,9 +1069,7 @@ public class MicronApi {
return
statusList
;
return
statusList
;
}
}
public
static
String
Api011
(
String
mode
,
String
userName
,
String
source
)
{
public
static
String
Api011
(
String
mode
,
String
userName
,
String
source
)
{
if
(
Debug
){
return
mode
+
"_test_operationId"
;
}
// Mode = "MBR|REQ|MCL|GR|MATRET|RET|NPI|RACK|PCBPRETASK|MCLPRETASK|LINEPREP|CTRLDISPATCH"
// Mode = "MBR|REQ|MCL|GR|MATRET|RET|NPI|RACK|PCBPRETASK|MCLPRETASK|LINEPREP|CTRLDISPATCH"
// Source = toolId, Facility+area for UI
// Source = toolId, Facility+area for UI
String
url
=
config
.
getUrl
(
config
.
api_name_011
);
String
url
=
config
.
getUrl
(
config
.
api_name_011
);
...
@@ -1049,7 +1077,8 @@ public class MicronApi {
...
@@ -1049,7 +1077,8 @@ public class MicronApi {
source
=
config
.
api_011_Source
;
source
=
config
.
api_011_Source
;
}
}
source
=
"KTS-0001"
;
source
=
"KTS-0001"
;
if
(
ObjectUtil
.
isEmpty
(
url
)&&
Debug
){
if
(
ObjectUtil
.
isEmpty
(
url
)||
Debug
){
log
.
info
(
"调试状态直接返回,调用MES接口 Api011: url="
+
url
+
" "
);
return
mode
+
"_test_operationId"
;
return
mode
+
"_test_operationId"
;
}
}
url
=
MessageFormat
.
format
(
url
,
mode
,
userName
,
source
);
url
=
MessageFormat
.
format
(
url
,
mode
,
userName
,
source
);
...
@@ -1145,7 +1174,7 @@ public class MicronApi {
...
@@ -1145,7 +1174,7 @@ public class MicronApi {
String
url
=
config
.
getUrl
(
config
.
api_name_012
);
String
url
=
config
.
getUrl
(
config
.
api_name_012
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
if
(
Debug
){
if
(
Debug
){
log
.
info
(
"调试状态直接返回true, 调用MES接口 Api012: url="
+
url
+
"
"
);
log
.
info
(
"调试状态直接返回true, 调用MES接口 Api012: url="
+
url
+
"
,operationId="
+
operationId
+
",action="
+
action
);
return
true
;
return
true
;
}
}
try
{
try
{
...
@@ -1278,10 +1307,11 @@ public class MicronApi {
...
@@ -1278,10 +1307,11 @@ public class MicronApi {
// "message": <ErrMessage>,
// "message": <ErrMessage>,
// "detail": <ErrDetail>
// "detail": <ErrDetail>
// }
// }
String
url
=
config
.
getUrl
(
config
.
api_name_201
);
if
(
Debug
){
if
(
Debug
){
log
.
info
(
"调试状态直接返回,调用MES接口 API201: url="
+
url
+
" "
);
return
""
;
return
""
;
}
}
String
url
=
config
.
getUrl
(
config
.
api_name_201
);
url
=
MessageFormat
.
format
(
url
,
linePrepOrderId
,
operationId
);
url
=
MessageFormat
.
format
(
url
,
linePrepOrderId
,
operationId
);
try
{
try
{
...
@@ -1325,6 +1355,8 @@ public class MicronApi {
...
@@ -1325,6 +1355,8 @@ public class MicronApi {
return
"NO"
;
return
"NO"
;
}
}
//以下接口为测试使用
public
static
MicronResult
validateMRB
(
String
mbrId
,
String
skipSap
)
{
public
static
MicronResult
validateMRB
(
String
mbrId
,
String
skipSap
)
{
//Validate if MBR (From Warehouse ) is valid
//Validate if MBR (From Warehouse ) is valid
// if (skipSap instanceof Boolean) {
// if (skipSap instanceof Boolean) {
...
...
src/main/java/com/neotel/smfcore/custom/micron1551/bean/TPMoveInfo.java
查看文件 @
2ef4cf7
...
@@ -25,7 +25,7 @@ public class TPMoveInfo implements Serializable {
...
@@ -25,7 +25,7 @@ public class TPMoveInfo implements Serializable {
/**
/**
* 当前正在移动的料盘信息
* 当前正在移动的料盘信息
*/
*/
private
String
currMoveReel
;
private
String
reelId
;
/**
/**
* 取料位置
* 取料位置
...
...
src/main/java/com/neotel/smfcore/custom/micron1551/bean/dto/ML5SViewDto.java
查看文件 @
2ef4cf7
...
@@ -5,10 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -5,10 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Data
@Data
public
class
ML5SViewDto
implements
Serializable
{
public
class
ML5SViewDto
implements
Serializable
{
...
@@ -30,6 +27,14 @@ public class ML5SViewDto implements Serializable {
...
@@ -30,6 +27,14 @@ public class ML5SViewDto implements Serializable {
@ApiModelProperty
(
"当前Loading信息名称,为空时可以点START,"
)
@ApiModelProperty
(
"当前Loading信息名称,为空时可以点START,"
)
private
String
currLoading
=
""
;
private
String
currLoading
=
""
;
@ApiModelProperty
(
"当前loading创建时间"
)
private
Date
loadingCreateDate
;
@ApiModelProperty
(
"当前loading已扫码盘数"
)
private
int
loadingScanQty
;
@ApiModelProperty
(
"当前loading已分拣判断"
)
private
int
loadingIsShelfQty
;
@ApiModelProperty
(
"仅显示的日志消息集合"
)
@ApiModelProperty
(
"仅显示的日志消息集合"
)
...
...
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5DeviceController.java
0 → 100644
查看文件 @
2ef4cf7
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/custom/micron1551/controller/ML5SDeviceController.java
查看文件 @
2ef4cf7
...
@@ -19,13 +19,10 @@ import io.swagger.annotations.ApiOperation;
...
@@ -19,13 +19,10 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
@Slf4j
@Slf4j
@RestController
@RestController
...
@@ -75,7 +72,20 @@ public class ML5SDeviceController {
...
@@ -75,7 +72,20 @@ public class ML5SDeviceController {
if
(
inList
==
null
)
{
if
(
inList
==
null
)
{
dto
.
setCurrLoading
(
""
);
dto
.
setCurrLoading
(
""
);
}
else
{
}
else
{
dto
.
setCurrLoading
(
inList
.
getName
());
dto
.
setCurrLoading
(
inList
.
getName
());
dto
.
setLoadingCreateDate
(
inList
.
getCreateDate
());
dto
.
setLoadingScanQty
(
inList
.
getInListItems
().
size
());
int
putOkCount
=
0
;
for
(
InListItem
item
:
inList
.
getInListItems
()
)
{
String
output
=
item
.
getAppendData
(
"output"
);
if
(
ObjectUtil
.
isNotEmpty
(
output
))
{
putOkCount
++;
}
}
dto
.
setLoadingIsShelfQty
(
putOkCount
);
}
}
return
dto
;
return
dto
;
}
}
...
@@ -114,4 +124,6 @@ public class ML5SDeviceController {
...
@@ -114,4 +124,6 @@ public class ML5SDeviceController {
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论