Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c1695581
由
zshaohui
编写于
2025-03-19 14:54:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
禁用料展示
1 个父辈
fd6115bb
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
31 行增加
和
8 行删除
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
查看文件 @
c169558
...
@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.utils.HttpHelper;
...
@@ -10,6 +10,7 @@ import com.neotel.smfcore.common.utils.HttpHelper;
import
com.neotel.smfcore.common.utils.JsonUtil
;
import
com.neotel.smfcore.common.utils.JsonUtil
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.api.listener.DefaultSmfApiListener
;
import
com.neotel.smfcore.core.api.listener.DefaultSmfApiListener
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
...
@@ -38,6 +39,13 @@ public class LuxsanApi extends DefaultSmfApiListener {
...
@@ -38,6 +39,13 @@ public class LuxsanApi extends DefaultSmfApiListener {
@Autowired
@Autowired
private
KafkaService
kafkaService
;
private
KafkaService
kafkaService
;
private
static
IBarcodeManager
barcodeManager
;
@Autowired
private
void
setBarcodeManager
(
IBarcodeManager
manager
){
LuxsanApi
.
barcodeManager
=
manager
;
}
@Override
@Override
public
void
inTaskStatusChange
(
String
inNotifyUrl
,
DataLog
task
)
{
public
void
inTaskStatusChange
(
String
inNotifyUrl
,
DataLog
task
)
{
if
(
task
.
isFinished
()){
if
(
task
.
isFinished
()){
...
@@ -957,16 +965,18 @@ public class LuxsanApi extends DefaultSmfApiListener {
...
@@ -957,16 +965,18 @@ public class LuxsanApi extends DefaultSmfApiListener {
}
}
//保存禁用料记录
//保存禁用料记录
/*Barcode barcodeOri = barcodeManager.findByBarcode(barcode.getBarcode());
Barcode
barcodeOri
=
barcodeManager
.
findByBarcode
(
barcode
.
getBarcode
());
if (barcodeOri != null){
if
(
barcodeOri
!=
null
)
{
if
(
StringUtils
.
isNotEmpty
(
resultStr
))
{
barcodeOri
.
setDisableMsg
(
resultStr
);
barcodeOri
.
setDisableMsg
(
resultStr
);
barcode = barcodeManager.save(barcodeOri);
barcodeManager
.
save
(
barcodeOri
);
StoragePos storagePos = storagePosManager.getByBarcode(barcode.getBarcode());
}
else
{
if (storagePos != null){
if
(
StringUtils
.
isNotEmpty
(
barcodeOri
.
getDisableMsg
()))
{
storagePos.setBarcode(barcode);
barcodeOri
.
setDisableMsg
(
""
);
storagePosManager.save(storagePos);
barcodeManager
.
save
(
barcodeOri
);
}
}
}
}
}*/
if
(
StringUtils
.
isNotBlank
(
resultStr
))
{
if
(
StringUtils
.
isNotBlank
(
resultStr
))
{
throw
new
ValidateException
(
"smfcore.mesApi.inCheck.ng"
,
/*"MES验证失败:" + */
barcode
.
getBarcode
()
+
"验证失败:"
+
resultStr
);
throw
new
ValidateException
(
"smfcore.mesApi.inCheck.ng"
,
/*"MES验证失败:" + */
barcode
.
getBarcode
()
+
"验证失败:"
+
resultStr
);
...
@@ -1163,6 +1173,19 @@ public class LuxsanApi extends DefaultSmfApiListener {
...
@@ -1163,6 +1173,19 @@ public class LuxsanApi extends DefaultSmfApiListener {
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
log
.
info
(
"批量禁用接口调用失败:"
+
e
.
getMessage
());
log
.
info
(
"批量禁用接口调用失败:"
+
e
.
getMessage
());
}
}
for
(
Barcode
barcode
:
barcodeList
)
{
if
(
reelList
.
contains
(
barcode
.
getBarcode
()))
{
barcode
.
setDisableMsg
(
"禁用料"
);
barcodeManager
.
save
(
barcode
);
}
else
{
if
(
StringUtils
.
isNotEmpty
(
barcode
.
getDisableMsg
()))
{
barcode
.
setDisableMsg
(
""
);
barcodeManager
.
save
(
barcode
);
}
}
}
return
reelList
;
return
reelList
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论