魏熙美 6 år sedan
förälder
incheckning
ea3d7c5683

+ 9
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/feign/IFuShiServer.java Visa fil

@@ -20,11 +20,19 @@ public interface IFuShiServer {
20 20
     String getParkInfoByCarNo(@RequestParam("carNo") String carNo);
21 21
 
22 22
     /**
23
-     * 缴费
23
+     * 月租车缴费
24 24
      * @param parameter
25 25
      * @return
26 26
      */
27 27
     @PostMapping("/car/apiThirdPartyMonthCardPay")
28 28
     String apiThirdPartyMonthCardPay(@RequestBody String parameter);
29 29
 
30
+    /**
31
+     * 临时车缴费
32
+     * @param parameter
33
+     * @return
34
+     */
35
+    @PostMapping("/car/apiThirdPartyTemporaryCardPay")
36
+    String apiThirdPartyTemporaryCardPay(@RequestBody String parameter);
37
+
30 38
 }

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/feign/entity/ApiThirdPartyMonthCardPay.java Visa fil

@@ -20,6 +20,11 @@ public class ApiThirdPartyMonthCardPay {
20 20
      */
21 21
     private String RenewDay;
22 22
 
23
+    /**
24
+     * 交易编号
25
+     */
26
+    private String DealNo;
27
+
23 28
     /**
24 29
      * 交易方式(中文描述),例如:微信、 支付宝、 银联
25 30
      */

+ 200
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/feign/entity/ApiThirdPartyTemporaryCardPay.java Visa fil

@@ -0,0 +1,200 @@
1
+package com.community.huiju.feign.entity;
2
+
3
+import java.util.List;
4
+
5
+public class ApiThirdPartyTemporaryCardPay {
6
+
7
+
8
+    /**
9
+     * Amount : 10
10
+     * ActualAmount : 10
11
+     * DeductionAmount : 0
12
+     * Reason : 
13
+     * DealNo : 2017082821001004930232739530
14
+     * PayStyle : 支付宝
15
+     * CarNo : 粤BS69W3
16
+     * ParkingCode : 17000107550001
17
+     * CardNo : 
18
+     * PayCostMachineOrderId : 
19
+     * CouponList : [{"CouponType":2,"CouponValue":0,"CouponCode":"2319e5e516dd42f49a0514796fd0bb43","FavorableType":2,"IsAuto":2,"UseStatus":1}]
20
+     */
21
+
22
+    private Integer Amount;
23
+    private Integer ActualAmount;
24
+    private Integer DeductionAmount;
25
+    private String Reason;
26
+    private String DealNo;
27
+    private String PayStyle;
28
+    private String CarNo;
29
+    /**
30
+     * 停车场编号,目前只有Q+社区
31
+     */
32
+    private String ParkingCode;
33
+
34
+    /**
35
+     * 停车卡号
36
+     */
37
+    private String CardNo;
38
+    /**
39
+     * 线下自助缴费机订单号,若不是自助缴费机缴费则该字段为空
40
+     */
41
+    private String PayCostMachineOrderId;
42
+    /**
43
+     * 优惠券
44
+     */
45
+    private List<CouponListBean> CouponList;
46
+
47
+    public Integer getAmount() {
48
+        return Amount;
49
+    }
50
+
51
+    public void setAmount(Integer Amount) {
52
+        this.Amount = Amount;
53
+    }
54
+
55
+    public Integer getActualAmount() {
56
+        return ActualAmount;
57
+    }
58
+
59
+    public void setActualAmount(Integer ActualAmount) {
60
+        this.ActualAmount = ActualAmount;
61
+    }
62
+
63
+    public Integer getDeductionAmount() {
64
+        return DeductionAmount;
65
+    }
66
+
67
+    public void setDeductionAmount(Integer DeductionAmount) {
68
+        this.DeductionAmount = DeductionAmount;
69
+    }
70
+
71
+    public String getReason() {
72
+        return Reason;
73
+    }
74
+
75
+    public void setReason(String Reason) {
76
+        this.Reason = Reason;
77
+    }
78
+
79
+    public String getDealNo() {
80
+        return DealNo;
81
+    }
82
+
83
+    public void setDealNo(String DealNo) {
84
+        this.DealNo = DealNo;
85
+    }
86
+
87
+    public String getPayStyle() {
88
+        return PayStyle;
89
+    }
90
+
91
+    public void setPayStyle(String PayStyle) {
92
+        this.PayStyle = PayStyle;
93
+    }
94
+
95
+    public String getCarNo() {
96
+        return CarNo;
97
+    }
98
+
99
+    public void setCarNo(String CarNo) {
100
+        this.CarNo = CarNo;
101
+    }
102
+
103
+    public String getParkingCode() {
104
+        return ParkingCode;
105
+    }
106
+
107
+    public void setParkingCode(String ParkingCode) {
108
+        this.ParkingCode = ParkingCode;
109
+    }
110
+
111
+    public String getCardNo() {
112
+        return CardNo;
113
+    }
114
+
115
+    public void setCardNo(String CardNo) {
116
+        this.CardNo = CardNo;
117
+    }
118
+
119
+    public String getPayCostMachineOrderId() {
120
+        return PayCostMachineOrderId;
121
+    }
122
+
123
+    public void setPayCostMachineOrderId(String PayCostMachineOrderId) {
124
+        this.PayCostMachineOrderId = PayCostMachineOrderId;
125
+    }
126
+
127
+    public List<CouponListBean> getCouponList() {
128
+        return CouponList;
129
+    }
130
+
131
+    public void setCouponList(List<CouponListBean> CouponList) {
132
+        this.CouponList = CouponList;
133
+    }
134
+
135
+    public static class CouponListBean {
136
+        /**
137
+         * CouponType : 2
138
+         * CouponValue : 0
139
+         * CouponCode : 2319e5e516dd42f49a0514796fd0bb43
140
+         * FavorableType : 2
141
+         * IsAuto : 2
142
+         * UseStatus : 1
143
+         */
144
+
145
+        private Integer CouponType;
146
+        private Integer CouponValue;
147
+        private String CouponCode;
148
+        private Integer FavorableType;
149
+        private Integer IsAuto;
150
+        private Integer UseStatus;
151
+
152
+        public Integer getCouponType() {
153
+            return CouponType;
154
+        }
155
+
156
+        public void setCouponType(Integer CouponType) {
157
+            this.CouponType = CouponType;
158
+        }
159
+
160
+        public Integer getCouponValue() {
161
+            return CouponValue;
162
+        }
163
+
164
+        public void setCouponValue(Integer CouponValue) {
165
+            this.CouponValue = CouponValue;
166
+        }
167
+
168
+        public String getCouponCode() {
169
+            return CouponCode;
170
+        }
171
+
172
+        public void setCouponCode(String CouponCode) {
173
+            this.CouponCode = CouponCode;
174
+        }
175
+
176
+        public Integer getFavorableType() {
177
+            return FavorableType;
178
+        }
179
+
180
+        public void setFavorableType(Integer FavorableType) {
181
+            this.FavorableType = FavorableType;
182
+        }
183
+
184
+        public Integer getIsAuto() {
185
+            return IsAuto;
186
+        }
187
+
188
+        public void setIsAuto(Integer IsAuto) {
189
+            this.IsAuto = IsAuto;
190
+        }
191
+
192
+        public Integer getUseStatus() {
193
+            return UseStatus;
194
+        }
195
+
196
+        public void setUseStatus(Integer UseStatus) {
197
+            this.UseStatus = UseStatus;
198
+        }
199
+    }
200
+}

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/feign/impl/FuShiServerImpl.java Visa fil

@@ -18,6 +18,11 @@ public class FuShiServerImpl implements IFuShiServer {
18 18
         return back();
19 19
     }
20 20
 
21
+    @Override
22
+    public String apiThirdPartyTemporaryCardPay(String parameter) {
23
+        return back();
24
+    }
25
+
21 26
     private String back() {
22 27
         log.error("hardware-server 远端服务请求失败!");
23 28
         ResponseBean responseBean = new ResponseBean();

+ 3
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/WxPayServiceImpl.java Visa fil

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
4 4
 import com.community.commom.constant.Constant;
5 5
 import com.community.commom.mode.ResponseBean;
6 6
 import com.community.commom.session.UserElement;
7
+import com.community.commom.uuid.IdGen;
7 8
 import com.community.huiju.common.perproties.PayNotifyPerproties;
8 9
 import com.community.huiju.common.wxpay.HfWxConfig;
9 10
 import com.community.huiju.common.wxpay.WXPay;
@@ -90,6 +91,7 @@ public class WxPayServiceImpl implements WxPayServiceI {
90 91
 	@Autowired
91 92
 	private ITaUserLicenseService iTaUserLicenseService;
92 93
 
94
+	private IdGen idGen = IdGen.get();
93 95
 
94 96
 	/**
95 97
 	 * 微信支付统一下单
@@ -492,6 +494,7 @@ public class WxPayServiceImpl implements WxPayServiceI {
492 494
 		apiThirdPartyMonthCardPay.setCarNo(taUserLicenseOrder.getLicensePlate());
493 495
 		apiThirdPartyMonthCardPay.setCardNo(null);
494 496
 		apiThirdPartyMonthCardPay.setRechargeAmt(String.valueOf(Double.valueOf(taUserLicenseOrder.getExtensionPrice()) / 100));
497
+		apiThirdPartyMonthCardPay.setDealNo(outTradeNo);
495 498
 
496 499
 		// 推送到车辆管理系统
497 500
 		iFuShiServer.apiThirdPartyMonthCardPay(JSONObject.toJSONString(apiThirdPartyMonthCardPay));

+ 4
- 0
CODE/smart-community/hardware-server/src/main/java/com/community/huiju/controller/CardController.java Visa fil

@@ -62,6 +62,7 @@ public class CardController {
62 62
     @ApiImplicitParams({
63 63
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "Phone手机号;RenewDayType续费日期类型( 3:年 2:月 1:日, 选入对应的数字);" +
64 64
                     "RenewDay续费日期数目;" +
65
+                    "DealNo交易编号;" +
65 66
                     "PayStyle交易方式(中文描述),例如:微信、 支付宝、 银联;" +
66 67
                     "CarNo车牌号;" +
67 68
                     "CardNo停车卡号;" +
@@ -73,6 +74,7 @@ public class CardController {
73 74
         responseBean = fsHardwareServiceI.apiThirdPartyMonthCardPay(jsonObject.getString("Phone"),
74 75
                 jsonObject.getString("RenewDayType"),
75 76
                 jsonObject.getString("RenewDay"),
77
+                jsonObject.getString("DealNo"),
76 78
                 jsonObject.getString("PayStyle"),
77 79
                 jsonObject.getString("CarNo"),
78 80
                 jsonObject.getString("CardNo"),
@@ -87,6 +89,7 @@ public class CardController {
87 89
                     "ActualAmount实缴金额(单位元);" +
88 90
                     "DeductionAmount抵扣金额(单位元);" +
89 91
                     "Reason抵扣原因;" +
92
+                    "DealNo交易编号;" +
90 93
                     "PayStyle交易方式(汉字描述),例如:微信、支付宝、银联;" +
91 94
                     "CarNo车牌号;" +
92 95
                     "CardNo停车卡号;" +
@@ -99,6 +102,7 @@ public class CardController {
99 102
                 jsonObject.getString("ActualAmount"),
100 103
                 jsonObject.getString("DeductionAmount"),
101 104
                 jsonObject.getString("Reason"),
105
+                jsonObject.getString("DealNo"),
102 106
                 jsonObject.getString("PayStyle"),
103 107
                 jsonObject.getString("CarNo"),
104 108
                 jsonObject.getString("CardNo"),

+ 4
- 2
CODE/smart-community/hardware-server/src/main/java/com/community/huiju/service/FSHardwareServiceI.java Visa fil

@@ -22,6 +22,7 @@ public interface FSHardwareServiceI {
22 22
      * @param Phone 车主手机号
23 23
      * @param RenewDayType 续费日期类型: 3:年; 2:月; 1:日;
24 24
      * @param RenewDay 续费日期数目
25
+     * @param DealNo 交易编号
25 26
      * @param PayStyle 交易方式(中文描述),例如:微信、 支付宝、 银联
26 27
      * @param CarNo 车牌号
27 28
      * @param CardNo 停车卡号
@@ -29,7 +30,7 @@ public interface FSHardwareServiceI {
29 30
      * @param ParkingCode 车管所编号
30 31
      * @return
31 32
      */
32
-    ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay, String PayStyle, String CarNo, String CardNo, String RechargeAmt, String ParkingCode);
33
+    ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay,String DealNo , String PayStyle, String CarNo, String CardNo, String RechargeAmt, String ParkingCode);
33 34
 
34 35
 
35 36
     /**
@@ -38,6 +39,7 @@ public interface FSHardwareServiceI {
38 39
      * @param ActualAmount 实缴金额(单位元)
39 40
      * @param DeductionAmount 抵扣金额(单位元)
40 41
      * @param Reason 抵扣原因
42
+     * @param DealNo 交易编号
41 43
      * @param PayStyle 交易方式(汉字描述),例如:微信、支付宝、银联
42 44
      * @param CarNo 车牌号
43 45
      * @param CardNo 停车卡号
@@ -55,7 +57,7 @@ public interface FSHardwareServiceI {
55 57
      * @param ParkingCode 车管所编号
56 58
      * @return
57 59
      */
58
-    ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo, String CouponList, String ParkingCode);
60
+    ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason,String DealNo, String PayStyle, String CarNo, String CardNo, String CouponList, String ParkingCode);
59 61
 
