From 9806ca2cd1f15c6cf7b595ae455ff61904792b8a Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期一, 21 八月 2023 09:56:14 +0800
Subject: [PATCH] 大屏
---
server/src/main/resources/mappers/WStockExtMapper.xml | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/server/src/main/resources/mappers/WStockExtMapper.xml b/server/src/main/resources/mappers/WStockExtMapper.xml
index 8001bb1..0f32d14 100644
--- a/server/src/main/resources/mappers/WStockExtMapper.xml
+++ b/server/src/main/resources/mappers/WStockExtMapper.xml
@@ -77,6 +77,18 @@
<result column="WMODEL_ADDR" jdbcType="VARCHAR" property="addr"/>
</association>
</resultMap>
+ <select id="getStatisticsStockList" parameterType="doumeemes.dao.ext.dto.QueryWStockExtDTO" resultType="doumeemes.dao.business.dto.statistics.StockDataModel">
+ select sum(a.NUM) as num,c.`NAME` as materialName,d.name as warehouseName,f.UNION_NAME as location,u.name as unitName
+ from w_stock a
+ left join material_distribute b on a.MATERIAL_ID=b.ID
+ left join material c on b.MATERIAL_ID=c.ID
+ left join warehouse d on a.WAREHOUSE_ID=d.ID
+ left join warehouse_location f on a.LOCATION_ID=f.ID
+ left join unit u on a.UNIT_ID=u.id
+ where a.DELETED = 0 AND a.ROOT_DEPART_ID = #{rootDepartId} AND d.DEPART_ID=#{wmodelDepartId}
+ GROUP BY a.MATERIAL_ID,a.WAREHOUSE_ID,a.BATCH
+ ORDER BY num DESC
+ </select>
<select id="selectAllList" parameterType="doumeemes.dao.ext.dto.QueryWStockExtDTO" resultMap="WStockExtListVO">
SELECT a.*
FROM w_stock a
--
Gitblit v1.9.3