Browse Source

#新增告警模块

zhongwei
yang_shj 1 year ago
parent
commit
d530c232f8
  1. 13
      hzims-service-api/alarm-api/pom.xml
  2. 9
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/constants/AlarmConstants.java
  3. 60
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmConfigDetailEntity.java
  4. 29
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmConfigEntity.java
  5. 68
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmEntity.java
  6. 20
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmHistoryEntity.java
  7. 1
      hzims-service-api/pom.xml
  8. 134
      hzims-service/hzims-alarm/pom.xml
  9. 30
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/AlarmApplication.java
  10. 73
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigController.java
  11. 73
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigDetailController.java
  12. 12
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/mapper/AlarmConfigDetailMapper.java
  13. 12
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/mapper/AlarmConfigMapper.java
  14. 11
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigDetailService.java
  15. 11
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java
  16. 19
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigDetailServiceImpl.java
  17. 19
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java
  18. 12
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHistoryMapper.java
  19. 12
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmMapper.java
  20. 11
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmHistoryService.java
  21. 11
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmService.java
  22. 19
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHistoryServiceImpl.java
  23. 19
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java
  24. 41
      hzims-service/hzims-alarm/src/main/resources/application.yml
  25. 7
      hzims-service/hzims-alarm/src/main/resources/bootstrap.yml
  26. 5
      hzims-service/hzims-alarm/src/main/resources/mapper/AlarmConfigDetatilMapper.xml
  27. 5
      hzims-service/hzims-alarm/src/main/resources/mapper/AlarmConfigMapper.xml
  28. 5
      hzims-service/hzims-alarm/src/main/resources/mapper/AlarmHistoryMapper.xml
  29. 5
      hzims-service/hzims-alarm/src/main/resources/mapper/AlarmMapper.xml
  30. 15
      hzims-service/hzims-alarm/src/test/java/com/hnac/hzims/alarm/MiddleApplicationTests.java
  31. 16
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  32. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java
  33. 41
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java
  34. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java
  35. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java
  36. 4
      hzims-service/pom.xml

13
hzims-service-api/alarm-api/pom.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>hzims-service-api</artifactId>
<groupId>com.hnac.hzims</groupId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>alarm-api</artifactId>
<packaging>jar</packaging>
</project>

9
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/constants/AlarmConstants.java

@ -0,0 +1,9 @@
package com.hnac.hzims.alarm.constants;
/**
* @author ysj
*/
public interface AlarmConstants {
public final static String APP_NAME = "hzims-alarm";
}

60
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmConfigDetailEntity.java

@ -0,0 +1,60 @@
package com.hnac.hzims.alarm.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* @author ysj
*/
@Data
@TableName("hzimsalarmconfigdetail")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "站点告警配置详情对象", description = "站点告警配置详情对象")
public class AlarmConfigDetailEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "告警配置ID")
private Long strategyId;
@ApiModelProperty(value = "告警大类")
private String alarmType;
@ApiModelProperty(value = "告警子类")
private String alarmChiledType;
@ApiModelProperty(value = "告警内容")
private String alarmContext;
@ApiModelProperty(value = "告警监测点")
private String alarmPoint;
@ApiModelProperty(value = "是否集中监控右侧列表展示 : 0-展示 1-不展示")
private Integer isRightTabulation;
@ApiModelProperty(value = "是否集中监控弹窗展示 : 0-展示 1-不展示")
private Integer isShowAlert;
@ApiModelProperty(value = "是否集中监控铃铛展示 : 0-展示 1-不展示")
private Integer isSmallBell;
@ApiModelProperty(value = "是否集中监控遮罩展示 : 0-展示 1-不展示")
private Integer isMask;
@ApiModelProperty(value = "是否语音播报 : 0-播报 1-不播报")
private Integer isBroadcast;
@ApiModelProperty(value = "是否进行平台消息推送 : 0-推送 1-不推送")
private Integer isPlatformMessage;
@ApiModelProperty(value = "是否短信推送 :0-推送 1-不推送")
private Integer isShortMessage;
@ApiModelProperty(value = "是否微信公众号消息推送 :0-推送 1-不推送")
private Integer isWxMessage;
}

