| | |
| | | <result column="engineer_id" property="engineerId"/> |
| | | <result column="tempering_layout_id" property="temperingLayoutId"/> |
| | | <result column="slot" property="slot"/> |
| | | <result column="glass_count" property="glassCount"/> |
| | | <result column="max_sequence" property="maxSequence"/> |
| | | <result column="min_sequence" property="minSequence"/> |
| | | <result column="remain_width" property="remainWidth"/> |
| | |
| | | SELECT ENGINEER_ID, |
| | | TEMPERING_LAYOUT_ID, |
| | | SLOT, |
| | | count(*) as glass_count, |
| | | MAX(TEMPERING_FEED_SEQUENCE) AS MAX_SEQUENCE, |
| | | MIN(TEMPERING_FEED_SEQUENCE) AS MIN_SEQUENCE |
| | | FROM BIG_STORAGE_CAGE_DETAILS |
| | |
| | | </update> |
| | | |
| | | <select id="selectTemperingGlassCount" resultType="java.util.Map"> |
| | | select a.engineer_id,a.tempering_layout_id,count2,count1,count2-count1 as count3 from |
| | | select a.engineer_id,a.tempering_layout_id,count2,count1,count2-count1 as count3,count(c.glass_id) as count4 from |
| | | (select engineer_id,tempering_layout_id,count(*) as count1 from big_storage_cage_details where state=100 group by engineer_id,tempering_layout_id) as a |
| | | left join |
| | | (select engineer_id,tempering_layout_id,count(*) as count2 from glass_info group by engineer_id,tempering_layout_id) as b |
| | | on a.engineer_id=b.engineer_id and a.tempering_layout_id=b.tempering_layout_id |
| | | left join damage as c on a.engineer_id=c.engineer_id and a.tempering_layout_id=c.tempering_layout_id and (type = 8 or type = 9) |
| | | group by a.engineer_id,a.tempering_layout_id |
| | | order by a.engineer_id,a.tempering_layout_id |
| | | </select> |
| | | </mapper> |