Browse Source

合并代码

dingxin 6 years ago
parent
commit
881004e9a1
28 changed files with 1086 additions and 68 deletions
  1. 33
    21
      CODE/foreign-service/src/main/java/com/community/huiju/controller/FSController.java
  2. 16
    0
      CODE/foreign-service/src/main/java/com/community/huiju/dao/TaTemporaryLicenseOrderMapper.java
  3. 16
    0
      CODE/foreign-service/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java
  4. 119
    0
      CODE/foreign-service/src/main/java/com/community/huiju/model/TaTemporaryLicenseOrder.java
  5. 124
    0
      CODE/foreign-service/src/main/java/com/community/huiju/model/TaUserLicenseOrder.java
  6. 6
    6
      CODE/foreign-service/src/main/java/com/community/huiju/service/IFuShiService.java
  7. 18
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/ITaTemporaryLicenseOrderService.java
  8. 16
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java
  9. 116
    6
      CODE/foreign-service/src/main/java/com/community/huiju/service/impl/FuShiServiceImpl.java
  10. 20
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TaTemporaryLicenseOrderServiceImpl.java
  11. 20
    0
      CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java
  12. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/HkController.java
  13. 12
    6
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/MonitoringController.java
  14. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaPublicMonitorMapper.java
  15. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaRemotelyDoorMapper.java
  16. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaRemotelyMonitorMapper.java
  17. 11
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  18. 45
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaPublicMonitor.java
  19. 55
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaRemotelyDoor.java
  20. 55
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaRemotelyMonitor.java
  21. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IMonitoringService.java
  22. 12
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/HKServiceImpl.java
  23. 52
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MonitoringServiceImpl.java
  24. 11
    19
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  25. 82
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaPublicMonitorMapper.xml
  26. 93
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaRemotelyDoorMapper.xml
  27. 93
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaRemotelyMonitorMapper.xml
  28. 1
    1
      CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FuShiRequestAPI.java

+ 33
- 21
CODE/foreign-service/src/main/java/com/community/huiju/controller/FSController.java View File

23
     @ApiOperation(value = "获取停车信息(通过车牌号)", notes = "获取停车信息(通过车牌号)")
23
     @ApiOperation(value = "获取停车信息(通过车牌号)", notes = "获取停车信息(通过车牌号)")
24
     @ApiImplicitParams({
24
     @ApiImplicitParams({
25
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号"),
25
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号"),
26
+            @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "query", name = "communityId", value = "小区Id"),
26
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
27
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
27
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
28
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
28
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
29
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
29
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
30
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
30
     })
31
     })
31
-    public ResponseBean getParkInfoByCarNo(@PathVariable("carNo") String carNo) {
32
+    public ResponseBean getParkInfoByCarNo(@PathVariable("carNo") String carNo,
33
+                                           @RequestParam(value = "communityId") Integer communityId) {
32
         ResponseBean responseBean = new ResponseBean();
34
         ResponseBean responseBean = new ResponseBean();
33
-        responseBean = iFuShiService.getParkInfoByCarNo(carNo);
35
+        responseBean = iFuShiService.getParkInfoByCarNo(carNo, communityId);
34
         return responseBean;
36
         return responseBean;
35
     }
37
     }
36
 
38
 
38
     @ApiOperation(value = "获取月租车信息(通过车牌号)", notes = "获取月租车信息(通过车牌号)")
40
     @ApiOperation(value = "获取月租车信息(通过车牌号)", notes = "获取月租车信息(通过车牌号)")
39
     @ApiImplicitParams({
41
     @ApiImplicitParams({
40
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号"),
42
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号"),
43
+            @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "query", name = "communityId", value = "小区Id"),
41
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
44
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
42
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
45
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
43
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
46
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
44
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
47
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
45
     })
48
     })
46
-    public ResponseBean parkGetMonthCardInfoByCarNo(@PathVariable("carNo") String carNo) {
49
+    public ResponseBean parkGetMonthCardInfoByCarNo(@PathVariable("carNo") String carNo,
50
+                                                    @RequestParam(value = "communityId") Integer communityId) {
47
         ResponseBean responseBean = new ResponseBean();
51
         ResponseBean responseBean = new ResponseBean();
48
-        responseBean = iFuShiService.parkGetMonthCardInfoByCarNo(carNo);
52
+        responseBean = iFuShiService.parkGetMonthCardInfoByCarNo(carNo, communityId);
49
         return responseBean;
53
         return responseBean;
50
     }
54
     }
51
 
55
 
53
     @ApiOperation(value = "获取临时车信息(通过车牌号)", notes = "获取临时车信息(通过车牌号)")
57
     @ApiOperation(value = "获取临时车信息(通过车牌号)", notes = "获取临时车信息(通过车牌号)")
54
     @ApiImplicitParams({
58
     @ApiImplicitParams({
55
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号"),
59
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "carNo", value = "车牌号"),
60
+            @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "query", name = "communityId", value = "小区Id"),
56
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
61
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
57
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
62
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
58
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
63
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
59
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
64
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
60
     })
65
     })
61
-    public ResponseBean parkGetTempCarPaymentInfoByCarNo(@PathVariable("carNo") String carNo) {
66
+    public ResponseBean parkGetTempCarPaymentInfoByCarNo(@PathVariable("carNo") String carNo,
67
+                                                         @RequestParam(value = "communityId") Integer communityId) {
62
         ResponseBean responseBean = new ResponseBean();
68
         ResponseBean responseBean = new ResponseBean();
63
-        responseBean = iFuShiService.parkGetTempCarPaymentInfoByCarNo(carNo);
69
+        responseBean = iFuShiService.parkGetTempCarPaymentInfoByCarNo(carNo, communityId);
64
         return responseBean;
70
         return responseBean;
65
     }
71
     }
66
 
72
 
73
 //                    "CarNo车牌号;" +
79
 //                    "CarNo车牌号;" +
74
 //                    "CardNo停车卡号;" +
80
 //                    "CardNo停车卡号;" +
75
 //                    "RechargeAmt充值续费金额;"),
81
 //                    "RechargeAmt充值续费金额;"),
76
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
77
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
78
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
79
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
82
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
83
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
84
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
85
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
80
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "Phone", value = "手机号"),
86
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "Phone", value = "手机号"),
81
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "RenewDayType", value = "续费日期类型( 3:年 2:月 1:日, 选入对应的数字)"),
87
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "RenewDayType", value = "续费日期类型( 3:年 2:月 1:日, 选入对应的数字)"),
82
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "RenewDay", value = "续费日期数目"),
88
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "RenewDay", value = "续费日期数目"),
84
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CarNo", value = "车牌号"),
90
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CarNo", value = "车牌号"),
85
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CardNo", value = "停车卡号"),
91
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CardNo", value = "停车卡号"),
86
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "RechargeAmt", value = "充值续费金额"),
92
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "RechargeAmt", value = "充值续费金额"),
93
+            @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "communityId", value = "小区Id"),
87
     })
94
     })
88
     public ResponseBean apiThirdPartyMonthCardPay(@RequestParam(value = "Phone") String Phone,
95
     public ResponseBean apiThirdPartyMonthCardPay(@RequestParam(value = "Phone") String Phone,
89
                                                   @RequestParam(value = "RenewDayType") String RenewDayType,
96
                                                   @RequestParam(value = "RenewDayType") String RenewDayType,
91
                                                   @RequestParam(value = "PayStyle") String PayStyle,
98
                                                   @RequestParam(value = "PayStyle") String PayStyle,
92
                                                   @RequestParam(value = "CarNo") String CarNo,
99
                                                   @RequestParam(value = "CarNo") String CarNo,
93
                                                   @RequestParam(value = "CardNo", required = false) String CardNo,
100
                                                   @RequestParam(value = "CardNo", required = false) String CardNo,
94
-                                                  @RequestParam(value = "RechargeAmt") String RechargeAmt) {
101
+                                                  @RequestParam(value = "RechargeAmt") String RechargeAmt,
102
+                                                  @RequestParam(value = "communityId") Integer communityId) {
95
         ResponseBean responseBean = new ResponseBean();
103
         ResponseBean responseBean = new ResponseBean();
96
         responseBean = iFuShiService.apiThirdPartyMonthCardPay(Phone, RenewDayType,
104
         responseBean = iFuShiService.apiThirdPartyMonthCardPay(Phone, RenewDayType,
97
-                RenewDay, PayStyle, CarNo, CardNo, RechargeAmt);
105
+                RenewDay, PayStyle, CarNo, CardNo, RechargeAmt, communityId);
98
         return responseBean;
106
         return responseBean;
99
     }
107
     }
100
 
108
 
109
 //                    "CarNo车牌号;" +
117
 //                    "CarNo车牌号;" +
