update 统计查询范围

This commit is contained in:
YAS\29473
2025-08-13 16:36:53 +08:00
parent cc23872407
commit f46c7c0292
4 changed files with 17 additions and 8 deletions

View File

@@ -230,6 +230,7 @@ public class ThirdPartyBaseController extends BaseController {
}
// 计算sign
String sign = GBSignUtils.sign(map, signSecret);
logger.info("sign:{}, dto.getSig():{}", sign, dto.getSig());
return StringUtils.equals(dto.getSig(), sign);
}

View File

@@ -1208,4 +1208,12 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
return endLocalDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
}
public static String getEndTime(String dateStr) {
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse(dateStr, inputFormatter);
LocalDateTime endTime = date.atTime(23, 59, 59);
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
return endTime.format(outputFormatter);
}
}

View File

@@ -1116,7 +1116,8 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
//时间格式化
startTime = DateUtils.convertDateToDateTime(startTime);
endTime = DateUtils.convertDateToDateTime(endTime);
endTime = DateUtils.getEndTime(endTime);
List<SupStationStatsVO> orderBasicInfos;
try {
@@ -1267,14 +1268,13 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
SupStationStatsInfo supStationStatsInfo = SupStationStatsInfo.builder()
.stationId(stationId)
.startTime(startChargeTime)
.endTime(endChargeTime)
.startTime(dto.getStartTime())
.endTime(dto.getEndTime())
.stationElectricity(stationTotalElectricity.setScale(2, BigDecimal.ROUND_HALF_UP))
.stationTotalChargeNum(orderBasicInfos.size())
.stationTotalChargeTime(stationTotalChargeTime)
.stationTotalWarningNum(0)
.equipmentStatsInfos(equipmentStatsInfoList)
.supEquipmentStatsInfos(equipmentStatsInfoList)
.build();
Map<String, Object> map = new LinkedHashMap<>();
@@ -1446,8 +1446,8 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
SupStationStatsInfo supStationStatsInfo = SupStationStatsInfo.builder()
.stationId(stationId)
.startTime(startChargeTime)
.endTime(endChargeTime)
.startTime(DateUtils.convertDateTimeToDate(startChargeTime))
.endTime(DateUtils.convertDateTimeToDate(endChargeTime))
.stationElectricity(stationTotalElectricity.setScale(2, BigDecimal.ROUND_HALF_UP))
.stationTotalChargeNum(orderBasicInfos.size())
.stationTotalChargeTime(stationTotalChargeTime)
@@ -1684,7 +1684,7 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
equipmentStatsInfo.setEquipmentTotalChargeNum(connectorList.size()); // 改为每个桩的订单数
equipmentStatsInfo.setEquipmentTotalWarningNum(0);
equipmentStatsInfo.setConnectorStatsInfos(connectorList);
equipmentStatsInfo.setSupconnectorStatsInfos(connectorList);
// equipmentStatsInfo.setSupconnectorStatsInfos(connectorList);
resultList.add(equipmentStatsInfo);
log.debug("添加桩统计信息: 桩编号={}, 电量={}, 充电时长={}, 枪数量={}",

View File

@@ -17,7 +17,7 @@ import java.util.List;
public class StationStatusInfoVO implements Serializable {
private static final long serialVersionUID = 1L;
@JSONField(name = "StationId")
@JSONField(name = "StationID")
private String stationId;
@JSONField(name = "ConnectorStatusInfos")