<?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.unis.financialSupervision.modular.fsinterestmaintain.mapper.BusinessFsInterestMaintainMapper">

    <select id="finfByYear"
            resultType="com.unis.financialSupervision.modular.fsinterestsubsidysettle.entity.FsInterestSubsidySettle">
        SELECT
            bfm.org_id,
            bfm.year,
            SUM(bfm.actual_interest_received) actual_interest_received,
            SUM(bfm.other_deduction) other_deduction,
            oi.org_name orgName
        FROM
            business_fs_interest_maintain bfm
        left join org_info oi on bfm.org_id =oi.org_id
        where bfm.year=#{planYear}
        GROUP BY bfm.org_id

    </select>
</mapper>