29
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmConfigEntity.java

@ -0,0 +1,29 @@
package com.hnac.hzims.alarm.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* @author ysj
*/
@Data
@TableName("hzims_alarm_config")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "告警配置对象", description = "告警配置")
public class AlarmConfigEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "站点编号")
private String stationId;
@ApiModelProperty(value = "站点名称")
private String stationName;
@ApiModelProperty(value = "是否启用 :0-启用 1-不启用")
private Integer isEnable;
}

68
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmEntity.java

@ -0,0 +1,68 @@
package com.hnac.hzims.alarm.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.util.Date;
/**
* @author ysj
*/
@Data
@TableName("hzims_alarm")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "告警对象", description = "各告警数据源保存对象")
public class AlarmEntity extends TenantEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "站点编号")
private String stationId;
@ApiModelProperty(value = "站点名称")
private String stationName;
@ApiModelProperty(value = "设备编码")
private String deviceCode;
@ApiModelProperty(value = "设备名称")
private String deviceName;
@ApiModelProperty(value = "告警ID")
private String alarmId;
@ApiModelProperty(value = "告警类型 :0- HZ3000告警 1 -等级告警 2 -条件告警 3-FDP智能预警")
private Integer alarmSource;
@ApiModelProperty(value = "告警子类")
private Integer alarmType;
@ApiModelProperty(value = "告警属性标识")
private String alarmSignage;
@ApiModelProperty(value = "告警内容")
private String alarmContext;
@ApiModelProperty(value = "告警状态")
private Integer alarmStatus;
@ApiModelProperty(value = "告警等级")
private Integer alarmLevel;
@ApiModelProperty(value = "告警动作数值")
private String alarmValue;
@ApiModelProperty(value = "告警数量")
private Integer alarmCount;
@ApiModelProperty(value = "告警时间")
private Date alarmTime;
@ApiModelProperty(value = "监测点")
private Date realId;
}

20
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/entity/AlarmHistoryEntity.java

@ -0,0 +1,20 @@
package com.hnac.hzims.alarm.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author ysj
*/
@Data
@TableName("hzims_alarm_history")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "告警对象", description = "各告警数据源保存对象")
public class AlarmHistoryEntity extends AlarmEntity {
private static final long serialVersionUID = 1L;
}

1
hzims-service-api/pom.xml

@ -27,6 +27,7 @@
<module>weather-api</module> <module>weather-api</module>
<module>common-api</module> <module>common-api</module>
<module>middle-api</module> <module>middle-api</module>
<module>alarm-api</module>
</modules> </modules>
<dependencies> <dependencies>

134
hzims-service/hzims-alarm/pom.xml

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-service</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>hzims-alarm</artifactId>
<packaging>jar</packaging>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.6.13</spring-boot.version>
<swagger-bootstrap-ui.version>1.9.6</swagger-bootstrap-ui.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-common</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
<exclusions>
<exclusion>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-redis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-redis</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-auto</artifactId>
<scope>provided</scope>
</dependency>
<!--生成代码-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</dependency>
<!-- velocity 模板引擎, Mybatis Plus 代码生成器需要-->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.2</version>
</dependency>
<!--swagger-bootstrap-ui-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>${swagger-bootstrap-ui.version}</version>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>alarm-api</artifactId>
<version>4.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.name}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

30
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/AlarmApplication.java

@ -0,0 +1,30 @@
package com.hnac.hzims.alarm;
import com.hnac.hzims.alarm.constants.AlarmConstants;
import org.springblade.core.cloud.feign.EnableBladeFeign;
import org.springblade.core.launch.BladeApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.ComponentScan;
import javax.annotation.Resource;
/**
* @author ysj
*/
@EnableBladeFeign
@SpringCloudApplication
@ComponentScan(basePackages = {"com.hnac.hzims.alarm.*"})
@Resource
public class AlarmApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
BladeApplication.run(AlarmConstants.APP_NAME, AlarmApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return BladeApplication.createSpringApplicationBuilder(builder, AlarmConstants.APP_NAME, AlarmApplication.class);
}
}

