From 1976d790db5d2230e0e74662701b71b6740b3b20 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Tue, 14 Jun 2022 12:00:11 +0800
Subject: [PATCH] 农资库存管理

---
 src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml b/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml
index 873edb4..2ce7dbc 100644
--- a/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml
+++ b/src/main/java/org/springblade/modules/farmplant/mapper/FarmProductStockMapper.xml
@@ -20,6 +20,12 @@
         <if test="farmProductStock.endTime!=null and farmProductStock.endTime!=''">
             and sfps.time &lt;= #{farmProductStock.endTime}
         </if>
+        <if test="farmProductStock.deptId!=null and farmProductStock.deptId!=''">
+            and sfps.dept_id = #{farmProductStock.deptId}
+        </if>
+        <if test="farmProductStock.tenantId!=null and farmProductStock.tenantId!=''">
+            and sfps.tenant_id = #{farmProductStock.tenantId}
+        </if>
         group by sfps.strain_id,ss.url,ss.strain_name
     </select>
 
@@ -42,6 +48,12 @@
         <if test="farmProductStock.endTime!=null and farmProductStock.endTime!=''">
             and sfps.time &lt;= #{farmProductStock.endTime}
         </if>
+        <if test="farmProductStock.deptId!=null and farmProductStock.deptId!=''">
+            and sfps.dept_id = #{farmProductStock.deptId}
+        </if>
+        <if test="farmProductStock.tenantId!=null and farmProductStock.tenantId!=''">
+            and sfps.tenant_id = #{farmProductStock.tenantId}
+        </if>
         group by sfps.strain_id,ss.url,ss.strain_name
     </select>
 

--
Gitblit v1.9.3