zhuo
2025-04-16 0d0f9bf9cc37073d23889c4d8aa8bb5bd038c85f
cnas-process/src/main/resources/mapper/QualityMonitorDetailsMapper.xml
@@ -29,5 +29,12 @@
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
        order by quality_monitor_id, monitor_purpose, -- 提取年份
        CAST(SUBSTRING(planned_time, 1, 4) AS SIGNED) ASC,
        -- 提取月份
        CASE
        WHEN planned_time LIKE '% - %' THEN 1
        ELSE CAST(SUBSTRING_INDEX(SUBSTRING(planned_time, 6), '月', 1) AS SIGNED)
        END ASC
    </select>
</mapper>