73
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigController.java

@ -0,0 +1,73 @@
package com.hnac.hzims.alarm.config.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.alarm.entity.AlarmConfigEntity;
import com.hnac.hzims.alarm.config.service.AlarmConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.Map;
/**
* @author ysj
*/
@RestController
@AllArgsConstructor
@RequestMapping("/alarm/config")
@Api(value = "告警配置", tags = "告警配置")
public class AlarmConfigController extends BladeController {
private final AlarmConfigService alarmConfigService;
@PostMapping("/save")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增", notes = "传入AlarmConfigEntity对象")
public R save(@Valid @RequestBody AlarmConfigEntity entity) {
return R.status(alarmConfigService.save(entity));
}
@PostMapping("/update")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "修改", notes = "传入AlarmConfigEntity对象")
public R update(@Valid @RequestBody AlarmConfigEntity entity) {
return R.status(alarmConfigService.updateById(entity));
}
@PostMapping("/remove")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(alarmConfigService.deleteLogic(Func.toLongList(ids)));
}
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "分页", notes = "传入em_model_param")
public R<IPage<AlarmConfigEntity>> list(@ApiIgnore @RequestParam Map<String,Object> params, Query query) {
QueryWrapper<AlarmConfigEntity> queryWrapper = Condition.getQueryWrapper( params, AlarmConfigEntity.class);
IPage<AlarmConfigEntity> pages = alarmConfigService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}
@GetMapping("/detail")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "详情", notes = "传入em_model_param")
public R<AlarmConfigEntity> detail(AlarmConfigEntity entity) {
AlarmConfigEntity detail = alarmConfigService.getOne(Condition.getQueryWrapper(entity));
return R.data(detail);
}
}

73
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/controller/AlarmConfigDetailController.java

@ -0,0 +1,73 @@
package com.hnac.hzims.alarm.config.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity;
import com.hnac.hzims.alarm.config.service.AlarmConfigDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.Map;
/**
* @author ysj
*/
@RestController
@AllArgsConstructor
@RequestMapping("/alarm/configDetail")
@Api(value = "告警配置", tags = "告警配置")
public class AlarmConfigDetailController extends BladeController {
private final AlarmConfigDetailService detailService;
@PostMapping("/save")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "新增", notes = "传入AlarmConfigEntity对象")
public R save(@Valid @RequestBody AlarmConfigDetailEntity entity) {
return R.status(detailService.save(entity));
}
@PostMapping("/update")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "修改", notes = "传入AlarmConfigEntity对象")
public R update(@Valid @RequestBody AlarmConfigDetailEntity entity) {
return R.status(detailService.updateById(entity));
}
@PostMapping("/remove")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(detailService.deleteLogic(Func.toLongList(ids)));
}
@GetMapping("/list")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "分页", notes = "传入em_model_param")
public R<IPage<AlarmConfigDetailEntity>> list(@ApiIgnore @RequestParam Map<String,Object> params, Query query) {
QueryWrapper<AlarmConfigDetailEntity> queryWrapper = Condition.getQueryWrapper( params, AlarmConfigDetailEntity.class);
IPage<AlarmConfigDetailEntity> pages = detailService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}
@GetMapping("/detail")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "详情", notes = "传入em_model_param")
public R<AlarmConfigDetailEntity> detail(AlarmConfigDetailEntity entity) {
AlarmConfigDetailEntity detail = detailService.getOne(Condition.getQueryWrapper(entity));
return R.data(detail);
}
}

12
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/mapper/AlarmConfigDetailMapper.java

@ -0,0 +1,12 @@
package com.hnac.hzims.alarm.config.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity;
/**
* @author ysj
*/
public interface AlarmConfigDetailMapper extends BaseMapper<AlarmConfigDetailEntity> {
}

12
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/mapper/AlarmConfigMapper.java

@ -0,0 +1,12 @@
package com.hnac.hzims.alarm.config.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.alarm.entity.AlarmConfigEntity;
/**
* @author ysj
*/
public interface AlarmConfigMapper extends BaseMapper<AlarmConfigEntity> {
}