110
 //                    "CardNo停车卡号;" +
118
 //                    "CardNo停车卡号;" +
111
 //                    "CouponList使用的优惠券列表"),
119
 //                    "CouponList使用的优惠券列表"),
112
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
113
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
114
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
115
-            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
120
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "appid", value = "appid"),
121
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "datetime", value = "时间戳"),
122
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "encrypt", value = "加密方式"),
123
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "sign", value = "签名"),
116
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "Amount", value = "应缴金额(单位元)"),
124
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "Amount", value = "应缴金额(单位元)"),
117
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "ActualAmount", value = "实缴金额(单位元)"),
125
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "ActualAmount", value = "实缴金额(单位元)"),
118
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "DeductionAmount", value = "抵扣金额(单位元)"),
126
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "DeductionAmount", value = "抵扣金额(单位元)"),
121
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CarNo", value = "车牌号"),
129
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CarNo", value = "车牌号"),
122
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CardNo", value = "停车卡号"),
130
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CardNo", value = "停车卡号"),
123
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CouponList", value = "使用的优惠券列表"),
131
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "form", name = "CouponList", value = "使用的优惠券列表"),
132
+            @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "communityId", value = "小区Id"),
124
     })
133
     })
125
     public ResponseBean apiThirdPartyTemporaryCardPay(@RequestParam(value = "Amount") String Amount,
134
     public ResponseBean apiThirdPartyTemporaryCardPay(@RequestParam(value = "Amount") String Amount,
126
                                                       @RequestParam(value = "ActualAmount") String ActualAmount,
135
                                                       @RequestParam(value = "ActualAmount") String ActualAmount,
129
                                                       @RequestParam(value = "PayStyle") String PayStyle,
138
                                                       @RequestParam(value = "PayStyle") String PayStyle,
130
                                                       @RequestParam(value = "CarNo") String CarNo,
139
                                                       @RequestParam(value = "CarNo") String CarNo,
131
                                                       @RequestParam(value = "CardNo",  required = false) String CardNo,
140
                                                       @RequestParam(value = "CardNo",  required = false) String CardNo,
132
-                                                      @RequestParam(value = "CouponList", required = false) String CouponList) {
141
+                                                      @RequestParam(value = "CouponList", required = false) String CouponList,
142
+                                                      @RequestParam(value = "communityId") Integer communityId) {
133
         ResponseBean responseBean = new ResponseBean();
143
         ResponseBean responseBean = new ResponseBean();
134
         responseBean = iFuShiService.apiThirdPartyTemporaryCardPay(Amount, ActualAmount, DeductionAmount,
144
         responseBean = iFuShiService.apiThirdPartyTemporaryCardPay(Amount, ActualAmount, DeductionAmount,
135
-                Reason, PayStyle, CarNo, CardNo, CouponList);
145
+                Reason, PayStyle, CarNo, CardNo, CouponList, communityId);
136
         return responseBean;
146
         return responseBean;
137
     }
147
     }
138
 
148
 
140
     @RequestMapping(value = "/car/apiGetOfflineFee/{carNoOrCardNo}", method = RequestMethod.GET)
150
     @RequestMapping(value = "/car/apiGetOfflineFee/{carNoOrCardNo}", method = RequestMethod.GET)
141
     @ApiOperation(value = "获取线下算费结果", notes = "获取线下算费结果")
151
     @ApiOperation(value = "获取线下算费结果", notes = "获取线下算费结果")
142
     @ApiImplicitParams({
152
     @ApiImplicitParams({
143
-        @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "carNoOrCardNo" , value = "车牌号码或卡号"),
153
+            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "carNoOrCardNo" , value = "车牌号码或卡号"),
144
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
154
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "appid"),
145
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
155
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
146
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
156
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "加密方式"),
147
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
157
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "签名"),
158
+            @ApiImplicitParam(dataTypeClass = Integer.class, paramType = "form", name = "communityId", value = "小区Id"),
148
     })
159
     })
149
-    public ResponseBean apiGetOfflineFee(@PathVariable("carNoOrCardNo") String carNoOrCardNo) {
160
+    public ResponseBean apiGetOfflineFee(@PathVariable("carNoOrCardNo") String carNoOrCardNo,
161
+                                         @RequestParam(value = "communityId") Integer communityId) {
150
         ResponseBean responseBean = new ResponseBean();
162
         ResponseBean responseBean = new ResponseBean();
151
-        responseBean = iFuShiService.apiGetOfflineFee(carNoOrCardNo);
163
+        responseBean = iFuShiService.apiGetOfflineFee(carNoOrCardNo, communityId);
152
         return responseBean;
164
         return responseBean;
153
     }
165
     }
154
 
166
 

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/dao/TaTemporaryLicenseOrderMapper.java View File

1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TaTemporaryLicenseOrder;
5
+
6
+/**
7
+ * <p>
8
+ * 临时车缴费表 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-28
13
+ */
14
+public interface TaTemporaryLicenseOrderMapper extends BaseMapper<TaTemporaryLicenseOrder> {
15
+
16
+}

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/dao/TaUserLicenseOrderMapper.java View File

1
+package com.community.huiju.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.community.huiju.model.TaUserLicenseOrder;
5
+
6
+/**
7
+ * <p>
8
+ * 月租车缴费订单表 Mapper 接口
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-28
13
+ */
14
+public interface TaUserLicenseOrderMapper extends BaseMapper<TaUserLicenseOrder> {
15
+
16
+}

+ 119
- 0
CODE/foreign-service/src/main/java/com/community/huiju/model/TaTemporaryLicenseOrder.java View File

1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+import java.util.Date;
13
+
14
+/**
15
+ * <p>
16
+ * 临时车缴费表
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2019-05-28
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@Accessors(chain = true)
25
+@TableName("ta_temporary_license_order")
26
+public class TaTemporaryLicenseOrder implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    @TableId(value = "id", type = IdType.AUTO)
31
+    private Integer id;
32
+
33
+    /**
34
+     * 小区ID
35
+     */
36
+    private Integer communityId;
37
+
38
+    /**
39
+     * 人员ID
40
+     */
41
+    private Integer taUserId;
42
+
43
+    /**
44
+     * 订单号
45
+     */
46
+    private String orderNumber;
47
+
48
+    /**
49
+     * 支付状态  0:未支付  1: 已支付 2: 正在支付中
50
+     */
51
+    private String orderStatus;
52
+
53
+    /**
54
+     * 创建人
55
+     */
56
+    private Integer createUser;
57
+
58
+    /**
59
+     * 创建时间
60
+     */
61
+    private Date createDate;
62
+
63
+    /**
64
+     * 更新人
65
+     */
66
+    private Integer updateUser;
67
+
68
+    /**
69
+     * 更新时间
70
+     */
71
+    private Date updateDate;
72
+
73
+    /**
74
+     * 缴费手机号
75
+     */
76
+    private String paymentTel;
77
+
78
+    /**
79
+     * 缴费人姓名
80
+     */
81
+    private String paymentName;
82
+
83
+    /**
84
+     * 缴费方式 1是支付宝 2是微信支付
85
+     */
86
+    private String paymentType;
87
+
88
+    /**
89
+     * 实缴金额
90
+     */
91
+    private String actualAmount;
92
+
93
+    /**
94
+     * 抵扣金额
95
+     */
96
+    private String deductionAmount;
97
+
98
+    /**
99
+     * 应缴金额
100
+     */
101
+    private String amount;
102
+
103
+    /**
104
+     * 停车场
105
+     */
106
+    private String parkingLot;
107
+
108
+    /**
109
+     * 车牌号
110
+     */
111
+    private String licensePlate;
112
+
113
+    /**
114
+     * 来源
115
+     */
116
+    private String sourceFrom;
117
+
118
+
119
+}

+ 124
- 0
CODE/foreign-service/src/main/java/com/community/huiju/model/TaUserLicenseOrder.java View File

