Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit daf593ed
由
LN
编写于
2024-06-19 11:34:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
提示信息修改
1 个父辈
2d1e389e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
23 行增加
和
4 行删除
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/MicronPreTaskController.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
查看文件 @
daf593e
...
@@ -351,7 +351,16 @@ public class MicronApi {
...
@@ -351,7 +351,16 @@ public class MicronApi {
}
}
public
static
List
<
DispatchId
>
Api004
(
String
operationId
)
{
public
static
List
<
DispatchId
>
Api004
(
String
mode
,
String
operationId
)
{
// PCBPRETASK,MCLPRETASK,LINEPREP
// PCB PRETASK
// No line prep available for pcb pretask
//
// MCL PRETASK
// No line prep available for mcl pretask
//
// LINE PREP Dispatch
// No line prep available for Dispatch
String
url
=
config
.
getUrl
(
config
.
api_name_004
);
String
url
=
config
.
getUrl
(
config
.
api_name_004
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
if
(
Debug
){
if
(
Debug
){
...
@@ -378,9 +387,19 @@ public class MicronApi {
...
@@ -378,9 +387,19 @@ public class MicronApi {
if
(
result
.
isOk
()
)
{
if
(
result
.
isOk
()
)
{
List
<
DispatchId
>
resultDis
=
result
.
getResult
(
"dispatchIds"
,
false
);
List
<
DispatchId
>
resultDis
=
result
.
getResult
(
"dispatchIds"
,
false
);
if
(
resultDis
==
null
||
resultDis
.
size
()<=
0
){
if
(
resultDis
==
null
||
resultDis
.
size
()<=
0
){
log
.
info
(
"API004 ,接口通信失败"
);
// 这个需要改进一些,如果dispatchIds 长度为0,能不能显示 no line prep available for pcb pretask, depending on the mode,
// 如果是lineprep dispatch 和 mcl pretask 也reply 相对的message, 再说这个API transaction 没有fail,只是没有lineprep, 这个error fail to get data 有点误导了
log
.
info
(
"API004 ,接口通信失败: no line prep available for pcb pretask, depending on the mode"
);
//throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API004"});
//throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API004"});
String
msg
=
"API004 Failed to get data"
;
String
msg
=
"No line prep available for pcb pretask "
;
if
(
mode
.
equalsIgnoreCase
(
"PCBPRETASK"
)){
msg
=
"No line prep available for pcb pretask "
;
}
else
if
(
mode
.
equalsIgnoreCase
(
"MCLPRETASK"
)){
msg
=
"No line prep available for mcl pretask "
;
}
else
if
(
mode
.
equalsIgnoreCase
(
"LINEPREP"
))
{
msg
=
"No line prep available for Dispatch "
;
}
Object
message
=
result
.
getResult
(
"message"
,
false
);
Object
message
=
result
.
getResult
(
"message"
,
false
);
if
(
message
!=
null
){
if
(
message
!=
null
){
msg
=
message
.
toString
();
msg
=
message
.
toString
();
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/task/MicronPreTaskController.java
查看文件 @
daf593e
...
@@ -135,7 +135,7 @@ public class MicronPreTaskController {
...
@@ -135,7 +135,7 @@ public class MicronPreTaskController {
}
}
//获取Pre Task ID
//获取Pre Task ID
List
<
DispatchId
>
dispatchIdList
=
MicronApi
.
Api004
(
operationId
);
List
<
DispatchId
>
dispatchIdList
=
MicronApi
.
Api004
(
mode
,
operationId
);
if
(
dispatchIdList
!=
null
&&
!
dispatchIdList
.
isEmpty
())
{
if
(
dispatchIdList
!=
null
&&
!
dispatchIdList
.
isEmpty
())
{
dto
.
setType
(
1
);
dto
.
setType
(
1
);
dto
.
setDispatchIdList
(
dispatchIdList
);
dto
.
setDispatchIdList
(
dispatchIdList
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论