浏览代码

完成 月租车 临时车 缴费记录

魏熙美 6 年前
父节点
当前提交
12e16e659a

+ 33
- 21
CODE/foreign-service/src/main/java/com/community/huiju/controller/FSController.java 查看文件

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

+ 16
- 0
CODE/foreign-service/src/main/java/com/community/huiju/dao/TaTemporaryLicenseOrderMapper.java 查看文件

@@ -0,0 +1,16 @@
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 查看文件

@@ -0,0 +1,16 @@
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 查看文件

@@ -0,0 +1,119 @@
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 查看文件

@@ -0,0 +1,124 @@
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 查看文件

@@ -13,7 +13,7 @@ public interface IFuShiService {
13 13
      * @param carNo
14 14
      * @return
15 15
      */
16
-    ResponseBean getParkInfoByCarNo(String carNo);
16
+    ResponseBean getParkInfoByCarNo(String carNo, Integer communityId);
17 17
 
18 18
     /**
19 19
      * 第三方月卡上发续费
@@ -26,7 +26,7 @@ public interface IFuShiService {
26 26
      * @param RechargeAmt 充值续费金额
27 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,26 +52,26 @@ public interface IFuShiService {
52 52
      *
53 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 59
      * @param CarNoOrCardNo 车牌号码或卡号
60 60
      * @return
61 61
      */
62
-    ResponseBean apiGetOfflineFee(String CarNoOrCardNo);
62
+    ResponseBean apiGetOfflineFee(String CarNoOrCardNo, Integer communityId);
63 63
 
64 64
     /**
65 65
      * 获取月租车信息(通过车牌号)
66 66
      * @param CarNo
67 67
      * @return
68 68
      */
69
-    ResponseBean parkGetMonthCardInfoByCarNo(String CarNo);
69
+    ResponseBean parkGetMonthCardInfoByCarNo(String CarNo, Integer communityId);
70 70
 
71 71
     /**
72 72
      * 获取临时车信息(通过车牌号)
73 73
      * @param CarNo
74 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 查看文件

@@ -0,0 +1,18 @@
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 查看文件

@@ -0,0 +1,16 @@
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 查看文件

@@ -1,20 +1,32 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3 3
 import com.alibaba.fastjson.JSONObject;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 5
 import com.community.commom.fushi.FuShiRequestAPI;
6
+import com.community.commom.fushi.error.FuShiException;
5 7
 import com.community.commom.mode.ResponseBean;
6 8
 import com.community.commom.uuid.IdGen;
7 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 13
 import com.community.huiju.log.LogAnnotation;
9 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 18
 import com.community.huiju.service.IFuShiService;
11 19
 import com.google.common.collect.Maps;
12 20
 import lombok.extern.slf4j.Slf4j;
13 21
 import org.springframework.beans.factory.annotation.Autowired;
14 22
 import org.springframework.stereotype.Service;
15 23
 
24
+import java.math.BigDecimal;
25
+import java.text.ParseException;
26
+import java.text.SimpleDateFormat;
16 27
 import java.time.LocalDateTime;
17 28
 import java.time.format.DateTimeFormatter;
29
+import java.util.Date;
18 30
 import java.util.Map;
19 31
 
20 32
 /**
@@ -33,6 +45,15 @@ public class FuShiServiceImpl implements IFuShiService {
33 45
 
34 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 58
      * 获取 富士 json 值
38 59
      * @param jsonString
@@ -52,7 +73,7 @@ public class FuShiServiceImpl implements IFuShiService {
52 73
 
53 74
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取停车信息(通过车牌号)")
54 75
     @Override
55
-    public ResponseBean getParkInfoByCarNo(String carNo) {
76
+    public ResponseBean getParkInfoByCarNo(String carNo, Integer communityId) {
56 77
         ResponseBean responseBean = new ResponseBean();
57 78
         String parkInfo = fuShiRequestAPI.getParkInfoByCarNo(fuShiProperties.getParkingCode(), carNo);
58 79
         Map<String, Object> fuShiInfo = getFuShiInfo(parkInfo);
@@ -62,7 +83,7 @@ public class FuShiServiceImpl implements IFuShiService {
62 83
 
63 84
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方月卡上发续费")
64 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 87
         ResponseBean responseBean = new ResponseBean();
67 88
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
68 89
         // 交易编码
@@ -75,6 +96,58 @@ public class FuShiServiceImpl implements IFuShiService {
75 96
         Map<String, Object> map = Maps.newHashMap();
76 97
         map.put("TradeNo", tradeNo);
77 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 151
         return responseBean;
79 152
     }
80 153
 
@@ -103,7 +176,7 @@ public class FuShiServiceImpl implements IFuShiService {
103 176
      */
104 177
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方临时卡上发缴费")
105 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 180
         ResponseBean responseBean = new ResponseBean();
108 181
         // 交易编号
109 182
         String dealNo = idGen.nextId() + "";
@@ -112,12 +185,49 @@ public class FuShiServiceImpl implements IFuShiService {
112 185
         Map<String, Object> map = Maps.newHashMap();
113 186
         map.put("TradeNo", tradeNo);
114 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 225
         return responseBean;
116 226
     }
117 227
 
118 228
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取线下算费结果")
119 229
     @Override
120
-    public ResponseBean apiGetOfflineFee(String CarNoOrCardNo) {
230
+    public ResponseBean apiGetOfflineFee(String CarNoOrCardNo, Integer communityId) {
121 231
         ResponseBean responseBean = new ResponseBean();
122 232
         String apiGetOfflineFee = fuShiRequestAPI.apiGetOfflineFee(fuShiProperties.getParkingCode(), CarNoOrCardNo);
123 233
         String result = JSONObject.parseObject(apiGetOfflineFee).getString("Result");
@@ -134,7 +244,7 @@ public class FuShiServiceImpl implements IFuShiService {
134 244
      */
135 245
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取月租车信息(通过车牌号)")
136 246
     @Override
137
-    public ResponseBean parkGetMonthCardInfoByCarNo(String CarNo) {
247
+    public ResponseBean parkGetMonthCardInfoByCarNo(String CarNo, Integer communityId) {
138 248
         ResponseBean responseBean = new ResponseBean();
139 249
         String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetMonthCardInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
140 250
         JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);
@@ -153,7 +263,7 @@ public class FuShiServiceImpl implements IFuShiService {
153 263
      */
154 264
     @LogAnnotation(value = LogEnums.DA_SU, alias = "获取临时车信息(通过车牌号)")
155 265
     @Override
156
-    public ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo) {
266
+    public ResponseBean parkGetTempCarPaymentInfoByCarNo(String CarNo,Integer communityId) {
157 267
         ResponseBean responseBean = new ResponseBean();
158 268
         String parkGetMonthCardInfoByCarNo = fuShiRequestAPI.parkGetTempCarPaymentInfoByCarNo(fuShiProperties.getParkingCode(), CarNo);
159 269
         JSONObject jsonObject = JSONObject.parseObject(parkGetMonthCardInfoByCarNo);

+ 20
- 0
CODE/foreign-service/src/main/java/com/community/huiju/service/impl/TaTemporaryLicenseOrderServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
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 查看文件

@@ -0,0 +1,20 @@
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/community-common/src/main/java/com/community/commom/fushi/FuShiRequestAPI.java 查看文件

@@ -158,7 +158,7 @@ public class FuShiRequestAPI {
158 158
         map.put("ParkingCode", ParkingCode);
159 159
         map.put("CardNo", CardNo);
160 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 163
         String json = JSONObject.toJSONString(map);
164 164
         log.info("第三方临时卡上发缴费请求参数:{}", json);