11
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigDetailService.java

@ -0,0 +1,11 @@
package com.hnac.hzims.alarm.config.service;
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface AlarmConfigDetailService extends BaseService<AlarmConfigDetailEntity> {
}

11
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/AlarmConfigService.java

@ -0,0 +1,11 @@
package com.hnac.hzims.alarm.config.service;
import com.hnac.hzims.alarm.entity.AlarmConfigEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface AlarmConfigService extends BaseService<AlarmConfigEntity> {
}

19
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigDetailServiceImpl.java

@ -0,0 +1,19 @@
package com.hnac.hzims.alarm.config.service.impl;
import com.hnac.hzims.alarm.config.mapper.AlarmConfigDetailMapper;
import com.hnac.hzims.alarm.config.service.AlarmConfigDetailService;
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@AllArgsConstructor
@Service
@Slf4j
public class AlarmConfigDetailServiceImpl extends BaseServiceImpl<AlarmConfigDetailMapper, AlarmConfigDetailEntity> implements AlarmConfigDetailService {
}

19
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/config/service/impl/AlarmConfigServiceImpl.java

@ -0,0 +1,19 @@
package com.hnac.hzims.alarm.config.service.impl;
import com.hnac.hzims.alarm.config.mapper.AlarmConfigMapper;
import com.hnac.hzims.alarm.config.service.AlarmConfigService;
import com.hnac.hzims.alarm.entity.AlarmConfigEntity;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@AllArgsConstructor
@Service
@Slf4j
public class AlarmConfigServiceImpl extends BaseServiceImpl<AlarmConfigMapper, AlarmConfigEntity> implements AlarmConfigService {
}

12
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHistoryMapper.java

@ -0,0 +1,12 @@
package com.hnac.hzims.alarm.show.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.alarm.entity.AlarmHistoryEntity;
/**
* @author ysj
*/
public interface AlarmHistoryMapper extends BaseMapper<AlarmHistoryEntity> {
}

12
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmMapper.java

@ -0,0 +1,12 @@
package com.hnac.hzims.alarm.show.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.alarm.entity.AlarmEntity;
/**
* @author ysj
*/
public interface AlarmMapper extends BaseMapper<AlarmEntity> {
}

11
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmHistoryService.java

@ -0,0 +1,11 @@
package com.hnac.hzims.alarm.show.service;
import com.hnac.hzims.alarm.entity.AlarmHistoryEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface AlarmHistoryService extends BaseService<AlarmHistoryEntity> {
}

11
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmService.java

@ -0,0 +1,11 @@
package com.hnac.hzims.alarm.show.service;
import com.hnac.hzims.alarm.entity.AlarmEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface AlarmService extends BaseService<AlarmEntity> {
}

19
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHistoryServiceImpl.java

@ -0,0 +1,19 @@
package com.hnac.hzims.alarm.show.service.impl;
import com.hnac.hzims.alarm.entity.AlarmHistoryEntity;
import com.hnac.hzims.alarm.show.mapper.AlarmHistoryMapper;
import com.hnac.hzims.alarm.show.service.AlarmHistoryService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@AllArgsConstructor
@Service
@Slf4j
public class AlarmHistoryServiceImpl extends BaseServiceImpl<AlarmHistoryMapper, AlarmHistoryEntity> implements AlarmHistoryService {
}

19
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java

@ -0,0 +1,19 @@
package com.hnac.hzims.alarm.show.service.impl;
import com.hnac.hzims.alarm.entity.AlarmEntity;
import com.hnac.hzims.alarm.show.mapper.AlarmMapper;
import com.hnac.hzims.alarm.show.service.AlarmService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@AllArgsConstructor
@Service
@Slf4j
public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity> implements AlarmService {
}

41
hzims-service/hzims-alarm/src/main/resources/application.yml

