<?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.base.manager.mapper.TbJcglXfMapper">
    <select id="xfbmtj" resultType="java.util.Map">
        SELECT ssbmdm, ssbm, COUNT( 1 ) as sc FROM tb_jcgl_xf
        WHERE xt_scbz = '0'
        <if test="ssbmdm != null and ssbmdm != ''">
            and ssbmdm like concat (#{ssbmdm},'%')
        </if>
        <if test="kssj != null and kssj != ''">
            and to_char(xfsj,'yyyy-MM-dd HH:mm:ss') >= #{kssj}
        </if>
        <if test="jssj != null and jssj != ''">
            and to_char(xfsj,'yyyy-MM-dd HH:mm:ss') &lt;= #{jssj}
        </if>
        GROUP BY ssbmdm, ssbm
    </select>

    <update id="bacthSb">
        update tb_jcgl_xf set sbzt = '02' where id in
        <foreach collection="list" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
    </update>
</mapper>
