From c7cfcbbb6117e77819d8aeaee6100e907633e233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Wed, 26 Jul 2023 16:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=99=E7=82=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=97=A5=E5=BF=97=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/fdp/controller/FdpDeviceController.java | 2 +- .../hzims/fdp/controller/FdpFaultController.java | 2 +- .../hzims/fdp/controller/FdpMonitorController.java | 2 +- .../hzims/fdp/controller/FdpTaskController.java | 2 +- .../hzims/middle/systemlog/entity/Statistics.java | 13 +++++++-- .../middle/systemlog/mapper/StatisticsMapper.xml | 6 +++- .../service/impl/StatisticsServiceImpl.java | 34 +++++++++++++++++++++- .../middle/systemlog/vo/StatisticsResponseVo.java | 7 ++++- .../hzims-middle/src/main/resources/db/1.0.2.sql | 1 + .../controller/FocusAttributeController.java | 2 +- .../controller/StFocusPropertiesController.java | 2 +- .../defect/controller/OperFaultController.java | 2 +- .../main/controller/MainWorkBenchController.java | 2 +- .../screen/controller/MainPageConfController.java | 2 +- .../HzimsAnalyzeModelStationController.java | 2 +- .../station/controller/StationController.java | 4 +-- .../controller/StationVideoTypeController.java | 2 +- 17 files changed, 68 insertions(+), 19 deletions(-) create mode 100644 hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpDeviceController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpDeviceController.java index 39923b7..953715e 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpDeviceController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpDeviceController.java @@ -84,7 +84,7 @@ public class FdpDeviceController extends BladeController { @ApiOperation(value = "自定义分页 FDP设备列表") @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页条件") + action = "分页条件智能诊断配置列表") public R> list(FdpDeviceDTO entity, Query query) { return service.doList(Condition.getPage(query), entity); } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpFaultController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpFaultController.java index 8cf4efb..7ba1710 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpFaultController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpFaultController.java @@ -103,7 +103,7 @@ public class FdpFaultController extends BladeController { @GetMapping("/queryFaultListOrd") @ApiOperationSupport(order = 60) @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断",operatorType = OperatorType.APPSYSTEMS,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询智能诊断列表") @ApiOperation(value = "分页 查询参数:name,fdpId,emId,detectability,severity,fdpDeviceId,fdpDeviceName") public R queryFaultListOrd(FdpFaultDTO req, Query query) { return R.data(service.queryFaultListOrd(req, query)); diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java index 4657f33..23a796a 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java @@ -153,7 +153,7 @@ public class FdpMonitorController extends BladeController { @ApiOperation(value = "查询监测点列表") @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询智能诊断配置列表") public R> listPage(FdpMonitorEntity entity, Query query) { return service.listPage(Condition.getPage(query), entity); } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpTaskController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpTaskController.java index 8a4dbde..db4ab11 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpTaskController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpTaskController.java @@ -93,7 +93,7 @@ public class FdpTaskController extends BladeController { @ApiOperation(value = "分页 查询参数:name,emId,faultId,reasonId,satisfaction") @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断任务",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询智能诊断任务列表") public R> list(FdpTaskDTO req, Query query) { return service.list(req, query); } diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java index 6dbcae6..315a5e1 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java @@ -2,8 +2,11 @@ package com.hnac.hzims.middle.systemlog.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; + import java.time.LocalDateTime; + import com.baomidou.mybatisplus.annotation.TableField; + import java.io.Serializable; import java.time.YearMonth; @@ -28,7 +31,7 @@ import lombok.experimental.Accessors; @ApiModel("操作日志统计对象") public class Statistics implements Serializable { - private static final long serialVersionUID=1L; + private static final long serialVersionUID = 1L; /** * 编号 @@ -38,7 +41,6 @@ public class Statistics implements Serializable { private Long id; - /** * 功能模块统计 */ @@ -63,7 +65,6 @@ public class Statistics implements Serializable { private String dateCalculated; - /** * 创建时间 */ @@ -79,4 +80,10 @@ public class Statistics implements Serializable { private LocalDateTime updateTime; + /** + * 排序 + */ + private Integer sort; + + } diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml index f8e11c7..5c5c9d7 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml @@ -6,6 +6,9 @@ select module_name moduleName, sum(module_name_num) moduleNameNum from hzims_statistics + + module_name like concat('%',#{statistics.moduleName},'%') + date_format(date_calculated,'%Y-%m-%d') >= #{statistics.createTime} @@ -13,6 +16,7 @@ and date_format(date_calculated,'%Y-%m-%d') <= #{statistics.endTime} - group by module_name; + group by module_name + order by sort asc; diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java index 6c0b0eb..4e1fb0c 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java @@ -3,6 +3,7 @@ package com.hnac.hzims.middle.systemlog.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.google.common.collect.Lists; import com.hnac.hzims.middle.systemlog.entity.Statistics; import com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper; import com.hnac.hzims.middle.systemlog.service.StatisticsService; @@ -17,7 +18,10 @@ import org.apache.xmlbeans.StringEnumAbstractBase; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.Comparator; import java.util.List; +import java.util.stream.Collectors; /** *

@@ -56,11 +60,13 @@ public class StatisticsServiceImpl extends ServiceImpl selectPage(Page page1, StatisticsVo statistics) { statistics.setCreateTime(statistics.getCreateTime().substring(0, 10)); statistics.setEndTime(statistics.getEndTime().substring(0, 10)); - return baseMapper.selectPages(page1, statistics); + IPage statisticsResponseVoIPage = baseMapper.selectPages(page1, statistics); + // List records = statisticsResponseVoIPage.getRecords(); + // List collect = records.stream().sorted(Comparator.comparing(StatisticsResponseVo::getSort)).collect(Collectors.toList()); + // statisticsResponseVoIPage.setRecords(collect); + return statisticsResponseVoIPage; + } + + + /** + * 排序 + */ + private static int getModuleName(String moduleName) { + List moduleNames = Lists.newArrayList("集中监控", + "综合调度", "视频集中监控", "实时监控", "视频监控", "演示大屏", "生态监控", + "数据分析", "数据查询", "通讯告警统计", "气象监测", "我的事务", "值班管理", + "缺陷管理", "两票管理", "巡检管理", "日常维护", "检修管理", "数据填报", "安全管理", "设备管理", + "资产管理", "智能诊断", "生产月报", "告警配置","电站安全标准", "站点管理", "实时画面", "资源配置", "消息管理", + "移动端配置", "水电站管理", "告警配置"); + int result = 0; + for (int i = 0; i < moduleNames.size(); i++) { + String name = moduleNames.get(i); + if (name.equals(moduleName)) { + result = i + 1; + break; + } + } + return result; } } diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsResponseVo.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsResponseVo.java index 3d8f18e..f652c5f 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsResponseVo.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsResponseVo.java @@ -21,5 +21,10 @@ public class StatisticsResponseVo { /** * 模块统计 */ - private Integer moduleNameNum; + private Integer moduleNameNum; + + /** + * 排序 + */ + private Integer sort; } diff --git a/hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql b/hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql new file mode 100644 index 0000000..9771348 --- /dev/null +++ b/hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql @@ -0,0 +1 @@ +alter table hzims_statistics add sort int comment '排序'; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/FocusAttributeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/FocusAttributeController.java index cd214d7..f44d635 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/FocusAttributeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/FocusAttributeController.java @@ -55,7 +55,7 @@ public class FocusAttributeController extends BladeController { @OperationAnnotation( moduleName = "站点管理", title = "集中监控属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询集中监控属性配置列表") public R getMainList(FocusAttributeDto focusAttributeDto, Query query) { return attributeService.getMainList(focusAttributeDto,query); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java index f0f73e2..d4324cd 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java @@ -36,7 +36,7 @@ public class StFocusPropertiesController { @OperationAnnotation( moduleName = "站点管理", title = "重点属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询重点属性配置列表") public R> pageList(StFocusPropertiesEntity entity, Query query) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper(); if(StringUtil.isNotBlank(entity.getPropertyName())){ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperFaultController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperFaultController.java index 664d437..aaeb2a8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperFaultController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperFaultController.java @@ -62,7 +62,7 @@ public class OperFaultController extends BladeController { }) @OperationAnnotation(moduleName = "智能诊断",title = "故障库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询故障库列表") public R> list(OperFaultEntity entity, Query query) { LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new OperFaultEntity(),entity); queryWrapper.orderByDesc(OperFaultEntity::getUpdateTime); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainWorkBenchController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainWorkBenchController.java index fce06ad..baa7595 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainWorkBenchController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainWorkBenchController.java @@ -45,7 +45,7 @@ public class MainWorkBenchController extends BladeController { @OperationAnnotation( moduleName = "站点管理", title = "工作台管理",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询工作台管理列表") public R> list(MainWorkBenchEntity entity, Query query) { IPage vos = workBenchService.list(entity, query); return R.data(vos); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/screen/controller/MainPageConfController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/screen/controller/MainPageConfController.java index 495a386..0719d9c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/screen/controller/MainPageConfController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/screen/controller/MainPageConfController.java @@ -60,7 +60,7 @@ public class MainPageConfController { @OperationAnnotation( moduleName = "站点管理", title = "大屏样式配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询大屏样式配置列表") public R> listPage (Query query, MainPageConfDto req) { return R.data(mainPageConfService.listPage(query,req)); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HzimsAnalyzeModelStationController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HzimsAnalyzeModelStationController.java index f62a360..526ad77 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HzimsAnalyzeModelStationController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HzimsAnalyzeModelStationController.java @@ -51,7 +51,7 @@ public class HzimsAnalyzeModelStationController extends BladeController { @OperationAnnotation( moduleName = "站点管理", title = "模型站点",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询模型站点列表") public R> list(HzimsAnalyzeModelStationEntity entity, Query query) { IPage page = analyzeModelStationService.page(Condition.getPage(query), Condition.getQueryWrapper(entity)); return R.data(page); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java index b204bbf..3eac95a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java @@ -63,8 +63,8 @@ public class StationController extends BladeController { @ApiOperation(value = "分页", notes = "传入StationEntity") @OperationAnnotation( moduleName = "站点管理", - title = "水电站点管理", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, - action = "分页查询") + title = "站点管理", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, + action = "分页查询站点管理列表") public R> list(StationEntity entity, Query query) { IPage vos = stationService.list(entity, query); return R.data(vos); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java index 5f7c323..2cc57ac 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java @@ -79,7 +79,7 @@ public class StationVideoTypeController extends BladeController { @OperationAnnotation( moduleName = "站点管理", title = "视频配置", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, - action = "分页查询") + action = "分页查询视频配置列表") public R> list(StationVideoTypeEntity entity, Query query) { LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new StationVideoTypeEntity(), entity); queryWrapper.orderByAsc(StationVideoTypeEntity::getStationId).orderByAsc(StationVideoTypeEntity::getSort);