1
+package com.community.huiju.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
5
+import com.baomidou.mybatisplus.annotation.TableName;
6
+import lombok.Data;
7
+import lombok.EqualsAndHashCode;
8
+import lombok.experimental.Accessors;
9
+
10
+import java.io.Serializable;
11
+import java.time.LocalDateTime;
12
+import java.util.Date;
13
+
14
+/**
15
+ * <p>
16
+ * 月租车缴费订单表
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2019-05-28
21
+ */
22
+@Data
23
+@EqualsAndHashCode(callSuper = false)
24
+@Accessors(chain = true)
25
+@TableName("ta_user_license_order")
26
+public class TaUserLicenseOrder implements Serializable {
27
+
28
+    private static final long serialVersionUID = 1L;
29
+
30
+    @TableId(value = "id", type = IdType.AUTO)
31
+    private Integer id;
32
+
33
+    /**
34
+     * 小区ID
35
+     */
36
+    private Integer communityId;
37
+
38
+    /**
39
+     * 人员ID
40
+     */
41
+    private Integer taUserId;
42
+
43
+    /**
44
+     * 订单号
45
+     */
46
+    private String orderNumber;
47
+
48
+    /**
49
+     * 支付状态  0:未支付  1: 已支付 2: 正在支付中 3:已关闭
50
+     */
51
+    private String orderStatus;
52
+
53
+    /**
54
+     * 创建人
55
+     */
56
+    private Integer createUser;
57
+
58
+    /**
59
+     * 创建时间
60
+     */
61
+    private Date createDate;
62
+
63
+    /**
64
+     * 更新人
65
+     */
66
+    private Integer updateUser;
67
+
68
+    /**
69
+     * 更新时间
70
+     */
71
+    private Date updateDate;
72
+
73
+    /**
74
+     * 延期月份
75
+     */
76
+    private Integer extensionMonth;
77
+
78
+    /**
79
+     * 延期费用
80
+     */
81
+    private String extensionPrice;
82
+
83
+    /**
84
+     * 缴费手机号
85
+     */
86
+    private String paymentTel;
87
+
88
+    /**
89
+     * 缴费人姓名
90
+     */
91
+    private String paymentName;
92
+
93
+    /**
94
+     * 缴费方式 0是微信支付 2是支付宝 
95
+     */
96
+    private String paymentType;
97
+
98
+    /**
99
+     * 到期时间
100
+     */
101
+    private Date expireDate;
102
+
103
+    /**
104
+     * 单价费用
105
+     */
106
+    private String unitPrice;
107
+
108
+    /**
109
+     * 停车场
110
+     */
111
+    private String parkingLot;
112
+
113
+    /**
114
+     * 车牌号
115
+     */
116
+    private String licensePlate;
117
+
118
+    /**
119
+     * 来源
120
+     */
121
+    private String sourceFrom;
122
+
123
+
124
+}

+ 6
- 6
CODE/foreign-service/src/main/java/com/community/huiju/service/IFuShiService.java View File

13
      * @param carNo
13
      * @param carNo
14
      * @return
14
      * @return
15
      */
15
      */
16
-    ResponseBean getParkInfoByCarNo(String carNo);
16
+    ResponseBean getParkInfoByCarNo(String carNo, Integer communityId);
17
 
17
 
18
     /**
18
     /**
19
      * 第三方月卡上发续费
19
      * 第三方月卡上发续费
26
      * @param RechargeAmt 充值续费金额
26
      * @param RechargeAmt 充值续费金额
27
      * @return
27
      * @return
28
      */
28
      */
29
-    ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay, String PayStyle, String CarNo, String CardNo, String RechargeAmt);
29
+    ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay, String PayStyle, String CarNo, String CardNo, String RechargeAmt, Integer communityId);
30
 
30
 
31
 
31
 
32
     /**
32
     /**
52
      *
52
      *
53
      * @return
53
      * @return
54
      */
54
      */
55
-    ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo, String CouponList);
55
+    ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo, String CouponList, Integer communityId);
56
 
56
 
57
     /**
57
     /**
58
      * 获取线下算费结果
58
      * 获取线下算费结果
59
      * @param CarNoOrCardNo 车牌号码或卡号
59
      * @param CarNoOrCardNo 车牌号码或卡号
60
      * @return
60
      * @return
61
      */
61
      */
62
-    ResponseBean apiGetOfflineFee(String CarNoOrCardNo);
62
+    ResponseBean apiGetOfflineFee(String CarNoOrCardNo, Integer communityId);
63
 
63
 
64
     /**
64
     /**
65
      * 获取月租车信息(通过车牌号)
65
      * 获取月租车信息(通过车牌号)
66
      * @param CarNo
66
      * @param CarNo
67
      * @return
67
      * @return
68
      */
68
      */
69
-    ResponseBean parkGetMonthCardInfoByCarNo(String CarNo);
69
+    ResponseBean parkGetMonthCardInfoByCarNo(String CarNo, Integer communityId);
70
 
70
 
71
     /**
71
     /**
72
      * 获取临时车信息(通过车牌号)
72
      * 获取临时车信息(通过车牌号)
73
      * @param CarNo
73
      * @param CarNo
74
      * @return
74
      * @return
75
      */
75
      */
76
-    ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo);
76
+    ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo, Integer communityId);
77
 }
77
 }

+ 18
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/ITaTemporaryLicenseOrderService.java View File

1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.common.base.ResponseBean;
5
+import com.community.huiju.model.TaTemporaryLicenseOrder;
6
+
7
+/**
8
+ * <p>
9
+ * 临时车缴费表 服务类
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-05-28
14
+ */
15
+public interface ITaTemporaryLicenseOrderService extends IService<TaTemporaryLicenseOrder> {
16
+
17
+
18
+}

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/ITaUserLicenseOrderService.java View File

1
+package com.community.huiju.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.community.huiju.model.TaUserLicenseOrder;
5
+
6
+/**
7
+ * <p>
8
+ * 月租车缴费订单表 服务类
9
+ * </p>
10
+ *
11
+ * @author jobob
12
+ * @since 2019-05-28
13
+ */
14
+public interface ITaUserLicenseOrderService extends IService<TaUserLicenseOrder> {
15
+
16
+}

+ 116
- 6
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/FuShiServiceImpl.java View File

1
 package com.community.huiju.service.impl;
1
 package com.community.huiju.service.impl;
2
 
2
 
3
 import com.alibaba.fastjson.JSONObject;
3
 import com.alibaba.fastjson.JSONObject;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
 import com.community.commom.fushi.FuShiRequestAPI;
5
 import com.community.commom.fushi.FuShiRequestAPI;
6
+import com.community.commom.fushi.error.FuShiException;
5
 import com.community.commom.mode.ResponseBean;
7
 import com.community.commom.mode.ResponseBean;
6
 import com.community.commom.uuid.IdGen;
8
 import com.community.commom.uuid.IdGen;
7
 import com.community.huiju.common.perproties.FuShiProperties;
9
 import com.community.huiju.common.perproties.FuShiProperties;
10
+import com.community.huiju.dao.TaTemporaryLicenseOrderMapper;
11
+import com.community.huiju.dao.TaUserLicenseOrderMapper;
12
+import com.community.huiju.dao.TaUserMapper;
8
 import com.community.huiju.log.LogAnnotation;
13
 import com.community.huiju.log.LogAnnotation;
9
 import com.community.huiju.log.LogEnums;
14
 import com.community.huiju.log.LogEnums;
15
+import com.community.huiju.model.TaTemporaryLicenseOrder;
16
+import com.community.huiju.model.TaUser;
17
+import com.community.huiju.model.TaUserLicenseOrder;
10
 import com.community.huiju.service.IFuShiService;
18
 import com.community.huiju.service.IFuShiService;
11
 import com.google.common.collect.Maps;
19
 import com.google.common.collect.Maps;
12
 import lombok.extern.slf4j.Slf4j;
20
 import lombok.extern.slf4j.Slf4j;
13
 import org.springframework.beans.factory.annotation.Autowired;
21
 import org.springframework.beans.factory.annotation.Autowired;
14
 import org.springframework.stereotype.Service;
22
 import org.springframework.stereotype.Service;
15
 
23
 
24
+import java.math.BigDecimal;
25
+import java.text.ParseException;
26
+import java.text.SimpleDateFormat;
16
 import java.time.LocalDateTime;
27
 import java.time.LocalDateTime;
17
 import java.time.format.DateTimeFormatter;
28
 import java.time.format.DateTimeFormatter;
29
+import java.util.Date;
18
 import java.util.Map;
30
 import java.util.Map;
19
 
31
 
