From 349bcef9a96391d22522a3409adf5a89e7e70a95 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 24 十月 2023 08:46:11 +0800
Subject: [PATCH] Merge branch 'dev' of http://139.186.142.91:10010/r/productDev/dmMes into dev
---
server/src/main/resources/mappers/WStockExtMapper.xml | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/server/src/main/resources/mappers/WStockExtMapper.xml b/server/src/main/resources/mappers/WStockExtMapper.xml
index 0f32d14..b3e9a00 100644
--- a/server/src/main/resources/mappers/WStockExtMapper.xml
+++ b/server/src/main/resources/mappers/WStockExtMapper.xml
@@ -78,16 +78,17 @@
</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
+ 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 num DESC
+ ORDER BY c.code , p.SORTNUM
</select>
<select id="selectAllList" parameterType="doumeemes.dao.ext.dto.QueryWStockExtDTO" resultMap="WStockExtListVO">
SELECT a.*
@@ -905,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