Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jyzb_platformV2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
赵剑炜
jyzb_platformV2
Commits
ddcedce8
Commit
ddcedce8
authored
Mar 15, 2024
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
盘点上报时不删除销毁物资
parent
45f31323
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
51 行增加
和
13 行删除
+51
-13
InvSummaryDto.java
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InvSummaryDto.java
+2
-0
InventoryMapper.java
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventoryMapper.java
+3
-0
BussinessInventoryServiceImpl.java
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/BussinessInventoryServiceImpl.java
+17
-13
InventoryMapper.xml
jyzb-biz/src/main/resources/mapper/InventoryMapper.xml
+29
-0
没有找到文件。
jyzb-api/src/main/java/com/junmp/jyzb/api/bean/dto/InvSummaryDto.java
View file @
ddcedce8
...
@@ -6,9 +6,11 @@ import java.math.BigDecimal;
...
@@ -6,9 +6,11 @@ import java.math.BigDecimal;
@Data
@Data
public
class
InvSummaryDto
{
public
class
InvSummaryDto
{
private
String
id
;
private
String
typeId
;
private
String
typeId
;
private
String
sizeId
;
private
String
sizeId
;
private
String
locationId
;
private
String
locationId
;
private
Integer
count
;
private
Integer
count
;
private
BigDecimal
price
;
private
BigDecimal
price
;
private
String
epc
;
}
}
jyzb-biz/src/main/java/com/junmp/jyzb/mapper/InventoryMapper.java
View file @
ddcedce8
...
@@ -27,6 +27,9 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
...
@@ -27,6 +27,9 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
List
<
WarehouseInvDto
>
GetViewWarehouseInv
(
@Param
(
"warehouseId"
)
String
warehouseId
,
@Param
(
"typeIdsList"
)
List
<
String
>
typeIdsList
,
@Param
(
"sizeIds"
)
List
<
String
>
sizeIds
);
List
<
WarehouseInvDto
>
GetViewWarehouseInv
(
@Param
(
"warehouseId"
)
String
warehouseId
,
@Param
(
"typeIdsList"
)
List
<
String
>
typeIdsList
,
@Param
(
"sizeIds"
)
List
<
String
>
sizeIds
);
List
<
ViewEquipmentDto
>
GetViewEquipment
(
@Param
(
"epcList"
)
List
<
String
>
epcList
);
List
<
ViewEquipmentDto
>
GetViewEquipment
(
@Param
(
"epcList"
)
List
<
String
>
epcList
);
List
<
EpcListDto
>
GetViewCountByepcs
(
@Param
(
"epcList"
)
List
<
String
>
epcList
);
List
<
EpcListDto
>
GetViewCountByepcs
(
@Param
(
"epcList"
)
List
<
String
>
epcList
);
List
<
InvSummaryDto
>
selectEpcsByWarehouse
(
@Param
(
"warehouseId"
)
String
warehouseId
,
@Param
(
"typeIdList"
)
List
<
String
>
typeIdList
,
@Param
(
"sizeIdList"
)
List
<
String
>
sizeIdList
);
List
<
InventoryMapDto
>
GetViewInventoryMap
(
@Param
(
"warehouseId"
)
String
warehouseId
);
List
<
InventoryMapDto
>
GetViewInventoryMap
(
@Param
(
"warehouseId"
)
String
warehouseId
);
...
...
jyzb-biz/src/main/java/com/junmp/jyzb/service/impl/BussinessInventoryServiceImpl.java
View file @
ddcedce8
...
@@ -654,7 +654,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
...
@@ -654,7 +654,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
if
(
req
.
getState
().
equals
(
"0"
))
//确认结果
if
(
req
.
getState
().
equals
(
"0"
))
//确认结果
{
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
List
<
WarehouseInventory
>
DeleteList
;
//
List<WarehouseInventory> DeleteList;
List
<
WarehouseInventory
>
SaveEpcList
=
new
ArrayList
<>();
List
<
WarehouseInventory
>
SaveEpcList
=
new
ArrayList
<>();
List
<
BussinessDetail
>
bussinessDetail
=
bussinessInventoryDetailService
.
list
(
List
<
BussinessDetail
>
bussinessDetail
=
bussinessInventoryDetailService
.
list
(
new
LambdaQueryWrapper
<
BussinessDetail
>().
eq
(
BussinessDetail:
:
getInventoryId
,
req
.
getOrderId
())
new
LambdaQueryWrapper
<
BussinessDetail
>().
eq
(
BussinessDetail:
:
getInventoryId
,
req
.
getOrderId
())
...
@@ -746,7 +746,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
...
@@ -746,7 +746,7 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
}
}
LambdaQueryWrapper
<
WarehouseInventory
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
//
LambdaQueryWrapper<WarehouseInventory> queryWrapper = new LambdaQueryWrapper<>();
params
.
put
(
"warehouseId"
,
BI
.
getWarehouseId
());
// 添加一个空的列表
params
.
put
(
"warehouseId"
,
BI
.
getWarehouseId
());
// 添加一个空的列表
// 从Map中获取sizeIds,假设它们存储为List类型
// 从Map中获取sizeIds,假设它们存储为List类型
List
<
String
>
sizeIds
=
(
List
<
String
>)
params
.
get
(
"sizeIds"
);
List
<
String
>
sizeIds
=
(
List
<
String
>)
params
.
get
(
"sizeIds"
);
...
@@ -754,20 +754,20 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
...
@@ -754,20 +754,20 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
List
<
String
>
typeIds
=
(
List
<
String
>)
params
.
get
(
"typeIds"
);
List
<
String
>
typeIds
=
(
List
<
String
>)
params
.
get
(
"typeIds"
);
// 检查sizeIds是否不为空且不是空列表
// 检查sizeIds是否不为空且不是空列表
if
(
sizeIds
!=
null
&&
!
sizeIds
.
isEmpty
())
{
if
(
sizeIds
!=
null
&&
!
sizeIds
.
isEmpty
())
{
queryWrapper
.
in
(
WarehouseInventory:
:
getSizeId
,
sizeIds
);
//
queryWrapper.in(WarehouseInventory::getSizeId, sizeIds);
}
}
// 检查sizeIds是否不为空且不是空列表
// 检查sizeIds是否不为空且不是空列表
if
(
typeIds
!=
null
&&
!
typeIds
.
isEmpty
())
{
if
(
typeIds
!=
null
&&
!
typeIds
.
isEmpty
())
{
queryWrapper
.
in
(
WarehouseInventory:
:
getTypeId
,
typeIds
);
//
queryWrapper.in(WarehouseInventory::getTypeId, typeIds);
}
}
// 添加查询条件,仅查询warehouseId为111的记录
// // 添加查询条件,仅查询warehouseId符合的记录
queryWrapper
.
eq
(
WarehouseInventory:
:
getLocationId
,
BI
.
getWarehouseId
());
// queryWrapper.eq(WarehouseInventory::getLocationId, BI.getWarehouseId());
DeleteList
=
warehouseInventoryService
.
list
(
queryWrapper
);
// DeleteList = warehouseInventoryService.list(queryWrapper);
List
<
InvSummaryDto
>
invDelete
=
inventoryMapper
.
selectEpcsByWarehouse
(
BI
.
getWarehouseId
(),
typeIds
,
sizeIds
);
List
<
String
>
removeIds
=
invDelete
.
stream
()
// 创建流
.
map
(
InvSummaryDto:
:
getId
)
// 提取每个InvSummaryDto对象的id
.
collect
(
Collectors
.
toList
());
// 收集到列表中
// 检查sizeIds是否不为空且不是空列表
if
(
sizeIds
!=
null
&&
!
sizeIds
.
isEmpty
())
{
queryWrapper
.
in
(
WarehouseInventory:
:
getSizeId
,
sizeIds
);
}
List
<
WarehouseInvDto
>
DeleteFakeEpc
=
inventoryMapper
.
GetViewWarehouseInv
(
BI
.
getWarehouseId
(),
typeIds
,
sizeIds
);
List
<
WarehouseInvDto
>
DeleteFakeEpc
=
inventoryMapper
.
GetViewWarehouseInv
(
BI
.
getWarehouseId
(),
typeIds
,
sizeIds
);
...
@@ -917,9 +917,13 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
...
@@ -917,9 +917,13 @@ public class BussinessInventoryServiceImpl extends ServiceImpl<BussinessInventor
BI
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
BI
.
setUpdateTime
(
DateTimeUtil
.
getCurrentDateTime
());
//删除同组织机构下该EPC其他仓库的位置信息
//删除同组织机构下该EPC其他仓库的位置信息
inventoryMapper
.
DeleteEpcsWithoutWarehouse
(
UpdateInventorys
,
String
.
valueOf
(
BI
.
getOrgId
()),
String
.
valueOf
(
BI
.
getWarehouseId
()));
inventoryMapper
.
DeleteEpcsWithoutWarehouse
(
UpdateInventorys
,
String
.
valueOf
(
BI
.
getOrgId
()),
String
.
valueOf
(
BI
.
getWarehouseId
()));
if
(
DeleteList
.
size
()>
0
)
//删除库内全部的EPC信息
// if (DeleteList.size()>0)//删除库内全部的EPC信息
// {
// warehouseInventoryService.removeBatchByIds(DeleteList);
// }
if
(
removeIds
.
size
()>
0
)
//删除库内全部的EPC信息
{
{
warehouseInventoryService
.
removeB
atchByIds
(
DeleteList
);
warehouseInventoryService
.
removeB
yIds
(
removeIds
);
}
}
if
(
DeleteSummary
.
size
()>
0
)
if
(
DeleteSummary
.
size
()>
0
)
...
...
jyzb-biz/src/main/resources/mapper/InventoryMapper.xml
View file @
ddcedce8
...
@@ -134,6 +134,34 @@
...
@@ -134,6 +134,34 @@
AND bwi.location_id != #{warehouseId}
AND bwi.location_id != #{warehouseId}
</delete>
</delete>
<select
id=
"selectEpcsByWarehouse"
resultType=
"com.junmp.jyzb.api.bean.dto.InvSummaryDto"
>
SELECT
bi.epc,
bi.type_id as typeId,
bi.size_id as sizeId,
bwi.id as id,
bwi.location_id as locationId,
bi.price
FROM
`base_inventory` `bi`
JOIN
`base_warehouse_inventory` `bwi` ON `bi`.`epc` = `bwi`.`epc`
WHERE bwi.location_id=#{warehouseId} and bi.state!="destory"
<if
test=
"typeIdList!=null and typeIdList.size() > 0"
>
AND bi.type_id IN
<foreach
collection=
"typeIdList "
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"sizeIdList != null and sizeIdList.size() > 0"
>
AND bi.size_id IN
<foreach
item=
"item"
collection=
"sizeIdList"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
<select
id=
"selectWarehouseByEpcs"
resultType=
"com.junmp.jyzb.api.bean.dto.InvSummaryDto"
>
<select
id=
"selectWarehouseByEpcs"
resultType=
"com.junmp.jyzb.api.bean.dto.InvSummaryDto"
>
SELECT
SELECT
bi.type_id as typeId,
bi.type_id as typeId,
...
@@ -150,6 +178,7 @@
...
@@ -150,6 +178,7 @@
open=
"("
separator=
","
close=
")"
>
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
and bwi.org_id=#{orgId} and bwi.location_id!=#{warehouseId}
and bwi.org_id=#{orgId} and bwi.location_id!=#{warehouseId}
GROUP BY
GROUP BY
bi.size_id, bi.type_id, bi.price,bwi.location_id
bi.size_id, bi.type_id, bi.price,bwi.location_id
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论