20
 /**
32
 /**
33
 
45
 
34
     private IdGen idGen = IdGen.get();
46
     private IdGen idGen = IdGen.get();
35
 
47
 
48
+    @Autowired
49
+    private TaTemporaryLicenseOrderMapper taTemporaryLicenseOrderMapper;
50
+
51
+    @Autowired
52
+    private TaUserLicenseOrderMapper taUserLicenseOrderMapper;
53
+
54
+    @Autowired
55
+    private TaUserMapper taUserMapper;
56
+
36
     /**
57
     /**
37
      * 获取 富士 json 值
58
      * 获取 富士 json 值
38
      * @param jsonString
59
      * @param jsonString
52
 
73
 
53
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取停车信息(通过车牌号)")
74
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取停车信息(通过车牌号)")
54
     @Override
75
     @Override
55
-    public ResponseBean getParkInfoByCarNo(String carNo) {
76
+    public ResponseBean getParkInfoByCarNo(String carNo, Integer communityId) {
56
         ResponseBean responseBean = new ResponseBean();
77
         ResponseBean responseBean = new ResponseBean();
57
         String parkInfo = fuShiRequestAPI.getParkInfoByCarNo(fuShiProperties.getParkingCode(), carNo);
78
         String parkInfo = fuShiRequestAPI.getParkInfoByCarNo(fuShiProperties.getParkingCode(), carNo);
58
         Map<String, Object> fuShiInfo = getFuShiInfo(parkInfo);
79
         Map<String, Object> fuShiInfo = getFuShiInfo(parkInfo);
62
 
83
 
63
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方月卡上发续费")
84
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方月卡上发续费")
64
     @Override
85
     @Override
65
-    public ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay, String PayStyle, String CarNo, String CardNo, String RechargeAmt) {
86
+    public ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay, String PayStyle, String CarNo, String CardNo, String RechargeAmt, Integer communityId) {
66
         ResponseBean responseBean = new ResponseBean();
87
         ResponseBean responseBean = new ResponseBean();
67
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
88
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
68
         // 交易编码
89
         // 交易编码
75
         Map<String, Object> map = Maps.newHashMap();
96
         Map<String, Object> map = Maps.newHashMap();
76
         map.put("TradeNo", tradeNo);
97
         map.put("TradeNo", tradeNo);
77
         responseBean.addSuccess(map);
98
         responseBean.addSuccess(map);
99
+
100
+        QueryWrapper<TaUser> userQueryWrapper = new QueryWrapper<>();
101
+        userQueryWrapper.eq("login_name", Phone);
102
+        TaUser user = taUserMapper.selectOne(userQueryWrapper);
103
+
104
+        // 月租车缴费记录
105
+        TaUserLicenseOrder taUserLicenseOrder = new TaUserLicenseOrder();
106
+        taUserLicenseOrder.setCommunityId(communityId);
107
+        taUserLicenseOrder.setTaUserId(user.getUserId());
108
+        taUserLicenseOrder.setOrderNumber(dealNo);
109
+        taUserLicenseOrder.setOrderStatus("1");
110
+        taUserLicenseOrder.setCreateUser(user.getUserId());
111
+        taUserLicenseOrder.setCreateDate(new Date());
112
+        taUserLicenseOrder.setExtensionMonth(Integer.valueOf(RenewDay));
113
+        taUserLicenseOrder.setExtensionPrice(RechargeAmt);
114
+        taUserLicenseOrder.setPaymentTel(user.getLoginName());
115
+        taUserLicenseOrder.setPaymentName(user.getUserName());
116
+        // 缴费方式 1是支付宝 2是微信支付
117
+        if (PayStyle.contains("微信")) {
118
+            taUserLicenseOrder.setPaymentType("0");
119
+        } else if (PayStyle.contains("支付宝")){
120
+            taUserLicenseOrder.setPaymentType("2");
121
+        }
122
+
123
+        // 查询这个交费后的车牌
124
+        String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetMonthCardInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
125
+        JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
126
+        Map<String, Object> innerMap = jsonObject.getInnerMap();
127
+        Integer messageCode = (Integer) innerMap.get("MessageCode");
128
+        if (200 != messageCode.intValue()) {
129
+            log.error("月租车缴费记录错误:{}", parkGetMonthCardInfoByCarNo);
130
+            String messageContent = jsonObject.getString("MessageContent");
131
+            throw new FuShiException(messageCode, messageContent);
132
+        }
133
+
134
+        Map<String, Object> result = (Map<String, Object>) innerMap.get("Result");
135
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
136
+        try {
137
+            taUserLicenseOrder.setExpireDate(format.parse(String.valueOf(result.get("EndTime"))));
138
+        } catch (ParseException e) {
139
+            e.printStackTrace();
140
+        }
141
+
142
+        Object cost = result.get("Cost");
143
+        String costValue = String.valueOf(Double.valueOf(((BigDecimal) cost).toString()) * 100);
144
+
145
+        taUserLicenseOrder.setUnitPrice(costValue.substring(0, costValue.lastIndexOf(".")));
146
+        taUserLicenseOrder.setParkingLot(String.valueOf(result.get("ParkingName")));
147
+        taUserLicenseOrder.setLicensePlate(CarNo);
148
+        taUserLicenseOrder.setSourceFrom("大苏");
149
+        taUserLicenseOrderMapper.insert(taUserLicenseOrder);
150
+
78
         return responseBean;
151
         return responseBean;
79
     }
152
     }
80
 
153
 
103
      */
176
      */
104
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方临时卡上发缴费")
177
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方临时卡上发缴费")
105
     @Override
178
     @Override
106
-    public ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo, String CouponList) {
179
+    public ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo, String CouponList, Integer communityId) {
107
         ResponseBean responseBean = new ResponseBean();
180
         ResponseBean responseBean = new ResponseBean();
108
         // 交易编号
181
         // 交易编号
109
         String dealNo = idGen.nextId() + "";
182
         String dealNo = idGen.nextId() + "";
112
         Map<String, Object> map = Maps.newHashMap();
185
         Map<String, Object> map = Maps.newHashMap();
113
         map.put("TradeNo", tradeNo);
186
         map.put("TradeNo", tradeNo);
114
         responseBean.addSuccess(map);
187
         responseBean.addSuccess(map);
188
+
189
+        // 临时车缴费记录
190
+        TaTemporaryLicenseOrder taTemporaryLicenseOrder = new TaTemporaryLicenseOrder();
191
+        taTemporaryLicenseOrder.setCommunityId(communityId);
192
+        taTemporaryLicenseOrder.setOrderNumber(dealNo);
193
+        taTemporaryLicenseOrder.setOrderStatus("1");
194
+        taTemporaryLicenseOrder.setCreateDate(new Date());
195
+        taTemporaryLicenseOrder.setUpdateDate(new Date());
196
+        // 缴费方式 1是支付宝 2是微信支付
197
+        if (PayStyle.contains("微信")) {
198
+            taTemporaryLicenseOrder.setPaymentType("2");
199
+        } else if (PayStyle.contains("支付宝")){
200
+            taTemporaryLicenseOrder.setPaymentType("1");
201
+        }
202
+        taTemporaryLicenseOrder.setActualAmount(ActualAmount);
203
+        taTemporaryLicenseOrder.setDeductionAmount(DeductionAmount);
204
+        taTemporaryLicenseOrder.setAmount(Amount);
205
+
206
+        String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetTempCarPaymentInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
207
+        JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
208
+        Map<String, Object> innerMap = jsonObject.getInnerMap();
209
+        Integer messageCode = (Integer) innerMap.get("MessageCode");
210
+        if (200 != messageCode.intValue()) {
211
+            log.error("临时车缴费记录错误:{}", parkGetMonthCardInfoByCarNo);
212
+            String messageContent = jsonObject.getString("MessageContent");
213
+            throw new FuShiException(messageCode, messageContent);
214
+        }
215
+
216
+        Map<String, Object> result = (Map<String, Object>) innerMap.get("Result");
217
+        taTemporaryLicenseOrder.setParkingLot(String.valueOf(result.get("ParkingName")));
218
+        taTemporaryLicenseOrder.setLicensePlate(CarNo);
219
+        taTemporaryLicenseOrder.setSourceFrom("大苏");
220
+
221
+        taTemporaryLicenseOrderMapper.insert(taTemporaryLicenseOrder);
222
+
223
+
224
+
115
         return responseBean;
225
         return responseBean;
116
     }
226
     }
117
 
227
 
118
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取线下算费结果")
228
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取线下算费结果")
119
     @Override
229
     @Override
