This commit is contained in:
Lemon
2024-07-03 14:09:54 +08:00
parent 567fb85640
commit 7198ddd975
3 changed files with 53 additions and 15 deletions

View File

@@ -3721,9 +3721,11 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
public List<SupStationStatsVO> queryOrderListByStationId(String stationId) {
List<SupStationStatsVO> orderVOS = orderBasicInfoMapper.queryOrderListByStationId(stationId);
for (SupStationStatsVO orderVO : orderVOS) {
// 计算每笔订单充电时长(分钟)
long intervalTime = DateUtils.intervalTime(orderVO.getStartTime(), orderVO.getEndTime());
orderVO.setChargingTime(Integer.parseInt(String.valueOf(intervalTime)));
if (StringUtils.isNotBlank(orderVO.getStartTime()) && StringUtils.isNotBlank(orderVO.getEndTime())) {
// 计算每笔订单充电时长(分钟)
long intervalTime = DateUtils.intervalTime(orderVO.getStartTime(), orderVO.getEndTime());
orderVO.setChargingTime(Integer.parseInt(String.valueOf(intervalTime)));
}
}
return orderVOS;
}