Browse Source

修改工作票及消息日志统计

zhongwei
段飞宇 1 year ago
parent
commit
7194fd9e9f
  1. 15
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/StatisticsController.java
  2. 49
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java
  3. 37
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java
  4. 14
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java
  5. 5
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml
  6. 13
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java
  7. 21
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml
  8. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/StatisticsService.java
  9. 12
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java
  10. 20
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java
  11. 16
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java
  12. 25
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsResponseVo.java
  13. 25
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsTitleResponseVo.java
  14. 7
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java
  15. 7
      hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java
  16. 7
      hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessageTemplateController.java
  17. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/FocusAttributeController.java
  18. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java
  19. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/MainWorkBenchController.java
  20. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/screen/controller/MainPageConfController.java
  21. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HzimsAnalyzeModelStationController.java
  22. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java
  23. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java
  24. 10
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  25. BIN
      hzims-service/ticket/src/main/resources/template/secondary/工作票危险点分析及控制措施票.docx
  26. BIN
      hzims-service/ticket/src/main/resources/template/secondary/工作票安全措施附页.docx
  27. BIN
      hzims-service/ticket/src/main/resources/template/电气第一种工作票模版.docx

15
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/StatisticsController.java

@ -9,6 +9,7 @@ import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.middle.systemlog.entity.Statistics; import com.hnac.hzims.middle.systemlog.entity.Statistics;
import com.hnac.hzims.middle.systemlog.entity.SysLog; import com.hnac.hzims.middle.systemlog.entity.SysLog;
import com.hnac.hzims.middle.systemlog.service.StatisticsService; import com.hnac.hzims.middle.systemlog.service.StatisticsService;
import com.hnac.hzims.middle.systemlog.vo.StatisticsResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo; import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -44,11 +45,6 @@ public class StatisticsController {
* @param statistics * @param statistics
* @return * @return
*/ */
@ApiOperation("操作日志统计数据分页查询")
@OperationAnnotation(moduleName = "操作日志",
operatorType = OperatorType.MANAGE,
businessType = BusinessType.INSERT
, title = "操作日志统计数据", action = "操作日志统计数据分页查询")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200,message = "OK",response = Statistics.class), @ApiResponse(code = 200,message = "OK",response = Statistics.class),
}) })
@ -57,8 +53,8 @@ public class StatisticsController {
@PathVariable Long page, @PathVariable Long page,
@PathVariable Long size, @PathVariable Long size,
StatisticsVo statistics) { StatisticsVo statistics) {
Page<Statistics> page1 = new Page(page, size); Page<StatisticsResponseVo> page1 = new Page(page, size);
IPage<Statistics> pageSize = statisticsService.selectPage(page1, statistics); IPage<StatisticsResponseVo> pageSize = statisticsService.selectPage(page1, statistics);
return R.data(pageSize); return R.data(pageSize);
} }
@ -73,10 +69,6 @@ public class StatisticsController {
@ApiResponse(code = 200,message = "OK",response = Statistics.class), @ApiResponse(code = 200,message = "OK",response = Statistics.class),
}) })
@ApiOperation("根据Id查询日志") @ApiOperation("根据Id查询日志")
@OperationAnnotation(moduleName = "操作日志",
operatorType = OperatorType.MANAGE,
businessType = BusinessType.INSERT
, title = "操作日志统计数据", action = "根据Id查询日志")
@GetMapping("/get/{id}") @GetMapping("/get/{id}")
public R list(@PathVariable Long id) { public R list(@PathVariable Long id) {
Statistics statistics = statisticsService.getById(id); Statistics statistics = statisticsService.getById(id);
@ -84,5 +76,6 @@ public class StatisticsController {
} }
} }

49
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java

