Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fd6115bb
由
zshaohui
编写于
2025-03-18 14:49:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.增加料卷注册功能
2.7寸箱子隔口卡控20盘
1 个父辈
ec2a5c21
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
57 行增加
和
6 行删除
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualReturnTowerController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/util/BinCacheUtil.java
src/main/resources/config/application-21088prod.yml
src/main/resources/config/application-21088test.yml
src/main/java/com/neotel/smfcore/custom/luxsan/api/LuxsanApi.java
查看文件 @
fd6115b
...
...
@@ -1204,6 +1204,38 @@ public class LuxsanApi extends DefaultSmfApiListener {
}
}
public
static
void
whRegister
(
String
barcodeStr
,
String
wareHouseCode
)
{
log
.
info
(
"收到料卷注册信息,barcode为:"
+
barcodeStr
+
",库别为:"
+
wareHouseCode
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"PLANT"
,
CommonUtil
.
plantCode
);
paramMap
.
put
(
"BARCODE"
,
barcodeStr
);
paramMap
.
put
(
"WAREHOUSE"
,
wareHouseCode
);
log
.
info
(
barcodeStr
+
"料卷注册调用参数为:"
+
JSON
.
toJSONString
(
paramMap
)
+
",地址为:"
+
whRegisterUrl
);
try
{
String
resultStr
=
HttpHelper
.
postJson
(
whRegisterUrl
,
paramMap
);
log
.
info
(
barcodeStr
+
"料卷注册调用结果为:"
+
resultStr
);
JSONObject
resultObj
=
JSONObject
.
parseObject
(
resultStr
);
String
msgty
=
resultObj
.
getString
(
"MSGTY"
);
if
(
"S"
.
equals
(
msgty
))
{
}
else
{
String
msgtx
=
resultObj
.
getString
(
"MSGTX"
);
if
(
StringUtils
.
isNotEmpty
(
msgtx
)
&&
msgtx
.
contains
(
"已存在于系统中"
)){
}
else
{
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
msgtx
});
}
}
}
catch
(
Exception
e
)
{
log
.
info
(
barcodeStr
+
"料卷注册调用失败:"
+
e
.
getMessage
());
throw
new
ValidateException
(
"smfcore.api.error"
,
"接口请求失败[{0}]"
,
new
String
[]{
e
.
getMessage
()});
}
}
@Override
public
boolean
isForThisApi
(
String
apiName
)
{
return
"luxsan"
.
equals
(
apiName
);
...
...
@@ -1529,4 +1561,13 @@ public class LuxsanApi extends DefaultSmfApiListener {
public
void
setManualPalletUrl
(
String
url
)
{
LuxsanApi
.
manualPalletUrl
=
url
;
}
public
static
String
whRegisterUrl
;
@Value
(
"${api.whRegister}"
)
public
void
setWhRegisterUrl
(
String
url
){
LuxsanApi
.
whRegisterUrl
=
url
;
}
}
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualReturnTowerController.java
查看文件 @
fd6115b
...
...
@@ -66,12 +66,12 @@ public class ManualReturnTowerController {
//@AnonymousAccess
public
synchronized
ResultBean
reelToBox
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
{
String
wareHouseCode
=
paramMap
.
get
(
"wareHouseCode"
);
String
binCode
=
paramMap
.
get
(
"binCode"
);
//料格信息
String
codeStr
=
paramMap
.
get
(
"codeStr"
);
//条码信息
String
boxStr
=
paramMap
.
get
(
"boxStr"
);
//料箱信息
log
.
info
(
"人工手动退料,料格信息为:"
+
binCode
+
",料箱信息为:"
+
boxStr
+
"条码信息为:"
+
codeStr
);
log
.
info
(
"人工手动退料,料格信息为:"
+
binCode
+
",料箱信息为:"
+
boxStr
+
"条码信息为:"
+
codeStr
+
",库别为:"
+
wareHouseCode
);
if
(
StringUtils
.
isEmpty
(
binCode
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"料格信息"
});
...
...
@@ -82,11 +82,17 @@ public class ManualReturnTowerController {
if
(
StringUtils
.
isEmpty
(
boxStr
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"料箱信息"
});
}
if
(
StringUtils
.
isEmpty
(
wareHouseCode
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"库别"
});
}
codeStr
=
codeStr
.
toUpperCase
(
Locale
.
ROOT
);
binCode
=
binCode
.
toUpperCase
(
Locale
.
ROOT
);
boxStr
=
boxStr
.
toUpperCase
(
Locale
.
ROOT
);
//先进行料卷注册
LuxsanApi
.
whRegister
(
codeStr
,
wareHouseCode
);
Barcode
noDbBarcode
=
codeResolve
.
resolveCode
(
codeStr
);
if
(
noDbBarcode
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.error.barcode.noValidCode"
,
"条码无效"
);
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/util/BinCacheUtil.java
查看文件 @
fd6115b
...
...
@@ -455,7 +455,7 @@ public class BinCacheUtil {
}
List
<
Barcode
>
subCodeList
=
boxBarcode
.
getSubCodeList
();
//判断是否超过2
1
盘
//判断是否超过2
0
盘
if
(
subCodeList
!=
null
)
{
int
hasReelCount
=
0
;
for
(
Barcode
barcode
:
subCodeList
)
{
...
...
@@ -464,8 +464,8 @@ public class BinCacheUtil {
}
}
if
(
binId
.
startsWith
(
"C07"
))
{
if
(
hasReelCount
>=
2
1
)
{
return
"料格中["
+
binId
+
"]的数量为:"
+
hasReelCount
+
",大于等于2
1
个,请选择其他料格"
;
if
(
hasReelCount
>=
2
0
)
{
return
"料格中["
+
binId
+
"]的数量为:"
+
hasReelCount
+
",大于等于2
0
个,请选择其他料格"
;
}
}
else
{
if
(
hasReelCount
>=
500
)
{
...
...
src/main/resources/config/application-21088prod.yml
查看文件 @
fd6115b
...
...
@@ -181,3 +181,5 @@ api:
batchCheckReel
:
http://10.68.25.42:8001/Npm/CheckReelBatch
fetchReel
:
http://10.68.30.22:8082/api/mlb/FetchReel
whRegister
:
http://10.68.30.22:8082/api/mlb/WhRegister
src/main/resources/config/application-21088test.yml
查看文件 @
fd6115b
...
...
@@ -180,4 +180,6 @@ api:
#批量禁用料
batchCheckReel
:
http://10.68.27.68:8001/Npm/CheckReelBatch
fetchReel
:
http://10.42.220.171:8082/api/mlb/FetchReel
\ No newline at end of file
fetchReel
:
http://10.42.220.171:8082/api/mlb/FetchReel
whRegister
:
http://10.42.220.171:8082/api/mlb/WhRegister
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论