正在显示
3 个修改的文件
包含
12 行增加
和
5 行删除
@@ -133,13 +133,13 @@ public class LocationController { | @@ -133,13 +133,13 @@ public class LocationController { | ||
133 | // 查询旧表实施数据 | 133 | // 查询旧表实施数据 |
134 | WaterMeter realTime = waterMeterService.findRealTime(wmId); | 134 | WaterMeter realTime = waterMeterService.findRealTime(wmId); |
135 | // 计算旧表余量 新表累计充值量 = 旧表余量 | 135 | // 计算旧表余量 新表累计充值量 = 旧表余量 |
136 | - String newWmIdSacc = AllUtils.nubmerSubtraction(realTime.getWmSacc(), realTime.getWmLacc()); | ||
137 | - log.info("旧表余量:{}",newWmIdSacc); | ||
138 | - waterMeterSacc.setWmSacc(new BigDecimal(newWmIdSacc)); | 136 | +// String newWmIdSacc = AllUtils.nubmerSubtraction(realTime.getWmSacc(), realTime.getWmLacc()); |
137 | + log.info("旧表累计充值量:{}",realTime.getWmSacc()); | ||
138 | +// waterMeterSacc.setWmSacc(new BigDecimal(newWmIdSacc)); | ||
139 | // 充值新表水量 | 139 | // 充值新表水量 |
140 | Map<String, Object> datas = new HashMap<>(); | 140 | Map<String, Object> datas = new HashMap<>(); |
141 | datas.put("MtId", wmId); | 141 | datas.put("MtId", wmId); |
142 | - datas.put("Add_sacc", newWmIdSacc); | 142 | + datas.put("Add_sacc", realTime.getWmSacc()); |
143 | datas.put("Add_addmode", "2"); | 143 | datas.put("Add_addmode", "2"); |
144 | String status = HttpsUtils.httpRequest("http://123.56.159.203:8023/mtfmset/allWMadd", datas); | 144 | String status = HttpsUtils.httpRequest("http://123.56.159.203:8023/mtfmset/allWMadd", datas); |
145 | datas.put("status", status); | 145 | datas.put("status", status); |
@@ -13,6 +13,7 @@ import com.sunyo.energy.location.service.PayOrderService; | @@ -13,6 +13,7 @@ import com.sunyo.energy.location.service.PayOrderService; | ||
13 | import com.sunyo.energy.location.service.WaterMeterService; | 13 | import com.sunyo.energy.location.service.WaterMeterService; |
14 | import io.swagger.annotations.Api; | 14 | import io.swagger.annotations.Api; |
15 | import io.swagger.annotations.ApiOperation; | 15 | import io.swagger.annotations.ApiOperation; |
16 | +import lombok.extern.slf4j.Slf4j; | ||
16 | import org.springframework.beans.factory.annotation.Autowired; | 17 | import org.springframework.beans.factory.annotation.Autowired; |
17 | import org.springframework.web.bind.annotation.*; | 18 | import org.springframework.web.bind.annotation.*; |
18 | 19 | ||
@@ -24,6 +25,7 @@ import java.util.Map; | @@ -24,6 +25,7 @@ import java.util.Map; | ||
24 | * 订单查询,新增,更新,删除 | 25 | * 订单查询,新增,更新,删除 |
25 | */ | 26 | */ |
26 | @Api(description = "订单管理") | 27 | @Api(description = "订单管理") |
28 | +@Slf4j | ||
27 | @RestController | 29 | @RestController |
28 | @RequestMapping("/order") | 30 | @RequestMapping("/order") |
29 | public class PayOrderController { | 31 | public class PayOrderController { |
@@ -144,7 +146,9 @@ public class PayOrderController { | @@ -144,7 +146,9 @@ public class PayOrderController { | ||
144 | /** | 146 | /** |
145 | * 查询水表编号 | 147 | * 查询水表编号 |
146 | */ | 148 | */ |
149 | + log.info("进入处理方法"); | ||
147 | Location location = locationMapper.waterId_eleId(payRecords.getPaylocationname()); | 150 | Location location = locationMapper.waterId_eleId(payRecords.getPaylocationname()); |
151 | + log.info("查询水表编号:{}",location.getWmid()); | ||
148 | ResultJson resultJson = waterMeterService.remoteTopUpWater(location.getWmid()); | 152 | ResultJson resultJson = waterMeterService.remoteTopUpWater(location.getWmid()); |
149 | return resultJson; | 153 | return resultJson; |
150 | 154 |
@@ -15,6 +15,7 @@ import com.sunyo.energy.location.model.WaterMeterSacc; | @@ -15,6 +15,7 @@ import com.sunyo.energy.location.model.WaterMeterSacc; | ||
15 | import com.sunyo.energy.location.service.WaterMeterService; | 15 | import com.sunyo.energy.location.service.WaterMeterService; |
16 | import com.sunyo.energy.location.utils.AllUtils; | 16 | import com.sunyo.energy.location.utils.AllUtils; |
17 | import com.sunyo.energy.location.utils.HttpsUtils; | 17 | import com.sunyo.energy.location.utils.HttpsUtils; |
18 | +import lombok.extern.slf4j.Slf4j; | ||
18 | import org.springframework.beans.factory.annotation.Autowired; | 19 | import org.springframework.beans.factory.annotation.Autowired; |
19 | import org.springframework.beans.factory.annotation.Value; | 20 | import org.springframework.beans.factory.annotation.Value; |
20 | import org.springframework.scheduling.annotation.Scheduled; | 21 | import org.springframework.scheduling.annotation.Scheduled; |
@@ -24,7 +25,7 @@ import java.io.UnsupportedEncodingException; | @@ -24,7 +25,7 @@ import java.io.UnsupportedEncodingException; | ||
24 | import java.math.BigDecimal; | 25 | import java.math.BigDecimal; |
25 | import java.util.*; | 26 | import java.util.*; |
26 | 27 | ||
27 | - | 28 | +@Slf4j |
28 | @Service | 29 | @Service |
29 | public class WaterMeterServiceImp implements WaterMeterService { | 30 | public class WaterMeterServiceImp implements WaterMeterService { |
30 | 31 | ||
@@ -248,12 +249,14 @@ public class WaterMeterServiceImp implements WaterMeterService { | @@ -248,12 +249,14 @@ public class WaterMeterServiceImp implements WaterMeterService { | ||
248 | public ResultJson remoteTopUpWater(String wmid) throws Exception { | 249 | public ResultJson remoteTopUpWater(String wmid) throws Exception { |
249 | ResultJson resultJson = new ResultJson(); | 250 | ResultJson resultJson = new ResultJson(); |
250 | WaterMeterSacc waterMeterSacc = waterMeterSaccMapper.selectByPrimaryKey(wmid); | 251 | WaterMeterSacc waterMeterSacc = waterMeterSaccMapper.selectByPrimaryKey(wmid); |
252 | + log.info("水表编号累计充值量:{}",waterMeterSacc.getWmSacc(), wmid); | ||
251 | Map<String, Object> datas = new HashMap<>(); | 253 | Map<String, Object> datas = new HashMap<>(); |
252 | datas.put("MtId", wmid); | 254 | datas.put("MtId", wmid); |
253 | datas.put("Add_sacc", waterMeterSacc.getWmSacc()); | 255 | datas.put("Add_sacc", waterMeterSacc.getWmSacc()); |
254 | datas.put("Add_addmode", "2"); | 256 | datas.put("Add_addmode", "2"); |
255 | String status = HttpsUtils.httpRequest(payUrl, datas); | 257 | String status = HttpsUtils.httpRequest(payUrl, datas); |
256 | datas.put("status", status); | 258 | datas.put("status", status); |
259 | + log.info("远程调用水表充值接口:{}", datas.get("status").toString()); | ||
257 | Map hashMap = JSON.parseObject(datas.get("status").toString(), HashMap.class); | 260 | Map hashMap = JSON.parseObject(datas.get("status").toString(), HashMap.class); |
258 | /** | 261 | /** |
259 | * 外部充值水表成功 | 262 | * 外部充值水表成功 |
-
请 注册 或 登录 后发表评论