@ -11,6 +11,8 @@ import com.hnac.hzims.common.logs.to.SysLogTo;
import com.hnac.hzims.middle.systemlog.entity.Statistics; import com.hnac.hzims.middle.systemlog.entity.Statistics;
import com.hnac.hzims.middle.systemlog.entity.SysLog; import com.hnac.hzims.middle.systemlog.entity.SysLog;
import com.hnac.hzims.middle.systemlog.service.SysLogService; import com.hnac.hzims.middle.systemlog.service.SysLogService;
import com.hnac.hzims.middle.systemlog.vo.StatisticsResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsTitleResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo; import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogVo; import com.hnac.hzims.middle.systemlog.vo.SysLogVo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -48,10 +50,6 @@ public class SysLogController {
* 保存操作日志 * 保存操作日志
* @param sysLogToList * @param sysLogToList
*/ */
@OperationAnnotation(moduleName = "操作日志",
operatorType = OperatorType.MANAGE,
businessType = BusinessType.INSERT
,title = "系统日志",action = "保存操作日志")
@ApiOperation("保存操作日志") @ApiOperation("保存操作日志")
@PostMapping("/batchSave") @PostMapping("/batchSave")
public void saveBatch(@RequestBody List<SysLogTo> sysLogToList) { public void saveBatch(@RequestBody List<SysLogTo> sysLogToList) {
@ -78,10 +76,6 @@ public class SysLogController {
* @param size * @param size
* @return * @return
*/ */
@OperationAnnotation(moduleName = "操作日志",
operatorType = OperatorType.MANAGE,
businessType = BusinessType.INSERT
,title = "系统日志",action = "日志分页查询")
@ApiOperation("日志分页查询") @ApiOperation("日志分页查询")
@GetMapping("/selectPage/{page}/{size}") @GetMapping("/selectPage/{page}/{size}")
@ApiResponses({ @ApiResponses({
@ -104,10 +98,6 @@ public class SysLogController {
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200,message = "OK",response = SysLog.class), @ApiResponse(code = 200,message = "OK",response = SysLog.class),
}) })
@OperationAnnotation(moduleName = "操作日志",
operatorType = OperatorType.MANAGE,
businessType = BusinessType.INSERT
,title = "系统日志",action = "根据Id获取日志数据")
@ApiOperation("根据Id获取日志数据") @ApiOperation("根据Id获取日志数据")
@GetMapping("/get/{id}") @GetMapping("/get/{id}")
public R getById(@PathVariable Long id) { public R getById(@PathVariable Long id) {
@ -116,30 +106,21 @@ public class SysLogController {
} }
/**
* 根据功能模块统计操作模块
*/
@GetMapping("/statisticsTitleByModuleName/{page}/{size}")
public R statisticsTitleByModuleName(
@PathVariable Long page,
@PathVariable Long size,
StatisticsVo statisticsVo){
Page<StatisticsTitleResponseVo> page1 = new Page(page, size);
List<StatisticsTitleResponseVo> responseVos = sysLogService.statisticsTitleByModuleName(page1,
statisticsVo);
return R.data(responseVos);
}
// /**
// * 根据Id获取日志数据
// * @return
// */
// @ApiResponses({
// @ApiResponse(code = 200,message = "OK",response = SysLog.class),
// })
// @OperationAnnotation(moduleName = "操作日志",
// operatorType = OperatorType.MANAGE,
// businessType = BusinessType.INSERT
// ,title = "系统日志",action = "根据操作模块查询信息")
// @ApiOperation("根据操作模块查询信息")
// @GetMapping("/selectPageByModuleName/{page}/{size}")
// public R selectPageByModuleName(
// @PathVariable Long page,
// @PathVariable Long size,
// SysLogVo sysLogVo) {
// Page<SysLog> objectPage = new Page<>(page,size);
// IPage<SysLog> sysLog = sysLogService.selectPageByModuleName(objectPage,sysLogVo);
// return R.data(sysLog);
// }
} }

37
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/Statistics.java

@ -36,28 +36,6 @@ public class Statistics implements Serializable {
@TableField("id") @TableField("id")
private Long id; private Long id;
/**
* 统计日期
*/
@ApiModelProperty("统计日期")
@TableField("date_calculated")
private String dateCalculated;
/**
* 操作模块
*/
@ApiModelProperty("操作模块")
@TableField("title")
private String title;
/**
* 操作模块统计
*/
@ApiModelProperty("操作模块统计")
@TableField("title_num")
private Integer titleNum;
/** /**
@ -77,18 +55,13 @@ public class Statistics implements Serializable {
/** /**
* 请求路径统计 * 统计日期
*/ */
@ApiModelProperty("请求路径统计") @ApiModelProperty("统计日期")
@TableField("path") @TableField("date_calculated")
private String path; private String dateCalculated;
/**
* 请求路径统计
*/
@ApiModelProperty("请求路径统计")
@TableField("path_num")
private Integer pathNum;
/** /**
* 创建时间 * 创建时间

14
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.java

@ -1,7 +1,12 @@
package com.hnac.hzims.middle.systemlog.mapper; package com.hnac.hzims.middle.systemlog.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.middle.systemlog.entity.Statistics; import com.hnac.hzims.middle.systemlog.entity.Statistics;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.middle.systemlog.vo.StatisticsResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import org.apache.ibatis.annotations.Param;
/** /**
* <p> * <p>
@ -13,4 +18,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface StatisticsMapper extends BaseMapper<Statistics> { public interface StatisticsMapper extends BaseMapper<Statistics> {
/**
* 分页查询
*
* @param page1
* @param statistics
* @return
*/
IPage<StatisticsResponseVo> selectPages(Page<StatisticsResponseVo> page1, @Param("statistics") StatisticsVo statistics);
} }

5
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/StatisticsMapper.xml

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper"> <mapper namespace="com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper">
<select id="selectPages" resultType="com.hnac.hzims.middle.systemlog.vo.StatisticsResponseVo">
select module_name moduleName, sum(module_name_num) moduleNameNum
from hzims_statistics
group by module_name;
</select>
</mapper> </mapper>

13
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java

@ -1,8 +1,12 @@
package com.hnac.hzims.middle.systemlog.mapper; package com.hnac.hzims.middle.systemlog.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.middle.systemlog.entity.SysLog; import com.hnac.hzims.middle.systemlog.entity.SysLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.middle.systemlog.vo.StatisticsTitleResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo; import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -18,9 +22,18 @@ public interface SysLogMapper extends BaseMapper<SysLog> {
/** /**
* 查询统计的数据 * 查询统计的数据
*
* @return * @return
*/ */
List<SysLogStatisticsVo> countStatistics(); List<SysLogStatisticsVo> countStatistics();
/**
* 根据功能模块统计操作模块
*
* @param moduleName
* @param statisticsVo
* @return
*/
List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> moduleName, @Param("statisticsVo") StatisticsVo statisticsVo);
} }

