Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mini-wms
概览
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
周海峰
mini-wms
Commits
7494b209
Commit
7494b209
authored
Dec 15, 2025
by
zhangtw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页入库统计值为0也显示列表数据
parent
67729606
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
21 行增加
和
14 行删除
+21
-14
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrdersMapper.xml
+21
-14
没有找到文件。
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrdersMapper.xml
View file @
7494b209
...
...
@@ -247,21 +247,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
column=
"total_money"
property=
"totalMoney"
jdbcType=
"DECIMAL"
/>
</resultMap>
<select
id=
"countInboundMaterialQuantity"
resultMap=
"InboundMaterialTotalResultMap"
parameterType=
"String"
>
select m.material_name,sum(ioi.actual_quantity) as total_quantity
from inbound_orders as io
inner join inbound_order_items as ioi on io.id = ioi.inbound_order_id
inner join materials as m on ioi.material_id = m.id
where io.order_status = 2
group by m.id
order by total_quantity asc
select m.material_name,
COALESCE(SUM(ioi.actual_quantity), 0) as total_quantity
from materials as m
left join inbound_order_items as ioi
on m.id = ioi.material_id
left join inbound_order as io
on io.id = ioi.inbound_order_id
and io.order_status = 2
group by m.id, m.material_name
order by total_quantity desc
</select>
<select
id=
"countInboundMaterialMoney"
resultMap=
"InboundMaterialTotalResultMap"
parameterType=
"String"
>
select m.material_name,sum(ioi.actual_quantity * ioi.unit_price) as total_money
from inbound_orders as io
inner join inbound_order_items as ioi on io.id = ioi.inbound_order_id
inner join materials as m on ioi.material_id = m.id
where io.order_status = 2
group by m.id
order by total_money asc
select m.material_name,
COALESCE(sum(ioi.actual_quantity * ioi.unit_price), 0) as total_money
from materials as m
left join inbound_order_items as ioi
on m.id = ioi.material_id
left join inbound_orders as io
on io.id = ioi.inbound_order_id
and io.order_status = 2
group by m.id, m.material_name
order by total_money desc
</select>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论