@ -0,0 +1,41 @@
#服务器端口
server:
port: 8400
#数据源配置
spring:
main:
allow-bean-definition-overriding: true
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
url: jdbc:mysql://192.168.1.20:3576/dev_hzims_middle?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: 123
#mybatis-plus配置
mybatis-plus:
mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.hnac.hzims.**.entity
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#swagger扫描路径配置
swagger:
base-packages:
- org.springbalde
- com.hnac
blade:
data-scope:
enabled: false
lock:
enabled: true
address: redis://192.168.1.20:3577
password: 1qaz2WSX@redis
database: 0
ssl: false

7
hzims-service/hzims-alarm/src/main/resources/bootstrap.yml

@ -0,0 +1,7 @@
spring:
cloud:
nacos:
discovery:
server-addr: 175.6.40.67:10042

5
hzims-service/hzims-alarm/src/main/resources/mapper/AlarmConfigDetatilMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.alarm.config.mapper.AlarmConfigDetailMapper">
</mapper>

5
hzims-service/hzims-alarm/src/main/resources/mapper/AlarmConfigMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.alarm.config.mapper.AlarmConfigMapper">
</mapper>

5
hzims-service/hzims-alarm/src/main/resources/mapper/AlarmHistoryMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.alarm.show.mapper.AlarmHistoryMapper">
</mapper>

5
hzims-service/hzims-alarm/src/main/resources/mapper/AlarmMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.alarm.show.mapper.AlarmMapper">
</mapper>

15
hzims-service/hzims-alarm/src/test/java/com/hnac/hzims/alarm/MiddleApplicationTests.java

@ -0,0 +1,15 @@
package com.hnac.hzims.alarm;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest(classes = AlarmApplication.class)
class AlarmApplicationTests {
@Test
void contextLoads() {
System.out.println("1");
}
}

