| | |
| | | <mapper namespace="com.mes.workstation.mapper.UpWorkstationMapper"> |
| | | |
| | | <resultMap id="sequenceMap" type="com.mes.workstation.entity.UpWorkSequence"> |
| | | <id property="sequence" column="layout_sequence"/> |
| | | <result property="number" column="number"/> |
| | | <id property="workId" column="workstation_id"/> |
| | | <!-- <result property="number" column="number"/>--> |
| | | </resultMap> |
| | | |
| | | <select id="selectPriority" resultMap="sequenceMap"> |
| | | SELECT |
| | | b.layout_sequence,a."number" |
| | | b.workstation_id |
| | | FROM |
| | | up_workstation a |
| | | LEFT JOIN up_patten_usage b ON a.pattern_width = b.width |
| | | AND a.pattern_heigth = b.width |
| | | AND a.pattern_thickness = b.thickness |
| | | WHERE |
| | | a.workstation_id = #{id} |
| | | ( SELECT * FROM up_patten_usage a WHERE state = 1 ORDER BY a.layout_sequence LIMIT 1 )as a |
| | | LEFT JOIN up_workstation b ON a.width =b.pattern_width |
| | | AND a.height = b.pattern_heigth |
| | | AND a.thickness = b.pattern_thickness |
| | | AND a.films_id = b.films_id |
| | | </select> |
| | | |
| | | |