<?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.mosty.qwzx.mapper.TbQwClMapper">

    <!--根据ID删除勤务车辆明细-->
    <update id="deleteCl">
        update tb_qw_cl set xt_scbz = '1' where id in
        <foreach collection="list" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
    </update>

    <!--根据业务ID删除明细-->
    <update id="deleteByYwid">
        delete from tb_qw_cl where ywid = #{ywid}
    </update>

    <select id="queryListByYwid" resultType="com.mosty.base.model.entity.qwzx.TbQwCl">
        select a.* from tb_qw_cl a
        where a.xt_scbz = '0'
        and a.ywid in
        <foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
            #{item}
        </foreach>
    </select>

</mapper>