120
-    public ResponseBean apiGetOfflineFee(String CarNoOrCardNo) {
230
+    public ResponseBean apiGetOfflineFee(String CarNoOrCardNo, Integer communityId) {
121
         ResponseBean responseBean = new ResponseBean();
231
         ResponseBean responseBean = new ResponseBean();
122
         String apiGetOfflineFee = fuShiRequestAPI.apiGetOfflineFee(fuShiProperties.getParkingCode(), CarNoOrCardNo);
232
         String apiGetOfflineFee = fuShiRequestAPI.apiGetOfflineFee(fuShiProperties.getParkingCode(), CarNoOrCardNo);
123
         String result = JSONObject.parseObject(apiGetOfflineFee).getString("Result");
233
         String result = JSONObject.parseObject(apiGetOfflineFee).getString("Result");
134
      */
244
      */
135
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取月租车信息(通过车牌号)")
245
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取月租车信息(通过车牌号)")
136
     @Override
246
     @Override
137
-    public ResponseBean parkGetMonthCardInfoByCarNo(String CarNo) {
247
+    public ResponseBean parkGetMonthCardInfoByCarNo(String CarNo, Integer communityId) {
138
         ResponseBean responseBean = new ResponseBean();
248
         ResponseBean responseBean = new ResponseBean();
139
         String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetMonthCardInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
249
         String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetMonthCardInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
140
         JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
250
         JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
153
      */
263
      */
154
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取临时车信息(通过车牌号)")
264
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取临时车信息(通过车牌号)")
155
     @Override
265
     @Override
156
-    public ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo) {
266
+    public ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo,Integer communityId) {
157
         ResponseBean responseBean = new ResponseBean();
267
         ResponseBean responseBean = new ResponseBean();
158
         String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetTempCarPaymentInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
268
         String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetTempCarPaymentInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
159
         JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
269
         JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);

+ 20
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TaTemporaryLicenseOrderServiceImpl.java View File

1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TaTemporaryLicenseOrderMapper;
5
+import com.community.huiju.model.TaTemporaryLicenseOrder;
6
+import com.community.huiju.service.ITaTemporaryLicenseOrderService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 临时车缴费表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-28
16
+ */
17
+@Service
18
+public class TaTemporaryLicenseOrderServiceImpl extends ServiceImpl<TaTemporaryLicenseOrderMapper, TaTemporaryLicenseOrder> implements ITaTemporaryLicenseOrderService {
19
+
20
+}

+ 20
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TaUserLicenseOrderServiceImpl.java View File

1
+package com.community.huiju.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.community.huiju.dao.TaUserLicenseOrderMapper;
5
+import com.community.huiju.model.TaUserLicenseOrder;
6
+import com.community.huiju.service.ITaUserLicenseOrderService;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 月租车缴费订单表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-28
16
+ */
17
+@Service
18
+public class TaUserLicenseOrderServiceImpl extends ServiceImpl<TaUserLicenseOrderMapper, TaUserLicenseOrder> implements ITaUserLicenseOrderService {
19
+
20
+}

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/HkController.java View File

61
 
61
 
62
 	@ApiOperation(value = "门口机开门", notes = "门口机开门")
62
 	@ApiOperation(value = "门口机开门", notes = "门口机开门")
63
 	@ApiImplicitParams({
63
 	@ApiImplicitParams({
64
-			@ApiImplicitParam(dataTypeClass = Integer.class, paramType = "header", name = "X-Auth-Token", value = "用户审核房产id")
64
+			@ApiImplicitParam(dataTypeClass = Integer.class, paramType = "header", name = "X-Auth-Token", value = "Token")
65
 	})
65
 	})
66
 	@RequestMapping(value = "/visual/syncControl", method = RequestMethod.POST)
66
 	@RequestMapping(value = "/visual/syncControl", method = RequestMethod.POST)
67
 	public ResponseBean syncControl( HttpServletRequest request, HttpSession session){
67
 	public ResponseBean syncControl( HttpServletRequest request, HttpSession session){

+ 12
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/MonitoringController.java View File

30
     @ApiImplicitParams({
30
     @ApiImplicitParams({
31
             @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "communityId",value = "小区ID"),
31
             @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "communityId",value = "小区ID"),
32
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNo",value = "第几页"),
32
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNo",value = "第几页"),
33
-            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少行")
33
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少行"),
34
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
34
     })
35
     })
35
     @RequestMapping(value = "/monitoring/{communityId}",method = RequestMethod.GET)
36
     @RequestMapping(value = "/monitoring/{communityId}",method = RequestMethod.GET)
36
     public ResponseBean getList(@PathVariable("communityId") Integer communityId,
37
     public ResponseBean getList(@PathVariable("communityId") Integer communityId,
37
                                 @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
38
                                 @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
38
-                                @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
39
+                                @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
40
+                                HttpSession session){
39
         ResponseBean response = new ResponseBean();
41
         ResponseBean response = new ResponseBean();
40
         if (!check(communityId)) {
42
         if (!check(communityId)) {
41
             response.addError("小区不存在");
43
             response.addError("小区不存在");
42
             return response;
44
             return response;
43
         }
45
         }
44
 
46
 
45
-        response = iMonitoringService.getByCommunityId(communityId,pageNo,pageSize);
47
+        UserElement userElement = getUserElement(session);
48
+        response = iMonitoringService.getByCommunityId(userElement,communityId,pageNo,pageSize);
46
         return response;
49
         return response;
47
     }
50
     }
48
 
51
 
71
     @ApiImplicitParams({
74
     @ApiImplicitParams({
72
             @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "communityId",value = "小区ID"),
75
             @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "communityId",value = "小区ID"),
73
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNo",value = "第几页"),
76
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNo",value = "第几页"),
74
-            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少行")
77
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少行"),
78
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
75
     })
79
     })
76
     @RequestMapping(value = "/monitoring/hls/{communityId}",method = RequestMethod.GET)
80
     @RequestMapping(value = "/monitoring/hls/{communityId}",method = RequestMethod.GET)
77
     public ResponseBean getListHLS(@PathVariable("communityId") Integer communityId,
81
     public ResponseBean getListHLS(@PathVariable("communityId") Integer communityId,
78
                                    @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
82
                                    @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
79
-                                   @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize) {
83
+                                   @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
84
+                                   HttpSession session) {
80
 
85
 
81
         ResponseBean responseBean = new ResponseBean();
86
         ResponseBean responseBean = new ResponseBean();
82
-        responseBean = iMonitoringService.getHlsByCommunityId(communityId, pageNo, pageSize);
87
+        UserElement userElement = getUserElement(session);
88
+        responseBean = iMonitoringService.getHlsByCommunityId(userElement,communityId, pageNo, pageSize);
83
         return responseBean;
89
         return responseBean;
84
     }
90
     }
85
 
91
 

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaPublicMonitorMapper.java View File

1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TaPublicMonitor;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TaPublicMonitorMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TaPublicMonitor record);
11
+
12
+    int insertSelective(TaPublicMonitor record);
13
+
14
+    TaPublicMonitor selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TaPublicMonitor record);
17
+
18
+    int updateByPrimaryKey(TaPublicMonitor record);
19
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaRemotelyDoorMapper.java View File

1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TaRemotelyDoor;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TaRemotelyDoorMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TaRemotelyDoor record);
11
+
12
+    int insertSelective(TaRemotelyDoor record);
13
+
14
+    TaRemotelyDoor selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TaRemotelyDoor record);
17
+
18
+    int updateByPrimaryKey(TaRemotelyDoor record);
19
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaRemotelyMonitorMapper.java View File

1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TaRemotelyMonitor;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface TaRemotelyMonitorMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(TaRemotelyMonitor record);
11
+
12
+    int insertSelective(TaRemotelyMonitor record);
13
+
14
+    TaRemotelyMonitor selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(TaRemotelyMonitor record);
17
+
18
+    int updateByPrimaryKey(TaRemotelyMonitor record);
19
+}

+ 11
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java View File

1
 package com.community.huiju.dao;
1
 package com.community.huiju.dao;
2
 
2
 
3
 import com.community.huiju.model.TpBuildingOwnerInfo;
3
 import com.community.huiju.model.TpBuildingOwnerInfo;
4
-import org.apache.ibatis.annotations.Mapper;
5
-import org.apache.ibatis.annotations.Param;
6
-import org.apache.ibatis.annotations.ResultMap;
7
-import org.apache.ibatis.annotations.Select;
4
+import org.apache.ibatis.annotations.*;
8
 
5
 
9
 import java.util.List;
6
 import java.util.List;
10
 
7
 
76
     @ResultMap("BaseResultMap")
73
     @ResultMap("BaseResultMap")
77
     @Select("select * from tp_building_owner_info where ta_user_verify_id = #{userVerifyId}")
74
     @Select("select * from tp_building_owner_info where ta_user_verify_id = #{userVerifyId}")
78
     TpBuildingOwnerInfo selectByUserVerifyId(@Param("userVerifyId") Integer userVerifyId);
75
     TpBuildingOwnerInfo selectByUserVerifyId(@Param("userVerifyId") Integer userVerifyId);
76
+
77
+    /**
78
+     * 根据手机号更新手机号
79
+     * @param oldPhone
80
+     * @param newPhone
81
+     * @return
82
+     */
83
+    @ResultType(Integer.class)
84
+    @Update("update tp_building_owner_info set owner_tel = #{newPhone} where owner_tel = #{oldPhone}")
85
+    Integer updateAllByPhone(String oldPhone, String newPhone);
79
 }
86
 }

+ 45
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaPublicMonitor.java View File

