mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-13 14:30:08 +08:00
update 青海平台推送站点功率接口
This commit is contained in:
@@ -36,10 +36,10 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: jsowell_dev
|
# username: jsowell_dev
|
||||||
#url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
#username: jsowell_prd_copy
|
username: jsowell_prd_copy
|
||||||
password: 123456
|
password: 123456
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
|
|||||||
@@ -408,8 +408,15 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
public String notificationPowerInfo(List<String> stationIds) {
|
public String notificationPowerInfo(List<String> stationIds) {
|
||||||
SupStationPowerInfo supStationPowerInfo = null;
|
SupStationPowerInfo supStationPowerInfo = null;
|
||||||
List<SupStationPowerInfo> list = new ArrayList<>();
|
List<SupStationPowerInfo> list = new ArrayList<>();
|
||||||
|
|
||||||
|
List<SupStationPowerInfo
|
||||||
|
.EquipmentPowerInfo> supPileInfoList = null;
|
||||||
SupStationPowerInfo
|
SupStationPowerInfo
|
||||||
.EquipmentPowerInfo supPileInfo = null;
|
.EquipmentPowerInfo supPileInfo = null;
|
||||||
|
|
||||||
|
List<SupStationPowerInfo
|
||||||
|
.EquipmentPowerInfo
|
||||||
|
.ConnectorPowerInfo> connectorPowerInfoList = null;
|
||||||
SupStationPowerInfo
|
SupStationPowerInfo
|
||||||
.EquipmentPowerInfo
|
.EquipmentPowerInfo
|
||||||
.ConnectorPowerInfo connectorPowerInfo = null;
|
.ConnectorPowerInfo connectorPowerInfo = null;
|
||||||
@@ -447,6 +454,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
logger.error("推送充换电站实时功率 error, 查询枪口列表信息为空");
|
logger.error("推送充换电站实时功率 error, 查询枪口列表信息为空");
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_SELECT_INFO_IS_NULL);
|
throw new BusinessException(ReturnCodeEnum.CODE_SELECT_INFO_IS_NULL);
|
||||||
}
|
}
|
||||||
|
supPileInfoList = new ArrayList<>();
|
||||||
String dateTimeNow = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
String dateTimeNow = DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||||
for (PileBasicInfo pileBasicInfo : pileList) {
|
for (PileBasicInfo pileBasicInfo : pileList) {
|
||||||
supPileInfo = new SupStationPowerInfo.EquipmentPowerInfo();
|
supPileInfo = new SupStationPowerInfo.EquipmentPowerInfo();
|
||||||
@@ -454,28 +462,36 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
supPileInfo.setEquipmentClassification(Constants.one);
|
supPileInfo.setEquipmentClassification(Constants.one);
|
||||||
supPileInfo.setDataTime(dateTimeNow);
|
supPileInfo.setDataTime(dateTimeNow);
|
||||||
BigDecimal pileInstantPower = BigDecimal.ZERO;
|
BigDecimal pileInstantPower = BigDecimal.ZERO;
|
||||||
|
connectorPowerInfoList = new ArrayList<>();
|
||||||
for (PileConnectorInfoVO pileConnectorInfoVO : connectorList) {
|
for (PileConnectorInfoVO pileConnectorInfoVO : connectorList) {
|
||||||
if (StringUtils.equals(pileBasicInfo.getSn(), pileConnectorInfoVO.getPileSn())) {
|
if (!StringUtils.equals(pileBasicInfo.getSn(), pileConnectorInfoVO.getPileSn())) {
|
||||||
connectorPowerInfo = new SupStationPowerInfo
|
continue;
|
||||||
.EquipmentPowerInfo
|
|
||||||
.ConnectorPowerInfo();
|
|
||||||
connectorPowerInfo.setConnectorID(pileConnectorInfoVO.getPileConnectorCode());
|
|
||||||
connectorPowerInfo.setEquipmentClassification(Constants.one);
|
|
||||||
connectorPowerInfo.setDataTime(dateTimeNow);
|
|
||||||
BigDecimal InstantPower = pileConnectorInfoVO.getInstantPower().setScale(1, BigDecimal.ROUND_HALF_UP);
|
|
||||||
connectorPowerInfo.setConnectorRealTimePower(InstantPower);
|
|
||||||
// 计算桩此时实时功率
|
|
||||||
pileInstantPower = pileInstantPower.add(InstantPower);
|
|
||||||
}
|
}
|
||||||
|
BigDecimal instantPower = pileConnectorInfoVO.getInstantPower() == null ? BigDecimal.ZERO : pileConnectorInfoVO.getInstantPower();
|
||||||
|
connectorPowerInfo = new SupStationPowerInfo
|
||||||
|
.EquipmentPowerInfo
|
||||||
|
.ConnectorPowerInfo();
|
||||||
|
connectorPowerInfo.setConnectorID(pileConnectorInfoVO.getPileConnectorCode());
|
||||||
|
connectorPowerInfo.setEquipmentClassification(Constants.one);
|
||||||
|
connectorPowerInfo.setDataTime(dateTimeNow);
|
||||||
|
BigDecimal InstantPower = instantPower.setScale(1, BigDecimal.ROUND_HALF_UP);
|
||||||
|
connectorPowerInfo.setConnectorRealTimePower(InstantPower);
|
||||||
|
// 计算桩此时实时功率
|
||||||
|
pileInstantPower = pileInstantPower.add(InstantPower);
|
||||||
|
|
||||||
|
connectorPowerInfoList.add(connectorPowerInfo);
|
||||||
}
|
}
|
||||||
|
supPileInfo.setConnectorPowerInfos(connectorPowerInfoList);
|
||||||
// 桩实时功率
|
// 桩实时功率
|
||||||
supPileInfo.setEquipRealTimePower(pileInstantPower);
|
supPileInfo.setEquipRealTimePower(pileInstantPower);
|
||||||
stationPower = stationPower.add(pileInstantPower);
|
stationPower = stationPower.add(pileInstantPower);
|
||||||
|
|
||||||
|
supPileInfoList.add(supPileInfo);
|
||||||
}
|
}
|
||||||
|
supStationPowerInfo.setEquipmentPowerInfos(supPileInfoList);
|
||||||
supStationPowerInfo.setStationRealTimePower(stationPower);
|
supStationPowerInfo.setStationRealTimePower(stationPower);
|
||||||
list.add(supStationPowerInfo);
|
|
||||||
}
|
}
|
||||||
|
list.add(supStationPowerInfo);
|
||||||
|
|
||||||
// 获取推送配置密钥信息
|
// 获取推送配置密钥信息
|
||||||
ThirdPartyStationRelationVO settingInfo = getQingHaiSettingInfo();
|
ThirdPartyStationRelationVO settingInfo = getQingHaiSettingInfo();
|
||||||
|
|||||||
Reference in New Issue
Block a user