作者 shenhailong

修改 订单列表查询条件 为房间号查询 添加用户充值后 不上水费的问题

... ... @@ -138,6 +138,18 @@ public class PayOrderController {
}
}
@ApiOperation(value = "处理失败订单充值信息")
@PostMapping("/remoteTopUpWater")
public ResultJson remoteTopUpWater(@RequestBody PayRecords payRecords) throws Exception {
/**
* 查询水表编号
*/
Location location = locationMapper.waterId_eleId(payRecords.getPaylocationname());
ResultJson resultJson = waterMeterService.remoteTopUpWater(location.getWmid());
return resultJson;
}
@ApiOperation(value = "水电剩余余额统计")
@GetMapping("/waterEleCount")
public ResultJson waterEleCount() throws Exception {
... ...
... ... @@ -22,4 +22,5 @@ public interface WaterMeterService {
ResultJson qrCode(String payFees, String wmId, String userId, String realName, String eeId, String payType) throws UnsupportedEncodingException;
ResultJson remoteTopUpWater(String wmid) throws Exception;
}
... ...
... ... @@ -244,6 +244,30 @@ public class WaterMeterServiceImp implements WaterMeterService {
return resultJson;
}
@Override
public ResultJson remoteTopUpWater(String wmid) throws Exception {
ResultJson resultJson = new ResultJson();
WaterMeterSacc waterMeterSacc = waterMeterSaccMapper.selectByPrimaryKey(wmid);
Map<String, Object> datas = new HashMap<>();
datas.put("MtId", wmid);
datas.put("Add_sacc", waterMeterSacc.getWmSacc());
datas.put("Add_addmode", "2");
String status = HttpsUtils.httpRequest(payUrl, datas);
datas.put("status", status);
Map hashMap = JSON.parseObject(datas.get("status").toString(), HashMap.class);
/**
* 外部充值水表成功
*/
if ("0".equals(hashMap.get("state").toString())) {
resultJson.setCode("200");
resultJson.setMsg("充值成功");
} else {
resultJson.setCode("201");
resultJson.setMsg("充值失败");
}
return resultJson;
}
/**
* 总水量 换算
*
... ...
... ... @@ -36,7 +36,7 @@
from pay_records
where reamke1 = '0'
<if test="orderNumber != '' and orderNumber != null">
and orderNumber = #{orderNumber,jdbcType=VARCHAR}
and payLocationName = #{orderNumber,jdbcType=VARCHAR}
</if>
<if test="startTime != '' and startTime != null">
and payTime &gt; #{startTime,jdbcType=VARCHAR}
... ...