Quellcode durchsuchen

服务中管家人数

suntianwu vor 3 Jahren
Ursprung
Commit
e2c96e7e32

+ 4 - 0
src/main/java/com/care/bigscreen/entity/StStation.java

@@ -86,6 +86,10 @@ public class StStation implements Serializable {
     @TableField("chamberlain_amount")
     @TableField("chamberlain_amount")
     private Long chamberlainAmount;
     private Long chamberlainAmount;
 
 
+    @ApiModelProperty(value = "服务中管家人数")
+    @TableField("chamberlain_in_service_amount")
+    private Long chamberlainInServiceAmount;
+
     @ApiModelProperty(value = "累计服务总人次")
     @ApiModelProperty(value = "累计服务总人次")
     @TableField("serve_amount")
     @TableField("serve_amount")
     private Long serveAmount;
     private Long serveAmount;

+ 2 - 1
src/main/resources/mybatis/StStationMapper.xml

@@ -17,7 +17,8 @@
         (select count(1) from care_older a where a.station_id = t.id and a.safe_level = '1') oneLevelAmount,
         (select count(1) from care_older a where a.station_id = t.id and a.safe_level = '1') oneLevelAmount,
         (select count(1) from care_older a where a.station_id = t.id and a.safe_level = '1') twoLevelAmount,
         (select count(1) from care_older a where a.station_id = t.id and a.safe_level = '1') twoLevelAmount,
         (select count(1) from care_older a where a.station_id = t.id and a.safe_level = '1') threeLevelAmount,
         (select count(1) from care_older a where a.station_id = t.id and a.safe_level = '1') threeLevelAmount,
-        (select count(1) from care_sys_user b where b.role = 'chanmb' ) chamberlainAmount,
+        (select count(1) from care_sys_user b where b.station_id = t.id  and  b.role = 'chanmb' ) chamberlainAmount,
+        (select count(DISTINCT chamb_id) from care_event_order_chamb b where  b.station_id = t.id  and  b.status != '3' ) chamberlainInServiceAmount,
         (select count(1) from care_event_order c where c.station_id = t.id ) serveAmount,
         (select count(1) from care_event_order c where c.station_id = t.id ) serveAmount,
         (select count(1) from care_event_order c where c.station_id = t.id and c.create_time >= CURDATE()) serveTodayAmount,
         (select count(1) from care_event_order c where c.station_id = t.id and c.create_time >= CURDATE()) serveTodayAmount,
         (select count(1) from care_device d where d.station_id = t.id ) deviceAmount,
         (select count(1) from care_device d where d.station_id = t.id ) deviceAmount,