mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 将起始soc修改为0x13获取到的第一条
This commit is contained in:
@@ -28,6 +28,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@@ -325,6 +326,18 @@ public class UploadRealTimeMonitorHandler extends AbstractYkcHandler {
|
|||||||
orderInfo.setChargeStartTime(new Date());
|
orderInfo.setChargeStartTime(new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String startSoc = orderInfo.getStartSoc();
|
||||||
|
// 获取上面存到redis中的soc
|
||||||
|
Map<String, String> socMap = YKCUtils.getSOCMap(transactionCode);
|
||||||
|
String min = socMap.get("min");
|
||||||
|
if (StringUtils.isNotBlank(startSoc) && StringUtils.isNotBlank(min)) {
|
||||||
|
if (Double.parseDouble(startSoc) < Double.parseDouble(min)) {
|
||||||
|
// 数据库中的起始soc < redis中的最小值, 更新数据库
|
||||||
|
orderInfo.setStartSoc(min);
|
||||||
|
updateFlag = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (updateFlag) {
|
if (updateFlag) {
|
||||||
orderBasicInfoService.updateOrderBasicInfo(orderInfo);
|
orderBasicInfoService.updateOrderBasicInfo(orderInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user