Browse Source

修改站点管理日志注解

zhongwei
段飞宇 1 year ago
parent
commit
c7cfcbbb61
  1. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpDeviceController.java
  2. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpFaultController.java
  3. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java
  4. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpTaskController.java
  5. 13
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java
  6. 6
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml
  7. 34
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java
  8. 5
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsResponseVo.java
  9. 1
      hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql
  10. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/FocusAttributeController.java
  11. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java
  12. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperFaultController.java
  13. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainWorkBenchController.java
  14. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/screen/controller/MainPageConfController.java
  15. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HzimsAnalyzeModelStationController.java
  16. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java
  17. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java

2
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设备列表") @ApiOperation(value = "自定义分页 FDP设备列表")
@OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType = @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页条件") action = "分页条件智能诊断配置列表")
public R<IPage<FdpDeviceVO>> list(FdpDeviceDTO entity, Query query) { public R<IPage<FdpDeviceVO>> list(FdpDeviceDTO entity, Query query) {
return service.doList(Condition.getPage(query), entity); return service.doList(Condition.getPage(query), entity);
} }

2
hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpFaultController.java

@ -103,7 +103,7 @@ public class FdpFaultController extends BladeController {
@GetMapping("/queryFaultListOrd") @GetMapping("/queryFaultListOrd")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@OperationAnnotation(moduleName = "智能诊断",title = "智能诊断",operatorType = OperatorType.APPSYSTEMS,businessType = BusinessType.GENCODE, @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断",operatorType = OperatorType.APPSYSTEMS,businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询智能诊断列表")
@ApiOperation(value = "分页 查询参数:name,fdpId,emId,detectability,severity,fdpDeviceId,fdpDeviceName") @ApiOperation(value = "分页 查询参数:name,fdpId,emId,detectability,severity,fdpDeviceId,fdpDeviceName")
public R queryFaultListOrd(FdpFaultDTO req, Query query) { public R queryFaultListOrd(FdpFaultDTO req, Query query) {
return R.data(service.queryFaultListOrd(req, query)); return R.data(service.queryFaultListOrd(req, query));

2
hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpMonitorController.java

@ -153,7 +153,7 @@ public class FdpMonitorController extends BladeController {
@ApiOperation(value = "查询监测点列表") @ApiOperation(value = "查询监测点列表")
@OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType = @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断配置",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询") action = "分页查询智能诊断配置列表")
public R<IPage<FdpMonitorEntity>> listPage(FdpMonitorEntity entity, Query query) { public R<IPage<FdpMonitorEntity>> listPage(FdpMonitorEntity entity, Query query) {
return service.listPage(Condition.getPage(query), entity); return service.listPage(Condition.getPage(query), entity);
} }

2
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") @ApiOperation(value = "分页 查询参数:name,emId,faultId,reasonId,satisfaction")
@OperationAnnotation(moduleName = "智能诊断",title = "智能诊断任务",operatorType = OperatorType.MOBILE,businessType = @OperationAnnotation(moduleName = "智能诊断",title = "智能诊断任务",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询") action = "分页查询智能诊断任务列表")
public R<IPage<FdpTaskVO>> list(FdpTaskDTO req, Query query) { public R<IPage<FdpTaskVO>> list(FdpTaskDTO req, Query query) {
return service.list(req, query); return service.list(req, query);
} }

13
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.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable; import java.io.Serializable;
import java.time.YearMonth; import java.time.YearMonth;
@ -28,7 +31,7 @@ import lombok.experimental.Accessors;
@ApiModel("操作日志统计对象") @ApiModel("操作日志统计对象")
public class Statistics implements Serializable { 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; private Long id;
/** /**
* 功能模块统计 * 功能模块统计
*/ */
@ -63,7 +65,6 @@ public class Statistics implements Serializable {
private String dateCalculated; private String dateCalculated;
/** /**
* 创建时间 * 创建时间
*/ */
@ -79,4 +80,10 @@ public class Statistics implements Serializable {
private LocalDateTime updateTime; private LocalDateTime updateTime;
/**
* 排序
*/
private Integer sort;
} }

6
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 select module_name moduleName, sum(module_name_num) moduleNameNum
from hzims_statistics from hzims_statistics
<where> <where>
<if test="statistics.moduleName != null and statistics.moduleName != ''">
module_name like concat('%',#{statistics.moduleName},'%')
</if>
<if test="statistics.createTime != null"> <if test="statistics.createTime != null">
date_format(date_calculated,'%Y-%m-%d') &gt;= #{statistics.createTime} date_format(date_calculated,'%Y-%m-%d') &gt;= #{statistics.createTime}
</if> </if>
@ -13,6 +16,7 @@
and date_format(date_calculated,'%Y-%m-%d') &lt;= #{statistics.endTime} and date_format(date_calculated,'%Y-%m-%d') &lt;= #{statistics.endTime}
</if> </if>
</where> </where>
group by module_name; group by module_name
order by sort asc;
</select> </select>
</mapper> </mapper>

34
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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.entity.Statistics;
import com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper; import com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper;
import com.hnac.hzims.middle.systemlog.service.StatisticsService; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* <p> * <p>
@ -56,11 +60,13 @@ public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statist
//如果为空保存数据,如果不为空更新数据 //如果为空保存数据,如果不为空更新数据
if (statistics == null) { if (statistics == null) {
statistics = new Statistics(); statistics = new Statistics();
statistics.setSort(getModuleName(sysLogStatisticsVo.getModuleName()));
statistics.setDateCalculated(sysLogStatisticsVo.getOperationTime()); statistics.setDateCalculated(sysLogStatisticsVo.getOperationTime());
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount());
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); statistics.setModuleName(sysLogStatisticsVo.getModuleName());
this.save(statistics); this.save(statistics);
} else { } else {
statistics.setSort(getModuleName(sysLogStatisticsVo.getModuleName()));
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); statistics.setModuleName(sysLogStatisticsVo.getModuleName());
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount());
this.updateById(statistics); this.updateById(statistics);
@ -94,7 +100,33 @@ public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statist
public IPage<StatisticsResponseVo> selectPage(Page<StatisticsResponseVo> page1, StatisticsVo statistics) { public IPage<StatisticsResponseVo> selectPage(Page<StatisticsResponseVo> page1, StatisticsVo statistics) {
statistics.setCreateTime(statistics.getCreateTime().substring(0, 10)); statistics.setCreateTime(statistics.getCreateTime().substring(0, 10));
statistics.setEndTime(statistics.getEndTime().substring(0, 10)); statistics.setEndTime(statistics.getEndTime().substring(0, 10));
return baseMapper.selectPages(page1, statistics); IPage<StatisticsResponseVo> statisticsResponseVoIPage = baseMapper.selectPages(page1, statistics);
// List<StatisticsResponseVo> records = statisticsResponseVoIPage.getRecords();
// List<StatisticsResponseVo> collect = records.stream().sorted(Comparator.comparing(StatisticsResponseVo::getSort)).collect(Collectors.toList());
// statisticsResponseVoIPage.setRecords(collect);
return statisticsResponseVoIPage;
}
/**
* 排序
*/
private static int getModuleName(String moduleName) {
List<String> 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;
} }
} }

5
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsResponseVo.java

@ -22,4 +22,9 @@ public class StatisticsResponseVo {
* 模块统计 * 模块统计
*/ */
private Integer moduleNameNum; private Integer moduleNameNum;
/**
* 排序
*/
private Integer sort;
} }

1
hzims-service/hzims-middle/src/main/resources/db/1.0.2.sql

@ -0,0 +1 @@
alter table hzims_statistics add sort int comment '排序';

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/FocusAttributeController.java

@ -55,7 +55,7 @@ public class FocusAttributeController extends BladeController {
@OperationAnnotation( @OperationAnnotation(
moduleName = "站点管理", moduleName = "站点管理",
title = "集中监控属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, title = "集中监控属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询集中监控属性配置列表")
public R<IPage> getMainList(FocusAttributeDto focusAttributeDto, Query query) { public R<IPage> getMainList(FocusAttributeDto focusAttributeDto, Query query) {
return attributeService.getMainList(focusAttributeDto,query); return attributeService.getMainList(focusAttributeDto,query);
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java

@ -36,7 +36,7 @@ public class StFocusPropertiesController {
@OperationAnnotation( @OperationAnnotation(
moduleName = "站点管理", moduleName = "站点管理",
title = "重点属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, title = "重点属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询重点属性配置列表")
public R<IPage<StFocusPropertiesEntity>> pageList(StFocusPropertiesEntity entity, Query query) { public R<IPage<StFocusPropertiesEntity>> pageList(StFocusPropertiesEntity entity, Query query) {
LambdaQueryWrapper<StFocusPropertiesEntity> queryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<StFocusPropertiesEntity> queryWrapper = new LambdaQueryWrapper();
if(StringUtil.isNotBlank(entity.getPropertyName())){ if(StringUtil.isNotBlank(entity.getPropertyName())){

2
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 = @OperationAnnotation(moduleName = "智能诊断",title = "故障库",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询") action = "分页查询故障库列表")
public R<IPage<OperFaultVO>> list(OperFaultEntity entity, Query query) { public R<IPage<OperFaultVO>> list(OperFaultEntity entity, Query query) {
LambdaQueryWrapper<OperFaultEntity> queryWrapper = Condition.getQueryWrapper(new OperFaultEntity(),entity); LambdaQueryWrapper<OperFaultEntity> queryWrapper = Condition.getQueryWrapper(new OperFaultEntity(),entity);
queryWrapper.orderByDesc(OperFaultEntity::getUpdateTime); queryWrapper.orderByDesc(OperFaultEntity::getUpdateTime);

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainWorkBenchController.java

@ -45,7 +45,7 @@ public class MainWorkBenchController extends BladeController {
@OperationAnnotation( @OperationAnnotation(
moduleName = "站点管理", moduleName = "站点管理",
title = "工作台管理",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, title = "工作台管理",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询工作台管理列表")
public R<IPage<MainWorkBenchVO>> list(MainWorkBenchEntity entity, Query query) { public R<IPage<MainWorkBenchVO>> list(MainWorkBenchEntity entity, Query query) {
IPage<MainWorkBenchVO> vos = workBenchService.list(entity, query); IPage<MainWorkBenchVO> vos = workBenchService.list(entity, query);
return R.data(vos); return R.data(vos);

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/screen/controller/MainPageConfController.java

@ -60,7 +60,7 @@ public class MainPageConfController {
@OperationAnnotation( @OperationAnnotation(
moduleName = "站点管理", moduleName = "站点管理",
title = "大屏样式配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, title = "大屏样式配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询大屏样式配置列表")
public R<IPage<MainPageConfVo>> listPage (Query query, MainPageConfDto req) { public R<IPage<MainPageConfVo>> listPage (Query query, MainPageConfDto req) {
return R.data(mainPageConfService.listPage(query,req)); return R.data(mainPageConfService.listPage(query,req));
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HzimsAnalyzeModelStationController.java

@ -51,7 +51,7 @@ public class HzimsAnalyzeModelStationController extends BladeController {
@OperationAnnotation( @OperationAnnotation(
moduleName = "站点管理", moduleName = "站点管理",
title = "模型站点",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, title = "模型站点",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询模型站点列表")
public R<IPage<HzimsAnalyzeModelStationEntity>> list(HzimsAnalyzeModelStationEntity entity, Query query) { public R<IPage<HzimsAnalyzeModelStationEntity>> list(HzimsAnalyzeModelStationEntity entity, Query query) {
IPage<HzimsAnalyzeModelStationEntity> page = analyzeModelStationService.page(Condition.getPage(query), Condition.getQueryWrapper(entity)); IPage<HzimsAnalyzeModelStationEntity> page = analyzeModelStationService.page(Condition.getPage(query), Condition.getQueryWrapper(entity));
return R.data(page); return R.data(page);

4
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") @ApiOperation(value = "分页", notes = "传入StationEntity")
@OperationAnnotation( @OperationAnnotation(
moduleName = "站点管理", moduleName = "站点管理",
title = "水电站点管理", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, title = "站点管理", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询站点管理列表")
public R<IPage<StationVO>> list(StationEntity entity, Query query) { public R<IPage<StationVO>> list(StationEntity entity, Query query) {
IPage<StationVO> vos = stationService.list(entity, query); IPage<StationVO> vos = stationService.list(entity, query);
return R.data(vos); return R.data(vos);

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java

@ -79,7 +79,7 @@ public class StationVideoTypeController extends BladeController {
@OperationAnnotation( @OperationAnnotation(
moduleName = "站点管理", moduleName = "站点管理",
title = "视频配置", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, title = "视频配置", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询视频配置列表")
public R<IPage<StationVideoTypeVO>> list(StationVideoTypeEntity entity, Query query) { public R<IPage<StationVideoTypeVO>> list(StationVideoTypeEntity entity, Query query) {
LambdaQueryWrapper<StationVideoTypeEntity> queryWrapper = Condition.getQueryWrapper(new StationVideoTypeEntity(), entity); LambdaQueryWrapper<StationVideoTypeEntity> queryWrapper = Condition.getQueryWrapper(new StationVideoTypeEntity(), entity);
queryWrapper.orderByAsc(StationVideoTypeEntity::getStationId).orderByAsc(StationVideoTypeEntity::getSort); queryWrapper.orderByAsc(StationVideoTypeEntity::getStationId).orderByAsc(StationVideoTypeEntity::getSort);

Loading…
Cancel
Save