From 59d9ea33f503e363f2e2941c7c00cc9dd9d9d1c7 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: Tue, 28 Nov 2023 11:00:42 +0800
Subject: [PATCH] 修改课题管理bug
---
src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml b/src/main/java/com/nanometer/smartlab/dao/SysLaboratoryContainerDao.xml
index 7b9520c..be36307 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>
@@ -84,6 +90,29 @@
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}
+ </if>
+ </select>
+
+
+ <select id="getSysLaboratoryContainerSimpleInfoList" parameterType="java.util.Map" resultMap="SysLaboratoryContainer">
+ select su.id,su.name,su.container_code,su.info_code,su.project as project,bm1.meta_value as type,bm2.meta_value as structure,
+ ss.name as laboratoryName,sc.controller_name as controllerName from sys_laboratory_container as su
+ left join sys_laboratory as ss on su.laboratory_id = ss.id
+ left join sys_controller sc on sc.controller_code=su.controller_code
+ left join base_meta bm1 ON bm1.id = su.type
+ left join base_meta bm2 ON bm2.id = su.structure
+ where su.valid_flag = 1
+ AND sc.valid_flag = 1
+ AND ss.valid_flag = 1
+ <if test="laboratoryName != null and laboratoryName != ''">
+ and ss.name like #{laboratoryName}
+ </if>
+ <if test="controllerName != null and controllerName != ''">
+ and sc.controller_name like concat("%",#{controllerName},"%")
+ </if>
+ order by su.create_time desc
<if test="first != null and pageSize != null">
limit #{first}, #{pageSize}
</if>
@@ -234,6 +263,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
@@ -254,4 +284,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