gongchunyi
昨天 a1fde96b1f1bf7e8a337a3550e41418e88e7bc97
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>