From 295327fcd76a1f96c196137cd618d9a16ec30536 Mon Sep 17 00:00:00 2001 From: "aoli.qu" <408346101@qq.com> Date: Wed, 25 Oct 2023 15:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/org/web/data/mapper/DataMapper.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/org/web/data/mapper/DataMapper.java b/src/main/java/com/org/web/data/mapper/DataMapper.java index eb2d212..0f7eb54 100644 --- a/src/main/java/com/org/web/data/mapper/DataMapper.java +++ b/src/main/java/com/org/web/data/mapper/DataMapper.java @@ -220,21 +220,7 @@ public interface DataMapper extends BaseMapper { // 房源入住情况 - @Select("select '房间' as name, " + - " (select count(1) " + - " from bc_room " + - " where is_delete = 0 " + - " and room_type = 1) as value, " + - " (select count(distinct a.id) " + - " from bc_room a " + - " left join bc_hospital_record b on a.id = b.room_id " + - " where a.is_delete = 0 " + - " and b.is_delete = 0 " + - " and b.check_out_time is null) as value2 " + - - "union " + - - "select '床位' as name, " + + @Select("select '床位' as name, " + " (select count(1) " + " from bc_room_bed a " + " left join bc_room b on a.room_id = b.id " + @@ -246,7 +232,21 @@ public interface DataMapper extends BaseMapper { " left join bc_hospital_record b on a.id = b.bed_id " + " where a.is_delete = 0 " + " and b.is_delete = 0 " + - " and b.check_out_time is null) as value2") + " and b.check_out_time is null) as value2 " + + + "union " + + + "select '房间' as name, " + + " (select count(1) " + + " from bc_room " + + " where is_delete = 0 " + + " and room_type = 1) as value, " + + " (select count(distinct a.id) " + + " from bc_room a " + + " left join bc_hospital_record b on a.id = b.room_id " + + " where a.is_delete = 0 " + + " and b.is_delete = 0 " + + " and b.check_out_time is null) as value2 ") List listRoomCount(); /** ----------------------------------------- 入住情况统计 ------------------------------ */