修改启动充电上传停止soc

This commit is contained in:
yuyang 2021-10-29 11:33:37 +08:00
parent 38174984b1
commit 31aa3ab72e

View File

@ -177,15 +177,24 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
//平台
String soc = redisService.getCacheObject("global:SOC");
if(!"".equals(soc) && soc!=null){
if(Integer.parseInt(soc)-number<0){
if(number!=0){
if(Integer.parseInt(soc)-number<0){
number=Integer.parseInt(soc);
}
}else{
number=Integer.parseInt(soc);
}
}
Map<String, Object> operatorMessage = xhpcChargeOrderMapper.getOperatorMessage(xhpcTerminal.getChargingStationId());
if(operatorMessage !=null && operatorMessage.get("soc") !=null && !"".equals(operatorMessage.get("soc"))){
if(Integer.parseInt(operatorMessage.get("soc").toString())-number<0){
if(number!=0){
if(Integer.parseInt(operatorMessage.get("soc").toString())-number<0){
number=Integer.parseInt(operatorMessage.get("soc").toString());
}
}else{
number=Integer.parseInt(operatorMessage.get("soc").toString());
}
}
if(number !=0){
startChargingData.setSoc(number);