21
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml

@ -13,11 +13,26 @@
<select id="countStatistics" resultType="com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo"> <select id="countStatistics" resultType="com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo">
select date_format(operation_time, '%Y-%m-%d') operationTime, select date_format(operation_time, '%Y-%m-%d') operationTime,
module_name, module_name,
count(module_name) moduleNameCount, count(module_name) moduleNameCount
group_concat(distinct title) title,
group_concat(distinct path) path
from hzims_sys_log from hzims_sys_log
where to_days(operation_time) = to_days(now()) where to_days(operation_time) = to_days(now())
group by module_name; group by module_name;
</select> </select>
<select id="statisticsTitleByModuleName"
resultType="com.hnac.hzims.middle.systemlog.vo.StatisticsTitleResponseVo">
select title, count(title) titleCount
from hzims_sys_log
<where>
module_name = #{statisticsVo.moduleName}
<if test="statisticsVo.createTime != null">
and operation_time &gt;= #{statisticsVo.createTime}
</if>
<if test="statisticsVo.endTime != null">
and operation_time &lt;= #{statisticsVo.endTime}
</if>
</where>
group by title;
</select>
</mapper> </mapper>

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/StatisticsService.java

@ -4,6 +4,7 @@ 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.hnac.hzims.middle.systemlog.entity.Statistics; import com.hnac.hzims.middle.systemlog.entity.Statistics;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.middle.systemlog.vo.StatisticsResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo; import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo; import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo;
@ -36,6 +37,6 @@ public interface StatisticsService extends IService<Statistics> {
* @param statistics * @param statistics
* @return * @return
*/ */
IPage<Statistics> selectPage(Page<Statistics> page1, StatisticsVo statistics); IPage<StatisticsResponseVo> selectPage(Page<StatisticsResponseVo> page1, StatisticsVo statistics);
} }

12
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java

@ -4,6 +4,8 @@ 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.hnac.hzims.middle.systemlog.entity.SysLog; import com.hnac.hzims.middle.systemlog.entity.SysLog;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.middle.systemlog.vo.StatisticsTitleResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo; import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogVo; import com.hnac.hzims.middle.systemlog.vo.SysLogVo;
@ -34,4 +36,14 @@ public interface SysLogService extends IService<SysLog> {
*/ */
IPage<SysLog> selectPage(Page<SysLog> page1, SysLogVo sysLog); IPage<SysLog> selectPage(Page<SysLog> page1, SysLogVo sysLog);
/**
* 根据功能模块统计操作模块
*
* @param statisticsTitleResponseVoPage
* @param statisticsVo
* @return
*/
List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage,
StatisticsVo statisticsVo);
} }

20
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java

