作者 shenhailong

删除没有的包 添加日志信息 添加实体 toString方法

package com.sunyo.energy.location.controller;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.internal.$Gson$Preconditions;
import com.sunyo.energy.location.controller.response.ResultJson;
import com.sunyo.energy.location.dao.PayRecordsMapper;
import com.sunyo.energy.location.dao.PayResponseMapper;
... ... @@ -9,7 +8,6 @@ import com.sunyo.energy.location.model.PayRecords;
import com.sunyo.energy.location.model.PayResponse;
import com.sunyo.energy.location.service.ElectricityMeterService;
import com.sunyo.energy.location.service.WaterMeterService;
import com.sunyo.energy.location.utils.HttpsUtils;
import com.sunyo.energy.location.websocket.WebSocketServer;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
... ... @@ -22,8 +20,6 @@ import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
... ...
... ... @@ -167,4 +167,26 @@ public class PayRecords {
public void setPaytypeaddress(String paytypeaddress) {
this.paytypeaddress = paytypeaddress == null ? null : paytypeaddress.trim();
}
@Override
public String toString() {
return "PayRecords{" +
"id=" + id +
", payfees=" + payfees +
", payuserid=" + payuserid +
", paytime=" + paytime +
", paylocationid=" + paylocationid +
", paystatus=" + paystatus +
", paytype=" + paytype +
", payfesstype=" + payfesstype +
", ordernumber='" + ordernumber + '\'' +
", reamke1='" + reamke1 + '\'' +
", reamke2='" + reamke2 + '\'' +
", reamke3='" + reamke3 + '\'' +
", reamke4='" + reamke4 + '\'' +
", payusername='" + payusername + '\'' +
", paylocationname='" + paylocationname + '\'' +
", paytypeaddress='" + paytypeaddress + '\'' +
'}';
}
}
\ No newline at end of file
... ...
... ... @@ -183,4 +183,28 @@ public class PayResponse {
public void setSign(String sign) {
this.sign = sign == null ? null : sign.trim();
}
@Override
public String toString() {
return "PayResponse{" +
"id='" + id + '\'' +
", posid='" + posid + '\'' +
", branchid='" + branchid + '\'' +
", orderid='" + orderid + '\'' +
", payment=" + payment +
", curcode='" + curcode + '\'' +
", remark1='" + remark1 + '\'' +
", remark2='" + remark2 + '\'' +
", accType='" + accType + '\'' +
", success='" + success + '\'' +
", type='" + type + '\'' +
", referer='" + referer + '\'' +
", clientip='" + clientip + '\'' +
", accdate=" + accdate +
", usrmsg='" + usrmsg + '\'' +
", usrinfo='" + usrinfo + '\'' +
", paytype='" + paytype + '\'' +
", sign='" + sign + '\'' +
'}';
}
}
\ No newline at end of file
... ...
... ... @@ -88,6 +88,8 @@ public class WaterMeterServiceImp implements WaterMeterService {
// 得到请求接口 返回值 和总水量
Map<String, Object> map = allWater(payFees, wmId);
Map hashMap = JSON.parseObject(map.get("status").toString(), HashMap.class);
log.info("远程水表充值编号:{}", wmId);
log.info("远程水表充值反馈成功:{}",hashMap);
/**
* 外部充值水表成功
*/
... ... @@ -101,7 +103,6 @@ public class WaterMeterServiceImp implements WaterMeterService {
int i = waterMeterSaccMapper.updateByPrimaryKeySelective(waterMeterSacc);
if (i > 0){
resultJson.setCode("200");
WaterMeter realTime = findRealTime(wmId);
String add_sacc = AllUtils.nubmerSubtraction(map.get("Add_sacc").toString(), realTime.getWmLacc());
boolean eleMoney = AllUtils.eleMoney(new BigDecimal(add_sacc), "3");
... ... @@ -151,6 +152,11 @@ public class WaterMeterServiceImp implements WaterMeterService {
datas.put("Add_sacc", allSacc);
datas.put("Add_addmode", "2");
String status = HttpsUtils.httpRequest(payUrl, datas);
log.info("充值1次:{}", status);
String s1 = HttpsUtils.httpRequest(payUrl, datas);
log.info("充值2次:{}", s1);
String s2 = HttpsUtils.httpRequest(payUrl, datas);
log.info("充值3次:{}", s2);
datas.put("allSacc", allSacc);
datas.put("status", status);
... ...