From e7f7daae5d21ad2988cadd25b6987ca5e7ef8001 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期六, 09 九月 2023 09:51:20 +0800
Subject: [PATCH] 修改bug

---
 inspection-server/src/main/resources/mapper/InspectionMapper.xml |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/inspection-server/src/main/resources/mapper/InspectionMapper.xml b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
index a8421e2..f67ae4e 100644
--- a/inspection-server/src/main/resources/mapper/InspectionMapper.xml
+++ b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
@@ -22,8 +22,8 @@
         join lims_laboratory.inspection_material im on i.id = im.inspection_id
         where i.state=1
         <if test="message!=null">
-            and i.code like concat('%', #{message}, '%')
-            or im.name like concat('%', #{message}, '%')
+            and (i.code like concat('%', #{message}, '%')
+            or im.name like concat('%', #{message}, '%'))
         </if>
     </select>
 
@@ -179,4 +179,25 @@
           and inspection_status = 1
           and DATE_FORMAT(end_time, '%Y-%m') = #{monthofYear}
     </select>
+    <select id="getInspectionMaterials" resultType="java.util.Map">
+
+    </select>
+    <select id="selectImAndUserName" resultType="java.util.Map">
+        SELECT
+            im.`code`,
+            im.`name`,
+            i.`code` iCode,
+            i.create_time iCreateTime,
+            im.specifications_id specificationsId,
+            im.specifications specifications,
+            u.`name` uName
+        FROM
+            inspection i,
+            inspection_material im,
+            `user` u
+        WHERE
+            i.id = im.inspection_id
+          AND i.user_id=u.id
+          AND i.id=#{id}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3