This commit is contained in:
Lemon
2023-10-27 16:50:23 +08:00
parent 3234590200
commit d49f661eab

View File

@@ -1954,17 +1954,19 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
orderCodeList.addAll(Lists.newArrayList(StringUtils.split(indexOrderInfoVO.getOrderCodes(), ",")));
}
// 查询对应数据
IndexOrderInfoVO detailInfo = orderBasicInfoMapper.getIndexOrderDetail(orderCodeList);
vo.setTotalOrderAmount(totalOrderAmount.toString());
vo.setTotalElectricity(totalElectricity.toString());
vo.setTotalPeakUsedElectricity(detailInfo.getTotalPeakUsedElectricity());
vo.setTotalFlatUsedElectricity(detailInfo.getTotalFlatUsedElectricity());
vo.setTotalSharpUsedElectricity(detailInfo.getTotalSharpUsedElectricity());
vo.setTotalValleyUsedElectricity(detailInfo.getTotalValleyUsedElectricity());
resultList.add(vo);
if (CollectionUtils.isNotEmpty(orderCodeList)) {
// 查询对应数据
IndexOrderInfoVO detailInfo = orderBasicInfoMapper.getIndexOrderDetail(orderCodeList);
vo.setTotalOrderAmount(totalOrderAmount.toString());
vo.setTotalElectricity(totalElectricity.toString());
if (detailInfo != null) {
vo.setTotalPeakUsedElectricity(detailInfo.getTotalPeakUsedElectricity());
vo.setTotalFlatUsedElectricity(detailInfo.getTotalFlatUsedElectricity());
vo.setTotalSharpUsedElectricity(detailInfo.getTotalSharpUsedElectricity());
vo.setTotalValleyUsedElectricity(detailInfo.getTotalValleyUsedElectricity());
}
resultList.add(vo);
}
}
resultList = resultList.stream().sorted(Comparator.comparing(IndexOrderInfoVO::getDate)).collect(Collectors.toList());
return resultList;