zhoushihao
2025-07-09 a3c4e24bf090430e1a0a207d44478ca61926248a
hangzhoumesParent/common/servicebase/src/main/resources/mapper/TemperingGlassInfoMapper.xml
@@ -1,6 +1,11 @@
<?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.temperingglass.mapper.TemperingGlassInfoMapper">
    <resultMap id="baseMap" type="com.mes.temperingglass.entity.TemperingGlassInfo">
        <result column="engineer_id" property="engineerId"/>
        <result column="tempering_layout_id" property="temperingLayoutId"/>
    </resultMap>
    <insert id="saveBatch">
        INSERT INTO tempering_glass_info (glass_id, flow_card_id, glass_type, width, height, thickness, films_id,
        ishorizontal, tempering_layout_id,
@@ -12,5 +17,12 @@
            #{item.angle}, #{item.state}, #{item.slot}, #{item.engineerId}, 0)
        </foreach>
    </insert>
    <select id="queryEngineerAndLayoutId" resultMap="baseMap">
        select top 3 engineer_id,tempering_layout_id
        from tempering_glass_info
        where state = 1 and deleted = 0
        group by engineer_id, tempering_layout_id
        order by min(id) desc
    </select>
</mapper>