<?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.tofly.feesapi.bmgl.mapper.BmDbhysyhMapper">

    <resultMap id="bmDbhysyhMap" type="com.tofly.feesapi.bmgl.entity.BmDbhysyh">
        <id property="id" column="ID"/>
        <result property="year" column="YEAR"/>
        <result property="mc" column="MC"/>
        <result property="sdys" column="SDYS"/>
        <result property="sdsl" column="SDSL"/>
        <result property="kssj" column="KSSJ"/>
        <result property="jssj" column="JSSJ"/>
        <result property="czrybm" column="CZRYBM"/>
        <result property="czryxm" column="CZRYXM"/>
        <result property="czsj" column="CZSJ"/>
        <result property="isdisabled" column="ISDISABLED"/>
        <result property="isby" column="ISBY"/>
        <result property="wccjlfs" column="WCCJLFS"/>
        <result property="ccjlfs" column="CCJLFS"/>
    </resultMap>

    <insert id="insertBmDbh">
        insert into BM_DBHYSYH
        select sys_guid(), #{yhyear}, '低保用水'||#{yhyear}||'年',
               SDYS,
               SDSL,
               to_date(#{yhyear}||'-01-01','yyyy-mm-dd'),
               JSSJ,
               CZRYBM,
               CZRYXM,
               sysdate,
               ISDISABLED,
               ISBY,
               WCCJLFS,
               CCJLFS
        from BM_DBHYSYH
        where YEAR = #{year}
    </insert>
</mapper>
