数据统计修改数据量统计接口,添加按文件类型统计、按项目统计数据接口
| | |
| | | (select sum(sizes) from lf.sys_meta b where b.dircode like a.code || '%') "数量(MB)" |
| | | from lf.sys_dir a where id > 1 and pid = 0; |
| | | |
| | | -- 按文件类型统计 |
| | | select name "m1", (select sum(sizes) from lf.sys_meta b where b.dircode like a.code || '%') "sizes", |
| | | (select count(*) from lf.sys_meta b where b.dircode like a.code || '%') "count" |
| | | from lf.sys_dir a where pid = 0 order by a.code; |
| | | |
| | | -- 按文件类型统计 * |
| | | select type,count(*),sum(sizes) from lf.sys_meta group by type; |
| | | select type "m1", cast(sum(sizes) as decimal(18, 3)) "sizes", count(*) "count" from lf.sys_meta group by type order by type; |
| | | |
| | | -- type类型:1-Shp文件,2-专题图,3-元数据,4-业务数据,5-管道分析,6-统计报告 |
| | | select * from lf.sys_download; |
| | |
| | | from lf.sys_dir d |
| | | where pid = 0 |
| | | order by d.code; |
| | | |
| | | --------------------------------------------------------- 02.递归查询 |
| | | with recursive rs as( |
| | | select * from lf.sys_menu where cn_name='管道基础大数据平台' |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "按文件类型统计") |
| | | @GetMapping(value = "/countSizesByType") |
| | | public ResponseMsg<Object> countSizesByType() { |
| | | try { |
| | | List<CountEntity> list = reportService.countSizesByType(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询服务调用量统计") |
| | | @GetMapping(value = "/selectCountServices") |
| | | public ResponseMsg<Object> selectCountServices() { |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "按项目统计数据") |
| | | @GetMapping(value = "/countSizesByPrj") |
| | | public ResponseMsg<Object> countSizesByPrj() { |
| | | try { |
| | | List<CountEntity> list = reportService.countSizesByPrj(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "下载报告") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "报告ID", dataType = "Integer", paramType = "7") |
| | |
| | | public List<CountEntity> countSizes(); |
| | | |
| | | /** |
| | | * 按文件类型统计 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<CountEntity> countSizesByType(); |
| | | |
| | | /** |
| | | * 服务调用量统计 |
| | | * |
| | | * @return |
| | |
| | | * @return |
| | | */ |
| | | public List<CountEntity> countOperates(); |
| | | |
| | | /** |
| | | * 按项目统计数据 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<CountEntity> countSizesByPrj(); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<CountEntity> countSizesByType() { |
| | | return reportMapper.countSizesByType(); |
| | | } |
| | | |
| | | @Override |
| | | public List<CountEntity> countServices() { |
| | | return reportMapper.countServices(); |
| | | } |
| | |
| | | return reportMapper.countOperates(); |
| | | } |
| | | |
| | | @Override |
| | | public List<CountEntity> countSizesByPrj() { |
| | | return reportMapper.countSizesByPrj(); |
| | | } |
| | | |
| | | /** |
| | | * 创建报告 |
| | | */ |
| | |
| | | name: prod |
| | | # JDBC 基本配置 ¤tSchema=public |
| | | #url: jdbc:postgresql://103.85.165.99:5433/langfang?useAffectedRows=true |
| | | #url: jdbc:postgresql://192.168.20.205:5433/langfang?useAffectedRows=true |
| | | url: jdbc:postgresql://127.0.0.1:5433/langfang?useAffectedRows=true |
| | | url: jdbc:postgresql://192.168.20.205:5433/langfang?useAffectedRows=true |
| | | #url: jdbc:postgresql://127.0.0.1:5433/langfang?useAffectedRows=true |
| | | username : postgres |
| | | #password: Postgres!_14_Lf |
| | | password: postgres |
| | | password: Postgres!_14_Lf |
| | | #password: postgres |
| | | driver-class-name: org.postgresql.Driver |
| | | platform: POSTGRESQL |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | |
| | | <!-- 数据量统计 --> |
| | | <select id="countSizes" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select fn_get_fullname(depcode, 1) "m1", cast(sum(sizes) as decimal(18, 3)) "sizes" |
| | | select fn_get_fullname(depcode, 1) "m1", cast(sum(sizes) as decimal(18, 3)) "sizes", count(*) "count" |
| | | from lf.sys_meta |
| | | group by depcode |
| | | order by depcode; |
| | | </select> |
| | | |
| | | <!-- 按文件类型统计 --> |
| | | <select id="countSizesByType" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select type "m1", cast(sum(sizes) as decimal(18, 3)) "sizes", count(*) "count" |
| | | from lf.sys_meta |
| | | group by type |
| | | order by type; |
| | | </select> |
| | | |
| | | <!-- 服务调用量统计 --> |
| | |
| | | group by modular1,modular2 |
| | | order by modular1 desc,modular2; |
| | | </select> |
| | | |
| | | <!-- 按项目统计数据 --> |
| | | <select id="countSizesByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select name "m1", coalesce((select sum(sizes) from lf.sys_meta b where b.dircode like a.code || '%'), 0) "sizes", |
| | | (select count(*) from lf.sys_meta b where b.dircode like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by a.code; |
| | | </select> |
| | | </mapper> |