中电联协议 新增站点图片、枪口功率不再除以枪口数量

This commit is contained in:
Lemon
2024-01-20 15:58:38 +08:00
parent 6c33ad6760
commit 86d6cddf9c

View File

@@ -239,6 +239,10 @@ public class ZDLServiceImpl implements ZDLService {
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
info.setEquipmentOwnerId(equipmentOwnerId);
}
// 站点图片
if (StringUtils.isNotBlank(pileStationInfo.getPictures())) {
info.setPictures(Lists.newArrayList(pileStationInfo.getPictures().split(",")));
}
List<ZDLEquipmentInfo> pileList = getPileList(pileStationInfo);
if (CollectionUtils.isNotEmpty(pileList)) {
@@ -642,14 +646,14 @@ public class ZDLServiceImpl implements ZDLService {
connectorInfo.setVoltageLowerLimits(Integer.valueOf(modelInfo.getRatedVoltage()));
connectorInfo.setCurrent(Integer.valueOf(modelInfo.getRatedCurrent()));
connectorInfo.setNationalStandard(2);
if (!StringUtils.equals(modelInfo.getConnectorNum(), "1")) {
// 如果不是单枪,则枪口功率需要除以枪口数量
String ratedPowerStr = modelInfo.getRatedPower();
BigDecimal ratedPower = new BigDecimal(ratedPowerStr);
connectorInfo.setPower(ratedPower.divide(new BigDecimal(modelInfo.getConnectorNum()), 1, BigDecimal.ROUND_HALF_UP));
}else {
connectorInfo.setPower(new BigDecimal(modelInfo.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
}
// if (!StringUtils.equals(modelInfo.getConnectorNum(), "1")) {
// // 如果不是单枪,则枪口功率需要除以枪口数量
// String ratedPowerStr = modelInfo.getRatedPower();
// BigDecimal ratedPower = new BigDecimal(ratedPowerStr);
// connectorInfo.setPower(ratedPower.divide(new BigDecimal(modelInfo.getConnectorNum()), 1, BigDecimal.ROUND_HALF_UP));
// }else {
// }
connectorInfo.setPower(new BigDecimal(modelInfo.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP));
resultList.add(connectorInfo);
}