From fa326e87de2805d8b66b301daee596b1d959e430 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 15 Sep 2022 11:42:45 +0800
Subject: [PATCH] 出入库记录删除回滚逻辑修改

---
 src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 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 b3ccf2f..55facbc 100644
--- a/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
+++ b/src/main/java/org/springblade/modules/lang/mapper/LandMapper.xml
@@ -127,18 +127,21 @@
 
     <!--详情信息(自定义查询)-->
     <select id="getLandInfo" resultType="org.springblade.modules.lang.vo.LandVO">
-        select user_id,
-               land_name,
-               land_type,
-               land_area,
-               ST_ASTEXT(land_range) as landRange,
-               type,
-               land_unit,
-               url
-        from sys_land
+        select l.user_id,
+               l.land_name,
+               l.land_type,
+               l.land_area,
+               ST_ASTEXT(l.land_range) as landRange,
+               l.type,
+               l.land_unit,
+               l.url,
+               bdb.dict_value dica
+        from sys_land l
+        LEFT JOIN blade_dict_biz bdb ON bdb.dict_key =l.land_unit
         where 1 = 1
-          and is_deleted = 0
-          and id = #{land.id}
+          and l.is_deleted = 0
+          AND bdb.code = 'landunit'
+          and l.id = #{land.id}
     </select>
 
     <!--自定义地块数据-->
@@ -272,7 +275,7 @@
     </select>
     <select id="selectRecoveryLandList" resultType="org.springblade.modules.lang.vo.LandVO">
         SELECT
-            l.id,l.land_name AS landName
+            DISTINCT l.id,l.land_name AS landName
         FROM
             sys_recovery r
         LEFT JOIN sys_land l ON r.land_id = l.id

--
Gitblit v1.9.3