60 62
     /**
61 63
      * 获取线下算费结果

+ 6
- 6
CODE/smart-community/hardware-server/src/main/java/com/community/huiju/service/impl/FSHardwareServiceImpl.java Visa fil

@@ -62,15 +62,15 @@ public class FSHardwareServiceImpl implements FSHardwareServiceI {
62 62
 
63 63
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方月卡上发续费")
64 64
     @Override
65
-    public ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay, String PayStyle, String CarNo, String CardNo,String RechargeAmt, String ParkingCode) {
65
+    public ResponseBean apiThirdPartyMonthCardPay(String Phone, String RenewDayType, String RenewDay,String DealNo, String PayStyle, String CarNo, String CardNo,String RechargeAmt, String ParkingCode) {
66 66
         ResponseBean responseBean = new ResponseBean();
67 67
         DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd hh:mm:ss");
68 68
         // 交易编码
69
-        String dealNo = idGen.nextId() + "";
69
+        // String dealNo = idGen.nextId() + "";
70 70
         // 第三方交易日期
71 71
         String dateTime = dateTimeFormatter.format(LocalDateTime.now());
72 72
         // 富士云请求
73
-        String partyMonthCardPay = fuShiRequestAPI.apiThirdPartyMonthCardPay(RenewDayType, RenewDay, dealNo, PayStyle, CarNo, ParkingCode, CardNo, RechargeAmt, dateTime);
73
+        String partyMonthCardPay = fuShiRequestAPI.apiThirdPartyMonthCardPay(RenewDayType, RenewDay, DealNo, PayStyle, CarNo, ParkingCode, CardNo, RechargeAmt, dateTime);
74 74
         String tradeNo = JSONObject.parseObject(partyMonthCardPay).getString("TradeNo");
75 75
         Map<String, Object> map = Maps.newHashMap();
76 76
         map.put("TradeNo", tradeNo);
@@ -103,11 +103,11 @@ public class FSHardwareServiceImpl implements FSHardwareServiceI {
103 103
      */
