xuefei
2020-12-11 386e4215819efd8dd5e0f60b363708871bb7686d
platform-modules/platform-zhyl/src/main/java/cn/cetc54/platform/zhyl/mapper/SubsidyLogMapper.java
@@ -27,7 +27,7 @@
            " </where>" +
            " GROUP BY duixiang_id"+
            " </script>")
    Integer getTotalNum(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type);
    List<Integer> getTotalNum(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type);
    /**
     * 获取总金额
@@ -45,7 +45,6 @@
            " and type = #{type}" +
            " </if>" +
            " </where>" +
            " GROUP BY duixiang_id"+
            " </script>")
    Double getTotalMoney(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type);
@@ -96,6 +95,7 @@
            " </script>")
    List<Map<String,Object>> getYearTotal(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type);
    /**
     *统计每种补贴的金额数
     * @param areaId
@@ -109,24 +109,26 @@
            " and area_id = #{areaId}" +
            " </if>" +
            " </where>" +
            " GROUP BY type ORDER BY money desc"+
            " GROUP BY type ORDER BY sum desc"+
            " </script>")
    List<Map<String,Object>> getTypeMoney(@Param(value = "areaId")String areaId);
    /**
     * 每种补贴的次数
     * 每种补贴的人数
     * @param areaId
     * @return
     */
    @Select("<script>" +
            " select type," +
            "conunt(id) as num FROM t_yl_subsidy_log" +
            "select type,count(duixiang_id) as num from (" +
            " select type,duixiang_id" +
            " FROM t_yl_subsidy_log" +
            " <where> " +
            " <if test='areaId!= null'>" +
            " and area_id = #{areaId}" +
            " </if>" +
            " </where>" +
            " GROUP BY type ORDER BY num desc"+
            " GROUP BY type,duixiang_id) t GROUP BY type" +
            " ORDER BY num desc"+
            " </script>")
    List<Map<String,Object>> getTypeNum(@Param(value = "areaId")String areaId);