1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TaPublicMonitor {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer taUserVerifyId;
11
+
12
+    private Date createDate;
13
+
14
+    public Integer getId() {
15
+        return id;
16
+    }
17
+
18
+    public void setId(Integer id) {
19
+        this.id = id;
20
+    }
21
+
22
+    public Integer getCommunityId() {
23
+        return communityId;
24
+    }
25
+
26
+    public void setCommunityId(Integer communityId) {
27
+        this.communityId = communityId;
28
+    }
29
+
30
+    public Integer getTaUserVerifyId() {
31
+        return taUserVerifyId;
32
+    }
33
+
34
+    public void setTaUserVerifyId(Integer taUserVerifyId) {
35
+        this.taUserVerifyId = taUserVerifyId;
36
+    }
37
+
38
+    public Date getCreateDate() {
39
+        return createDate;
40
+    }
41
+
42
+    public void setCreateDate(Date createDate) {
43
+        this.createDate = createDate;
44
+    }
45
+}

+ 55
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaRemotelyDoor.java View File

1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TaRemotelyDoor {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer taUserVerifyId;
11
+
12
+    private Integer unitId;
13
+
14
+    private Date createDate;
15
+
16
+    public Integer getId() {
17
+        return id;
18
+    }
19
+
20
+    public void setId(Integer id) {
21
+        this.id = id;
22
+    }
23
+
24
+    public Integer getCommunityId() {
25
+        return communityId;
26
+    }
27
+
28
+    public void setCommunityId(Integer communityId) {
29
+        this.communityId = communityId;
30
+    }
31
+
32
+    public Integer getTaUserVerifyId() {
33
+        return taUserVerifyId;
34
+    }
35
+
36
+    public void setTaUserVerifyId(Integer taUserVerifyId) {
37
+        this.taUserVerifyId = taUserVerifyId;
38
+    }
39
+
40
+    public Integer getUnitId() {
41
+        return unitId;
42
+    }
43
+
44
+    public void setUnitId(Integer unitId) {
45
+        this.unitId = unitId;
46
+    }
47
+
48
+    public Date getCreateDate() {
49
+        return createDate;
50
+    }
51
+
52
+    public void setCreateDate(Date createDate) {
53
+        this.createDate = createDate;
54
+    }
55
+}

+ 55
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaRemotelyMonitor.java View File

1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TaRemotelyMonitor {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer taUserVerifyId;
11
+
12
+    private Integer unitId;
13
+
14
+    private Date createDate;
15
+
16
+    public Integer getId() {
17
+        return id;
18
+    }
19
+
20
+    public void setId(Integer id) {
21
+        this.id = id;
22
+    }
23
+
24
+    public Integer getCommunityId() {
25
+        return communityId;
26
+    }
27
+
28
+    public void setCommunityId(Integer communityId) {
29
+        this.communityId = communityId;
30
+    }
31
+
32
+    public Integer getTaUserVerifyId() {
33
+        return taUserVerifyId;
34
+    }
35
+
36
+    public void setTaUserVerifyId(Integer taUserVerifyId) {
37
+        this.taUserVerifyId = taUserVerifyId;
38
+    }
39
+
40
+    public Integer getUnitId() {
41
+        return unitId;
42
+    }
43
+
44
+    public void setUnitId(Integer unitId) {
45
+        this.unitId = unitId;
46
+    }
47
+
48
+    public Date getCreateDate() {
49
+        return createDate;
50
+    }
51
+
52
+    public void setCreateDate(Date createDate) {
53
+        this.createDate = createDate;
54
+    }
55
+}

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/IMonitoringService.java View File

16
      * @param pageSize
16
      * @param pageSize
17
      * @return
17
      * @return
18
      */
18
      */
19
-    ResponseBean getByCommunityId(Integer communityId,Integer pageNo, Integer pageSize);
19
+    ResponseBean getByCommunityId(UserElement userElement, Integer communityId,Integer pageNo, Integer pageSize);
20
 
20
 
21
     /**
21
     /**
22
      * 生成 Token
22
      * 生成 Token
32
      * @param communityId
32
      * @param communityId
33
      * @return
33
      * @return
34
      */
34
      */
35
-    ResponseBean getHlsByCommunityId(Integer communityId, Integer pageNo, Integer pageSize);
35
+    ResponseBean getHlsByCommunityId(UserElement userElement, Integer communityId, Integer pageNo, Integer pageSize);
36
 
36
 
37
     /**
37
     /**
38
      * 可是对讲 视频流
38
      * 可是对讲 视频流

+ 12
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/HKServiceImpl.java View File

50
     @Autowired
50
     @Autowired
51
     private TaUserVerifyMapper taUserVerifyMapper;
51
     private TaUserVerifyMapper taUserVerifyMapper;
52
 
52
 
53
+    @Autowired
54
+    private TaRemotelyDoorMapper taRemotelyDoorMapper;
55
+
53
     /**
56
     /**
54
      * 获取设备UUID
57
      * 获取设备UUID
55
      * @param equipmentList
58
      * @param equipmentList
354
         JSONObject jsonObject = JSONObject.parseObject(data);
357
         JSONObject jsonObject = JSONObject.parseObject(data);
355
         int errorCode = jsonObject.getInteger("errorCode");
358
         int errorCode = jsonObject.getInteger("errorCode");
356
         if (errorCode == 0) {
359
         if (errorCode == 0) {
360
+
361
+            // 记录 远程开门次数
362
+            TaRemotelyDoor taRemotelyDoor = new TaRemotelyDoor();
363
+            taRemotelyDoor.setCommunityId(userVerify.getCommunityId());
364
+            taRemotelyDoor.setTaUserVerifyId(userVerify.getUserId());
365
+            taRemotelyDoor.setUnitId(userVerify.getUnitId());
366
+            taRemotelyDoor.setCreateDate(new Date());
367
+            taRemotelyDoorMapper.insertSelective(taRemotelyDoor);
368
+
357
             responseBean.addSuccess("操作成功!");
369
             responseBean.addSuccess("操作成功!");
358
             return responseBean;
370
             return responseBean;
359
         }
371
         }

+ 52
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MonitoringServiceImpl.java View File

25
 import java.time.Instant;
25
 import java.time.Instant;
26
 import java.time.LocalDateTime;
26
 import java.time.LocalDateTime;
27
 import java.time.ZoneId;
27
 import java.time.ZoneId;
28
+import java.util.Date;
28
 import java.util.HashMap;
29
 import java.util.HashMap;
29
 import java.util.List;
30
 import java.util.List;
30
 import java.util.Map;
31
 import java.util.Map;
67
     @Autowired
68
     @Autowired
68
     private ToCommunitiesMapper toCommunitiesMapper;
69
     private ToCommunitiesMapper toCommunitiesMapper;
69
 
70
 
71
+    @Autowired
72
+    private TaPublicMonitorMapper taPublicMonitorMapper;
73
+
74
+    @Autowired
75
+    private TaRemotelyMonitorMapper taRemotelyMonitorMapper;
76
+
70
     @Override
77
     @Override
71
-    public ResponseBean getByCommunityId(Integer communityId,Integer pageNo, Integer pageSize) {
78
+    public ResponseBean getByCommunityId(UserElement userElement, Integer communityId,Integer pageNo, Integer pageSize) {
72
 
79
 
73
         // TODO 数据是假数据, 后期在更改. 需要根据小区查询 组织中心编号
80
         // TODO 数据是假数据, 后期在更改. 需要根据小区查询 组织中心编号
74
 
81
 
95
         Page<TpEquipment> page = PageHelper.startPage(pageNo, pageSize);
102
         Page<TpEquipment> page = PageHelper.startPage(pageNo, pageSize);
96
         List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityId(communityId);
103
         List<TpEquipment> tpEquipments = tpEquipmentMapper.selectByCommunityId(communityId);
97
 
104
 
105
+        if (CollectionUtils.isEmpty(tpEquipments)) {
106
+            response.addError("系统未配置监控设备!");
107
+            return response;
108
+        }
109
+
98
         Map<String, Object> map = Maps.newHashMap();
110
         Map<String, Object> map = Maps.newHashMap();
99
         map.put("pageNo", page.getPageNum());
111
         map.put("pageNo", page.getPageNum());
100
         map.put("pageSize", page.getPageSize());
112
         map.put("pageSize", page.getPageSize());
102
         map.put("list", tpEquipments);
114
         map.put("list", tpEquipments);
103
         response.addSuccess(map);
115
         response.addSuccess(map);
104
 
116
 
117
+        // 记录 查看监控
118
+        insertPublicMonitor(communityId, userElement.getId());
119
+
105
         return response;
120
         return response;
106
     }
121
     }
107
 
122
 
123
+    /**
124
+     * 记录 查看监控
125
+     * @param communityId
126
+     * @param userId
127
+     * @return
128
+     */
129
+    private TaPublicMonitor insertPublicMonitor(Integer communityId, Integer userId) {
130
+        // 记录查看监控设备
131
+        TaPublicMonitor taPublicMonitor = new TaPublicMonitor();
132
+        taPublicMonitor.setCommunityId(communityId);
133
+        taPublicMonitor.setTaUserVerifyId(userId);
134
+        taPublicMonitor.setCreateDate(new Date());
135
+        taPublicMonitorMapper.insertSelective(taPublicMonitor);
136
+
137
+        return taPublicMonitor;
138
+    }
139
+
108
     @Override
