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/farm/mapper/FarmPaperMapper.xml |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/farm/mapper/FarmPaperMapper.xml b/src/main/java/org/springblade/modules/farm/mapper/FarmPaperMapper.xml
index 63f578d..ebabcbe 100644
--- a/src/main/java/org/springblade/modules/farm/mapper/FarmPaperMapper.xml
+++ b/src/main/java/org/springblade/modules/farm/mapper/FarmPaperMapper.xml
@@ -5,6 +5,26 @@
     <!--自定义查询农场检测报告/证书分页数据-->
     <select id="selectFarmPaperPage" resultType="org.springblade.modules.farm.vo.FarmPaperVO">
         select * from sys_farm_paper where 1=1
+        <if test="farmPaper.type!=null and farmPaper.type!=''">
+            and type = #{farmPaper.type}
+        </if>
+        <if test="farmPaper.deptId!=null and farmPaper.deptId!=''">
+            and dept_id = #{farmPaper.deptId}
+        </if>
+        <if test="farmPaper.farmId!=null">
+            and farm_id = #{farmPaper.farmId}
+        </if>
+        <if test="farmPaper.name!=null and farmPaper.name!=''">
+            and name like concat('%',#{farmPaper.name},'%')
+        </if>
+    </select>
+
+    <!--查询相关检测信息-->
+    <select id="getFarmPaperList" resultType="org.springblade.modules.farm.vo.FarmPaperVO">
+        select * from sys_farm_paper
+        where 1=1
+        and (farm_id = #{farmId} and type != 3)
+        or (farm_id = #{farmPlantId} and type = 3)
     </select>
 
 </mapper>

--
Gitblit v1.9.3