...
|
...
|
@@ -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;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 总水量 换算
|
|
|
*
|
...
|
...
|
|