From dd571bf55de7f9a72d458adc179958ed2f9473c0 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期一, 21 八月 2023 09:39:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 laboratory-server/src/main/resources/mapper/InstrumentMapper.xml |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/laboratory-server/src/main/resources/mapper/InstrumentMapper.xml b/laboratory-server/src/main/resources/mapper/InstrumentMapper.xml
index c66d06b..ee31f57 100644
--- a/laboratory-server/src/main/resources/mapper/InstrumentMapper.xml
+++ b/laboratory-server/src/main/resources/mapper/InstrumentMapper.xml
@@ -2,4 +2,24 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yuanchu.limslaboratory.mapper.InstrumentMapper">
 
+    <select id="getListInstrumentInformation" resultType="map">
+        SELECT i.`id`, i.`equipment_code`, i.`equipment_name`, i.`specifications_models`, u.`name`,
+               DATE_FORMAT(DATE_ADD(i.`create_time`, INTERVAL i.`term_validity` MONTH), '%Y-%m-%d') termValidity, i.`conditions`, i.`storage_place`
+        FROM instrument i, `user` u
+        WHERE i.`state` = 1
+          AND i.`classify_id` = #{classifyId}
+        <if test="conditions != null">
+            AND i.`conditions` = #{conditions}
+        </if>
+        <if test="numberOrNameOrSpecifications != null and numberOrNameOrSpecifications != ''">
+            AND CONCAT(i.`equipment_code`, i.`equipment_name`, i.`specifications_models`) LIKE CONCAT('%',#{numberOrNameOrSpecifications},'%')
+        </if>
+        <if test="whetherWhether == true">
+            AND DATE_FORMAT(DATE_ADD(i.`create_time`, INTERVAL i.`term_validity` MONTH), '%Y-%m-%d') <![CDATA[<]]> NOW()
+        </if>
+        AND i.`user_id` = u.`id`
+    </select>
+    <select id="selectInstrument" resultType="Map">
+        select id,equipment_name from lims_laboratory.instrument
+    </select>
 </mapper>

--
Gitblit v1.9.3