Parcourir la source

2022-12-16 修改房间类型是其他的房间,变动成为实验室,数据返回的是-1,判断一下,返回null

chaiyunlong il y a 3 ans
Parent
commit
c2f9aefa7b

+ 3 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabBuildFloorLayoutMapper.xml

@@ -25,7 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select t.id,
         (select bf.name from lab_build_floor bf where bf.id = t.build_id) buildName,
         (select bf.name from lab_build_floor bf where bf.id = t.floor_id) floorName,
-        t.build_id, t.floor_id, t.sub_id, t.room_num, t.room_name, t.room_type, t.point_name, t.user_id,
+        t.build_id, t.floor_id,
+        case when t.sub_id=-1 then null else t.sub_id end sub_id,
+        t.room_num, t.room_name, t.room_type, t.point_name, t.user_id,
         t.create_by, t.create_time, t.update_by, t.update_time, t.remark,
         (select st.name from lab_subject st where st.id = t.sub_id) subName
         from lab_build_floor_layout as t