Selaa lähdekoodia

修改 缴费

weiximei 6 vuotta sitten
vanhempi
commit
744cb32e8a

+ 2
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpBillInvoiceMapper.xml Näytä tiedosto

@@ -220,7 +220,8 @@
220 220
           i.bill_status AS billStatus,
221 221
           b.bill_name AS billName,
222 222
           b.bill_explain AS billExplain,
223
-          b.end_date AS endDate
223
+          b.end_date AS endDate,
224
+          b.create_date AS createDate
224 225
       FROM
225 226
           tp_bill_invoice i
226 227
           LEFT JOIN tp_bill b ON b.id = i.bill_id

+ 8
- 2
CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/MqMessageMapper.java Näytä tiedosto

@@ -20,8 +20,14 @@ public interface MqMessageMapper {
20 20
     int updateByPrimaryKey(MqMessage record);
21 21
 
22 22
     /**
23
-     * 统计开门次数
23
+     * 统计小区开门开启次数
24 24
      * @return
25 25
      */
26
-    int selectOpenDoorCount();
26
+    int selectCommunityOpenDoorCount();
27
+
28
+    /**
29
+     * 统计单元门开启次数
30
+     * @return
31
+     */
32
+    int selectUnitsOpenDoorCount(Integer eventType);
27 33
 }

+ 24
- 5
CODE/smart-community/operate-api/src/main/java/com/community/huiju/service/impl/MqMessageService.java Näytä tiedosto

@@ -3,10 +3,12 @@ package com.community.huiju.service.impl;
3 3
 import com.community.commom.mode.ResponseBean;
4 4
 import com.community.huiju.dao.MqMessageMapper;
5 5
 import com.community.huiju.service.IMqMessageService;
6
+import com.google.common.collect.Lists;
6 7
 import com.google.common.collect.Maps;
7 8
 import org.springframework.beans.factory.annotation.Autowired;
8 9
 import org.springframework.stereotype.Service;
9 10
 
11
+import java.util.List;
10 12
 import java.util.Map;
11 13
 
12 14
 /**
@@ -22,11 +24,28 @@ public class MqMessageService implements IMqMessageService {
22 24
     @Override
23 25
     public ResponseBean selectOpenDoorCount() {
24 26
         ResponseBean responseBean = new ResponseBean();
25
-        Map<String,Object> map = Maps.newHashMap();
26
-        Integer result = mqMessageMapper.selectOpenDoorCount();
27
-        map.put("message","开门次数");
28
-        map.put("count",result);
29
-        responseBean.addSuccess(map);
27
+
28
+        Map<String,Object> communityMap = Maps.newHashMap();
29
+        Integer result = mqMessageMapper.selectCommunityOpenDoorCount();
30
+        communityMap.put("message","小区开门次数");
31
+        communityMap.put("count",result);
32
+
33
+        // 刷卡开门次数
34
+        Integer brushCardUnitsOpenDoorCount = mqMessageMapper.selectUnitsOpenDoorCount(983299);
35
+        // 刷脸开门次数
36
+        Integer brushFaceUunitsOpenDoorCount = mqMessageMapper.selectUnitsOpenDoorCount(983309);
37
+
38
+        Integer openCount = brushCardUnitsOpenDoorCount + brushFaceUunitsOpenDoorCount;
39
+
40
+        Map<String,Object> uunitsMap = Maps.newHashMap();
41
+        uunitsMap.put("message","单元门开门次数");
42
+        uunitsMap.put("count",openCount);
43
+
44
+        List<Map<String,Object>> mapList = Lists.newArrayList();
45
+        mapList.add(communityMap);
46
+        mapList.add(uunitsMap);
47
+
48
+        responseBean.addSuccess(mapList);
30 49
         return responseBean;
31 50
     }
32 51
 }

+ 7
- 1
CODE/smart-community/operate-api/src/main/resources/mapper/MqMessageMapper.xml Näytä tiedosto

@@ -399,9 +399,15 @@
399 399
       pic_url = #{picUrl,jdbcType=VARCHAR}
400 400
     where id = #{id,jdbcType=INTEGER}
401 401
   </update>
402
-  <select id="selectOpenDoorCount" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
402
+  <select id="selectCommunityOpenDoorCount" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
403 403
     select count(*)
404 404
     from mq_message
405 405
     where event_type = '199941' AND source_idx in('94bac7e217fb4a698ad086876d347c6a','efcb9a3fe4e64e2f9c0f546c54465524')
406 406
   </select>
407
+
408
+  <select id="selectUnitsOpenDoorCount" parameterType="java.lang.Integer" resultType="java.lang.Integer" >
409
+    select count(*)
410
+    from mq_message
411
+    where event_type = #{eventType,jdbcType=INTEGER}
412
+  </select>
407 413
 </mapper>