<?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.fsstoragesubsidysettle.mapper.FsStorageSubsidySettleMapper">

    <select id="getOrgAndKcSum" resultType="java.util.Map">
        SELECT DISTINCT
            UnitID,
            nf,
            count(yf),
            sum(ROUND(qmkc/10000, 2)) AS qmkc
        FROM
            depot_qh.data_kcgl_kcyjd_default
        where nf=#{Year}
        GROUP BY
            nf,
            UnitID

    </select>
    <select id="getStaetAndEnd" resultType="java.util.Map">
        SELECT
            rotation_start 	rotationStart,
            rotation_end rotationEnd,
            SUM(planned_quantity -remaining_quantity)quantity
        FROM
            province_all.biz_pss_storage_empty_period
        where org_id=#{orgId} and plan_year =#{Year}
        GROUP BY org_id

    </select>
</mapper>