Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6a720178
由
LN
编写于
2024-08-15 16:48:42 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
入库单未找到任务时返回失败
1 个父辈
f8b99238
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
41 行增加
和
35 行删除
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 {
}
if
(!
spareNo
.
isExecuting
())
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
spareNoStr
+
"
不是
正在执行中,不允许放弃"
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
spareNoStr
+
"
入库单
正在执行中,不允许放弃"
);
}
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 {
boxTypes
.
add
(
"CM"
);
for
(
String
type
:
boxTypes
)
{
if
(
type
==
""
)
{
emptyPos
=
storagePosManager
.
findEmptyBoxToPut
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
baseNo
.
getWhCode
().
trim
());
}
else
{
if
(
type
==
""
)
{
emptyPos
=
storagePosManager
.
findEmptyBoxToPut
(
storageIdList
,
excludePosIds
,
dataCache
.
getCheckOutType
(),
baseNo
.
getWhCode
().
trim
());
}
else
{
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
)
{
emptyBox
=
emptyPos
.
getBarcode
();
newPn
.
setBarcode
(
emptyBox
.
getBarcode
()
+
"-"
+
(
emptyBox
.
getSubCodeList
()
==
null
?
1
:
emptyBox
.
getSubCodeList
().
size
()));
// newPn = barcodeManager.save(newPn);
newPn
=
barcodeManager
.
saveBarcode
(
newPn
);
...
...
@@ -335,7 +335,7 @@ public class SpareNoCache {
emptyBox
.
setOut
(
false
);
emptyBox
.
setStatus
(
BARCODE_STATUS
.
IN_STORE
);
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
());
break
;
...
...
@@ -348,39 +348,45 @@ public class SpareNoCache {
}
//开始生成出库任务
int
index
=
1
;
for
(
StoragePos
pos
:
needOutPos
.
values
()
)
{
Barcode
barcode
=
pos
.
getBarcode
();
log
.
info
(
"入库单"
+
orderNo
+
", 为库位="
+
pos
.
getPosName
()
+
",料箱="
+
barcode
.
getBarcode
()
+
"生成出库任务:"
+
index
);
pos
.
setBarcode
(
barcode
);
barcodeManager
.
save
(
barcode
);
barcodeManager
.
saveBarcode
(
barcode
);
storagePosManager
.
save
(
pos
);
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
log
.
info
(
pos
.
getPosName
()
+
"出库,料箱号为:"
+
barcode
.
getBarcode
());
DataLog
task
=
new
DataLog
(
storage
,
barcode
,
pos
);
task
.
setSourceId
(
baseNo
.
getId
());
task
.
setSourceName
(
orderNo
);
task
.
setSubSourceId
(
barcode
.
getLockName
());
task
.
setSubSourceInfo
(
barcode
.
getLockName
());
task
.
setType
(
OP
.
CHECKOUT
);
task
.
setCreator
(
SecurityUtils
.
getLoginUsername
());
task
.
setLoc
(
"s1"
);
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
try
{
taskService
.
addTaskToExecute
(
task
);
}
catch
(
Exception
e
)
{
e
.
getMessage
();
int
index
=
0
;
if
(
needOutPos
.
size
()>
0
)
{
for
(
StoragePos
pos
:
needOutPos
.
values
()
)
{
Barcode
barcode
=
pos
.
getBarcode
();
log
.
info
(
"入库单"
+
orderNo
+
", 为库位="
+
pos
.
getPosName
()
+
",料箱="
+
barcode
.
getBarcode
()
+
"生成出库任务:"
+
index
);
pos
.
setBarcode
(
barcode
);
barcodeManager
.
save
(
barcode
);
barcodeManager
.
saveBarcode
(
barcode
);
storagePosManager
.
save
(
pos
);
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
log
.
info
(
pos
.
getPosName
()
+
"出库,料箱号为:"
+
barcode
.
getBarcode
());
DataLog
task
=
new
DataLog
(
storage
,
barcode
,
pos
);
task
.
setSourceId
(
baseNo
.
getId
());
task
.
setSourceName
(
orderNo
);
task
.
setSubSourceId
(
barcode
.
getLockName
());
task
.
setSubSourceInfo
(
barcode
.
getLockName
());
task
.
setType
(
OP
.
CHECKOUT
);
task
.
setCreator
(
SecurityUtils
.
getLoginUsername
());
task
.
setLoc
(
"s1"
);
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
try
{
taskService
.
addTaskToExecute
(
task
);
}
catch
(
Exception
e
)
{
e
.
getMessage
();
}
index
++;
}
index
++;
}
//如果未找到任务,直接结束
else
{
return
"未找到可执行的任务"
;
}
}
catch
(
Exception
exception
)
{
log
.
error
(
"执行ReturnInventoryNo 出错: "
+
exception
.
toString
()
);
log
.
error
(
"执行ReturnInventoryNo 出错: "
,
exception
);
exception
.
printStackTrace
();
}
return
""
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论