Procházet zdrojové kódy

安全检查时根据房间号查询修改

xuxiaofei před 2 roky
rodič
revize
0395c402fc

+ 9 - 8
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabCheckRecordMapper.xml

@@ -283,9 +283,9 @@
         (select nick_name from sys_user u where u.user_id=s.admin_id) safe_user_name,
         (select phonenumber from sys_user u where u.user_id=s.admin_id) safe_user_phone,
         s.admin_id userId,
-        l.room_num room
-        from lab_build_floor_layout l INNER JOIN lab_subject s on l.sub_id= s.id
-        where  1=1
+        s.room
+        from   lab_subject s
+        <where>
         <if test="deptIds != null and deptIds.size()>0"> <!-- 部门集合id-->
             and s.dept_id in
             <foreach item="item" collection="deptIds" separator="," open="(" close=")" index="">'${item}'</foreach>
@@ -294,7 +294,7 @@
             and ( s.dept_id in (SELECT dt.dept_id FROM sys_dept dt WHERE find_in_set(#{deptId} ,ancestors )) or s.dept_id = #{deptId} )
         </if>
         <if test="room != null "> <!-- 房间号-->
-            and l.room_num like concat('%', #{room}, '%')
+            and s.room like concat('%', #{room}, '%')
         </if>
         <if test="name != null "> <!-- 实验室名称-->
             and s.name like concat('%', #{name}, '%')
@@ -302,12 +302,13 @@
         <if test="remark != null "> <!-- 用户id-->
             and s.admin_id != #{remark}
         </if>
-        <!-- 数据范围过滤 ${params.dataScope} -->
-
-        ) t  where 1=1
+        </where>
+        ) t
+        <where>
         <if test="userName != null "> <!-- 负责人-->
-            and t.safe_user like concat('%', #{userName}, '%')
+            and t.safe_user_name like concat('%', #{userName}, '%')
         </if>
+        </where>
     </select>
 
     <select id="selectStatusList"  resultType="java.util.Map" parameterType="com.zd.laboratory.domain.vo.LabCheckRecordVO">