From 77dd7d19bb13f19acd273ba92dfd2b866a229c5e Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Sat, 16 Jul 2022 16:20:07 +0800
Subject: [PATCH] 库存

---
 src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml b/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
index 9f8f0b5..87a2960 100644
--- a/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
+++ b/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
@@ -63,7 +63,12 @@
         land_name,
         land_area,
         ST_ASTEXT(land_range) as land_range,
-        url
+        url,
+        type,
+        land_type,
+        land_unit,
+        dept_id,
+        farm_id
         FROM sys_land
         where is_deleted = 0
         <if test="land.landType!=null and land.landType != ''">
@@ -145,10 +150,10 @@
         SELECT IFNULL(land_area, 0) as area, IFNULL(land_unit, 0) as unit FROM sys_land
         WHERE is_deleted = 0
         <if test="land.farmId!= null and land.farmId!=''">
-            and sl.farm_id=#{land.farmId}
+            and farm_id=#{land.farmId}
         </if>
         <if test="land.deptId!= null and land.deptId!=''">
-            and sl.dept_id=#{land.deptId}
+            and dept_id=#{land.deptId}
         </if>
     </select>
     <!--土地使用面积-->
@@ -158,10 +163,10 @@
         WHERE is_deleted = 0
         and type = 0
         <if test="land.farmId!= null and land.farmId!=''">
-            and sl.farm_id=#{land.farmId}
+            and farm_id=#{land.farmId}
         </if>
         <if test="land.deptId!= null and land.deptId!=''">
-            and sl.dept_id=#{land.deptId}
+            and dept_id=#{land.deptId}
         </if>
     </select>
     <!--土地未使用面积-->
@@ -171,10 +176,10 @@
         WHERE is_deleted = 0
         and type = 1
         <if test="land.farmId!= null and land.farmId!=''">
-            and sl.farm_id=#{land.farmId}
+            and farm_id=#{land.farmId}
         </if>
         <if test="land.deptId!= null and land.deptId!=''">
-            and sl.dept_id=#{land.deptId}
+            and dept_id=#{land.deptId}
         </if>
     </select>
 
@@ -186,7 +191,7 @@
             and sl.farm_id=#{land.farmId}
         </if>
         <if test="land.deptId!= null and land.deptId!=''">
-            and sl.dept_id=#{land.deptId}
+            and sfp.dept_id=#{land.deptId}
         </if>
         GROUP BY sfp.strain_id
     </select>

--
Gitblit v1.9.3