mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-23 16:49:49 +08:00
update 枪口充电记录
This commit is contained in:
@@ -11,13 +11,13 @@ import com.jsowell.pile.dto.QueryConnectorListDTO;
|
|||||||
import com.jsowell.pile.dto.QueryStationDTO;
|
import com.jsowell.pile.dto.QueryStationDTO;
|
||||||
import com.jsowell.pile.service.IPileConnectorInfoService;
|
import com.jsowell.pile.service.IPileConnectorInfoService;
|
||||||
import com.jsowell.pile.service.IPileStationInfoService;
|
import com.jsowell.pile.service.IPileStationInfoService;
|
||||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
|
||||||
import com.jsowell.pile.vo.uniapp.PersonalPileInfoVO;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电桩相关接口
|
* 充电桩相关接口
|
||||||
@@ -89,6 +89,27 @@ public class PileController extends BaseController {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据充电站id查询枪口列表
|
||||||
|
* @param request
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/selectStationConnectorList")
|
||||||
|
public RestApiResponse<?> selectStationConnectorList(HttpServletRequest request, @RequestBody QueryConnectorListDTO dto) {
|
||||||
|
logger.info("查询充电枪口列表 params:{}", JSONObject.toJSONString(dto));
|
||||||
|
RestApiResponse<?> response = null;
|
||||||
|
try {
|
||||||
|
PageResponse pageResponse = pileConnectorInfoService.selectStationConnectorList(dto);
|
||||||
|
response = new RestApiResponse<>(pageResponse);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("查询充电枪口列表异常", e);
|
||||||
|
response = new RestApiResponse<>(ReturnCodeEnum.CODE_GET_CONNECTOR_INFO_BY_STATION_ID_ERROR);
|
||||||
|
}
|
||||||
|
logger.info("查询充电枪口列表 result:{}", response);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,4 +132,6 @@ public interface IPileConnectorInfoService {
|
|||||||
List<ConnectorInfoVO> getConnectorListForLianLian(Long stationId);
|
List<ConnectorInfoVO> getConnectorListForLianLian(Long stationId);
|
||||||
|
|
||||||
List<ConnectorInfoVO> selectConnectorInfoList(String pileSn);
|
List<ConnectorInfoVO> selectConnectorInfoList(String pileSn);
|
||||||
|
|
||||||
|
PageResponse selectStationConnectorList(QueryConnectorListDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -423,6 +423,12 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService {
|
|||||||
return connectorInfoList;
|
return connectorInfoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse selectStationConnectorList(QueryConnectorListDTO dto) {
|
||||||
|
PageResponse response = getUniAppConnectorInfoListByParams(dto);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询充电枪口的实时数据
|
* 查询充电枪口的实时数据
|
||||||
*/
|
*/
|
||||||
@@ -448,7 +454,8 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService {
|
|||||||
pileConnectorInfoVO.setChargingDegree(new BigDecimal(realTimeMonitorData.getChargingDegree()));
|
pileConnectorInfoVO.setChargingDegree(new BigDecimal(realTimeMonitorData.getChargingDegree()));
|
||||||
pileConnectorInfoVO.setGunLineTemperature(realTimeMonitorData.getGunLineTemperature()); // 枪线温度
|
pileConnectorInfoVO.setGunLineTemperature(realTimeMonitorData.getGunLineTemperature()); // 枪线温度
|
||||||
pileConnectorInfoVO.setTimeRemaining(realTimeMonitorData.getTimeRemaining());
|
pileConnectorInfoVO.setTimeRemaining(realTimeMonitorData.getTimeRemaining());
|
||||||
pileConnectorInfoVO.setChargingTime(realTimeMonitorData.getSumChargingTime());
|
pileConnectorInfoVO.setChargingTime(realTimeMonitorData.getSumChargingTime()); // 已充时长
|
||||||
|
pileConnectorInfoVO.setTimeRemaining(realTimeMonitorData.getTimeRemaining()); // 剩余时间
|
||||||
// 计算实时功率(单位:kw)
|
// 计算实时功率(单位:kw)
|
||||||
BigDecimal instantPowerTemp = outputVoltage.multiply(outputCurrent);
|
BigDecimal instantPowerTemp = outputVoltage.multiply(outputCurrent);
|
||||||
BigDecimal instantPower = instantPowerTemp.divide(new BigDecimal(1000));
|
BigDecimal instantPower = instantPowerTemp.divide(new BigDecimal(1000));
|
||||||
|
|||||||
@@ -102,6 +102,11 @@ public class PileConnectorInfoVO {
|
|||||||
*/
|
*/
|
||||||
private String chargingTime;
|
private String chargingTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 剩余时间
|
||||||
|
*/
|
||||||
|
private String timeRemaining;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压
|
* 电压
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user