| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.mes.glassinfo.mapper.GlassInfoMapper"> |
| | | |
| | | <select id="listBySize" resultType="com.mes.glassinfo.entity.dto.HollowGlassInfoDTO"> |
| | | with glass_list as ( |
| | | SELECT flow_card_id, |
| | | glass_type, |
| | | GREATEST(width, height) as width, |
| | | least(width, height) as height, |
| | | thickness, |
| | | filmsid, |
| | | total_layer, |
| | | layer, |
| | | ismultiple, |
| | | max_width, |
| | | max_height, |
| | | tempering_layout_id, |
| | | tempering_feed_sequence, |
| | | engineer_id, |
| | | glass_id |
| | | FROM glass_info |
| | | where engineer_id = #{engineerId} |
| | | ) |
| | | select row_number() |
| | | over (order by flow_card_id, height desc, width desc, tempering_layout_id, tempering_feed_sequence) as rn, |
| | | t.* |
| | | from glass_list t |
| | | |
| | | </select> |
| | | </mapper> |