From 064457406bda554e713aea8bada1bb066be42b8e Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期六, 23 九月 2023 12:39:29 +0800
Subject: [PATCH] 9-23 去鵷雏管理端验证
---
inspection-server/src/main/resources/mapper/InspectionMapper.xml | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/inspection-server/src/main/resources/mapper/InspectionMapper.xml b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
index 711a5fe..f67ae4e 100644
--- a/inspection-server/src/main/resources/mapper/InspectionMapper.xml
+++ b/inspection-server/src/main/resources/mapper/InspectionMapper.xml
@@ -4,26 +4,26 @@
<select id="selectInspectsList" resultType="map">
select i.id,
i.code icode,
- type,
- DATE_FORMAT(`form_time`,'%Y-%m-%d'),
+ i.type type,
+ 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>
@@ -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