Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6a720178
由
LN
编写于
2024-08-15 16:48:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库单未找到任务时返回失败
1 个父辈
f8b99238
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
9 行删除
src/main/java/com/neotel/smfcore/custom/luxsan_sp/controller/SpSpareNoController.java
src/main/java/com/neotel/smfcore/custom/luxsan_sp/util/SpareNoCache.java
src/main/java/com/neotel/smfcore/custom/luxsan_sp/controller/SpSpareNoController.java
查看文件 @
6a72017
...
@@ -177,7 +177,7 @@ public class SpSpareNoController {
...
@@ -177,7 +177,7 @@ public class SpSpareNoController {
}
}
if
(!
spareNo
.
isExecuting
())
{
if
(!
spareNo
.
isExecuting
())
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
spareNoStr
+
"
不是
正在执行中,不允许放弃"
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
spareNoStr
+
"
入库单
正在执行中,不允许放弃"
);
}
}
spareNo
.
setSpareStatus
(
SpareNostatus
.
ABANDON_STATUS
);
spareNo
.
setSpareStatus
(
SpareNostatus
.
ABANDON_STATUS
);
...
...
src/main/java/com/neotel/smfcore/custom/luxsan_sp/util/SpareNoCache.java
查看文件 @
6a72017
...
@@ -315,14 +315,14 @@ public class SpareNoCache {
...
@@ -315,14 +315,14 @@ public class SpareNoCache {
boxTypes
.
add
(
"CM"
);
boxTypes
.
add
(
"CM"
);
for
(
String
type
:
for
(
String
type
:
boxTypes
)
{
boxTypes
)
{
if
(
type
==
""
)
{
if
(
type
==
""
)
{
emptyPos
=
storagePosManager
.
findEmptyBoxToPut
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
baseNo
.
getWhCode
().
trim
());
emptyPos
=
storagePosManager
.
findEmptyBoxToPut
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
baseNo
.
getWhCode
().
trim
());
}
else
{
}
else
{
int
count
=
SpBoxUtil
.
GetBoxSubCount
(
type
);
int
count
=
SpBoxUtil
.
GetBoxSubCount
(
type
);
emptyPos
=
storagePosManager
.
findEmptyBoxToPutIn
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
type
,
count
,
baseNo
.
getWhCode
().
trim
());
emptyPos
=
storagePosManager
.
findEmptyBoxToPutIn
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
type
,
count
,
baseNo
.
getWhCode
().
trim
());
}
}
emptyBox
=
emptyPos
.
getBarcode
();
if
(
emptyPos
!=
null
)
{
if
(
emptyPos
!=
null
)
{
emptyBox
=
emptyPos
.
getBarcode
();
newPn
.
setBarcode
(
emptyBox
.
getBarcode
()
+
"-"
+
(
emptyBox
.
getSubCodeList
()
==
null
?
1
:
emptyBox
.
getSubCodeList
().
size
()));
newPn
.
setBarcode
(
emptyBox
.
getBarcode
()
+
"-"
+
(
emptyBox
.
getSubCodeList
()
==
null
?
1
:
emptyBox
.
getSubCodeList
().
size
()));
// newPn = barcodeManager.save(newPn);
// newPn = barcodeManager.save(newPn);
newPn
=
barcodeManager
.
saveBarcode
(
newPn
);
newPn
=
barcodeManager
.
saveBarcode
(
newPn
);
...
@@ -335,7 +335,7 @@ public class SpareNoCache {
...
@@ -335,7 +335,7 @@ public class SpareNoCache {
emptyBox
.
setOut
(
false
);
emptyBox
.
setOut
(
false
);
emptyBox
.
setStatus
(
BARCODE_STATUS
.
IN_STORE
);
emptyBox
.
setStatus
(
BARCODE_STATUS
.
IN_STORE
);
emptyPos
.
setBarcode
(
emptyBox
);
emptyPos
.
setBarcode
(
emptyBox
);
needOutPos
.
put
(
emptyPos
.
getPosName
(),
emptyPos
);
needOutPos
.
put
(
emptyPos
.
getPosName
(),
emptyPos
);
log
.
info
(
"入库单"
+
orderNo
+
", Pn="
+
pn
+
","
+
type
+
"查找到有空格口料箱="
+
emptyPos
.
getPosName
()
+
",料箱号="
+
emptyBox
.
getBarcode
()
+
",格口号="
+
newPn
.
getBarcode
()
+
",需要入库数量="
+
detail
.
getInQty
());
log
.
info
(
"入库单"
+
orderNo
+
", Pn="
+
pn
+
","
+
type
+
"查找到有空格口料箱="
+
emptyPos
.
getPosName
()
+
",料箱号="
+
emptyBox
.
getBarcode
()
+
",格口号="
+
newPn
.
getBarcode
()
+
",需要入库数量="
+
detail
.
getInQty
());
break
;
break
;
...
@@ -348,7 +348,8 @@ public class SpareNoCache {
...
@@ -348,7 +348,8 @@ public class SpareNoCache {
}
}
//开始生成出库任务
//开始生成出库任务
int
index
=
1
;
int
index
=
0
;
if
(
needOutPos
.
size
()>
0
)
{
for
(
StoragePos
pos
:
needOutPos
.
values
()
for
(
StoragePos
pos
:
needOutPos
.
values
()
)
{
)
{
Barcode
barcode
=
pos
.
getBarcode
();
Barcode
barcode
=
pos
.
getBarcode
();
...
@@ -377,10 +378,15 @@ public class SpareNoCache {
...
@@ -377,10 +378,15 @@ public class SpareNoCache {
}
}
index
++;
index
++;
}
}
}
//如果未找到任务,直接结束
else
{
return
"未找到可执行的任务"
;
}
}
catch
(
Exception
exception
)
{
}
catch
(
Exception
exception
)
{
log
.
error
(
"执行ReturnInventoryNo 出错: "
+
exception
.
toString
()
);
log
.
error
(
"执行ReturnInventoryNo 出错: "
,
exception
);
exception
.
printStackTrace
();
exception
.
printStackTrace
();
}
}
return
""
;
return
""
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论