<?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>
|