dy
2025-04-16 83a348d85de2c04183211b0f464f82c33a77deea
aps-modules/aps-core/src/main/resources/mapper/core/ApsWeldSeamMapper.xml
@@ -163,4 +163,40 @@
        FROM   aps_weld_seam
        GROUP BY produce_year, produce_month,   production_base,  work_order_type, classification
    </select>
    <select id="weldSeamEcharts" parameterType="java.util.List" resultType="map">
        SELECT
            seam.produce_year,
            seam.produce_month,
            seam.production_base,
            workOrderType.dict_label AS work_order_name,
            classification.dict_label AS classification_name,
            SUM ( seam.total_weld_seam ) AS total_weld_seam
        FROM
            aps_weld_seam seam
            LEFT JOIN sys_dict_data workOrderType ON seam.work_order_type = workOrderType.dict_value
            AND workOrderType.dict_type = 'aps_weld_work_order_type'
            LEFT JOIN sys_dict_data classification ON seam.classification = classification.dict_value
            AND classification.dict_type = 'aps_weld_classification'
            <where>
                <if test="produceYears != null "> and produce_year in
                    <foreach item="produceYear" collection="produceYears" open="(" separator="," close=")">
                        #{produceYear}
                    </foreach>
                </if>
                <if test="produceMonths != null "> and produce_month in
                    <foreach item="produceMonth" collection="produceMonths" open="(" separator="," close=")">
                        #{produceMonth}
                    </foreach>
                </if>
            </where>
        GROUP BY
            seam.produce_year,
            seam.produce_month,
            seam.production_base,
            workOrderType.dict_label,
            classification.dict_label
    </select>
</mapper>