104 104
     @LogAnnotation(value = LogEnums.DA_SU, alias = "第三方临时卡上发缴费")
105 105
     @Override
106
-    public ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason, String PayStyle, String CarNo, String CardNo, String CouponList, String ParkingCode) {
106
+    public ResponseBean apiThirdPartyTemporaryCardPay(String Amount, String ActualAmount, String DeductionAmount, String Reason,String DealNo, String PayStyle, String CarNo, String CardNo, String CouponList, String ParkingCode) {
107 107
         ResponseBean responseBean = new ResponseBean();
108 108
         // 交易编号
109
-        String dealNo = idGen.nextId() + "";
110
-        String apiThirdPartyTemporaryCardPay = fuShiRequestAPI.apiThirdPartyTemporaryCardPay(Amount, ActualAmount, DeductionAmount, Reason, dealNo, PayStyle, CarNo, ParkingCode, CardNo, "", CouponList);
109
+        // String dealNo = idGen.nextId() + "";
110
+        String apiThirdPartyTemporaryCardPay = fuShiRequestAPI.apiThirdPartyTemporaryCardPay(Amount, ActualAmount, DeductionAmount, Reason, DealNo, PayStyle, CarNo, ParkingCode, CardNo, "", CouponList);
111 111
         String tradeNo = JSONObject.parseObject(apiThirdPartyTemporaryCardPay).getString("TradeNo");
112 112
         Map<String, Object> map = Maps.newHashMap();
113 113
         map.put("TradeNo", tradeNo);

+ 1
- 1
CODE/smart-community/hardware-server/src/main/resources/bootstrap.yml Visa fil

@@ -1,5 +1,5 @@
1 1
 server:
2
-  port: 8088
2
+  port: 8087
3 3
 spring:
4 4
   application:
5 5
     name: hardware-server