From 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 06 十二月 2023 08:41:32 +0800
Subject: [PATCH] bug
---
server/src/main/resources/mappers/WStockExtMapper.xml | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/server/src/main/resources/mappers/WStockExtMapper.xml b/server/src/main/resources/mappers/WStockExtMapper.xml
index 8001bb1..b3e9a00 100644
--- a/server/src/main/resources/mappers/WStockExtMapper.xml
+++ b/server/src/main/resources/mappers/WStockExtMapper.xml
@@ -77,6 +77,19 @@
<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,p.`NAME` as procedureName
+ 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 procedures p on p.ID=a.PROCEDURE_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 c.code , p.SORTNUM
+ </select>
<select id="selectAllList" parameterType="doumeemes.dao.ext.dto.QueryWStockExtDTO" resultMap="WStockExtListVO">
SELECT a.*
FROM w_stock a
@@ -893,6 +906,9 @@
<if test="stockNewDTO.qualityType != null">
and a.QUALITY_TYPE = #{stockNewDTO.qualityType}
</if>
+ <if test="stockNewDTO.locationId != null">
+ and a.LOCATION_ID = #{stockNewDTO.locationId}
+ </if>
<if test="stockNewDTO.batch != null and stockNewDTO.batch != '' ">
and a.BATCH = #{stockNewDTO.batch}
</if>
--
Gitblit v1.9.3