From 43ee95fbdcb6fe0a9d548d0935c23c232d5ffeaa Mon Sep 17 00:00:00 2001
From: 李宇 <986321569@qq.com>
Date: Fri, 12 Nov 2021 12:49:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml | 41 +++++++++++++++++++++++++++++++++++++++--
1 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml b/src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml
index d96843d..05e402a 100644
--- a/src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml
+++ b/src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml
@@ -24,7 +24,13 @@
<update id="updateInfo" parameterType="java.util.Map">
update sys_laboratory_container set temp=#{temp},humidity=#{humidity},voc1=#{voc1},flag=#{flag} where id=#{containerId}
</update>
-
+ <update id="delSlcIds" parameterType="java.util.List">
+ update sys_laboratory_container set valid_flag=0, update_time=now()
+ where laboratory_id in
+ <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
+ #{item}
+ </foreach>
+ </update>
<select id="getSysLaboratoryContainerInfoList" parameterType="java.util.Map" resultMap="SysLaboratoryContainer" >
select container_code,name,valid_flag,type,character_left,character_right from sys_laboratory_container where update_time >= #{startTime} and #{endTime} > update_time
</select>
@@ -77,6 +83,12 @@
<if test="laboratoryName != null and laboratoryName != ''">
and ss.name like #{laboratoryName}
</if>
+ <if test="project != null and project != ''">
+ and su.project like concat("%",#{project},"%")
+ </if>
+ <if test="controllerName != null and controllerName != ''">
+ and sc.controller_name like concat("%",#{controllerName},"%")
+ </if>
order by ss.name ASC,sc.controller_name,su.container_code,su.name
<if test="first != null and pageSize != null">
limit #{first}, #{pageSize}
@@ -93,7 +105,8 @@
bm1.meta_value containerType ,
slc.info_code infoCode ,
bm3.meta_value structure,
- slc.`name` name
+ slc.`name` name,
+ slc.project
FROM
sys_laboratory_container slc
LEFT JOIN base_meta bm1 ON bm1.id = slc.type
@@ -110,6 +123,12 @@
</if>
<if test="name != null and name != ''">
and sl.name like concat("%",#{name},"%")
+ </if>
+ <if test="project != null and project != ''">
+ and slc.project like concat("%",#{project},"%")
+ </if>
+ <if test="controllerName != null and controllerName != ''">
+ and sc.controller_name like concat("%",#{controllerName},"%")
</if>
order by sl.name ASC,sc.controller_name,slc.container_code,slc.name
@@ -136,6 +155,12 @@
</if>
<if test="editId != null and editId != ''">
and su.id != #{editId}
+ </if>
+ <if test="project != null and project != ''">
+ and su.project like concat("%",#{project},"%")
+ </if>
+ <if test="controllerName != null and controllerName != ''">
+ and sc.controller_name like concat("%",#{controllerName},"%")
</if>
</select>
@@ -215,6 +240,7 @@
<select id="selectLocationByContainerCode" parameterType="java.lang.String" resultType="java.util.Map">
SELECT
+ sl.name,
CONCAT(sl.location1,"-",sl.location2) location,sl.bar_code barCode
FROM sys_laboratory_container slc
@@ -235,4 +261,15 @@
AND slc.valid_flag = 1
AND sl.valid_flag = 1
</select>
+ <select id="getSysLaboratoryContainerExist" resultType="java.lang.Integer">
+ select count(1)
+ from sys_laboratory_container as su
+ where su.valid_flag = 1
+ <if test="containerCode != null and containerCode != ''">
+ and su.container_code = #{containerCode}
+ </if>
+ <if test="editId != null and editId != ''">
+ and su.id != #{editId}
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.2