Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 185d7428
由
LN
编写于
2024-08-09 17:22:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
ControlledDispatch 功能完善
1 个父辈
6c0bbe52
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
33 行增加
和
14 行删除
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/MicronDispatchController.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/dto/ItemDetialDto.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
185d742
...
...
@@ -1078,7 +1078,7 @@ public class LiteOrderCache {
outNum
+=
pos
.
getBarcode
().
getAmount
();
outReelCount
+=
1
;
}
else
{
reelItem
.
setExecutFailReason
(
s
.
getDescription
());
reelItem
.
setStatus
(
OrderItemStatus
.
CheckFail
);
log
.
info
(
"工单【"
+
orderNo
+
"】PN ["
+
item
.
getPn
()
+
"] RI ["
+
item
.
getRi
()
+
"] API009 验证失败,更改状态为 CheckFail"
);
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
查看文件 @
185d742
...
...
@@ -33,7 +33,7 @@ import java.util.Map;
@Slf4j
public
class
MicronApi
{
public
static
boolean
Debug
=
fals
e
;
public
static
boolean
Debug
=
tru
e
;
private
static
MicronConfig
config
;
@Autowired
...
...
@@ -689,10 +689,6 @@ public class MicronApi {
log
.
info
(
"调用MES接口 API009: url="
+
url
+
",body="
+
paramStr
+
""
);
MicronResult
micronResult
=
HttpHelper
.
postMicronJson
(
url
,
paramMap
);
// API-009 In Body: add operationId and linePrepOrderId
// Out Body: Change linePrepOrderId to reservedLinePrepOrderId (added 13-6-2024)
// if (micronResult.isOk() && micronResult.statusIsSuccess()) {
String
errMsg
=
getDErrorMsg
(
micronResult
);
if
(
micronResult
.
isOk
())
{
...
...
@@ -714,14 +710,23 @@ public class MicronApi {
// ]
// }
List
<
Object
>
resultList
=
micronResult
.
getResult
(
"results"
);
for
(
Object
Obj
:
resultList
)
{
MaterialStatus
s
=
JsonUtil
.
toObj
(
JsonUtil
.
toJsonStr
(
Obj
),
MaterialStatus
.
class
);
if
(
ObjectUtil
.
isEmpty
(
s
.
getDescription
()))
{
s
.
setDescription
(
errMsg
);
}
resultMap
.
put
(
s
.
getSerialNum
(),
s
);
}
}
else
if
(
ObjectUtil
.
isNotEmpty
(
errMsg
))
{
log
.
info
(
"API009 ,接口通信失败:"
+
errMsg
);
throw
new
ApiException
(
errMsg
);
log
.
info
(
"API009 ,接口通信失败:"
+
errMsg
);
for
(
Barcode
barcode
:
barcodeList
)
{
resultMap
.
put
(
barcode
.
getBarcode
(),
new
MaterialStatus
(
barcode
.
getBarcode
(),
barcode
.
getPartNumber
(),
""
,
errMsg
,
true
));
}
}
else
{
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/task/MicronDispatchController.java
查看文件 @
185d742
...
...
@@ -256,7 +256,7 @@ private IStoragePosManager storagePosManager;
dto
.
setLineId
(
lineId
);
//调用API201
String
result
=
MicronApi
.
Api201
(
lineId
,
dto
.
getOperationId
());
if
(
ObjectUtil
.
is
NotEmpty
(
result
))
{
if
(
ObjectUtil
.
is
Empty
(
result
))
{
//成功
dto
.
setLineId
(
lineId
);
dataCache
.
updateCache
(
Constants
.
CACHE_DISPATCH
+
mode
,
dto
);
...
...
@@ -387,7 +387,7 @@ private IStoragePosManager storagePosManager;
for
(
LiteOrderItem
item
:
selItem
.
getSelectItems
()
)
{
ItemDetialDto
dto
=
new
ItemDetialDto
(
item
.
getRi
(),
item
.
getNeedNum
(),
item
.
getStatus
());
ItemDetialDto
dto
=
new
ItemDetialDto
(
item
.
getRi
(),
item
.
getNeedNum
(),
item
.
getStatus
()
,
item
.
getExecutFailReason
()
);
detialDtos
.
add
(
dto
);
}
...
...
@@ -403,11 +403,25 @@ private IStoragePosManager storagePosManager;
for
(
StoragePos
pos
:
otherPosList
)
{
ItemDetialDto
dto
=
new
ItemDetialDto
(
pos
.
getBarcode
().
getBarcode
(),
pos
.
getBarcode
().
getAmount
(),
""
);
ItemDetialDto
dto
=
new
ItemDetialDto
(
pos
.
getBarcode
().
getBarcode
(),
pos
.
getBarcode
().
getAmount
(),
""
,
""
);
detialDtos
.
add
(
dto
);
}
}
if
(
MicronApi
.
Debug
){
if
(
detialDtos
.
size
()<=
0
){
for
(
int
i
=
0
;
i
<
5
;
i
++)
{
String
ok
=
(
i
<=
1
)
?
"CheckOk"
:
"CheckFail"
;
ItemDetialDto
dto
=
new
ItemDetialDto
(
"barcode"
+
i
,
i
*
100
,
ok
,
"msg"
+
i
);
detialDtos
.
add
(
dto
);
}
for
(
int
i
=
6
;
i
<
9
;
i
++)
{
ItemDetialDto
dto
=
new
ItemDetialDto
(
"barcode"
+
i
,
i
*
100
,
""
,
""
);
detialDtos
.
add
(
dto
);
}
}
}
//判断是否需要勾选
return
ResultBean
.
newOkResult
(
detialDtos
);
...
...
@@ -473,13 +487,11 @@ private IStoragePosManager storagePosManager;
pos
.
getBarcode
().
setLockId
(
order
.
getOrderNo
());
pos
.
getBarcode
().
setLockName
(
item
.
getPn
());
storagePosManager
.
save
(
pos
);
item
.
setOutNum
(
item
.
getOutNum
()
+
pos
.
getBarcode
().
getAmount
());
item
.
setOutNum
(
item
.
getOutNum
()
+
pos
.
getBarcode
().
getAmount
());
}
else
{
reelItem
.
setExecutFailReason
(
s
.
getDescription
());
reelItem
.
setStatus
(
OrderItemStatus
.
CheckFail
);
log
.
info
(
"工单【"
+
order
.
getOrderNo
()
+
"】PN ["
+
item
.
getPn
()
+
"] RI ["
+
item
.
getRi
()
+
"] API009 验证失败,更改状态为 CheckFail"
);
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/dto/ItemDetialDto.java
查看文件 @
185d742
...
...
@@ -25,4 +25,6 @@ public class ItemDetialDto implements Serializable {
* CheckFail 表示验证失败
*/
private
String
status
=
""
;
private
String
executFailReason
=
""
;
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论