Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 10ec53df
由
zshaohui
编写于
2025-11-13 14:44:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.入库通知,生产日期不对的问题 提交
1 个父辈
7f3d595d
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
42 行增加
和
1 行删除
src/main/java/com/neotel/smfcore/custom/haier1560/Haier1560Api.java
src/main/java/com/neotel/smfcore/custom/haier1560/Haier1560Api.java
查看文件 @
10ec53d
...
@@ -2,16 +2,23 @@ package com.neotel.smfcore.custom.haier1560;
...
@@ -2,16 +2,23 @@ package com.neotel.smfcore.custom.haier1560;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.HttpHelper
;
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.bean.ApiResult
;
import
com.neotel.smfcore.core.api.bean.CodeValidateParam
;
import
com.neotel.smfcore.core.api.bean.CodeValidateParam
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.order.service.po.LiteOrder
;
import
com.neotel.smfcore.core.order.service.po.LiteOrder
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.custom.neotel.NeotelApi
;
import
com.neotel.smfcore.custom.neotel.NeotelApi
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
@Slf4j
@Component
@Component
public
class
Haier1560Api
extends
NeotelApi
{
public
class
Haier1560Api
extends
NeotelApi
{
...
@@ -22,7 +29,41 @@ public class Haier1560Api extends NeotelApi {
...
@@ -22,7 +29,41 @@ public class Haier1560Api extends NeotelApi {
@Override
@Override
public
void
inTaskStatusChange
(
String
inNotifyUrl
,
DataLog
task
)
{
public
void
inTaskStatusChange
(
String
inNotifyUrl
,
DataLog
task
)
{
super
.
inTaskStatusChange
(
inNotifyUrl
,
task
);
String
requestParams
=
""
;
String
responseInfo
=
""
;
if
(
task
.
isFinished
())
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"reelId"
,
task
.
getBarcode
());
paramMap
.
put
(
"location"
,
task
.
getPosName
());
paramMap
.
put
(
"source"
,
"SMF"
);
paramMap
.
put
(
"fullCode"
,
""
);
paramMap
.
put
(
"partNum"
,
""
);
paramMap
.
put
(
"vendor"
,
""
);
paramMap
.
put
(
"qty"
,
0
);
paramMap
.
put
(
"produceDate"
,
""
);
paramMap
.
put
(
"batch"
,
""
);
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
task
.
getBarcode
());
if
(
barcode
!=
null
)
{
paramMap
.
put
(
"fullCode"
,
barcode
.
getFullCode
());
paramMap
.
put
(
"partNum"
,
barcode
.
getPartNumber
());
paramMap
.
put
(
"vendor"
,
barcode
.
getProvider
());
paramMap
.
put
(
"qty"
,
barcode
.
getAmount
());
if
(
barcode
.
getProduceDate
()
!=
null
){
paramMap
.
put
(
"produceDate"
,
DateUtil
.
toDateString
(
barcode
.
getProduceDate
(),
"yyyy-MM-dd HH:mm:ss"
));
}
paramMap
.
put
(
"batch"
,
barcode
.
getBatch
());
}
try
{
requestParams
=
JsonUtil
.
toJsonStr
(
paramMap
);
log
.
info
(
task
.
getBarcode
()
+
"入库通知,参数"
+
requestParams
);
responseInfo
=
HttpHelper
.
postJson
(
inNotifyUrl
,
paramMap
);
log
.
info
(
task
.
getBarcode
()
+
"入库通知返回"
+
responseInfo
);
ApiResult
apiResult
=
JsonUtil
.
toObj
(
responseInfo
,
ApiResult
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"入库通知接口出错:"
+
e
.
getMessage
());
}
}
}
}
@Override
@Override
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论