baoshiwei
2025-04-19 5d36e1f987ef21e44ded2e8a1d06c28094ec1e76
zhitan-system/src/main/resources/mapper/comprehensivestatistics/DailyComprehensiveMapper.xml
@@ -35,10 +35,11 @@
        <result column="value0" property="value0"/>
    </resultMap>
    <!--全厂能耗统计-->
    <select id="getdailyComprehensiveList" resultMap="dataItemMap">
    <select id="getDailyComprehensiveList" resultType="com.zhitan.comprehensivestatistics.domain.DailyComprehensive">
        SELECT
            aa.index_id,
            aa.index_name,
            aa.unit_id,
            <foreach item="item" index="index" collection="dataList">
                COALESCE ( MAX ( CASE WHEN data_time = #{item.dataTime} THEN "value" END ), null ) AS ${item.value},
            </foreach>
@@ -49,6 +50,7 @@
            SELECT
                ni.index_id,
                ei."name" AS "index_name",
                ei.unit_id,
                di."value",
                di.data_time,
                di.time_type,
@@ -68,11 +70,11 @@
                </if>
            ) aa
        GROUP BY
            aa.index_id, aa.index_name, aa.time_type, aa.order_num
            aa.index_id, aa.index_name, aa.unit_id, aa.time_type, aa.order_num
        ORDER BY aa.order_num ASC
    </select>
    <select id="getListChart" resultMap="dataItemMap">
    <select id="getListChart" resultType="com.zhitan.comprehensivestatistics.domain.DailyComprehensive">
        SELECT
            di.index_id,
            ci.name AS "index_name",