16
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -23,6 +23,7 @@ import com.hnac.hzims.scheduled.service.operation.station.StationAttributeServic
import com.hnac.hzims.scheduled.service.operation.station.StationService; import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzims.scheduled.service.operation.plate.DataService; import com.hnac.hzims.scheduled.service.operation.plate.DataService;
import com.hnac.hzinfo.datasearch.PointData; import com.hnac.hzinfo.datasearch.PointData;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO; import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO;
@ -37,6 +38,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
@ -81,6 +83,8 @@ public class RealTargetServiceImpl implements RealTargetService {
private final IHistoryDataSearchClient historyDataSearchClient; private final IHistoryDataSearchClient historyDataSearchClient;
private final IAnalyseDataSearchClient analyseDataSearchClient;
@Value("${hzims.equipment.emInfo.emInfoList}") @Value("${hzims.equipment.emInfo.emInfoList}")
public String device_cache_cofig_final; public String device_cache_cofig_final;
@ -374,6 +378,15 @@ public class RealTargetServiceImpl implements RealTargetService {
} }
List<WaterLevelVo> list = new ArrayList<>(); List<WaterLevelVo> list = new ArrayList<>();
modelList.forEach(item -> { modelList.forEach(item -> {
List<MultiAnalyzeCodePO> multiAnalyzeCodePOList = new ArrayList<>();
MultiAnalyzeCodePO multiAnalyzeCodePO = new MultiAnalyzeCodePO();
multiAnalyzeCodePO.setDeviceCode(item.getInstanceCode());
multiAnalyzeCodePO.setSignages(Collections.singletonList(HomePageConstant.FRONT_WATER_LEVEL));
multiAnalyzeCodePOList.add(multiAnalyzeCodePO);
R<List<AnalyzeCodeBySignagesVO>> result = analyseDataSearchClient.getAnalyzeCodeBySignages(multiAnalyzeCodePOList);
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){
return;
}
WaterLevelVo waterLevelVo = new WaterLevelVo(); WaterLevelVo waterLevelVo = new WaterLevelVo();
waterLevelVo.setStationCode(item.getStationId()); waterLevelVo.setStationCode(item.getStationId());
// 前水位 // 前水位
@ -382,6 +395,9 @@ public class RealTargetServiceImpl implements RealTargetService {
// 后水位 // 后水位
double rearWaterLevel = this.getWaterLevel(item.getInstanceCode(),HomePageConstant.REAR_WATER_LEVEL); double rearWaterLevel = this.getWaterLevel(item.getInstanceCode(),HomePageConstant.REAR_WATER_LEVEL);
waterLevelVo.setRearWaterLevel(rearWaterLevel); waterLevelVo.setRearWaterLevel(rearWaterLevel);
// 下泄流量
double dischargeFlow = this.getWaterLevel(item.getInstanceCode(),HomePageConstant.DISCHARGE_FLOW);
waterLevelVo.setDischargeFlow(dischargeFlow);
// 前水位当日曲线 // 前水位当日曲线
Map<Integer,String> frontCurveMap = this.getWaterLevelMap(item.getInstanceCode(),HomePageConstant.FRONT_WATER_LEVEL); Map<Integer,String> frontCurveMap = this.getWaterLevelMap(item.getInstanceCode(),HomePageConstant.FRONT_WATER_LEVEL);
waterLevelVo.setFrontCurveMap(frontCurveMap); waterLevelVo.setFrontCurveMap(frontCurveMap);

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java

@ -39,6 +39,7 @@ import java.util.List;
@RequestMapping("/abnormal/alarm") @RequestMapping("/abnormal/alarm")
public class AbnormalAlarmController extends BladeController { public class AbnormalAlarmController extends BladeController {
private final HistoryAbnormalAlarmService service; private final HistoryAbnormalAlarmService service;
/** /**
* 统计通讯中断时间 * 统计通讯中断时间

41
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java

@ -73,7 +73,7 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl<AbnormalAlarmMappe
query.setStationIds(stations.stream().map(StationEntity::getCode).collect(Collectors.toList())); query.setStationIds(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()));
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
query.setEndTime(LocalDateTime.parse(DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATETIME),DateUtil.DATETIME_FORMATTER)); query.setEndTime(LocalDateTime.parse(DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATETIME),DateUtil.DATETIME_FORMATTER));
calendar.add(Calendar.MINUTE,-3); calendar.add(Calendar.MINUTE,-2);
query.setBeginTime(LocalDateTime.parse(DateUtil.format(calendar.getTime() , DateUtil.PATTERN_DATETIME),DateUtil.DATETIME_FORMATTER)); query.setBeginTime(LocalDateTime.parse(DateUtil.format(calendar.getTime() , DateUtil.PATTERN_DATETIME),DateUtil.DATETIME_FORMATTER));
query.setNeedPage(false); query.setNeedPage(false);
query.setPage(1); query.setPage(1);
@ -150,53 +150,47 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl<AbnormalAlarmMappe
List<HistoryAbnormalAlarmEntity> historys = historyAbnormalAlarmService.list(Wrappers.<HistoryAbnormalAlarmEntity>lambdaQuery() List<HistoryAbnormalAlarmEntity> historys = historyAbnormalAlarmService.list(Wrappers.<HistoryAbnormalAlarmEntity>lambdaQuery()
.in(HistoryAbnormalAlarmEntity::getAlarmId,list.stream().map(SoeData::getId).collect(Collectors.toList())) .in(HistoryAbnormalAlarmEntity::getAlarmId,list.stream().map(SoeData::getId).collect(Collectors.toList()))
); );
Set<String> explainSet = new HashSet<>(); List<String> explains = new ArrayList<>();
list.forEach(item->{ for(SoeData item: list){
if(CollectionUtil.isNotEmpty(historys) && historys.stream().map(HistoryAbnormalAlarmEntity::getAlarmId).collect(Collectors.toList()).contains(item.getId())){ if(CollectionUtil.isNotEmpty(historys) && historys.stream().map(HistoryAbnormalAlarmEntity::getAlarmId).collect(Collectors.toList()).contains(item.getId())){
return; return;
} }
if(explainSet.contains(item.getSoeExplain())){
return;
}
HistoryAbnormalAlarmEntity entity = new HistoryAbnormalAlarmEntity(); HistoryAbnormalAlarmEntity entity = new HistoryAbnormalAlarmEntity();
String stationName = Optional.ofNullable(stations.stream().filter(o-> o.getCode().equals(item.getStation())).collect(Collectors.toList())).map(o->o.get(0).getName()).orElse(null); String stationName = Optional.ofNullable(stations.stream().filter(o-> o.getCode().equals(item.getStation())).collect(Collectors.toList())).map(o->o.get(0).getName()).orElse(null);
entity.setAlarmId(item.getId()); entity.setAlarmId(item.getId());
entity.setStationId(item.getStation()); entity.setStationId(item.getStation());
entity.setStationName(stationName); entity.setStationName(stationName);
entity.setRealId(item.getRealId()); entity.setRealId(item.getRealId());
if(AbnormalAlarmConstant.INTERRUPT_LIST.contains(entity.getType())){
entity.setSoeExplain(stationName+ ":" + item.getSoeExplain());
}else{
entity.setSoeExplain(item.getSoeExplain()); entity.setSoeExplain(item.getSoeExplain());
}
entity.setType(item.getSoeType()); entity.setType(item.getSoeType());
entity.setStartTime(item.getTs()); entity.setStartTime(item.getTs());
if(AbnormalAlarmConstant.ABNORMAL_STATUS.equals(item.getSoeAlarmType())){ if(AbnormalAlarmConstant.ABNORMAL_STATUS.equals(item.getSoeAlarmType())){
entity.setStatus(1); entity.setStatus(1);
}else{ }else{
entity.setStatus(1); entity.setStatus(0);
} }
this.historyAbnormalAlarmService.save(entity); this.historyAbnormalAlarmService.save(entity);
if(explains.contains(entity.getSoeExplain())){
continue;
}else{
// 相同告警只允许添加一次,发送一次消息 // 相同告警只允许添加一次,发送一次消息
explainSet.add(item.getSoeExplain()); explains.add(item.getSoeExplain());
}
// 发送消息 // 发送消息
this.sendAlarmMessage(Collections.singletonList(entity),stations); this.sendAlarmMessage(entity,stations);
// 推送短信: 只推送拥有项目经理角色用户 // 推送短信: 只推送拥有项目经理角色用户
};
});
} }
/** /**
* 告警消息推送 * 告警消息推送
* @param entitys * @param entity
*/ */
private void sendAlarmMessage(List<HistoryAbnormalAlarmEntity> entitys,List<StationEntity> stations) { private void sendAlarmMessage(HistoryAbnormalAlarmEntity entity,List<StationEntity> stations) {
if(CollectionUtil.isEmpty(entitys)){
return;
}
// 告警等级 :事故、数据中断
List<HistoryAbnormalAlarmEntity> alarms = entitys.stream().filter(entity -> AbnormalAlarmConstant.SEND_MESSSAGE_TYPE_LIST.contains(entity.getType())).collect(Collectors.toList());
if(CollectionUtil.isEmpty(alarms)){
return;
}
// 查询站点用户
entitys.forEach(entity->{
if(StringUtil.isEmpty(entity.getStationId())){ if(StringUtil.isEmpty(entity.getStationId())){
return; return;
} }
@ -225,7 +219,6 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl<AbnormalAlarmMappe
User admin = userClient.userByAccount("200000", "admin").getData(); User admin = userClient.userByAccount("200000", "admin").getData();
message.setCreateUser(admin.getId()); message.setCreateUser(admin.getId());
messageClient.sendAppAndWsMsgByUsers(message); messageClient.sendAppAndWsMsgByUsers(message);
});
} }
/** /**

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java

@ -733,7 +733,7 @@ public class StAlamRecordServiceImpl extends BaseServiceImpl<StAlarmRecordMapper
if(CollectionUtil.isEmpty(stations)){ if(CollectionUtil.isEmpty(stations)){
return null; return null;
} }
String result = fdpMonitorClient.getFaultList(new ArrayList<>()); String result = fdpMonitorClient.getFaultList(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()));
if(StringUtil.isEmpty(result)){ if(StringUtil.isEmpty(result)){
return null; return null;
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.operational.ecology.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.EquipmentConstants;
import com.hnac.hzims.equipment.vo.EminfoAndEmParamVo; import com.hnac.hzims.equipment.vo.EminfoAndEmParamVo;
import com.hnac.hzims.operational.ecology.entity.EcologyFlowDataEntity; import com.hnac.hzims.operational.ecology.entity.EcologyFlowDataEntity;
import com.hnac.hzims.operational.ecology.entity.EcologyFlowStationEntity; import com.hnac.hzims.operational.ecology.entity.EcologyFlowStationEntity;
@ -12,6 +13,7 @@ import com.hnac.hzims.operational.ecology.vo.*;
import com.hnac.hzims.operational.main.constant.HomePageConstant; import com.hnac.hzims.operational.main.constant.HomePageConstant;
import com.hnac.hzims.operational.main.service.IAnalyseDataService; import com.hnac.hzims.operational.main.service.IAnalyseDataService;
import com.hnac.hzims.operational.main.service.IMainSystemMonitoringService; import com.hnac.hzims.operational.main.service.IMainSystemMonitoringService;
import com.hnac.hzims.operational.main.vo.GenerationPowerVo;
import com.hnac.hzims.operational.main.vo.HydropowerUnitRealVo; import com.hnac.hzims.operational.main.vo.HydropowerUnitRealVo;
import com.hnac.hzims.operational.main.vo.HydropowerUnitTargetVo; import com.hnac.hzims.operational.main.vo.HydropowerUnitTargetVo;
import com.hnac.hzims.operational.main.vo.WaterLevelVo; import com.hnac.hzims.operational.main.vo.WaterLevelVo;
@ -187,7 +189,6 @@ public class EcologyFlowStationServiceImpl extends BaseServiceImpl<EcologyFlowSt
// 获取站点机组指标数据 // 获取站点机组指标数据
List<HydropowerUnitTargetVo> targetList = (List<HydropowerUnitTargetVo>) redisTemplate.opsForValue().get(load_hydropower_unit_target_key); List<HydropowerUnitTargetVo> targetList = (List<HydropowerUnitTargetVo>) redisTemplate.opsForValue().get(load_hydropower_unit_target_key);
// 所有设备 // 所有设备
List<EminfoAndEmParamVo> deviceList = maintenanceTaskService.getEmInfoList();
return stations.stream().map(item -> { return stations.stream().map(item -> {
StationVo station = new StationVo(); StationVo station = new StationVo();
station.setStationId(item.getCode()); station.setStationId(item.getCode());
@ -243,7 +244,6 @@ public class EcologyFlowStationServiceImpl extends BaseServiceImpl<EcologyFlowSt
// 有效站点机组数据 // 有效站点机组数据
List<HydropowerUnitRealVo> validRealList = realList.stream().filter(o-> null != station.getRefDept() && station.getRefDept().equals(o.getDeptId())).collect(Collectors.toList()); List<HydropowerUnitRealVo> validRealList = realList.stream().filter(o-> null != station.getRefDept() && station.getRefDept().equals(o.getDeptId())).collect(Collectors.toList());
// 有效站点机组指标数据 // 有效站点机组指标数据
List<HydropowerUnitTargetVo> validTargetList = targetList.stream().filter(o-> null != station.getRefDept() && station.getRefDept().equals(o.getDeptId())).collect(Collectors.toList());
List<DeviceVo> list = new ArrayList<>(); List<DeviceVo> list = new ArrayList<>();
for(HydropowerUnitRealVo real : validRealList){ for(HydropowerUnitRealVo real : validRealList){
DeviceVo device= new DeviceVo(); DeviceVo device= new DeviceVo();

4
hzims-service/pom.xml

@ -16,8 +16,7 @@
<modules> <modules>
<module>assets</module> <module>assets</module>
<!-- <module>spare</module>--> <module>topvision</module>
<!-- <module>topvision</module>-->
<module>equipment</module> <module>equipment</module>
<module>safeproduct</module> <module>safeproduct</module>
<module>operational</module> <module>operational</module>
@ -27,6 +26,7 @@
<module>weather</module> <module>weather</module>
<module>hzims-middle</module> <module>hzims-middle</module>
<module>hzims-scheduled</module> <module>hzims-scheduled</module>
<module>hzims-alarm</module>
</modules> </modules>
<dependencies> <dependencies>

Loading…
Cancel
Save