yangys
2025-11-18 8e944cfabb253fc2556588e308e282586043f7b0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?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.qianwen.smartman.modules.smis.mapper.TrayFixtureMapper">
 
    <update id="updateFixtureStatus">
        update blade_fixture
        set fixture_status = null, in_use = 0
        where id in (select btf.fix_id
        from blade_tray_fixture btf
        where tray_id in
        <foreach collection="trayIds" item="trayId" open="(" separator="," close=")">
            #{trayId}
        </foreach>
        )
    </update>
 
 
    <select id="listFixture" resultType="com.qianwen.smartman.modules.smis.vo.TrayFaceFixtureVO">
        select btf.id,
               tray_id as trayId,
               face_id as faceId,
               fix_id  as fixId,
               bf.code    fixtureCode,
               bf.name    fixtureName
        from blade_tray_fixture btf
                 left join blade_fixture bf on btf.fix_id = bf.id and bf.is_deleted = 0
        where btf.is_deleted = 0
          and btf.face_id = #{faceId}
        order by bf.create_time desc, bf.id desc
    </select>
</mapper>