正在显示
4 个修改的文件
包含
53 行增加
和
5 行删除
1 | package com.sunyo.energy.location.controller; | 1 | package com.sunyo.energy.location.controller; |
2 | 2 | ||
3 | import com.alibaba.fastjson.JSONObject; | 3 | import com.alibaba.fastjson.JSONObject; |
4 | -import com.google.gson.internal.$Gson$Preconditions; | ||
5 | import com.sunyo.energy.location.controller.response.ResultJson; | 4 | import com.sunyo.energy.location.controller.response.ResultJson; |
6 | import com.sunyo.energy.location.dao.PayRecordsMapper; | 5 | import com.sunyo.energy.location.dao.PayRecordsMapper; |
7 | import com.sunyo.energy.location.dao.PayResponseMapper; | 6 | import com.sunyo.energy.location.dao.PayResponseMapper; |
@@ -9,7 +8,6 @@ import com.sunyo.energy.location.model.PayRecords; | @@ -9,7 +8,6 @@ import com.sunyo.energy.location.model.PayRecords; | ||
9 | import com.sunyo.energy.location.model.PayResponse; | 8 | import com.sunyo.energy.location.model.PayResponse; |
10 | import com.sunyo.energy.location.service.ElectricityMeterService; | 9 | import com.sunyo.energy.location.service.ElectricityMeterService; |
11 | import com.sunyo.energy.location.service.WaterMeterService; | 10 | import com.sunyo.energy.location.service.WaterMeterService; |
12 | -import com.sunyo.energy.location.utils.HttpsUtils; | ||
13 | import com.sunyo.energy.location.websocket.WebSocketServer; | 11 | import com.sunyo.energy.location.websocket.WebSocketServer; |
14 | import io.swagger.annotations.ApiOperation; | 12 | import io.swagger.annotations.ApiOperation; |
15 | import lombok.extern.slf4j.Slf4j; | 13 | import lombok.extern.slf4j.Slf4j; |
@@ -22,8 +20,6 @@ import org.springframework.web.bind.annotation.ResponseBody; | @@ -22,8 +20,6 @@ import org.springframework.web.bind.annotation.ResponseBody; | ||
22 | import java.io.IOException; | 20 | import java.io.IOException; |
23 | import java.math.BigDecimal; | 21 | import java.math.BigDecimal; |
24 | import java.util.Date; | 22 | import java.util.Date; |
25 | -import java.util.HashMap; | ||
26 | -import java.util.Map; | ||
27 | import java.util.UUID; | 23 | import java.util.UUID; |
28 | 24 | ||
29 | 25 |
@@ -167,4 +167,26 @@ public class PayRecords { | @@ -167,4 +167,26 @@ public class PayRecords { | ||
167 | public void setPaytypeaddress(String paytypeaddress) { | 167 | public void setPaytypeaddress(String paytypeaddress) { |
168 | this.paytypeaddress = paytypeaddress == null ? null : paytypeaddress.trim(); | 168 | this.paytypeaddress = paytypeaddress == null ? null : paytypeaddress.trim(); |
169 | } | 169 | } |
170 | + | ||
171 | + @Override | ||
172 | + public String toString() { | ||
173 | + return "PayRecords{" + | ||
174 | + "id=" + id + | ||
175 | + ", payfees=" + payfees + | ||
176 | + ", payuserid=" + payuserid + | ||
177 | + ", paytime=" + paytime + | ||
178 | + ", paylocationid=" + paylocationid + | ||
179 | + ", paystatus=" + paystatus + | ||
180 | + ", paytype=" + paytype + | ||
181 | + ", payfesstype=" + payfesstype + | ||
182 | + ", ordernumber='" + ordernumber + '\'' + | ||
183 | + ", reamke1='" + reamke1 + '\'' + | ||
184 | + ", reamke2='" + reamke2 + '\'' + | ||
185 | + ", reamke3='" + reamke3 + '\'' + | ||
186 | + ", reamke4='" + reamke4 + '\'' + | ||
187 | + ", payusername='" + payusername + '\'' + | ||
188 | + ", paylocationname='" + paylocationname + '\'' + | ||
189 | + ", paytypeaddress='" + paytypeaddress + '\'' + | ||
190 | + '}'; | ||
191 | + } | ||
170 | } | 192 | } |
@@ -183,4 +183,28 @@ public class PayResponse { | @@ -183,4 +183,28 @@ public class PayResponse { | ||
183 | public void setSign(String sign) { | 183 | public void setSign(String sign) { |
184 | this.sign = sign == null ? null : sign.trim(); | 184 | this.sign = sign == null ? null : sign.trim(); |
185 | } | 185 | } |
186 | + | ||
187 | + @Override | ||
188 | + public String toString() { | ||
189 | + return "PayResponse{" + | ||
190 | + "id='" + id + '\'' + | ||
191 | + ", posid='" + posid + '\'' + | ||
192 | + ", branchid='" + branchid + '\'' + | ||
193 | + ", orderid='" + orderid + '\'' + | ||
194 | + ", payment=" + payment + | ||
195 | + ", curcode='" + curcode + '\'' + | ||
196 | + ", remark1='" + remark1 + '\'' + | ||
197 | + ", remark2='" + remark2 + '\'' + | ||
198 | + ", accType='" + accType + '\'' + | ||
199 | + ", success='" + success + '\'' + | ||
200 | + ", type='" + type + '\'' + | ||
201 | + ", referer='" + referer + '\'' + | ||
202 | + ", clientip='" + clientip + '\'' + | ||
203 | + ", accdate=" + accdate + | ||
204 | + ", usrmsg='" + usrmsg + '\'' + | ||
205 | + ", usrinfo='" + usrinfo + '\'' + | ||
206 | + ", paytype='" + paytype + '\'' + | ||
207 | + ", sign='" + sign + '\'' + | ||
208 | + '}'; | ||
209 | + } | ||
186 | } | 210 | } |
@@ -88,6 +88,8 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -88,6 +88,8 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
88 | // 得到请求接口 返回值 和总水量 | 88 | // 得到请求接口 返回值 和总水量 |
89 | Map<String, Object> map = allWater(payFees, wmId); | 89 | Map<String, Object> map = allWater(payFees, wmId); |
90 | Map hashMap = JSON.parseObject(map.get("status").toString(), HashMap.class); | 90 | Map hashMap = JSON.parseObject(map.get("status").toString(), HashMap.class); |
91 | + log.info("远程水表充值编号:{}", wmId); | ||
92 | + log.info("远程水表充值反馈成功:{}",hashMap); | ||
91 | /** | 93 | /** |
92 | * 外部充值水表成功 | 94 | * 外部充值水表成功 |
93 | */ | 95 | */ |
@@ -101,7 +103,6 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -101,7 +103,6 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
101 | int i = waterMeterSaccMapper.updateByPrimaryKeySelective(waterMeterSacc); | 103 | int i = waterMeterSaccMapper.updateByPrimaryKeySelective(waterMeterSacc); |
102 | if (i > 0){ | 104 | if (i > 0){ |
103 | resultJson.setCode("200"); | 105 | resultJson.setCode("200"); |
104 | - | ||
105 | WaterMeter realTime = findRealTime(wmId); | 106 | WaterMeter realTime = findRealTime(wmId); |
106 | String add_sacc = AllUtils.nubmerSubtraction(map.get("Add_sacc").toString(), realTime.getWmLacc()); | 107 | String add_sacc = AllUtils.nubmerSubtraction(map.get("Add_sacc").toString(), realTime.getWmLacc()); |
107 | boolean eleMoney = AllUtils.eleMoney(new BigDecimal(add_sacc), "3"); | 108 | boolean eleMoney = AllUtils.eleMoney(new BigDecimal(add_sacc), "3"); |
@@ -151,6 +152,11 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -151,6 +152,11 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
151 | datas.put("Add_sacc", allSacc); | 152 | datas.put("Add_sacc", allSacc); |
152 | datas.put("Add_addmode", "2"); | 153 | datas.put("Add_addmode", "2"); |
153 | String status = HttpsUtils.httpRequest(payUrl, datas); | 154 | String status = HttpsUtils.httpRequest(payUrl, datas); |
155 | + log.info("充值1次:{}", status); | ||
156 | + String s1 = HttpsUtils.httpRequest(payUrl, datas); | ||
157 | + log.info("充值2次:{}", s1); | ||
158 | + String s2 = HttpsUtils.httpRequest(payUrl, datas); | ||
159 | + log.info("充值3次:{}", s2); | ||
154 | 160 | ||
155 | datas.put("allSacc", allSacc); | 161 | datas.put("allSacc", allSacc); |
156 | datas.put("status", status); | 162 | datas.put("status", status); |
-
请 注册 或 登录 后发表评论