正在显示
4 个修改的文件
包含
38 行增加
和
1 行删除
| @@ -138,6 +138,18 @@ public class PayOrderController { | @@ -138,6 +138,18 @@ public class PayOrderController { | ||
| 138 | } | 138 | } |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | + @ApiOperation(value = "处理失败订单充值信息") | ||
| 142 | + @PostMapping("/remoteTopUpWater") | ||
| 143 | + public ResultJson remoteTopUpWater(@RequestBody PayRecords payRecords) throws Exception { | ||
| 144 | + /** | ||
| 145 | + * 查询水表编号 | ||
| 146 | + */ | ||
| 147 | + Location location = locationMapper.waterId_eleId(payRecords.getPaylocationname()); | ||
| 148 | + ResultJson resultJson = waterMeterService.remoteTopUpWater(location.getWmid()); | ||
| 149 | + return resultJson; | ||
| 150 | + | ||
| 151 | + } | ||
| 152 | + | ||
| 141 | @ApiOperation(value = "水电剩余余额统计") | 153 | @ApiOperation(value = "水电剩余余额统计") |
| 142 | @GetMapping("/waterEleCount") | 154 | @GetMapping("/waterEleCount") |
| 143 | public ResultJson waterEleCount() throws Exception { | 155 | public ResultJson waterEleCount() throws Exception { |
| @@ -22,4 +22,5 @@ public interface WaterMeterService { | @@ -22,4 +22,5 @@ public interface WaterMeterService { | ||
| 22 | ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId, String payType) throws UnsupportedEncodingException; | 22 | ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId, String payType) throws UnsupportedEncodingException; |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | + ResultJson remoteTopUpWater(String wmid) throws Exception; | ||
| 25 | } | 26 | } |
| @@ -244,6 +244,30 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -244,6 +244,30 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
| 244 | return resultJson; | 244 | return resultJson; |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | + @Override | ||
| 248 | + public ResultJson remoteTopUpWater(String wmid) throws Exception { | ||
| 249 | + ResultJson resultJson = new ResultJson(); | ||
| 250 | + WaterMeterSacc waterMeterSacc = waterMeterSaccMapper.selectByPrimaryKey(wmid); | ||
| 251 | + Map<String, Object> datas = new HashMap<>(); | ||
| 252 | + datas.put("MtId", wmid); | ||
| 253 | + datas.put("Add_sacc", waterMeterSacc.getWmSacc()); | ||
| 254 | + datas.put("Add_addmode", "2"); | ||
| 255 | + String status = HttpsUtils.httpRequest(payUrl, datas); | ||
| 256 | + datas.put("status", status); | ||
| 257 | + Map hashMap = JSON.parseObject(datas.get("status").toString(), HashMap.class); | ||
| 258 | + /** | ||
| 259 | + * 外部充值水表成功 | ||
| 260 | + */ | ||
| 261 | + if ("0".equals(hashMap.get("state").toString())) { | ||
| 262 | + resultJson.setCode("200"); | ||
| 263 | + resultJson.setMsg("充值成功"); | ||
| 264 | + } else { | ||
| 265 | + resultJson.setCode("201"); | ||
| 266 | + resultJson.setMsg("充值失败"); | ||
| 267 | + } | ||
| 268 | + return resultJson; | ||
| 269 | + } | ||
| 270 | + | ||
| 247 | /** | 271 | /** |
| 248 | * 总水量 换算 | 272 | * 总水量 换算 |
| 249 | * | 273 | * |
| @@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
| 36 | from pay_records | 36 | from pay_records |
| 37 | where reamke1 = '0' | 37 | where reamke1 = '0' |
| 38 | <if test="orderNumber != '' and orderNumber != null"> | 38 | <if test="orderNumber != '' and orderNumber != null"> |
| 39 | - and orderNumber = #{orderNumber,jdbcType=VARCHAR} | 39 | + and payLocationName = #{orderNumber,jdbcType=VARCHAR} |
| 40 | </if> | 40 | </if> |
| 41 | <if test="startTime != '' and startTime != null"> | 41 | <if test="startTime != '' and startTime != null"> |
| 42 | and payTime > #{startTime,jdbcType=VARCHAR} | 42 | and payTime > #{startTime,jdbcType=VARCHAR} |
-
请 注册 或 登录 后发表评论