...
|
...
|
@@ -15,6 +15,7 @@ import com.sunyo.energy.location.model.WaterMeterSacc; |
|
|
import com.sunyo.energy.location.service.WaterMeterService;
|
|
|
import com.sunyo.energy.location.utils.AllUtils;
|
|
|
import com.sunyo.energy.location.utils.HttpsUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
...
|
...
|
@@ -24,7 +25,7 @@ import java.io.UnsupportedEncodingException; |
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
public class WaterMeterServiceImp implements WaterMeterService {
|
|
|
|
...
|
...
|
@@ -248,12 +249,14 @@ public class WaterMeterServiceImp implements WaterMeterService { |
|
|
public ResultJson remoteTopUpWater(String wmid) throws Exception {
|
|
|
ResultJson resultJson = new ResultJson();
|
|
|
WaterMeterSacc waterMeterSacc = waterMeterSaccMapper.selectByPrimaryKey(wmid);
|
|
|
log.info("水表编号累计充值量:{}",waterMeterSacc.getWmSacc(), 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);
|
|
|
log.info("远程调用水表充值接口:{}", datas.get("status").toString());
|
|
|
Map hashMap = JSON.parseObject(datas.get("status").toString(), HashMap.class);
|
|
|
/**
|
|
|
* 外部充值水表成功
|
...
|
...
|
|