140
     @Override
109
     public ResponseBean getMonitoringToken(Integer communityId, Integer pageNo, Integer pageSize) {
141
     public ResponseBean getMonitoringToken(Integer communityId, Integer pageNo, Integer pageSize) {
110
 
142
 
168
     }
200
     }
169
 
201
 
170
     @Override
202
     @Override
171
-    public ResponseBean getHlsByCommunityId(Integer communityId, Integer pageNo, Integer pageSize) {
203
+    public ResponseBean getHlsByCommunityId(UserElement userElement, Integer communityId, Integer pageNo, Integer pageSize) {
172
         ResponseBean response = new ResponseBean();
204
         ResponseBean response = new ResponseBean();
173
         Page<TpEquipment> page = PageHelper.startPage(pageNo, pageSize);
205
         Page<TpEquipment> page = PageHelper.startPage(pageNo, pageSize);
174
         List<TpEquipment> tpEquipments = tpEquipmentMapper.selectHlsByCommunityId(communityId);
206
         List<TpEquipment> tpEquipments = tpEquipmentMapper.selectHlsByCommunityId(communityId);
175
 
207
 
208
+        if (CollectionUtils.isEmpty(tpEquipments)) {
209
+            response.addError("系统未配置监控设备!");
210
+            return response;
211
+        }
212
+
176
         Map<String, Object> map = Maps.newHashMap();
213
         Map<String, Object> map = Maps.newHashMap();
177
         map.put("pageNo", page.getPageNum());
214
         map.put("pageNo", page.getPageNum());
178
         map.put("pageSize", page.getPageSize());
215
         map.put("pageSize", page.getPageSize());
179
         map.put("total", page.getTotal());
216
         map.put("total", page.getTotal());
180
         map.put("list", tpEquipments);
217
         map.put("list", tpEquipments);
181
         response.addSuccess(map);
218
         response.addSuccess(map);
219
+
220
+        // 记录 查看监控
221
+        insertPublicMonitor(communityId, userElement.getId());
222
+
182
         return response;
223
         return response;
183
     }
224
     }
184
 
225
 
238
         map.put("address", toCommunities.getCommunityName() + tpUnit.getPhaseName() + tpUnit.getBuildingName() + tpUnit.getName());
279
         map.put("address", toCommunities.getCommunityName() + tpUnit.getPhaseName() + tpUnit.getBuildingName() + tpUnit.getName());
239
         map.put("token", tpEquipment.getOpUserUuid());
280
         map.put("token", tpEquipment.getOpUserUuid());
240
         responseBean.addSuccess(map);
281
         responseBean.addSuccess(map);
282
+
283
+        // 记录 单元门监控查看
284
+        TaRemotelyMonitor taRemotelyMonitor = new TaRemotelyMonitor();
285
+        taRemotelyMonitor.setCommunityId(userElement.getCommunityId());
286
+        taRemotelyMonitor.setTaUserVerifyId(userElement.getId());
287
+        taRemotelyMonitor.setUnitId(userElement.getUnitId());
288
+        taRemotelyMonitor.setCreateDate(new Date());
289
+        taRemotelyMonitorMapper.insertSelective(taRemotelyMonitor);
290
+
241
         return responseBean;
291
         return responseBean;
242
     }
292
     }
243
 }
293
 }

+ 11
- 19
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java View File

332
         // 校验手机号和验证码
332
         // 校验手机号和验证码
333
         iCode.checkPhoneAndCode(phone, code);
333
         iCode.checkPhoneAndCode(phone, code);
334
 
334
 
335
-        //当前小区下的电话校验
336
-        TaUser loginName = taUserMapper.getByLoginName(user.getCommunityId(), phone);
337
-        if (null != loginName) {
335
+        // 查询出这个手机号
336
+        TaUser hasUserPhone = hasUserPhone(phone);
337
+        if (null != hasUserPhone && user.getId().intValue() != hasUserPhone.getId().intValue()) {
338
             response.addError("号码已占用");
338
             response.addError("号码已占用");
339
             return response;
339
             return response;
340
         }
340
         }
341
+
342
+        // 如果提交上来的手机号 和 这个用户本身的手机号相等,就直接返回成功!
343
+        if (null != hasUserPhone && user.getLoginName().equals(phone)) {
344
+            response.addSuccess(new String[0]);
345
+            return response;
346
+        }
341
         TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(userElement.getCommunityId());
347
         TpEquipmentTree tpEquipmentTree = tpEquipmentTreeMapper.selectByCommunityId(userElement.getCommunityId());
342
         String data = HKOpenApi.HKpersonPhone(user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), phone, tpEquipmentTree.getHttpServer());
348
         String data = HKOpenApi.HKpersonPhone(user.getHkUserId(), user.getHkPersonNo(), user.getUserName(), phone, tpEquipmentTree.getHttpServer());
343
         JSONObject jsonobject = JSONObject.parseObject(data);
349
         JSONObject jsonobject = JSONObject.parseObject(data);
357
         taUserMapper.updateLongName(taUser);
363
         taUserMapper.updateLongName(taUser);
358
         response.addSuccess("修改成功");
364
         response.addSuccess("修改成功");
359
 
365
 
360
-        /**
361
-         * 如果是 家属或者租客,修改手机号, 就不允许修改资料库的信息
362
-         * 根据房产判断 当前是否是 业主
363
-         */
364
-
365
-        TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
366
-        TaSysRole sysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
367
-
368
-        // 修改楼栋信息资料库的手机号
369
-        // 1 业主 2 租客 3 家属
370
-        // 只允许业主修改
371
-        if (null != sysRole && sysRole.getId().intValue() == 1) {
372
-            TpBuildingOwnerInfo buildingOwnerInfo = tpBuildingOwnerInfoMapper.selectByPrimaryKey(userVerify.getRoomNoId());
373
-            buildingOwnerInfo.setOwnerTel(phone);
374
-            tpBuildingOwnerInfoMapper.updateByPrimaryKeySelective(buildingOwnerInfo);
375
-        }
366
+        // 修改楼栋资料库手机号
367
+        tpBuildingOwnerInfoMapper.updateAllByPhone(user.getLoginName(), phone);
376
 
368
 
377
         // 给前端返回一个空数组
369
         // 给前端返回一个空数组
378
         response.addSuccess(new String[0]);
370
         response.addSuccess(new String[0]);

+ 82
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaPublicMonitorMapper.xml View File

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TaPublicMonitorMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaPublicMonitor" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
8
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
9
+  </resultMap>
10
+  <sql id="Base_Column_List" >
11
+    id, community_id, ta_user_verify_id, create_date
12
+  </sql>
13
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
14
+    select 
15
+    <include refid="Base_Column_List" />
16
+    from ta_public_monitor
17
+    where id = #{id,jdbcType=INTEGER}
18
+  </select>
19
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
20
+    delete from ta_public_monitor
21
+    where id = #{id,jdbcType=INTEGER}
22
+  </delete>
23
+  <insert id="insert" parameterType="com.community.huiju.model.TaPublicMonitor" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
24
+    insert into ta_public_monitor (id, community_id, ta_user_verify_id, 
25
+      create_date)
26
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserVerifyId,jdbcType=INTEGER}, 
27
+      #{createDate,jdbcType=TIMESTAMP})
28
+  </insert>
29
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaPublicMonitor" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
30
+    insert into ta_public_monitor
31
+    <trim prefix="(" suffix=")" suffixOverrides="," >
32
+      <if test="id != null" >
33
+        id,
34
+      </if>
35
+      <if test="communityId != null" >
36
+        community_id,
37
+      </if>
38
+      <if test="taUserVerifyId != null" >
39
+        ta_user_verify_id,
40
+      </if>
41
+      <if test="createDate != null" >
42
+        create_date,
43
+      </if>
44
+    </trim>
45
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
46
+      <if test="id != null" >
47
+        #{id,jdbcType=INTEGER},
48
+      </if>
49
+      <if test="communityId != null" >
50
+        #{communityId,jdbcType=INTEGER},
51
+      </if>
52
+      <if test="taUserVerifyId != null" >
53
+        #{taUserVerifyId,jdbcType=INTEGER},
54
+      </if>
55
+      <if test="createDate != null" >
56
+        #{createDate,jdbcType=TIMESTAMP},
57
+      </if>
58
+    </trim>
59
+  </insert>
60
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaPublicMonitor" >
61
+    update ta_public_monitor
62
+    <set >
63
+      <if test="communityId != null" >
64
+        community_id = #{communityId,jdbcType=INTEGER},
65
+      </if>
66
+      <if test="taUserVerifyId != null" >
67
+        ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
68
+      </if>
69
+      <if test="createDate != null" >
70
+        create_date = #{createDate,jdbcType=TIMESTAMP},
71
+      </if>
72
+    </set>
73
+    where id = #{id,jdbcType=INTEGER}
74
+  </update>
75
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaPublicMonitor" >
76
+    update ta_public_monitor
77
+    set community_id = #{communityId,jdbcType=INTEGER},
78
+      ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
79
+      create_date = #{createDate,jdbcType=TIMESTAMP}
80
+    where id = #{id,jdbcType=INTEGER}
81
+  </update>
82
+</mapper>

