Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 65571d78
由
zshaohui
编写于
2023-03-03 10:14:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库判定接口修改
1 个父辈
515bc395
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
18 行增加
和
13 行删除
src/main/java/com/neotel/smfcore/custom/sungya20456/SungyaApi.java
src/main/java/com/neotel/smfcore/custom/sungya20456/bean/Item.java
src/main/java/com/neotel/smfcore/custom/sungya20456/SungyaApi.java
查看文件 @
65571d7
...
@@ -73,6 +73,7 @@ public class SungyaApi extends BaseSmfApiListener {
...
@@ -73,6 +73,7 @@ public class SungyaApi extends BaseSmfApiListener {
if
(
codeBean
.
getBarcode
()
==
null
)
{
if
(
codeBean
.
getBarcode
()
==
null
)
{
barcode
=
new
Barcode
();
barcode
=
new
Barcode
();
barcode
.
setBarcode
(
codeBean
.
getCodeStr
());
barcode
.
setBarcode
(
codeBean
.
getCodeStr
());
//barcode.setFullCode(codeBean.getCodeStr());
}
}
barcode
.
setPlateSize
(
codeBean
.
getReelWidth
());
barcode
.
setPlateSize
(
codeBean
.
getReelWidth
());
barcode
.
setHeight
(
codeBean
.
getReelHeight
());
barcode
.
setHeight
(
codeBean
.
getReelHeight
());
...
@@ -92,8 +93,8 @@ public class SungyaApi extends BaseSmfApiListener {
...
@@ -92,8 +93,8 @@ public class SungyaApi extends BaseSmfApiListener {
if
(
"1"
.
equals
(
sungyaResult
.
getStatus
()))
{
if
(
"1"
.
equals
(
sungyaResult
.
getStatus
()))
{
Item
item
=
sungyaResult
.
getItem
();
Item
item
=
sungyaResult
.
getItem
();
//物料编号
//物料编号
if
(
StringUtils
.
isNotBlank
(
item
.
getPart
N
um
()))
{
if
(
StringUtils
.
isNotBlank
(
item
.
getPart
n
um
()))
{
barcode
.
setPartNumber
(
item
.
getPart
N
um
());
barcode
.
setPartNumber
(
item
.
getPart
n
um
());
}
}
//供应商信息
//供应商信息
if
(
StringUtils
.
isNotBlank
(
item
.
getVendor
()))
{
if
(
StringUtils
.
isNotBlank
(
item
.
getVendor
()))
{
...
@@ -112,25 +113,27 @@ public class SungyaApi extends BaseSmfApiListener {
...
@@ -112,25 +113,27 @@ public class SungyaApi extends BaseSmfApiListener {
barcode
.
setHeight
(
item
.
getH
());
barcode
.
setHeight
(
item
.
getH
());
}
}
//生产日期
//生产日期
if
(
StringUtils
.
isNotBlank
(
item
.
getProduce
D
ate
()))
{
if
(
StringUtils
.
isNotBlank
(
item
.
getProduce
d
ate
()))
{
barcode
.
setProduceDate
(
DateUtil
.
toDate
(
item
.
getProduce
D
ate
(),
"yyyy-MM-dd HH:mm:ss"
));
barcode
.
setProduceDate
(
DateUtil
.
toDate
(
item
.
getProduce
d
ate
(),
"yyyy-MM-dd HH:mm:ss"
));
}
}
//过期时间
//过期时间
if
(
StringUtils
.
isNotBlank
(
item
.
getExpire
D
ate
()))
{
if
(
StringUtils
.
isNotBlank
(
item
.
getExpire
d
ate
()))
{
barcode
.
setExpireDate
(
DateUtil
.
toDate
(
item
.
getExpire
D
ate
(),
"yyyy-MM-dd HH:mm:ss"
));
barcode
.
setExpireDate
(
DateUtil
.
toDate
(
item
.
getExpire
d
ate
(),
"yyyy-MM-dd HH:mm:ss"
));
}
}
//批次
//批次
if
(
StringUtils
.
isNotBlank
(
item
.
getBatch
()))
{
if
(
StringUtils
.
isNotBlank
(
item
.
getBatch
()))
{
barcode
.
setBatch
(
item
.
getBatch
());
barcode
.
setBatch
(
item
.
getBatch
());
}
}
//搅拌时间(锡膏料仓使用)
//搅拌时间(锡膏料仓使用)
if
(
item
.
getMix
T
ime
()
!=
null
)
{
if
(
item
.
getMix
t
ime
()
!=
null
)
{
barcode
.
setMixTime
(
item
.
getMix
T
ime
());
barcode
.
setMixTime
(
item
.
getMix
t
ime
());
}
}
//如果fullcode为空,则取barcode
//如果fullcode为空,则取barcode
if
(
StringUtils
.
isBlank
(
barcode
.
getFullCode
())){
if
(
StringUtils
.
isBlank
(
barcode
.
getFullCode
())){
barcode
.
setFullCode
(
barcode
.
getBarcode
());
barcode
.
setFullCode
(
barcode
.
getBarcode
());
}
}
resolveComponent
(
barcode
);
barcode
=
barcodeManager
.
saveBarcode
(
barcode
);
return
barcode
;
return
barcode
;
}
else
{
}
else
{
errorMsg
=
"Sungya ["
+
barcode
.
getBarcode
()
+
"] NG:"
+
result
;
errorMsg
=
"Sungya ["
+
barcode
.
getBarcode
()
+
"] NG:"
+
result
;
...
@@ -141,9 +144,11 @@ public class SungyaApi extends BaseSmfApiListener {
...
@@ -141,9 +144,11 @@ public class SungyaApi extends BaseSmfApiListener {
log
.
error
(
msg
,
e
);
log
.
error
(
msg
,
e
);
throw
new
ValidateException
(
"sungya.error"
,
msg
+
":"
+
e
.
getMessage
());
throw
new
ValidateException
(
"sungya.error"
,
msg
+
":"
+
e
.
getMessage
());
}
}
throw
new
ValidateException
(
errorMsg
,
"Sungya验证失败"
);
throw
new
ValidateException
(
errorMsg
,
"Sungya验证失败"
+
errorMsg
);
}
}
/**
/**
* 入库判定接口
* 入库判定接口
*
*
...
...
src/main/java/com/neotel/smfcore/custom/sungya20456/bean/Item.java
查看文件 @
65571d7
...
@@ -7,7 +7,7 @@ public class Item {
...
@@ -7,7 +7,7 @@ public class Item {
/**
/**
* 物料编码
* 物料编码
*/
*/
private
String
part
N
um
;
private
String
part
n
um
;
/**
/**
* 供应商信息
* 供应商信息
...
@@ -32,12 +32,12 @@ public class Item {
...
@@ -32,12 +32,12 @@ public class Item {
/**
/**
* 生产日期,格式为yyyy-MM-dd HH:mm:ss
* 生产日期,格式为yyyy-MM-dd HH:mm:ss
*/
*/
private
String
produce
D
ate
;
private
String
produce
d
ate
;
/**
/**
* 过期时间,格式为 yyyy-MM-dd HH:mm:ss
* 过期时间,格式为 yyyy-MM-dd HH:mm:ss
*/
*/
private
String
expire
D
ate
;
private
String
expire
d
ate
;
/**
/**
* 批次信息
* 批次信息
...
@@ -47,5 +47,5 @@ public class Item {
...
@@ -47,5 +47,5 @@ public class Item {
/**
/**
* 搅拌时间(锡膏料仓使用)
* 搅拌时间(锡膏料仓使用)
*/
*/
private
Integer
mix
T
ime
;
private
Integer
mix
t
ime
;
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论