@ -8,6 +8,7 @@ import com.hnac.hzims.middle.systemlog.mapper.StatisticsMapper;
import com.hnac.hzims.middle.systemlog.service.StatisticsService; import com.hnac.hzims.middle.systemlog.service.StatisticsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.middle.systemlog.service.SysLogService; import com.hnac.hzims.middle.systemlog.service.SysLogService;
import com.hnac.hzims.middle.systemlog.vo.StatisticsResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo; import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo; import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -60,19 +61,11 @@ public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statist
statistics = new Statistics(); statistics = new Statistics();
statistics.setDateCalculated(sysLogStatisticsVo.getOperationTime()); statistics.setDateCalculated(sysLogStatisticsVo.getOperationTime());
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount());
statistics.setTitle(sysLogStatisticsVo.getTitle());
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); statistics.setModuleName(sysLogStatisticsVo.getModuleName());
statistics.setPath(sysLogStatisticsVo.getPath());
// statistics.setTitleNum(sysLogStatisticsVo.getTitleCount());
// statistics.setPathNum(sysLogStatisticsVo.getPathCount());
statisticsService.save(statistics); statisticsService.save(statistics);
} else { } else {
statistics.setTitle(sysLogStatisticsVo.getTitle());
statistics.setModuleName(sysLogStatisticsVo.getModuleName()); statistics.setModuleName(sysLogStatisticsVo.getModuleName());
statistics.setPath(sysLogStatisticsVo.getPath());
statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount()); statistics.setModuleNameNum(sysLogStatisticsVo.getModuleNameCount());
//statistics.setTitleNum(sysLogStatisticsVo.getTitleCount());
//statistics.setPathNum(sysLogStatisticsVo.getPathCount());
statisticsService.updateById(statistics); statisticsService.updateById(statistics);
} }
} }
@ -101,14 +94,7 @@ public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statist
* @return * @return
*/ */
@Override @Override
public IPage<Statistics> selectPage(Page<Statistics> page1, StatisticsVo statistics) { public IPage<StatisticsResponseVo> selectPage(Page<StatisticsResponseVo> page1, StatisticsVo statistics) {
QueryWrapper<Statistics> queryWrapper = new QueryWrapper<>(); return baseMapper.selectPages(page1,statistics);
//开始时间
queryWrapper.lambda().ge(StringUtils.isNotEmpty(statistics.getCreateTime()), Statistics::getDateCalculated, statistics.getCreateTime());
//结束时间
queryWrapper.lambda().le(StringUtils.isNotEmpty(statistics.getEndTime()), Statistics::getDateCalculated, statistics.getEndTime());
queryWrapper.lambda().orderByDesc(Statistics::getDateCalculated);
IPage<Statistics> statisticsPage = baseMapper.selectPage(page1, queryWrapper);
return statisticsPage;
} }
} }

16
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java

@ -4,17 +4,17 @@ 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.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.middle.systemlog.entity.Statistics;
import com.hnac.hzims.middle.systemlog.entity.SysLog; import com.hnac.hzims.middle.systemlog.entity.SysLog;
import com.hnac.hzims.middle.systemlog.mapper.SysLogMapper; import com.hnac.hzims.middle.systemlog.mapper.SysLogMapper;
import com.hnac.hzims.middle.systemlog.service.SysLogService; import com.hnac.hzims.middle.systemlog.service.SysLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.middle.systemlog.vo.StatisticsTitleResponseVo;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo; import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogVo; import com.hnac.hzims.middle.systemlog.vo.SysLogVo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@ -53,6 +53,18 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> impleme
return statisticsPage; return statisticsPage;
} }
/**
* 根据功能模块统计操作模块
*
* @param statisticsTitleResponseVoPage
* @param statisticsVo
* @return
*/
@Override
public List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage, StatisticsVo statisticsVo) {
return baseMapper.statisticsTitleByModuleName(statisticsTitleResponseVoPage, statisticsVo);
}
/** /**
* 日志查询接口 * 日志查询接口

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

@ -0,0 +1,25 @@
package com.hnac.hzims.middle.systemlog.vo;
import lombok.Data;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/9 9:37
*/
@Data
public class StatisticsResponseVo {
/**
* 模块名称
*/
private String moduleName;
/**
* 模块统计
*/
private Integer moduleNameNum;
}

25
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsTitleResponseVo.java

