首页订单数据新增汇总字段

This commit is contained in:
Lemon
2025-01-08 09:15:56 +08:00
parent 351e03d4e8
commit 82e1f4a1c8
3 changed files with 29 additions and 1 deletions

View File

@@ -2492,9 +2492,13 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
vo.setTotalElectricity(totalElectricity.toString()); vo.setTotalElectricity(totalElectricity.toString());
if (detailInfo != null) { if (detailInfo != null) {
vo.setTotalPeakUsedElectricity(detailInfo.getTotalPeakUsedElectricity()); vo.setTotalPeakUsedElectricity(detailInfo.getTotalPeakUsedElectricity());
vo.setTotalSharpAmount(detailInfo.getTotalSharpAmount());
vo.setTotalFlatUsedElectricity(detailInfo.getTotalFlatUsedElectricity()); vo.setTotalFlatUsedElectricity(detailInfo.getTotalFlatUsedElectricity());
vo.setTotalPeakAmount(detailInfo.getTotalPeakAmount());
vo.setTotalSharpUsedElectricity(detailInfo.getTotalSharpUsedElectricity()); vo.setTotalSharpUsedElectricity(detailInfo.getTotalSharpUsedElectricity());
vo.setTotalFlatAmount(detailInfo.getTotalFlatAmount());
vo.setTotalValleyUsedElectricity(detailInfo.getTotalValleyUsedElectricity()); vo.setTotalValleyUsedElectricity(detailInfo.getTotalValleyUsedElectricity());
vo.setTotalValleyAmount(detailInfo.getTotalValleyAmount());
} }
resultList.add(vo); resultList.add(vo);
} }

View File

@@ -35,19 +35,39 @@ public class IndexOrderInfoVO {
*/ */
private String totalSharpUsedElectricity; private String totalSharpUsedElectricity;
/**
* 尖时段总金额
*/
private String totalSharpAmount;
/** /**
* 峰时段总用电量 * 峰时段总用电量
*/ */
private String totalPeakUsedElectricity; private String totalPeakUsedElectricity;
/**
* 峰时段总金额
*/
private String totalPeakAmount;
/** /**
* 平时段总用电量 * 平时段总用电量
*/ */
private String totalFlatUsedElectricity; private String totalFlatUsedElectricity;
/**
* 平时段总金额
*/
private String totalFlatAmount;
/** /**
* 谷时段总用电量 * 谷时段总用电量
*/ */
private String totalValleyUsedElectricity; private String totalValleyUsedElectricity;
/**
* 谷时段总金额
*/
private String totalValleyAmount;
} }

View File

@@ -2802,9 +2802,13 @@
<select id="getIndexOrderDetail" resultType="com.jsowell.pile.vo.web.IndexOrderInfoVO"> <select id="getIndexOrderDetail" resultType="com.jsowell.pile.vo.web.IndexOrderInfoVO">
select select
sum(sharp_used_electricity) AS totalSharpUsedElectricity, sum(sharp_used_electricity) AS totalSharpUsedElectricity,
sum(sharp_amount) as totalSharpAmount,
sum(peak_used_electricity) AS totalPeakUsedElectricity, sum(peak_used_electricity) AS totalPeakUsedElectricity,
sum(peak_amount) as totalPeakAmount,
sum(flat_used_electricity) AS totalFlatUsedElectricity, sum(flat_used_electricity) AS totalFlatUsedElectricity,
sum(valley_used_electricity) AS totalValleyUsedElectricity sum(flat_amount) as totalFlatAmount,
sum(valley_used_electricity) AS totalValleyUsedElectricity,
sum(valley_amount) as totalValleyAmount
from order_detail from order_detail
<if test="list != null and list.size() != 0"> <if test="list != null and list.size() != 0">
where order_code in where order_code in