From c9da1b0da1178911e383ddcaebecd1e088fa6004 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期二, 05 九月 2023 16:37:07 +0800
Subject: [PATCH] 修改bug

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

diff --git a/inspection-server/src/main/resources/mapper/InspectionMapper.xml b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
index 275f752..3218545 100644
--- a/inspection-server/src/main/resources/mapper/InspectionMapper.xml
+++ b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
@@ -5,25 +5,25 @@
         select i.id,
         i.code icode,
         i.type type,
-        DATE_FORMAT(`form_time`,'%Y-%m-%d'),
+        DATE_FORMAT(`form_time`,'%Y-%m-%d') form_time,
         supplier,
         im.code mcode,
         im.name,
         specifications,
         unit,
         num,
-        DATE_FORMAT(i.`create_time`,'%Y-%m-%d'),
+        DATE_FORMAT(i.`create_time`,'%Y-%m-%d') as create_time,
         u.name userName,
         inspection_status,
-        DATE_FORMAT(i.`start_time`,'%Y-%m-%d'),
-        DATE_FORMAT(i.`end_time`,'%Y-%m-%d')
+        DATE_FORMAT(i.`start_time`,'%Y-%m-%d') as start_time,
+        DATE_FORMAT(i.`end_time`,'%Y-%m-%d') as end_time
         from lims_laboratory.inspection i
         join lims_laboratory.user u on i.user_id = u.id
         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>
 

--
Gitblit v1.9.3