@ -0,0 +1,25 @@
package com.hnac.hzims.middle.systemlog.vo;
import lombok.Data;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/9 9:37
*/
@Data
public class StatisticsTitleResponseVo {
/**
* 模块名称
*/
private String title;
/**
* 模块统计
*/
private Integer titleCount;
}

7
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java

@ -24,6 +24,13 @@ public class StatisticsVo {
/** /**
* 操作模块
*/
private String moduleName;
/**
* 开始时间 * 开始时间
*/ */
//@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING) //@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING)

7
hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java

@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.entity.MessagePushRecordEntity; import com.hnac.hzims.message.entity.MessagePushRecordEntity;
import com.hnac.hzims.message.service.IMessagePushRecordService; import com.hnac.hzims.message.service.IMessagePushRecordService;
@ -54,6 +57,10 @@ public class MessagePushRecordController extends BladeController {
@GetMapping("/listPage") @GetMapping("/listPage")
@ApiOperation("分页查询消息推送记录列表") @ApiOperation("分页查询消息推送记录列表")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@OperationAnnotation(
moduleName = "消息管理",
title = "消息管理",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询消息推送记录列表")
public R<IPage<MessagePushRecordEntity>> listPage(MessagePushRecordEntity request, Query query) { public R<IPage<MessagePushRecordEntity>> listPage(MessagePushRecordEntity request, Query query) {
return R.data(messagePushRecordService.listPage(request,query)); return R.data(messagePushRecordService.listPage(request,query));
} }

7
hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessageTemplateController.java

@ -3,6 +3,9 @@ package com.hnac.hzims.message.controller;
import com.aliyun.oss.ServiceException; import com.aliyun.oss.ServiceException;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.message.entity.config.MessageTemplateEntity; import com.hnac.hzims.message.entity.config.MessageTemplateEntity;
import com.hnac.hzims.message.service.IMessageTemplateService; import com.hnac.hzims.message.service.IMessageTemplateService;
import groovy.util.logging.Slf4j; import groovy.util.logging.Slf4j;
@ -43,6 +46,10 @@ public class MessageTemplateController extends BladeController {
@GetMapping("/listPage") @GetMapping("/listPage")
@ApiOperation("分页查询") @ApiOperation("分页查询")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@OperationAnnotation(
moduleName = "消息管理",
title = "消息模版配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询")
public R<IPage<MessageTemplateEntity>> listPage(MessageTemplateEntity request, Query query) { public R<IPage<MessageTemplateEntity>> listPage(MessageTemplateEntity request, Query query) {
return R.data(messageTemplateService.listPage(request,query)); return R.data(messageTemplateService.listPage(request,query));
} }

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

@ -3,6 +3,9 @@ package com.hnac.hzims.operational.config.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -49,6 +52,10 @@ public class FocusAttributeController extends BladeController {
@PostMapping("/getMainList") @PostMapping("/getMainList")
@ApiOperation("查询列表(主界面)") @ApiOperation("查询列表(主界面)")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@OperationAnnotation(
moduleName = "站点管理",
title = "集中监控属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
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);
} }

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

@ -2,6 +2,9 @@ package com.hnac.hzims.operational.config.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.config.entity.StFocusPropertiesEntity; import com.hnac.hzims.operational.config.entity.StFocusPropertiesEntity;
import com.hnac.hzims.operational.config.service.StFocusPropertiesService; import com.hnac.hzims.operational.config.service.StFocusPropertiesService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -30,6 +33,10 @@ public class StFocusPropertiesController {
@ApiLog @ApiLog
@ApiOperation("分页查询") @ApiOperation("分页查询")
@RequestMapping(value = "/pageList", method = RequestMethod.GET) @RequestMapping(value = "/pageList", method = RequestMethod.GET)
@OperationAnnotation(
moduleName = "站点管理",
title = "重点属性配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
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())){

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

@ -42,6 +42,10 @@ public class MainWorkBenchController extends BladeController {
@RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST})
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "分页", notes = "传入StationEntity") @ApiOperation(value = "分页", notes = "传入StationEntity")
@OperationAnnotation(
moduleName = "站点管理",
title = "工作台管理",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
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);

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

@ -2,6 +2,9 @@ package com.hnac.hzims.operational.screen.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.screen.dto.MainPageConfDto; import com.hnac.hzims.operational.screen.dto.MainPageConfDto;
import com.hnac.hzims.operational.screen.entity.MainPageConfEntity; import com.hnac.hzims.operational.screen.entity.MainPageConfEntity;
import com.hnac.hzims.operational.screen.service.IMainPageConfService; import com.hnac.hzims.operational.screen.service.IMainPageConfService;
@ -54,6 +57,10 @@ public class MainPageConfController {
@GetMapping("/listPage") @GetMapping("/listPage")
@ApiOperation("分页查询大屏首页配置") @ApiOperation("分页查询大屏首页配置")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@OperationAnnotation(
moduleName = "站点管理",
title = "大屏样式配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
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));
} }
@ -70,6 +77,10 @@ public class MainPageConfController {
@ApiLog @ApiLog
@GetMapping("/list") @GetMapping("/list")
@ApiOperation("更新大屏首页配置查询") @ApiOperation("更新大屏首页配置查询")
@OperationAnnotation(
moduleName = "实时画面",
title = "画面展示",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "更新大屏首页配置查询")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
public R<List<MainPageConfEntity>> list (MainPageConfDto req) { public R<List<MainPageConfEntity>> list (MainPageConfDto req) {
return R.data(mainPageConfService.list(req)); return R.data(mainPageConfService.list(req));

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

@ -3,6 +3,9 @@ package com.hnac.hzims.operational.station.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity;
import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity; import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity;
import com.hnac.hzims.operational.station.service.IHzimsAnalyzeModelStationService; import com.hnac.hzims.operational.station.service.IHzimsAnalyzeModelStationService;
@ -45,6 +48,10 @@ public class HzimsAnalyzeModelStationController extends BladeController {
@ApiLog @ApiLog
@ApiOperation(value = "查询分页数据") @ApiOperation(value = "查询分页数据")
@GetMapping(value = "/list") @GetMapping(value = "/list")
@OperationAnnotation(
moduleName = "站点管理",
title = "模型站点",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
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

@ -61,8 +61,8 @@ public class StationController extends BladeController {
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@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);

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

@ -76,6 +76,10 @@ public class StationVideoTypeController extends BladeController {
@RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST})
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "分页", notes = "传入stationVideoType") @ApiOperation(value = "分页", notes = "传入stationVideoType")
@OperationAnnotation(
moduleName = "站点管理",
title = "视频配置",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
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);

10
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -661,6 +661,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
measure.setTicketId(workTicketInfoEntity.getId()); measure.setTicketId(workTicketInfoEntity.getId());
measure.setCreateDept(workTicketInfoEntity.getCreateDept()); measure.setCreateDept(workTicketInfoEntity.getCreateDept());
measure.setCreateUser(workTicketInfoEntity.getCreateUser()); measure.setCreateUser(workTicketInfoEntity.getCreateUser());
measure.setExecutor(AuthUtil.getUserId());
return measure; return measure;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
boolean savedBatch = workTicketSafetyMeasureService.saveBatch(measureEntityList); boolean savedBatch = workTicketSafetyMeasureService.saveBatch(measureEntityList);
@ -829,6 +830,13 @@ public class TicketProcessServiceImpl implements TicketProcessService {
docPath = docPath + name + ".docx"; docPath = docPath + name + ".docx";
log.info("输出word路径:{}", docPath); log.info("输出word路径:{}", docPath);
//第一种工作票
resultMap.put("one", status == 1 ? "☑":"□");
//第二种工作票
resultMap.put("two", status == 2 ? "☑":"□");
//水力机器工作票
resultMap.put("three", status == 3 ? "☑":"□");
//导入文档 //导入文档
File file = new File(docPath); File file = new File(docPath);
MergeDocUtils.mergeDoc(docFileList, file); MergeDocUtils.mergeDoc(docFileList, file);
@ -1158,7 +1166,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
if (matterLibraryListFlow.size() <= i) { if (matterLibraryListFlow.size() <= i) {
objectObjectHashMap.put("safetyMeasure1", ""); objectObjectHashMap.put("safetyMeasure1", "");
} else { } else {
Map<String, Object> stringObjectMap = matterLibraryListFive.get(i); Map<String, Object> stringObjectMap = matterLibraryListFlow.get(i);
objectObjectHashMap.put("safetyMeasure1", stringObjectMap.get("safetyMeasure")); objectObjectHashMap.put("safetyMeasure1", stringObjectMap.get("safetyMeasure"));
} }
} else { } else {

BIN
hzims-service/ticket/src/main/resources/template/secondary/工作票危险点分析及控制措施票.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/secondary/工作票安全措施附页.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/电气第一种工作票模版.docx

Binary file not shown.
Loading…
Cancel
Save