Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 64843be9
由
zshaohui
编写于
2024-09-03 13:36:22 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.储位移转bug修改
2.库存报表 展示机种字段
1 个父辈
c6f8f79c
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
78 行增加
和
47 行删除
src/main/java/com/neotel/smfcore/core/barcode/rest/bean/dto/BarcodeDto.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/BoxTransferController.java
src/main/java/com/neotel/smfcore/core/barcode/rest/bean/dto/BarcodeDto.java
查看文件 @
64843be
...
...
@@ -291,4 +291,7 @@ public class BarcodeDto implements Serializable {
@ApiModelProperty
(
"标签id"
)
private
String
labelId
;
@ApiModelProperty
(
"机种"
)
private
String
modelFamily
;
}
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
64843be
...
...
@@ -1339,6 +1339,11 @@ public class LiteOrderCache {
excludePosIds
.
add
(
holdPosId
);
}
}
if
(
needOutPosList
!=
null
&&
!
needOutPosList
.
isEmpty
()){
for
(
StoragePos
pos
:
needOutPosList
)
{
excludePosIds
.
add
(
pos
.
getId
());
}
}
//查找符合条件的库位
Criteria
c
=
Criteria
.
where
(
"barcode.partNumber"
).
is
(
pn
)
.
and
(
"id"
).
nin
(
excludePosIds
)
...
...
@@ -1365,11 +1370,11 @@ public class LiteOrderCache {
dataLog
.
setSourceId
(
cacheOrder
.
getId
());
dataLog
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
dataLog
.
setType
(
OP
.
CHECKOUT
);
dataLog
.
setLoc
(
TaskLocUtil
.
OUT
);
dataLog
.
setLoc
(
TaskLocUtil
.
MW
);
if
(
StringUtils
.
isNotEmpty
(
barcode
.
getCartonId
()))
{
dataLog
.
setCartonId
(
barcode
.
getCartonId
());
}
dataLog
.
setOdn
(
tru
e
);
dataLog
.
setOdn
(
fals
e
);
dataLogList
.
add
(
dataLog
);
}
}
else
{
...
...
@@ -1571,6 +1576,12 @@ public class LiteOrderCache {
}
}
if
(
needOutPosList
!=
null
&&
!
needOutPosList
.
isEmpty
()){
for
(
StoragePos
pos
:
needOutPosList
)
{
excludePosIds
.
add
(
pos
.
getId
());
}
}
//查找符合条件的库位
Criteria
c
=
Criteria
.
where
(
"barcode.partNumber"
).
is
(
pn
)
.
and
(
"id"
).
nin
(
excludePosIds
)
...
...
@@ -1709,6 +1720,11 @@ public class LiteOrderCache {
excludePosIds
.
add
(
newPosId
);
}
}
if
(
needOutPosList
!=
null
&&
!
needOutPosList
.
isEmpty
()){
for
(
StoragePos
pos
:
needOutPosList
)
{
excludePosIds
.
add
(
pos
.
getId
());
}
}
//查找符合条件的库位
Criteria
c
=
Criteria
.
where
(
"barcode.partNumber"
).
is
(
pn
)
...
...
@@ -1729,54 +1745,68 @@ public class LiteOrderCache {
throw
new
ValidateException
(
""
,
"料号:"
+
pn
+
",库别:"
+
warehouseCode
+
"未找到符合出库的组合"
);
}
needOutPosList
.
addAll
(
targetPos
);
}
for
(
StoragePos
pos
:
needOutPosList
)
{
Barcode
barcode
=
pos
.
getBarcode
();
log
.
info
(
barcode
.
getBarcode
()
+
"需要生成出库任务,工单号为:"
+
orderNo
);
DataLog
task
=
newTask
(
pos
);
task
.
setSourceId
(
cacheOrder
.
getId
());
task
.
setSourceName
(
cacheOrder
.
getOrderNo
());
task
.
setSubSourceId
(
orderItem
.
getId
());
task
.
setSubSourceInfo
(
orderItem
.
getFeederInfo
());
task
.
setType
(
OP
.
CHECKOUT
);
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
task
.
setTicketCode
(
orderNo
);
task
.
setTicketItem
(
orderItem
.
getTicketItem
());
task
.
setSourceType
(
LiteorderCheckType
.
TICKET_TRANSFER_CHECKOUT
+
""
);
task
.
setCartonId
(
barcode
.
getCartonId
());
for
(
StoragePos
pos
:
needOutPosList
)
{
//获取目的库别
String
targetWarhouseCode
=
StringUtils
.
isNotEmpty
(
orderItem
.
getDstWarehouse
())
?
orderItem
.
getDstWarehouse
()
:
orderItem
.
getSrcWarehouse
();
task
.
setWarehouseCode
(
targetWarhouseCode
);
Collection
<
String
>
excludePosIds
=
excludeOutPosIds
();
if
(
dataLogList
!=
null
&&
!
dataLogList
.
isEmpty
())
{
for
(
DataLog
dataLog
:
dataLogList
)
{
excludePosIds
.
add
(
dataLog
.
getId
());
}
}
barcode
.
setWarehouseCode
(
targetWarhouseCode
);
if
(
newPosIdList
!=
null
&&
!
newPosIdList
.
isEmpty
()){
for
(
String
newPosId
:
newPosIdList
)
{
excludePosIds
.
add
(
newPosId
);
}
}
Storage
storage
=
null
;
for
(
Storage
stor
:
dataCache
.
getAllStorage
().
values
())
{
if
(!
stor
.
isVirtual
()){
storage
=
stor
;
break
;
}
Barcode
barcode
=
pos
.
getBarcode
();
log
.
info
(
barcode
.
getBarcode
()
+
"需要生成出库任务,工单号为:"
+
orderNo
);
DataLog
task
=
newTask
(
pos
);
task
.
setSourceId
(
cacheOrder
.
getId
());
task
.
setSourceName
(
cacheOrder
.
getOrderNo
());
task
.
setSubSourceId
(
orderItem
.
getId
());
task
.
setSubSourceInfo
(
orderItem
.
getFeederInfo
());
task
.
setType
(
OP
.
CHECKOUT
);
task
.
setStatus
(
OP_STATUS
.
WAIT
.
name
());
task
.
setTicketCode
(
orderNo
);
task
.
setTicketItem
(
orderItem
.
getTicketItem
());
task
.
setSourceType
(
LiteorderCheckType
.
TICKET_TRANSFER_CHECKOUT
+
""
);
task
.
setCartonId
(
barcode
.
getCartonId
());
//获取目的库别
String
targetWarhouseCode
=
StringUtils
.
isNotEmpty
(
orderItem
.
getDstWarehouse
())
?
orderItem
.
getDstWarehouse
()
:
orderItem
.
getSrcWarehouse
();
task
.
setWarehouseCode
(
targetWarhouseCode
);
barcode
.
setWarehouseCode
(
targetWarhouseCode
);
Storage
storage
=
null
;
for
(
Storage
stor
:
dataCache
.
getAllStorage
().
values
())
{
if
(!
stor
.
isVirtual
()){
storage
=
stor
;
break
;
}
}
StoragePos
newPos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
excludePosIds
,
""
);
StoragePos
newPos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
excludePosIds
,
""
);
if
(
newPos
==
null
)
{
barcode
.
setModelFamily
(
""
);
newPos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
excludePosIds
,
""
);
}
if
(
newPos
==
null
)
{
throw
new
ValidateException
(
""
,
"料号:"
+
pn
+
",库别:"
+
warehouseCode
+
"未找到目的库别:"
+
targetWarhouseCode
+
"的可用库位"
);
}
excludePosIds
.
add
(
newPos
.
getId
());
excludePosIds
.
add
(
pos
.
getId
());
newPosIdList
.
add
(
newPos
.
getId
());
task
.
setLoc
(
newPos
.
getPosName
());
task
.
updateExtraDataMap
(
"targetPos"
,
newPos
.
getPosName
());
task
.
updateExtraDataMap
(
"targetPosId"
,
newPos
.
getId
());
task
.
setOperator
(
SecurityUtils
.
getLoginUsername
()+
"单据转库"
);
dataLogList
.
add
(
task
);
if
(
newPos
==
null
)
{
barcode
.
setModelFamily
(
""
);
newPos
=
storagePosManager
.
getEmptyPosByStorage
(
storage
,
barcode
,
excludePosIds
,
""
);
}
if
(
newPos
==
null
)
{
throw
new
ValidateException
(
""
,
"料号:"
+
pn
+
",库别:"
+
warehouseCode
+
"未找到目的库别:"
+
targetWarhouseCode
+
"的可用库位"
);
}
//excludePosIds.add(newPos.getId());
//excludePosIds.add(pos.getId());
newPosIdList
.
add
(
newPos
.
getId
());
task
.
setLoc
(
newPos
.
getPosName
());
task
.
updateExtraDataMap
(
"targetPos"
,
newPos
.
getPosName
());
task
.
updateExtraDataMap
(
"targetPosId"
,
newPos
.
getId
());
task
.
setOperator
(
SecurityUtils
.
getLoginUsername
()+
"单据转库"
);
dataLogList
.
add
(
task
);
}
}
if
(
dataLogList
==
null
||
dataLogList
.
isEmpty
())
{
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
查看文件 @
64843be
...
...
@@ -503,10 +503,6 @@ public class StoragePosController {
barcodeDto
.
setFirstPutInDate
(
barcodeDto
.
getCreateDate
());
//storagePosDto.setBarcode(barcode);
}
Barcode
barcode
=
barcodeManager
.
findByBarcode
(
barcodeDto
.
getBarcode
());
if
(
ObjectUtil
.
isNotNull
(
barcode
))
{
barcodeDto
.
setLabelId
(
barcode
.
getLabelId
());
}
}
}
// for (StoragePosDto storagePosDto : StoragePosDtos) {
...
...
@@ -724,6 +720,7 @@ public class StoragePosController {
header
.
add
(
Arrays
.
asList
(
"条码编号"
));
header
.
add
(
Arrays
.
asList
(
"labelId"
));
header
.
add
(
Arrays
.
asList
(
"栈板Id"
));
header
.
add
(
Arrays
.
asList
(
"机种"
));
header
.
add
(
Arrays
.
asList
(
"料号"
));
header
.
add
(
Arrays
.
asList
(
"库别"
));
header
.
add
(
Arrays
.
asList
(
"批次"
));
...
...
@@ -757,6 +754,7 @@ public class StoragePosController {
boxData
.
add
(
barcode
.
getBarcode
());
boxData
.
add
(
""
);
boxData
.
add
(
barcode
.
getPalletId
());
boxData
.
add
(
barcode
.
getModelFamily
());
boxData
.
add
(
barcode
.
getPartNumber
());
boxData
.
add
(
barcode
.
getWarehouseCode
());
boxData
.
add
(
barcode
.
getBatch
());
...
...
src/main/java/com/neotel/smfcore/custom/luxsan/factory_c/wipstor/controller/BoxTransferController.java
查看文件 @
64843be
...
...
@@ -212,7 +212,7 @@ public class BoxTransferController {
log
.
info
(
task
.
getBarcode
()+
"为单据号:"
+
sourceName
+
"为最后一箱,调用单据转库过账"
);
String
result
=
LuxsanApi
.
ticketGbPost
(
new
TicketGbPostRequest
(
CommonUtil
.
plantCode
,
sourceName
));
log
.
info
(
task
.
getBarcode
()+
"调用单据转库过账,单据号为:"
+
sourceName
+
"展示过账结果为:"
+
result
);
if
(
StringUtils
.
isEmpty
(
result
)){
if
(
StringUtils
.
is
Not
Empty
(
result
)){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
task
.
getBarcode
()+
"为单据转库最后一箱,单据号为:"
+
sourceName
+
",过账失败:"
+
result
);
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论