Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f667e70d
由
LN
编写于
2024-11-11 16:21:24 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修改格口数量功能优化
1 个父辈
f9066fb2
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
19 行增加
和
4 行删除
src/main/java/com/neotel/smfcore/custom/luxsan_sp/controller/SpBoxPutInController.java
src/main/java/com/neotel/smfcore/custom/luxsan_sp/controller/SpBoxPutInController.java
查看文件 @
f667e70
...
@@ -55,7 +55,7 @@ public class SpBoxPutInController {
...
@@ -55,7 +55,7 @@ public class SpBoxPutInController {
String
currentRfid
=
station
.
getCurrentRfid
();
String
currentRfid
=
station
.
getCurrentRfid
();
if
(
ObjectUtil
.
isEmpty
(
currentRfid
))
{
if
(
ObjectUtil
.
isEmpty
(
currentRfid
))
{
if
(
LuxsanSpApi
.
Debug
)
{
if
(
LuxsanSpApi
.
Debug
)
{
currentRfid
=
"CS
0130
A"
;
currentRfid
=
"CS
1607
A"
;
}
}
}
}
// log.info("getStationInfo工位上"+currentRfid);
// log.info("getStationInfo工位上"+currentRfid);
...
@@ -111,6 +111,9 @@ public class SpBoxPutInController {
...
@@ -111,6 +111,9 @@ public class SpBoxPutInController {
public
ResultBean
updateSubCount
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
throws
Exception
{
public
ResultBean
updateSubCount
(
@RequestBody
Map
<
String
,
String
>
paramMap
)
throws
Exception
{
String
boxStr
=
paramMap
.
get
(
"boxStr"
).
trim
();
String
boxStr
=
paramMap
.
get
(
"boxStr"
).
trim
();
Integer
subNum
=
Integer
.
parseInt
(
paramMap
.
get
(
"subNum"
).
trim
());
Integer
subNum
=
Integer
.
parseInt
(
paramMap
.
get
(
"subNum"
).
trim
());
if
(
ObjectUtil
.
isEmpty
(
boxStr
)){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"未找到有效的料箱条码"
);
}
//解析料箱信息
//解析料箱信息
Barcode
boxBarcode
=
codeResolve
.
resolveOneValideBarcode
(
"=2x2="
+
boxStr
);
Barcode
boxBarcode
=
codeResolve
.
resolveOneValideBarcode
(
"=2x2="
+
boxStr
);
if
(
boxBarcode
==
null
)
{
if
(
boxBarcode
==
null
)
{
...
@@ -118,20 +121,32 @@ public class SpBoxPutInController {
...
@@ -118,20 +121,32 @@ public class SpBoxPutInController {
}
}
//判断料箱是否有料
//判断料箱是否有料
if
(
boxBarcode
.
getSubCodeList
()
!=
null
&&
boxBarcode
.
getSubCodeList
().
size
()
>
0
)
{
if
(
boxBarcode
.
getSubCodeList
()
!=
null
&&
boxBarcode
.
getSubCodeList
().
size
()
>
0
&&
boxBarcode
.
getMaxSubNum
()
>
subNum
)
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"料箱不为空,无法修改格口数量"
);
//格口数量不能小于当前物料数量
if
(
boxBarcode
.
getSubCodeList
().
size
()
>
subNum
)
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"料箱已有"
+
boxBarcode
.
getSubCodeList
().
size
()
+
"个物料,无法修改格口数量为"
+
subNum
);
}
for
(
int
index
=
subNum
+
1
;
index
<=
boxBarcode
.
getMaxSubNum
();
index
++)
{
//判断是否已有数据
String
subCode
=
boxBarcode
.
getBarcode
()
+
"-"
+
index
;
Barcode
gekouB
=
boxBarcode
.
getSubCodeByGeKou
(
subCode
);
if
(
gekouB
!=
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"料箱格口"
+
subCode
+
"已有料,无法修改格口数量为"
+
subNum
);
}
}
}
}
if
(
subNum
<=
0
&&
subNum
>
10
)
{
if
(
subNum
<=
0
&&
subNum
>
10
)
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"请输入正确的格口数量(1-10)"
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"请输入正确的格口数量(1-10)"
);
}
}
log
.
info
(
"修改料箱"
+
boxBarcode
.
getBarcode
()
+
"(原来格口数量:"
+
boxBarcode
.
getMaxSubNum
()
+
")的格口数量为:"
+
subNum
);
boxBarcode
.
setMaxSubNum
(
subNum
);
boxBarcode
.
setMaxSubNum
(
subNum
);
barcodeManager
.
save
(
boxBarcode
);
barcodeManager
.
save
(
boxBarcode
);
//更改库位中的条码
//更改库位中的条码
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
boxBarcode
.
getBarcode
());
StoragePos
pos
=
storagePosManager
.
getByBarcode
(
boxBarcode
.
getBarcode
());
if
(
pos
!=
null
)
{
if
(
pos
!=
null
)
{
pos
.
setBarcode
(
boxBarcode
);
pos
.
setBarcode
(
boxBarcode
);
storagePosManager
.
save
(
pos
);
storagePosManager
.
save
(
pos
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论