| | |
| | | |
| | | [1.通用](#1) |
| | | [ 1.1获取所有区域接口](#1.1) |
| | | [ 1.2获取全部补贴类型](#1.2) |
| | | |
| | | [2.首页](#2) |
| | | [ 2.1获取区域津贴统计](#2.1) |
| | | |
| | | [3.补贴](#3) |
| | | |
| | | [ 2.1获取区域津贴统计](#2.1) |
| | | [ 2.2获取全部补贴类型](#1.2) |
| | | [3.补贴](#3) |
| | | [ 3.1获取总统计数据](#3.1) |
| | | [ 3.2年度月度统计数据](#3.2) |
| | | [4.服务对象](#4) |
| | | |
| | | [5.服务机构](#5) |
| | | [5.服务机构](#5) |
| | | [ 5.1根据区域id获取区域下所有机构和人员数量以及订单总数](#5.1) |
| | | [ 5.2根据区域id获取区域下所有服务以及服务详情和订单人数](#5.2) |
| | | [ 5.3根据区域id和订单量查询服务机构排名情况](#5.3) |
| | | [ 5.4根据区域id和订单量查询服务机构排名情况](#5.4) |
| | | [ 5.5执行中订单](#5.4) |
| | | |
| | | |
| | | <h3 id='1'>一、通用</h2> |
| | | <h4 id='1.1'>1.1获取所有区域接口</h4> |
| | |
| | | > 获取所有区域 |
| | | |
| | | ###### URL |
| | | > /api/fwjg/getByPage |
| | | > /api/common/getAllArea |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | |
| | | ###### 请求参数 |
| | | |参数|必选|类型|说明| |
| | | |:----- |:-------|:-----|----- | |
| | | | pageNumber | 是 |int| 分页页数 | |
| | | | pageSize | 是 |int| 分页大小 | |
| | | | sort | 否 |String| 排序字段 | |
| | | | order | 否 |String| 排序方式 asc/desc | |
| | | ###### 返回字段 |
| | | |返回字段|字段类型|说明 | |
| | | |:----- |:------|:----------------------------- | |
| | | | name | String | 名称 | |
| | | | pid | String | 上级id | |
| | | |
| | | ###### 返回示例 |
| | | ``` java |
| | | { |
| | | "success": true, |
| | | "message": "success", |
| | | "code": 200, |
| | | "timestamp": 1607648233416, |
| | | "result": [ |
| | | { |
| | | "id": "1336922902628536320", |
| | | "createBy": null, |
| | | "createTime": "2020-12-10 14:37:13", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "delFlag": 0, |
| | | "name": "石家庄市", |
| | | "pid": null |
| | | }, |
| | | { |
| | | "id": "1336923258360041472", |
| | | "createBy": null, |
| | | "createTime": "2020-12-10 14:38:38", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "delFlag": 0, |
| | | "name": "长安区", |
| | | "pid": "1336922902628536320" |
| | | }, |
| | | ... |
| | | ] |
| | | } |
| | | ``` |
| | | <h4 id='1.2'>1.2获取全部补贴类型</h4> |
| | | ###### 接口功能 |
| | | > 获取全部补贴类型 |
| | | |
| | | ###### URL |
| | | > /api/common/getAllSubsidyType |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > GET |
| | | |
| | | ###### 请求参数 |
| | | |参数|必选|类型|说明| |
| | | |:----- |:-------|:-----|----- | |
| | | ###### 返回字段 |
| | | |返回字段|字段类型|说明 | |
| | | |:----- |:------|:----------------------------- | |
| | | | index | int | type值 | |
| | | | name | String | 名称 | |
| | | |
| | | ###### 返回示例 |
| | | ``` java |
| | | { |
| | | "success": true, |
| | | "message": "success", |
| | | "code": 200, |
| | | "timestamp": 1607648519602, |
| | | "result": [ |
| | | { |
| | | "index": 0, |
| | | "name": "困难残疾生活补贴" |
| | | }, |
| | | { |
| | | "index": 1, |
| | | "name": "重度残疾人生活补贴" |
| | | }, |
| | | { |
| | | "index": 2, |
| | | "name": "高龄老人生活补贴" |
| | | }, |
| | | { |
| | | "index": 3, |
| | | "name": "高龄老人生活津贴" |
| | | }, |
| | | ... |
| | | ] |
| | | } |
| | | ``` |
| | | <h3 id='3'>三、补贴</h2> |
| | | <h4 id='3.1'>3.1获取总统计数据</h4> |
| | | ###### 接口功能 |
| | | > 根据区域id和补贴类型获取总的统计数据 |
| | | |
| | | ###### URL |
| | | > /api/subsidy/getTotalStatistics |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > GET |
| | | |
| | | ###### 请求参数 |
| | | |参数|必选|类型|说明| |
| | | |:----- |:-------|:-----|----- | |
| | | | areaId | 否 |String | 区域id | |
| | | | type | 否 |Integer | 补贴类型 | |
| | | |
| | | ###### 返回字段 |
| | | |返回字段|字段类型|说明 | |
| | | |:----- |:------|:----------------------------- | |
| | | | total | int | 返回分页结果数 | |
| | | | size | int | 分页大小 | |
| | | | current | int | 当前页数 | |
| | | | pages | int | 总共页数 | |
| | | | success | boolean | 是否成功 | |
| | | | code | int | 返回code码 | |
| | | | result | object | 返回结果 | |
| | | | name | String | 名称 | |
| | | | pid | String | 上级id | |
| | | | totalPersonNum | int | 获取补贴的总人数 | |
| | | | fwPersonCount | double | 总金额 | |
| | | |
| | | ###### 接口示例 |
| | | ``` java |
| | |
| | | "success": true, |
| | | "message": "success", |
| | | "code": 200, |
| | | "timestamp": 1607582573231, |
| | | "timestamp": 1607648976798, |
| | | "result": { |
| | | "records": [ |
| | | "totalPersonNum": 1, |
| | | "totalMoney": 100 |
| | | } |
| | | } |
| | | ``` |
| | | <h4 id='3.2'>3.2年度月度统计数据</h4> |
| | | ###### 接口功能 |
| | | > 根据区域id和补贴类型获取年度月度统计数据 |
| | | |
| | | ###### URL |
| | | > /api/subsidy/getStatistics |
| | | |
| | | ###### 支持格式 |
| | | > JSON |
| | | |
| | | ###### HTTP请求方式 |
| | | > GET |
| | | |
| | | ###### 请求参数 |
| | | |参数|必选|类型|说明| |
| | | |:----- |:-------|:-----|----- | |
| | | | areaId | 否 |String | 区域id | |
| | | | type | 否 |Integer | 补贴类型 | |
| | | |
| | | ###### 返回字段 |
| | | |返回字段|字段类型|说明 | |
| | | |:----- |:------|:----------------------------- | |
| | | | monthStatistics | Objec | 月度统计数据 | |
| | | | yearStatistics | Objec | 年度统计数据 | |
| | | |
| | | ###### 接口示例 |
| | | ``` java |
| | | { |
| | | "success": true, |
| | | "message": "success", |
| | | "code": 200, |
| | | "timestamp": 1607649436415, |
| | | "result": { |
| | | "monthStatistics": [ |
| | | { |
| | | "id": "1336922902628536320", |
| | | "createBy": null, |
| | | "createTime": "2020-12-10 14:37:13", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "delFlag": 0, |
| | | "name": "石家庄市", |
| | | "pid": null |
| | | }, |
| | | { |
| | | "id": "1336923402568601600", |
| | | "createBy": null, |
| | | "createTime": "2020-12-10 14:39:12", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "delFlag": 0, |
| | | "name": "新华区", |
| | | "pid": "1336922902628536320" |
| | | }, |
| | | { |
| | | "id": "1336923441189752832", |
| | | "createBy": null, |
| | | "createTime": "2020-12-10 14:39:21", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "delFlag": 0, |
| | | "name": "正定县", |
| | | "pid": "1336922902628536320" |
| | | "sum": 100, |
| | | "time": "2020-12" |
| | | } |
| | | ], |
| | | "total": 7, |
| | | "size": 10, |
| | | "current": 1, |
| | | "orders": [], |
| | | "hitCount": false, |
| | | "searchCount": true, |
| | | "pages": 1 |
| | | "yearStatistics": [ |
| | | { |
| | | "sum": 100, |
| | | "time": "2020" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | ``` |
| | | |
| | | <h3 id='2'>二、服务机构</h2> |
| | | <h4 id='2.1'>2.1根据区域id获取区域下所有机构和人员数量以及订单总数</h4> |
| | | <h3 id='5'>五、服务机构</h2> |
| | | <h4 id='5.1'>5.1根据区域id获取区域下所有机构和人员数量以及订单总数</h4> |
| | | ###### 接口功能 |
| | | > 根据区域id获取区域下所有机构和人员数量以及订单总数 |
| | | |
| | |
| | | } |
| | | } |
| | | ``` |
| | | <h4 id='2.1'>2.1根据区域id获取区域下所有服务以及服务详情和订单人数</h4> |
| | | <h4 id='5.2'>5.2根据区域id获取区域下所有服务以及服务详情和订单人数</h4> |
| | | ###### 接口功能 |
| | | > 根据区域id获取区域下所有机构和人员数量以及订单总数 |
| | | |
| | |
| | | } |
| | | } |
| | | ``` |
| | | <h4 id='2.1'>2.3根据区域id和订单量查询服务机构排名情况</h4> |
| | | <h4 id='5.3'>5.3根据区域id和订单量查询服务机构排名情况</h4> |
| | | ###### 接口功能 |
| | | > 根据区域id和订单量查询服务机构排名情况 |
| | | |
| | |
| | | |
| | | |
| | | ``` |
| | | <h4 id='2.1'>2.3根据区域id和订单量查询服务机构排名情况</h4> |
| | | <h4 id='5.4'>5.4根据区域id和订单量查询服务机构排名情况</h4> |
| | | ###### 接口功能 |
| | | > 根据区域id和订单量查询实际服务排名情况 |
| | | |
| | |
| | | ``` java |
| | | |
| | | ``` |
| | | <h4 id='2.1'>2.4执行中订单</h4> |
| | | <h4 id='5.5'>5.5执行中订单</h4> |
| | | ###### 接口功能 |
| | | > 执行中订单 |
| | | |
| | |
| | | <artifactId>platform-quartz</artifactId> |
| | | <version>1.0-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.cetc54</groupId> |
| | | <artifactId>platform-zhyl</artifactId> |
| | |
| | | ignored: |
| | | # 无需登录认证的请求 |
| | | urls: |
| | | - /api/** |
| | | - /platform/file/** |
| | | - /platform/oauth2/** |
| | | - /platform/actuator/** |
| | |
| | | * 实体类名 |
| | | * 建议仅需修改 |
| | | */ |
| | | private static final String className = "Student"; |
| | | private static final String className = "Test"; |
| | | |
| | | /** |
| | | * 类说明描述 |
| | |
| | | * 生成模块路径 |
| | | * (文件自动生成至该模块下) |
| | | */ |
| | | private static final String module = "/platform-modules/platform-your"; |
| | | private static final String module = "/platform-modules/platform-zhyl"; |
| | | |
| | | /** |
| | | * 实体类对应包 |
| | | * (文件自动生成至该包下) |
| | | */ |
| | | private static final String entityPackage = "cn.cetc54.platform.your.entity"; |
| | | private static final String entityPackage = "cn.cetc54.platform.zhyl.entity"; |
| | | |
| | | /** |
| | | * dao对应包 【注意修改后需到cn.cetc54.platform.core.config.mybatisplus.MybatisPlusConfig配置你的mapper路径扫描】 |
| | | * (文件自动生成至该包下) |
| | | */ |
| | | private static final String daoPackage = "cn.cetc54.platform.your.mapper"; |
| | | private static final String daoPackage = "cn.cetc54.platform.zhyl.mapper"; |
| | | |
| | | /** |
| | | * service对应包 |
| | | * (文件自动生成至该包下) |
| | | */ |
| | | private static final String servicePackage = "cn.cetc54.platform.your.service"; |
| | | private static final String servicePackage = "cn.cetc54.platform.zhyl.service"; |
| | | |
| | | /** |
| | | * serviceImpl对应包 |
| | | * (文件自动生成至该包下) |
| | | */ |
| | | private static final String serviceImplPackage = "cn.cetc54.platform.your.serviceimpl"; |
| | | private static final String serviceImplPackage = "cn.cetc54.platform.zhyl.serviceimpl"; |
| | | |
| | | /** |
| | | * controller对应包 |
| | | * (文件自动生成至该包下) |
| | | */ |
| | | private static final String controllerPackage = "cn.cetc54.platform.your.controller"; |
| | | private static final String controllerPackage = "cn.cetc54.platform.zhyl.controller"; |
| | | |
| | | /** |
| | | * 运行该主函数即可生成代码 |
New file |
| | |
| | | package cn.cetc54.platform.zhyl.api; |
| | | |
| | | import cn.cetc54.platform.core.common.utils.ResultUtil; |
| | | import cn.cetc54.platform.core.common.vo.Result; |
| | | import cn.cetc54.platform.zhyl.entity.Area; |
| | | import cn.cetc54.platform.zhyl.entity.SubsidyEmum; |
| | | import cn.cetc54.platform.zhyl.service.IAreaService; |
| | | import cn.cetc54.platform.zhyl.vo.SubsidyTypeVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author xfei |
| | | * @date 2020/12/10 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @Api(description = "通用接口") |
| | | @RequestMapping("/api/common") |
| | | public class CommonController { |
| | | @Autowired |
| | | private IAreaService iAreaService; |
| | | @GetMapping("/getAllArea") |
| | | @ApiOperation(value = "获取全部区域") |
| | | public Result<List<Area>> getAll(){ |
| | | List<Area> list = iAreaService.list(); |
| | | return new ResultUtil<List<Area>>().setData(list); |
| | | } |
| | | @GetMapping("/getAllSubsidyType") |
| | | @ApiOperation(value = "获取全部补贴类型") |
| | | public Result<List<SubsidyTypeVo>> getAllSubsidyType(){ |
| | | List<SubsidyTypeVo> list = new ArrayList<>(); |
| | | for (SubsidyEmum emum:SubsidyEmum.values()){ |
| | | list.add(new SubsidyTypeVo(emum.ordinal(),emum.name())); |
| | | } |
| | | return new ResultUtil<List<SubsidyTypeVo>>().setData(list); |
| | | |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import javafx.collections.ObservableList; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
New file |
| | |
| | | package cn.cetc54.platform.zhyl.api; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author xfei |
| | | * @date 2020/12/10 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @Api(description = "首页接口") |
| | | @RequestMapping("/api/index") |
| | | public class IndexController { |
| | | |
| | | } |
New file |
| | |
| | | package cn.cetc54.platform.zhyl.api; |
| | | |
| | | import cn.cetc54.platform.core.common.utils.ResultUtil; |
| | | import cn.cetc54.platform.core.common.vo.Result; |
| | | import cn.cetc54.platform.zhyl.service.ISubsidyLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author xfei |
| | | * @date 2020/12/10 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @Api(description = "补贴页面接口") |
| | | @RequestMapping("/api/subsidy") |
| | | public class SubsidyAPIController { |
| | | @Autowired |
| | | private ISubsidyLogService iSubsidyLogService; |
| | | @GetMapping("/getTotalStatistics") |
| | | @ApiOperation(value = "获取总统计数据") |
| | | public Result getTotalStatistics(String areaId,Integer type){ |
| | | int totalPersonNum = iSubsidyLogService.getTotalNum(areaId,type);//获取补贴的总人数 |
| | | double totalMoney = iSubsidyLogService.getTotalMoney(areaId,type);//获取总金额 |
| | | |
| | | Map<String,Object> resMap = new HashMap<>(); |
| | | resMap.put("totalPersonNum",totalPersonNum); |
| | | resMap.put("totalMoney",totalMoney); |
| | | return ResultUtil.data(resMap); |
| | | |
| | | } |
| | | @GetMapping("/getStatistics") |
| | | @ApiOperation(value = "年度月度统计数据") |
| | | public Result getStatistics(String areaId,Integer type){ |
| | | Map<String,Object> resMap = new HashMap<>(); |
| | | resMap.put("monthStatistics",iSubsidyLogService.getMonthTotal(areaId,type)); |
| | | resMap.put("yearStatistics",iSubsidyLogService.getYearTotal(areaId,type)); |
| | | return ResultUtil.data(resMap); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.cetc54.platform.zhyl.entity; |
| | | |
| | | /** |
| | | * @author xfei |
| | | * @date 2020/12/10 |
| | | */ |
| | | public enum SubsidyEmum { |
| | | 困难残疾生活补贴,重度残疾人生活补贴,高龄老人生活补贴,高龄老人生活津贴,百岁寿星营养补贴,集中供应儿童,散居儿童,无人抚养儿童,城市特困人员,农村特困人员,城市低保家庭,农村低保家庭 |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import cn.cetc54.platform.zhyl.entity.SubsidyLog; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * 补贴日志数据处理层 |
| | | * @author |
| | | */ |
| | | public interface SubsidyLogMapper extends BaseMapper<SubsidyLog> { |
| | | //获取补贴总人数 |
| | | @Select("<script>" + |
| | | " select SUM(duixiang_id) from t_yl_subsidy_log" + |
| | | " <where> " + |
| | | " <if test='areaId!= null'>" + |
| | | " and area_id = #{areaId}" + |
| | | " </if>" + |
| | | " <if test='type!= null'>" + |
| | | " and type = #{type}" + |
| | | " </if>" + |
| | | " </where>" + |
| | | " GROUP BY duixiang_id"+ |
| | | " </script>") |
| | | Integer getTotalNum(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type); |
| | | |
| | | /** |
| | | * 获取总金额 |
| | | * @param areaId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Select("<script>" + |
| | | " select SUM(money) from t_yl_subsidy_log" + |
| | | " <where> " + |
| | | " <if test='areaId!= null'>" + |
| | | " and area_id = #{areaId}" + |
| | | " </if>" + |
| | | " <if test='type!= null'>" + |
| | | " and type = #{type}" + |
| | | " </if>" + |
| | | " </where>" + |
| | | " GROUP BY duixiang_id"+ |
| | | " </script>") |
| | | Double getTotalMoney(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type); |
| | | |
| | | /** |
| | | * 获取月度统计 |
| | | * @param areaId |
| | | * @param type |
| | | * @return |
| | | * SELECT |
| | | * CONCAT(YEAR(create_time),'-',MONTH(create_time)) AS releaseYearMonth, |
| | | * SUM(money) as sum |
| | | * FROM t_yl_subsidy_log |
| | | * GROUP BY releaseYearMonth ORDER BY releaseYearMonth desc LIMIT 12 |
| | | */ |
| | | @Select("<script>" + |
| | | " select CONCAT(YEAR(create_time),'-',MONTH(create_time)) AS time," + |
| | | "SUM(money) as sum FROM t_yl_subsidy_log" + |
| | | " <where> " + |
| | | " <if test='areaId!= null'>" + |
| | | " and area_id = #{areaId}" + |
| | | " </if>" + |
| | | " <if test='type!= null'>" + |
| | | " and type = #{type}" + |
| | | " </if>" + |
| | | " </where>" + |
| | | " GROUP BY time ORDER BY time desc LIMIT 12"+ |
| | | " </script>") |
| | | List<Map<String,Object>> getMonthTotal(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type); |
| | | |
| | | /** |
| | | * 获取年度统计 |
| | | * @param areaId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Select("<script>" + |
| | | " select CONCAT(YEAR(create_time)) AS time," + |
| | | "SUM(money) as sum FROM t_yl_subsidy_log" + |
| | | " <where> " + |
| | | " <if test='areaId!= null'>" + |
| | | " and area_id = #{areaId}" + |
| | | " </if>" + |
| | | " <if test='type!= null'>" + |
| | | " and type = #{type}" + |
| | | " </if>" + |
| | | " </where>" + |
| | | " GROUP BY time ORDER BY time desc LIMIT 12"+ |
| | | " </script>") |
| | | List<Map<String,Object>> getYearTotal(@Param(value = "areaId")String areaId, @Param(value = "type")Integer type); |
| | | |
| | | /** |
| | | *统计每种补贴的金额数 |
| | | * @param areaId |
| | | * @return |
| | | */ |
| | | @Select("<script>" + |
| | | " select type," + |
| | | "SUM(money) as sum FROM t_yl_subsidy_log" + |
| | | " <where> " + |
| | | " <if test='areaId!= null'>" + |
| | | " and area_id = #{areaId}" + |
| | | " </if>" + |
| | | " </where>" + |
| | | " GROUP BY type ORDER BY money 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" + |
| | | " <where> " + |
| | | " <if test='areaId!= null'>" + |
| | | " and area_id = #{areaId}" + |
| | | " </if>" + |
| | | " </where>" + |
| | | " GROUP BY type ORDER BY num desc"+ |
| | | " </script>") |
| | | List<Map<String,Object>> getTypeNum(@Param(value = "areaId")String areaId); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import cn.cetc54.platform.zhyl.entity.SubsidyLog; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 补贴日志接口 |
| | |
| | | */ |
| | | public interface ISubsidyLogService extends IService<SubsidyLog> { |
| | | |
| | | /** |
| | | * 获取补贴的总人数 |
| | | * @param areaId |
| | | * @return |
| | | */ |
| | | int getTotalNum(String areaId,Integer type); |
| | | |
| | | /** |
| | | * 获取总金额 |
| | | * @param areaId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | double getTotalMoney(String areaId,Integer type); |
| | | |
| | | /** |
| | | * 获取月度统计 |
| | | * @param areaId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getMonthTotal(String areaId,Integer type); |
| | | |
| | | /** |
| | | * 获取年度统计 |
| | | * @param areaId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getYearTotal(String areaId,Integer type); |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 补贴日志接口实现 |
| | |
| | | |
| | | @Autowired |
| | | private SubsidyLogMapper subsidyLogMapper; |
| | | |
| | | @Override |
| | | public int getTotalNum(String areaId,Integer type) { |
| | | Integer num = subsidyLogMapper.getTotalNum(areaId,type); |
| | | return num==null?0:num; |
| | | } |
| | | |
| | | @Override |
| | | public double getTotalMoney(String areaId, Integer type) { |
| | | Double money = subsidyLogMapper.getTotalMoney(areaId,type); |
| | | return money==null?0:money; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getMonthTotal(String areaId, Integer type) { |
| | | return subsidyLogMapper.getMonthTotal(areaId,type); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getYearTotal(String areaId, Integer type) { |
| | | return subsidyLogMapper.getYearTotal(areaId,type); |
| | | } |
| | | } |
New file |
| | |
| | | package cn.cetc54.platform.zhyl.vo; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | /** |
| | | * 补贴类型 |
| | | * @author xfei |
| | | * @date 2020/12/10 |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class SubsidyTypeVo { |
| | | private int index; |
| | | private String name; |
| | | } |