Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9d1d9397
由
hc
编写于
2024-07-06 13:22:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
fix:gr手动入库添加虚拟仓方式
1 个父辈
7390c53d
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
91 行增加
和
6 行删除
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualGrPutInController.java
src/main/resources/config/application.yml
src/main/java/com/neotel/smfcore/common/init/DataInitManager.java
查看文件 @
9d1d939
...
@@ -200,8 +200,10 @@ public class DataInitManager {
...
@@ -200,8 +200,10 @@ public class DataInitManager {
Menu
manual
=
Menu
.
CreatePMenu
(
"手动出入库"
,
5
,
"manual"
,
2
,
"manual"
,
raw
);
Menu
manual
=
Menu
.
CreatePMenu
(
"手动出入库"
,
5
,
"manual"
,
2
,
"manual"
,
raw
);
//手动入库
//手动入库
addNewFunctionMenu
(
1
,
manual
,
"manualWarehous"
,
"手动入库"
,
"manualWarehous"
,
"manualWarehous/index"
,
"manualWa"
,
functionMenuMap
);
addNewFunctionMenu
(
1
,
manual
,
"manualWarehous"
,
"手动入库"
,
"manualWarehous"
,
"manualWarehous/index"
,
"manualWa"
,
functionMenuMap
);
// 手动GR入库虚拟仓
addNewFunctionMenu
(
2
,
manual
,
"manualGrStorage"
,
"虚拟仓手动GR入库"
,
"manualGrStorage"
,
"manualGrStorage/index"
,
"manualGrSto"
,
functionMenuMap
);
// 手动GR入库
// 手动GR入库
addNewFunctionMenu
(
2
,
manual
,
"manualGrStorage"
,
"手动GR入库"
,
"manualGrStorage"
,
"manualGrStorage/index"
,
"manualGrSto
"
,
functionMenuMap
);
addNewFunctionMenu
(
3
,
manual
,
"manualGrStorageVirtual"
,
"手动GR入库"
,
"manualGrStorageVirtual"
,
"manualGrStorageVirtual/index"
,
"manualGrStoVirt
"
,
functionMenuMap
);
Menu
doc
=
Menu
.
CreatePMenu
(
"单据操作"
,
5
,
"doc"
,
1
,
"docOp"
,
raw
);
Menu
doc
=
Menu
.
CreatePMenu
(
"单据操作"
,
5
,
"doc"
,
1
,
"docOp"
,
raw
);
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/rawstor/controller/manual/ManualGrPutInController.java
查看文件 @
9d1d939
...
@@ -197,10 +197,8 @@ public class ManualGrPutInController {
...
@@ -197,10 +197,8 @@ public class ManualGrPutInController {
}
}
@ApiOperation
(
"完成装箱并入库"
)
@RequestMapping
(
"/boxToPos"
)
public
synchronized
ResultBean
boxToPos_old
(
String
boxStr
,
String
posName
)
{
@AnonymousAccess
public
synchronized
ResultBean
boxToPos
(
String
boxStr
,
String
posName
)
{
if
(
StringUtils
.
isEmpty
(
boxStr
))
{
if
(
StringUtils
.
isEmpty
(
boxStr
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"料箱信息"
});
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"料箱信息"
});
...
@@ -270,6 +268,91 @@ public class ManualGrPutInController {
...
@@ -270,6 +268,91 @@ public class ManualGrPutInController {
return
ResultBean
.
newOkResult
(
"ok"
);
return
ResultBean
.
newOkResult
(
"ok"
);
}
}
@ApiOperation
(
"完成装箱并入库"
)
@RequestMapping
(
"/boxToPos"
)
@AnonymousAccess
public
synchronized
ResultBean
boxToPosNew
(
String
boxStr
,
String
posName
)
{
if
(
StringUtils
.
isEmpty
(
boxStr
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"料箱信息"
});
}
Barcode
boxBarcode
=
codeResolve
.
resolveOneValideBarcode
(
boxStr
);
//1.判断有没有正在执行的任务
List
<
DataLog
>
taskList
=
taskService
.
getAllTasks
();
StoragePos
newPos
=
null
;
for
(
DataLog
dataLog
:
taskList
)
{
if
(
boxStr
.
startsWith
(
dataLog
.
getBarcode
()))
{
if
(!
dataLog
.
isFinished
()
&&
!
dataLog
.
isCancel
())
{
if
(
dataLog
.
isPutInTask
())
{
//return ResultBean.newOkResult(dataLog);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
boxStr
+
"有正在执行的入库任务,请确认"
);
}
else
{
log
.
info
(
boxStr
+
"有正在执行的出库任务,服务器更改状态为完成"
);
dataLog
.
setStatus
(
OP_STATUS
.
FINISHED
.
name
());
taskService
.
updateFinishedTask
(
dataLog
);
}
}
}
}
if
(
posName
==
null
)
{
//2.获取空库位
newPos
=
BoxHandleUtil
.
locOnePos
(
boxBarcode
);
if
(
newPos
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
""
,
boxStr
+
"未找到可用库位"
);
}
}
else
{
//2.判断库位是否存在
newPos
=
storagePosManager
.
getByPosName
(
posName
);
taskList
=
taskService
.
getAllTasks
();
for
(
DataLog
dataLog
:
taskList
)
{
if
(
dataLog
.
getPosName
().
equals
(
posName
))
{
if
(!
dataLog
.
isFinished
()
&&
!
dataLog
.
isCancel
())
{
//if (dataLog.isPutInTask()) {
return
ResultBean
.
newErrorResult
(-
1
,
""
,
posName
+
"有正在执行的任务,请确认"
);
//}
}
}
}
if
(
newPos
==
null
)
{
return
ResultBean
.
newErrorResult
(-
2
,
"smfcore.error.pos.notExist"
,
"[{0}]库位不存在"
,
new
String
[]{
posName
});
}
//3.库位是否存了料箱
if
(
ObjectUtil
.
isNotNull
(
newPos
.
getBarcode
())
&&
!
newPos
.
getBarcode
().
getBarcode
().
equals
(
boxStr
))
{
return
ResultBean
.
newErrorResult
(-
4
,
"smfcore.error.pos.hasReel"
,
"库位[{0}]中已有物料,无法入库"
,
new
String
[]{
posName
});
}
// 库位置空
if
(
ObjectUtil
.
isNotNull
(
newPos
.
getBarcode
()))
{
newPos
.
setBarcode
(
null
);
newPos
.
setUsed
(
false
);
}
}
String
oldPosName
=
boxBarcode
.
getPosName
();
//将料箱原来的库位置空
StoragePos
oldPos
=
null
;
if
(
oldPosName
!=
null
)
{
oldPos
=
storagePosManager
.
getByPosName
(
oldPosName
);
}
// 将原先库位清空,特别的当原先库位和当前库位相同时不清空
if
(
oldPos
!=
null
&&
!
oldPos
.
getPosName
().
equals
(
newPos
.
getPosName
()))
{
// 原先已被存储在oldPos
oldPos
.
setBarcode
(
null
);
oldPos
.
setUsed
(
false
);
}
//4.生成入库任务
taskService
.
addTaskToFinished
(
newPos
,
boxBarcode
,
SecurityUtils
.
getLoginUsername
());
// 入库成功后刷新旧的库位信息
if
(
oldPos
!=
null
&&
!
oldPos
.
isUsed
())
{
storagePosManager
.
save
(
oldPos
);
}
return
ResultBean
.
newOkResult
(
"ok"
);
}
...
...
src/main/resources/config/application.yml
查看文件 @
9d1d939
...
@@ -105,5 +105,5 @@ app:
...
@@ -105,5 +105,5 @@ app:
type
:
"
"
type
:
"
"
menu
:
menu
:
show
:
show
:
manualGrStorageVirtual
hide
:
hide
:
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论