+ 93
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaRemotelyDoorMapper.xml View File

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TaRemotelyDoorMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaRemotelyDoor" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
8
+    <result column="unit_id" property="unitId" jdbcType="INTEGER" />
9
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
10
+  </resultMap>
11
+  <sql id="Base_Column_List" >
12
+    id, community_id, ta_user_verify_id, unit_id, create_date
13
+  </sql>
14
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
15
+    select 
16
+    <include refid="Base_Column_List" />
17
+    from ta_remotely_door
18
+    where id = #{id,jdbcType=INTEGER}
19
+  </select>
20
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
21
+    delete from ta_remotely_door
22
+    where id = #{id,jdbcType=INTEGER}
23
+  </delete>
24
+  <insert id="insert" parameterType="com.community.huiju.model.TaRemotelyDoor" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
25
+    insert into ta_remotely_door (id, community_id, ta_user_verify_id, 
26
+      unit_id, create_date)
27
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserVerifyId,jdbcType=INTEGER}, 
28
+      #{unitId,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP})
29
+  </insert>
30
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaRemotelyDoor" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
31
+    insert into ta_remotely_door
32
+    <trim prefix="(" suffix=")" suffixOverrides="," >
33
+      <if test="id != null" >
34
+        id,
35
+      </if>
36
+      <if test="communityId != null" >
37
+        community_id,
38
+      </if>
39
+      <if test="taUserVerifyId != null" >
40
+        ta_user_verify_id,
41
+      </if>
42
+      <if test="unitId != null" >
43
+        unit_id,
44
+      </if>
45
+      <if test="createDate != null" >
46
+        create_date,
47
+      </if>
48
+    </trim>
49
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
50
+      <if test="id != null" >
51
+        #{id,jdbcType=INTEGER},
52
+      </if>
53
+      <if test="communityId != null" >
54
+        #{communityId,jdbcType=INTEGER},
55
+      </if>
56
+      <if test="taUserVerifyId != null" >
57
+        #{taUserVerifyId,jdbcType=INTEGER},
58
+      </if>
59
+      <if test="unitId != null" >
60
+        #{unitId,jdbcType=INTEGER},
61
+      </if>
62
+      <if test="createDate != null" >
63
+        #{createDate,jdbcType=TIMESTAMP},
64
+      </if>
65
+    </trim>
66
+  </insert>
67
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaRemotelyDoor" >
68
+    update ta_remotely_door
69
+    <set >
70
+      <if test="communityId != null" >
71
+        community_id = #{communityId,jdbcType=INTEGER},
72
+      </if>
73
+      <if test="taUserVerifyId != null" >
74
+        ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
75
+      </if>
76
+      <if test="unitId != null" >
77
+        unit_id = #{unitId,jdbcType=INTEGER},
78
+      </if>
79
+      <if test="createDate != null" >
80
+        create_date = #{createDate,jdbcType=TIMESTAMP},
81
+      </if>
82
+    </set>
83
+    where id = #{id,jdbcType=INTEGER}
84
+  </update>
85
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaRemotelyDoor" >
86
+    update ta_remotely_door
87
+    set community_id = #{communityId,jdbcType=INTEGER},
88
+      ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
89
+      unit_id = #{unitId,jdbcType=INTEGER},
90
+      create_date = #{createDate,jdbcType=TIMESTAMP}
91
+    where id = #{id,jdbcType=INTEGER}
92
+  </update>
93
+</mapper>

+ 93
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaRemotelyMonitorMapper.xml View File

1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TaRemotelyMonitorMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaRemotelyMonitor" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
8
+    <result column="unit_id" property="unitId" jdbcType="INTEGER" />
9
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
10
+  </resultMap>
11
+  <sql id="Base_Column_List" >
12
+    id, community_id, ta_user_verify_id, unit_id, create_date
13
+  </sql>
14
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
15
+    select 
16
+    <include refid="Base_Column_List" />
17
+    from ta_remotely_monitor
18
+    where id = #{id,jdbcType=INTEGER}
19
+  </select>
20
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
21
+    delete from ta_remotely_monitor
22
+    where id = #{id,jdbcType=INTEGER}
23
+  </delete>
24
+  <insert id="insert" parameterType="com.community.huiju.model.TaRemotelyMonitor" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
25
+    insert into ta_remotely_monitor (id, community_id, ta_user_verify_id, 
26
+      unit_id, create_date)
27
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserVerifyId,jdbcType=INTEGER}, 
28
+      #{unitId,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP})
29
+  </insert>
30
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaRemotelyMonitor" useGeneratedKeys="true" keyProperty="id" keyColumn="id" >
31
+    insert into ta_remotely_monitor
32
+    <trim prefix="(" suffix=")" suffixOverrides="," >
33
+      <if test="id != null" >
34
+        id,
35
+      </if>
36
+      <if test="communityId != null" >
37
+        community_id,
38
+      </if>
39
+      <if test="taUserVerifyId != null" >
40
+        ta_user_verify_id,
41
+      </if>
42
+      <if test="unitId != null" >
43
+        unit_id,
44
+      </if>
45
+      <if test="createDate != null" >
46
+        create_date,
47
+      </if>
48
+    </trim>
49
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
50
+      <if test="id != null" >
51
+        #{id,jdbcType=INTEGER},
52
+      </if>
53
+      <if test="communityId != null" >
54
+        #{communityId,jdbcType=INTEGER},
55
+      </if>
56
+      <if test="taUserVerifyId != null" >
57
+        #{taUserVerifyId,jdbcType=INTEGER},
58
+      </if>
59
+      <if test="unitId != null" >
60
+        #{unitId,jdbcType=INTEGER},
61
+      </if>
62
+      <if test="createDate != null" >
63
+        #{createDate,jdbcType=TIMESTAMP},
64
+      </if>
65
+    </trim>
66
+  </insert>
67
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaRemotelyMonitor" >
68
+    update ta_remotely_monitor
69
+    <set >
70
+      <if test="communityId != null" >
71
+        community_id = #{communityId,jdbcType=INTEGER},
72
+      </if>
73
+      <if test="taUserVerifyId != null" >
74
+        ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
75
+      </if>
76
+      <if test="unitId != null" >
77
+        unit_id = #{unitId,jdbcType=INTEGER},
78
+      </if>
79
+      <if test="createDate != null" >
80
+        create_date = #{createDate,jdbcType=TIMESTAMP},
81
+      </if>
82
+    </set>
83
+    where id = #{id,jdbcType=INTEGER}
84
+  </update>
85
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaRemotelyMonitor" >
86
+    update ta_remotely_monitor
87
+    set community_id = #{communityId,jdbcType=INTEGER},
88
+      ta_user_verify_id = #{taUserVerifyId,jdbcType=INTEGER},
89
+      unit_id = #{unitId,jdbcType=INTEGER},
90
+      create_date = #{createDate,jdbcType=TIMESTAMP}
91
+    where id = #{id,jdbcType=INTEGER}
92
+  </update>
93
+</mapper>

+ 1
- 1
CODE/smart-community/community-common/src/main/java/com/community/commom/fushi/FuShiRequestAPI.java View File

158
         map.put("ParkingCode", ParkingCode);
158
         map.put("ParkingCode", ParkingCode);
159
         map.put("CardNo", CardNo);
159
         map.put("CardNo", CardNo);
160
         map.put("PayCostMachineOrderId", PayCostMachineOrderId);
160
         map.put("PayCostMachineOrderId", PayCostMachineOrderId);
161
-        map.put("CouponList", JSONObject.parseObject(CouponList).getInnerMap());
161
+        map.put("CouponList", null == CouponList ? null : JSONObject.parseObject(CouponList).getInnerMap());
162
 
162
 
163
         String json = JSONObject.toJSONString(map);
163
         String json = JSONObject.toJSONString(map);
164
         log.info("第三方临时卡上发缴费请求参数:{}", json);
164
         log.info("第三方临时卡上发缴费请求参数:{}", json);