Browse Source

#数据填报

zhongwei
yang_shj 2 years ago
parent
commit
570af87fbf
  1. 30
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/HistoryAbnormalAlarmEntity.java
  2. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/DeviceClassifyVo.java
  3. 22
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/HydropowerTargetVo.java
  4. 22
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/WaterTargetVo.java
  5. 16
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/constants/HomePageConstant.java
  6. 215
      hzims-service-api/hzims-service-api.iml
  7. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java
  8. 34
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/TargetController.java
  9. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/TargetService.java
  10. 240
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java
  11. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertPowerServiceImpl.java
  12. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java
  13. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/RainFallServiceImpl.java
  14. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/StorageServiceImpl.java
  15. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java
  16. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java
  17. 28
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

30
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/HistoryAbnormalAlarmEntity.java

@ -1,19 +1,24 @@
package com.hnac.hzims.operational.alert.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@TableName("hzims_history_abnormal_alarm")
@EqualsAndHashCode(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "数据中断告警对象")
public class HistoryAbnormalAlarmEntity extends BaseEntity {
public class HistoryAbnormalAlarmEntity {
@ApiModelProperty("ID")
private Long id;
@ApiModelProperty("站点编码")
private String stationId;
@ -38,4 +43,25 @@ public class HistoryAbnormalAlarmEntity extends BaseEntity {
@ApiModelProperty("告警原因")
private String soeExplain;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty("创建时间")
private Date createTime;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("是否删除")
private Integer isDelete;
}

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/DeviceClassifyVo.java

@ -18,5 +18,5 @@ public class DeviceClassifyVo {
private String deviceName;
@ApiModelProperty("设备状态")
private String deviceStatus;
private Integer deviceStatus;
}

22
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/HydropowerTargetVo.java

@ -0,0 +1,22 @@
package com.hnac.hzims.operational.census.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
* @date 2023/03/14 15:01:17
* @version 4.0.0
*/
@Data
public class HydropowerTargetVo {
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("发电量")
private Double electric;
@ApiModelProperty("功率")
private Double power;
}

22
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/WaterTargetVo.java

@ -0,0 +1,22 @@
package com.hnac.hzims.operational.census.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author ysj
* @date 2023/03/14 15:01:17
* @version 4.0.0
*/
@Data
public class WaterTargetVo {
@ApiModelProperty("站点名称")
private String stationName;
@ApiModelProperty("用电量")
private Double use;
@ApiModelProperty("功率")
private Double load;
}

16
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/constants/HomePageConstant.java

@ -54,6 +54,10 @@ public interface HomePageConstant {
*/
List<Integer> waterList = Arrays.asList(HomePageConstant.WATER_CONSERVANCY,HomePageConstant.PUMPING,HomePageConstant.GATE);
List<Integer> types = Arrays.asList(HomePageConstant.HYDROPOWER,HomePageConstant.WIND_POWER,HomePageConstant.WATER_CONSERVANCY,HomePageConstant.ENERGY_STORAGE,
HomePageConstant.DISTRIBUTION_NETWORK,HomePageConstant.PHOTOVOLTAIC,HomePageConstant.WATER_AFFAIRS,HomePageConstant.CHARGE,HomePageConstant.PUMPING,
HomePageConstant.GATE);
List<String> SIGNAGES = Arrays.asList(HomePageConstant.JOINT_RELAY,HomePageConstant.SWITCH_ON_OFF,HomePageConstant.ELECTRICITY_CONSUMPTION,
HomePageConstant.ACTIVE_POWER,HomePageConstant.REACTIVE_POWER,HomePageConstant.POWER_FACTOR,HomePageConstant.VOLTAGE,HomePageConstant.CURRENT,
HomePageConstant.HYDROPOWER_GENERATE_POWER,HomePageConstant.HYDROPOWER_POWERFACTOR,HomePageConstant.HYDROPOWER_FREQUENCY,HomePageConstant.HYDROPOWER_GUIDEOPEN,
@ -65,6 +69,11 @@ public interface HomePageConstant {
Integer HYDROPOWER_SERVETYPE = 2;
/**
* 站点类型 云服务
*/
Integer CLOUD_SERVETYPE = 1;
/**
* 0-风电
*/
Integer WIND_POWER_TYPE = 0;
@ -166,4 +175,11 @@ public interface HomePageConstant {
/**遥信1**/
String PV_JOINT_RELAY = "joint_relay";
/*==========================================================================================*/
// 水电集团、区域指标关联
/**功率**/
Integer POWER = 0;
/*==========================================================================================*/
// 水利集团、区域指标关联
/**功率**/
Integer LOADING = 0;
}

215
hzims-service-api/hzims-service-api.iml

@ -1,215 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-mybatis:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.3.2" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.3.2" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.3.2" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.3.2" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.1" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.3" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.3" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-typehandlers-jsr310:1.0.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-auth:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-tool:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-launch:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.0" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.20.Final" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-undertow:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.undertow:undertow-core:2.0.30.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.xnio:xnio-api:3.3.8.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jboss.xnio:xnio-nio:3.3.8.Final" level="project" />
<orderEntry type="library" name="Maven: io.undertow:undertow-servlet:2.0.30.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.2.Final" level="project" />
<orderEntry type="library" name="Maven: io.undertow:undertow-websockets-jsr:2.0.30.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:1.1.4.Final" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: org.glassfish:javax.el:3.0.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.0" level="project" />
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.12.1" level="project" />
<orderEntry type="library" name="Maven: io.protostuff:protostuff-core:1.6.0" level="project" />
<orderEntry type="library" name="Maven: io.protostuff:protostuff-api:1.6.0" level="project" />
<orderEntry type="library" name="Maven: io.protostuff:protostuff-runtime:1.6.0" level="project" />
<orderEntry type="library" name="Maven: io.protostuff:protostuff-collectionschema:1.6.0" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-jwt:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.19.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.19.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.19.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.51.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.19.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-log:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-cloud:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-stream:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.37" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-core:5.1.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-jmx:5.1.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tuple:1.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:kryo-shaded:3.0.3" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:minlog:1.3.0" level="project" />
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-tuple:1.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-function-context:2.0.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-function-core:2.0.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign:feign-okhttp:10.4.0" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.5" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-hystrix:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-serialization:1.5.18" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.fasterxml.jackson.module:jackson-module-afterburner:2.13.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-metrics-event-stream:1.5.18" level="project" />
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" name="Maven: io.reactivex:rxjava-reactive-streams:1.2.1" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.16" level="project" />
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.1.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.2.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.73" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpclient:4.5.12" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-api:5.3.2" level="project" />
<orderEntry type="library" name="Maven: org.apiguardian:apiguardian-api:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.3.2" level="project" />
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-params:5.3.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.3.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.junit.platform:junit-platform-engine:1.3.2" level="project" />
<orderEntry type="library" name="Maven: org.mockito:mockito-junit-jupiter:2.23.4" level="project" />
<orderEntry type="library" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.16" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.1.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:6.2" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.0" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.janino:janino:3.0.15" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.janino:commons-compiler:3.0.16" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-tenant:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-cache:4.5.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:dynamic-datasource-spring-boot-starter:3.2.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.59" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.16.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.4.0" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.4.0" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.4.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.21" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.springblade:blade-core-auto:4.5.3.RELEASE" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
</component>
</module>

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

@ -32,7 +32,7 @@ public class AbnormalAlarmController extends BladeController {
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入imsDutyMainEntity")
@ApiOperation(value = "详情", notes = "传入HistoryAbnormalAlarmEntity")
public R<HistoryAbnormalAlarmEntity> detail(HistoryAbnormalAlarmEntity entity) {
HistoryAbnormalAlarmEntity detail = service.getOne(Condition.getQueryWrapper(entity));
return R.data(detail);
@ -43,7 +43,7 @@ public class AbnormalAlarmController extends BladeController {
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入imsDutyMain")
@ApiOperation(value = "分页", notes = "传入HistoryAbnormalAlarmEntity")
public R<IPage<HistoryAbnormalAlarmEntity>> list(HistoryAbnormalAlarmEntity entity, Query query) {
IPage<HistoryAbnormalAlarmEntity> pages = service.page(Condition.getPage(query), Condition.getQueryWrapper(entity));
return R.data(pages);
@ -54,7 +54,7 @@ public class AbnormalAlarmController extends BladeController {
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "新增或修改", notes = "传入imsDutyMain")
@ApiOperation(value = "新增或修改", notes = "传入HistoryAbnormalAlarmEntity")
public R submit(@Valid @RequestBody HistoryAbnormalAlarmEntity entity) {
return R.status(service.saveOrUpdate(entity));
}

34
hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/TargetController.java

@ -9,6 +9,7 @@ import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -31,42 +32,42 @@ public class TargetController {
@ApiOperation("装机容量统计:区分填报/接入站点")
@PostMapping("/installed-capacity")
@ApiOperationSupport(order = 1)
public R installedCapacity(@RequestParam(value = "stationName") String stationName,@RequestParam(value = "type") Integer type) {
public R installedCapacity(@RequestParam(value = "stationName",required = false) String stationName,@RequestParam(value = "type") Integer type) {
return R.data(service.installedCapacity(stationName,type));
}
@ApiOperation("发电量统计:区分填报/接入站点")
@PostMapping("/electric-generation")
@ApiOperationSupport(order = 2)
public R electricGeneration(@RequestParam(value = "stationName") String stationName,@RequestParam(value = "type") Integer type) {
public R electricGeneration(@RequestParam(value = "stationName",required = false) String stationName,@RequestParam(value = "type") Integer type) {
return R.data(service.electricGeneration(stationName,type));
}
@ApiOperation("计划发电量/实际发电量统计:区分填报/接入站点")
@PostMapping("/complete-generation")
@ApiOperationSupport(order = 3)
public R completeGeneration(@RequestParam(value = "stationName") String stationName,@RequestParam(value = "type") Integer type) {
public R completeGeneration(@RequestParam(value = "stationName",required = false) String stationName,@RequestParam(value = "type") Integer type) {
return R.data(service.completeGeneration(stationName,type));
}
@ApiOperation("两票统计:区分填报/平台业务数据")
@PostMapping("/complete-ticket")
@ApiOperationSupport(order = 4)
public R completeTicket(@RequestParam(value = "areaName") String areaName,@RequestParam(value = "type") Integer type) {
public R completeTicket(@RequestParam(value = "areaName",required = false) String areaName,@RequestParam(value = "type") Integer type) {
return R.data(service.completeTicket(areaName,type));
}
@ApiOperation("缺陷率统计:区分填报/平台业务数据")
@GetMapping("/complete-defect")
@ApiOperationSupport(order = 5)
public R completeDefect(@RequestParam(value = "areaName") String areaName,@RequestParam(value = "type") Integer type) {
public R completeDefect(@RequestParam(value = "areaName",required = false) String areaName,@RequestParam(value = "type") Integer type) {
return R.data(service.defect(areaName,type));
}
@ApiOperation("上线率/Fa投入条数统计")
@GetMapping("/complete-other")
@ApiOperationSupport(order = 6)
public R completeOther(@RequestParam(value = "stationName") String stationName,@RequestParam(value = "type") Integer type,@RequestParam(value = "queryType") Integer queryType) {
public R completeOther(@RequestParam(value = "stationName",required = false) String stationName,@RequestParam(value = "type") Integer type,@RequestParam(value = "queryType") Integer queryType) {
return R.data(service.completeOther(stationName,type,queryType));
}
@ -87,15 +88,30 @@ public class TargetController {
@ApiOperation("检修卡统计")
@GetMapping("/examineCard")
@ApiOperationSupport(order = 9)
public R examineCard(@RequestParam(value = "stationName") String stationName,@RequestParam(value = "type") Integer type) {
public R examineCard(@RequestParam(value = "stationName",required = false) String stationName,@RequestParam(value = "type") Integer type) {
return R.data(service.examineCard(stationName,type));
}
@ApiOperation("设备统计")
@GetMapping("/device-classify")
@ApiOperationSupport(order = 10)
public R deviceClassify(@RequestParam(value = "stationName") String stationName,@RequestParam(value = "deptId") Long deptId) {
return R.data(service.deviceClassify(stationName,deptId));
public R deviceClassify(@RequestParam(value = "stationName",required = false) String stationName, @RequestParam(value = "deptId",required = false) Long deptId,@RequestParam(value="status")Integer status) {
return R.data(service.deviceClassify(stationName,deptId,status));
}
@ApiOperation("水电集团、区域指标关联")
@GetMapping("/hydropower-target")
@ApiOperationSupport(order = 10)
public R hydropowerTarget(@RequestParam(value = "stationName",required = false) String stationName, @RequestParam(value = "deptId",required = false) Long deptId,@RequestParam(value = "target") Integer target) {
return R.data(service.hydropowerTarget(stationName,deptId,target));
}
@ApiOperation("水利集团、区域指标关联")
@GetMapping("/water-target")
@ApiOperationSupport(order = 10)
public R waterTarget(@RequestParam(value = "stationName",required = false) String stationName, @RequestParam(value = "deptId",required = false) Long deptId,@RequestParam(value = "target") Integer target) {
return R.data(service.waterTarget(stationName,deptId,target));
}
}

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/TargetService.java

@ -1,9 +1,7 @@
package com.hnac.hzims.operational.census.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.access.dto.OperAccessStatisticsDTO;
import com.hnac.hzims.operational.access.dto.OperAccessTaskDTO;
import com.hnac.hzims.operational.access.vo.OperAccessStatisticsVO;
import com.hnac.hzims.operational.access.vo.OperAccessTaskVO;
import com.hnac.hzims.operational.census.vo.*;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
@ -48,5 +46,9 @@ public interface TargetService {
R<IPage<OperAccessTaskVO>> examineRepair(OperAccessTaskDTO params, Query query, Integer type);
// 设备分类统计
List<DeviceClassifyVo> deviceClassify(String stationName, Long deptId);
List<DeviceClassifyVo> deviceClassify(String stationName, Long deptId,Integer status);
List<HydropowerTargetVo> hydropowerTarget(String stationName, Long deptId,Integer target);
List<WaterTargetVo> waterTarget(String stationName, Long deptId,Integer target);
}

240
hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java

@ -1,5 +1,6 @@
package com.hnac.hzims.operational.census.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.equipment.entity.EmInfoEntity;
@ -16,12 +17,13 @@ import com.hnac.hzims.operational.access.vo.OperAccessTaskVO;
import com.hnac.hzims.operational.census.constants.CensusConstant;
import com.hnac.hzims.operational.census.service.TargetService;
import com.hnac.hzims.operational.census.vo.*;
import com.hnac.hzims.operational.census.vo.WaterTargetVo;
import com.hnac.hzims.operational.defect.service.IOperPhenomenonService;
import com.hnac.hzims.operational.fill.entity.*;
import com.hnac.hzims.operational.fill.service.*;
import com.hnac.hzims.operational.main.service.AreaService;
import com.hnac.hzims.operational.main.service.IMainSystemMonitoringService;
import com.hnac.hzims.operational.main.vo.HydropowerUnitTargetVo;
import com.hnac.hzims.operational.main.vo.*;
import com.hnac.hzims.operational.maintenance.constants.HomePageConstant;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService;
@ -36,6 +38,7 @@ import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.MapUtils;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.entity.Dept;
@ -100,9 +103,18 @@ public class TargetServiceImpl implements TargetService {
private final static String load_hydropower_unit_target_key = "hzims:operation:loadhydropowerunit:target:key";
private final static String KEY_INDICATORS_INFO = "hzims:operation:key:indicators:info";
@Value("${hzims.operation.region.deviceClassifyKey}")
private String device_classify_key;
@Value("${hzims.operation.homePage.activePowerKey}")
public String activePowerKey;
private final static String loadwaterpump_target_key = "hzims:operation:loadwaterpump:target:key";
private final static String loadwaterpump_real_key = "hzims:operation:loadwaterpump:real:key";
/**
* 获取站点装机容量
* @return
@ -110,11 +122,13 @@ public class TargetServiceImpl implements TargetService {
@Override
public List<InstalledCapacityVo> installedCapacity(String stationName,Integer type) {
// 站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getType, type)
.eq(StationEntity::getServeType,2)
.like(StationEntity::getName,stationName)
);
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.eq(StationEntity::getType, HomePageConstant.HYDROPOWER);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(stationName)){
wappers.like(StationEntity::getName,stationName);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
@ -166,12 +180,15 @@ public class TargetServiceImpl implements TargetService {
*/
@Override
public List<ElectricGenerationVo> electricGeneration(String stationName,Integer type) {
// 接入站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getType, type)
.eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE)
.like(StationEntity::getName,stationName)
);if(CollectionUtils.isEmpty(stations)){
// 站点
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.eq(StationEntity::getType, HomePageConstant.HYDROPOWER);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(stationName)){
wappers.like(StationEntity::getName,stationName);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
// 填报数据
@ -227,10 +244,13 @@ public class TargetServiceImpl implements TargetService {
@Override
public List<CompleteGenerationVo> completeGeneration(String stationName,Integer type) {
// 站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getType, type)
.eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE)
.like(StationEntity::getName,stationName));
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.eq(StationEntity::getType, HomePageConstant.HYDROPOWER);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(stationName)){
wappers.like(StationEntity::getName,stationName);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
@ -450,11 +470,13 @@ public class TargetServiceImpl implements TargetService {
@Override
public List<ExamineCardVo> examineCard(String stationName, Integer type) {
// 站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getType, type)
.eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE)
.like(StationEntity::getName,stationName)
);
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.eq(StationEntity::getType, HomePageConstant.HYDROPOWER);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(stationName)){
wappers.like(StationEntity::getName,stationName);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
@ -492,11 +514,13 @@ public class TargetServiceImpl implements TargetService {
@Override
public List<CompleteOtherVo> completeOther(String stationName, Integer type, Integer queryType) {
// 站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getType, type)
.eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE)
.like(StationEntity::getName,stationName)
);
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.eq(StationEntity::getType, HomePageConstant.HYDROPOWER);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(stationName)){
wappers.like(StationEntity::getName,stationName);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
@ -531,11 +555,13 @@ public class TargetServiceImpl implements TargetService {
*/
private List<CompleteDefectVo> getFillDefect(String areaName, Integer type) {
// 站点
List<StationEntity> stations = stationService.list(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getType, type)
.eq(StationEntity::getServeType,2)
.like(StationEntity::getName,areaName)
);
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.eq(StationEntity::getType, HomePageConstant.HYDROPOWER);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(areaName)){
wappers.like(StationEntity::getName,areaName);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
@ -567,7 +593,7 @@ public class TargetServiceImpl implements TargetService {
/**
* 日常维护统计
* @param param
* @param params
* @param query
* @param type
* @return
@ -610,7 +636,7 @@ public class TargetServiceImpl implements TargetService {
* @return
*/
@Override
public List<DeviceClassifyVo> deviceClassify(String stationName, Long deptId) {
public List<DeviceClassifyVo> deviceClassify(String stationName, Long deptId,Integer status) {
// 获取区域设备统计
Map<String, List<String>> deviceClassifyMap = (Map<String, List<String>>) redisTemplate.opsForValue().get(device_classify_key);
List<String> faultList = deviceClassifyMap.get(HomePageConstant.FAULT);
@ -635,21 +661,157 @@ public class TargetServiceImpl implements TargetService {
if(CollectionUtils.isEmpty(devices)){
return new ArrayList<>();
}
return devices.stream().sorted(Comparator.comparing(EminfoAndEmParamVo::getCreateDept)).map(device -> {
// 获取设备集合
List<DeviceClassifyVo> deviceClassifys = devices.stream().sorted(Comparator.comparing(EminfoAndEmParamVo::getCreateDept)).map(device -> {
DeviceClassifyVo deviceClassify = new DeviceClassifyVo();
deviceClassify.setStationName(stations.stream().filter(o-> o.getRefDept().equals(o.getCreateDept())).collect(Collectors.toList()).get(0).getName());
deviceClassify.setDeviceName(device.getName());
if(faultList.contains(device.getEmCode())){
deviceClassify.setDeviceStatus(HomePageConstant.FAULT);
deviceClassify.setDeviceStatus(4);
}else if(overhaultList.contains(device.getEmCode())){
deviceClassify.setDeviceStatus(HomePageConstant.OVERHAUL);
deviceClassify.setDeviceStatus(0);
}else if(runtList.contains(device.getEmCode())){
deviceClassify.setDeviceStatus(HomePageConstant.RUN);
deviceClassify.setDeviceStatus(1);
}else{
deviceClassify.setDeviceStatus(HomePageConstant.SPARE);
deviceClassify.setDeviceStatus(2);
}
return deviceClassify;
}).collect(Collectors.toList());
}).filter(deviceClass -> StringUtils.isEmpty(stationName) || deviceClass.getStationName().contains(stationName)).collect(Collectors.toList());
// 状态过滤
if(ObjectUtil.isEmpty(status)){
return deviceClassifys.stream().sorted(Comparator.comparing(DeviceClassifyVo::getDeviceStatus)).collect(Collectors.toList());
}
return deviceClassifys.stream().filter(o->o.getDeviceStatus().equals(status)).sorted(Comparator.comparing(DeviceClassifyVo::getDeviceStatus)).collect(Collectors.toList());
}
/**
* 水电指标关联数据
* @param stationName
* @param deptId
* @return
*/
@Override
public List<HydropowerTargetVo> hydropowerTarget(String stationName, Long deptId,Integer target) {
// 站点
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.eq(StationEntity::getType, HomePageConstant.HYDROPOWER);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(stationName)){
wappers.like(StationEntity::getName,stationName);
}
if(!ObjectUtil.isEmpty(deptId)){
List<Long> deptIds = sysClient.getDeptByCurrentUser().getData().stream().filter(dept -> dept.getParentId().equals(deptId)).map(Dept::getId).collect(Collectors.toList());
wappers.in(StationEntity::getRefDept,deptIds);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
// 功率
if(HomePageConstant.POWER.equals(target)){
Map<String, Double> activePowerMap = (Map<String, Double>) redisTemplate.opsForValue().get(activePowerKey);
return stations.stream().map(station->{
HydropowerTargetVo hydropowerTarget = new HydropowerTargetVo();
hydropowerTarget.setStationName(station.getName());
if(MapUtils.isEmpty(activePowerMap)){
hydropowerTarget.setPower(0.0);
return hydropowerTarget;
}
Double power = activePowerMap.get(station.getCode());
hydropowerTarget.setPower(power);
return hydropowerTarget;
}).sorted(Comparator.comparing(HydropowerTargetVo::getPower)).collect(Collectors.toList());
}
// 发电量
KeyIndicatorsVo keyIndicatorsVo = (KeyIndicatorsVo) redisTemplate.opsForValue().get(KEY_INDICATORS_INFO);
// 水电站
List<PowerStationTotalVo> powers = keyIndicatorsVo.getPowerStationTotalVoList();
return stations.stream().map(station->{
HydropowerTargetVo hydropowerTarget = new HydropowerTargetVo();
hydropowerTarget.setStationName(station.getName());
if(CollectionUtils.isEmpty(powers)){
hydropowerTarget.setElectric(0.0);
return hydropowerTarget;
}
List<PowerStationTotalVo> stationTargets = powers.stream().filter(o-> o.getStationId().equals(station.getId())).collect(Collectors.toList());
if(CollectionUtils.isEmpty(stationTargets)){
hydropowerTarget.setElectric(0.0);
return hydropowerTarget;
}
switch (target){
case 3:
hydropowerTarget.setElectric(new BigDecimal(stationTargets.get(0).getCurrentYearPowerGeneration()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
break;
case 2:
hydropowerTarget.setElectric(stationTargets.get(0).getPowerGeneration());
break;
case 1:
hydropowerTarget.setElectric(new BigDecimal(stationTargets.get(0).getCurrentDayPowerGeneration()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
break;
}
return hydropowerTarget;
}).sorted(Comparator.comparing(HydropowerTargetVo::getElectric)).collect(Collectors.toList());
}
/**
* 水利指标关联数据
* @param stationName
* @param deptId
* @return
*/
@Override
public List<WaterTargetVo> waterTarget(String stationName, Long deptId,Integer target) {
// 站点
LambdaQueryWrapper<StationEntity> wappers = Wrappers.lambdaQuery();
wappers.in(StationEntity::getType, HomePageConstant.waterList);
wappers.eq(StationEntity::getServeType,2);
if(!StringUtils.isEmpty(stationName)){
wappers.like(StationEntity::getName,stationName);
}
if(!ObjectUtil.isEmpty(deptId)){
List<Long> deptIds = sysClient.getDeptByCurrentUser().getData().stream().filter(dept -> dept.getParentId().equals(deptId)).map(Dept::getId).collect(Collectors.toList());
wappers.in(StationEntity::getRefDept,deptIds);
}
List<StationEntity> stations = stationService.list(wappers);
if(CollectionUtils.isEmpty(stations)){
return new ArrayList<>();
}
// 负荷
if(HomePageConstant.LOADING.equals(target)){
List<WaterPumpRealVo> pumps = (List<WaterPumpRealVo>) redisTemplate.opsForValue().get(loadwaterpump_real_key);
return stations.stream().map(station->{
WaterTargetVo water = new WaterTargetVo();
water.setStationName(station.getName());
if(CollectionUtil.isEmpty(pumps)){
water.setUse(0.0);
return water;
}
water.setUse(pumps.stream().filter(o->o.getDeptId().equals(station.getRefDept())).mapToDouble(WaterPumpRealVo::getActivePower).sum());
return water;
}).sorted(Comparator.comparing(WaterTargetVo::getLoad)).collect(Collectors.toList());
}
// 用电量
List<WaterPumpTargetVo> targets = (List<WaterPumpTargetVo>) redisTemplate.opsForValue().get(loadwaterpump_target_key);
return stations.stream().map(station->{
WaterTargetVo water = new WaterTargetVo();
water.setStationName(station.getName());
if(CollectionUtil.isEmpty(targets)){
water.setUse(0.0);
return water;
}
switch (target){
case 3:
water.setUse(targets.stream().filter(o->o.getDeptId().equals(station.getRefDept())).mapToDouble(WaterPumpTargetVo::getUsrPowerYear).sum());
break;
case 2:
water.setUse(targets.stream().filter(o->o.getDeptId().equals(station.getRefDept())).mapToDouble(WaterPumpTargetVo::getUsrPowerMon).sum());
break;
case 1:
water.setUse(targets.stream().filter(o->o.getDeptId().equals(station.getRefDept())).mapToDouble(WaterPumpTargetVo::getUsrPowerDay).sum());
break;
}
return water;
}).sorted(Comparator.comparing(WaterTargetVo::getUse)).collect(Collectors.toList());
}
/**

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertPowerServiceImpl.java

@ -53,8 +53,7 @@ public class NotInsertPowerServiceImpl extends BaseServiceImpl<NotInsertPowerMap
orderByDesc("create_time");
}};
IPage pages = super.page(Condition.getPage(query), queryWrapper);
List list = OverWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
return R.data(pages.setRecords(pages.getRecords()));
}
/**
@ -69,7 +68,7 @@ public class NotInsertPowerServiceImpl extends BaseServiceImpl<NotInsertPowerMap
eq(NotInsertPowerEntity::getStationCode, entity.getStationCode());
eq(NotInsertPowerEntity::getFillDate,entity.getFillDate());
}});
if(!ObjectUtil.isEmpty(entity.getId())){
if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){
throw new ServiceException("日期已经存在填报数据!");
}
if(ObjectUtil.isEmpty(history)){

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/NotInsertUseServiceImpl.java

@ -54,8 +54,7 @@ public class NotInsertUseServiceImpl extends BaseServiceImpl<NotInsertUseMapper,
orderByDesc("create_time");
}};
IPage pages = super.page(Condition.getPage(query), queryWrapper);
List list = OverWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
return R.data(pages.setRecords(pages.getRecords()));
}
/**
@ -70,7 +69,7 @@ public class NotInsertUseServiceImpl extends BaseServiceImpl<NotInsertUseMapper,
eq(NotInsertUseEntity::getStationCode, entity.getStationCode());
eq(NotInsertUseEntity::getFillDate,entity.getFillDate());
}});
if(!ObjectUtil.isEmpty(entity.getId())){
if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){
throw new ServiceException("日期已经存在填报数据!");
}
if(ObjectUtil.isEmpty(history)){

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/RainFallServiceImpl.java

@ -54,8 +54,7 @@ public class RainFallServiceImpl extends BaseServiceImpl<RainfallMapper, Rainfal
orderByDesc("create_time");
}};
IPage pages = super.page(Condition.getPage(query), queryWrapper);
List list = OverWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
return R.data(pages.setRecords(pages.getRecords()));
}
/**
@ -70,7 +69,7 @@ public class RainFallServiceImpl extends BaseServiceImpl<RainfallMapper, Rainfal
eq(RainfallEntity::getStationCode, entity.getStationCode());
eq(RainfallEntity::getFillDate,entity.getFillDate());
}});
if(!ObjectUtil.isEmpty(entity.getId())){
if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){
throw new ServiceException("日期已经存在填报数据!");
}
if(ObjectUtil.isEmpty(history)){

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/StorageServiceImpl.java

@ -63,8 +63,7 @@ public class StorageServiceImpl extends BaseServiceImpl<StorageMapper, StorageEn
orderByDesc("create_time");
}};
IPage pages = super.page(Condition.getPage(query), queryWrapper);
List list = OverWrapper.build().listVO(pages.getRecords());
return R.data(pages.setRecords(list));
return R.data(pages.setRecords(pages.getRecords()));
}
/**
@ -79,7 +78,7 @@ public class StorageServiceImpl extends BaseServiceImpl<StorageMapper, StorageEn
eq(StorageEntity::getStationCode, entity.getStationCode());
eq(StorageEntity::getFillDate,entity.getFillDate());
}});
if(!ObjectUtil.isEmpty(entity.getId())){
if(ObjectUtil.isNotEmpty(history) && (ObjectUtil.isEmpty(entity.getId()) || !entity.getId().equals(history.getId()))){
throw new ServiceException("日期已经存在填报数据!");
}
if(ObjectUtil.isEmpty(history)){

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java

@ -172,4 +172,12 @@ public class StationController extends BladeController {
return R.data(stationService.getHomeStationList(deptId,types,serveType));
}
@GetMapping("/select")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "下拉站点列表", notes = "")
public R<List<StationEntity>> select(@RequestParam(value = "type",required = false) Integer type,@RequestParam(value = "serveType",required = false) Integer serveType){
return R.data(stationService.select(type,serveType));
}
}

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

@ -96,4 +96,6 @@ public interface IStationService extends BaseService<StationEntity> {
Integer getStationMaxOrder();
List<HzimsStationCountVo> getStationCount();
List<StationEntity> select(Integer type, Integer serveType);
}

28
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.common.service.UserAuthDataService;
import com.hnac.hzims.operational.OperationalConstants;
import com.hnac.hzims.operational.main.vo.StationCountVo;
import com.hnac.hzims.operational.maintenance.constants.HomePageConstant;
import com.hnac.hzims.operational.station.entity.ControlUsersEntity;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.mapper.ControlUsersMapper;
@ -15,6 +16,7 @@ import com.hnac.hzims.operational.station.vo.HzimsStationCountVo;
import com.hnac.hzims.operational.station.vo.StationAndDeptVo;
import com.hnac.hzims.operational.station.vo.StationVO;
import com.hnac.hzims.operational.station.wrapper.StationWrapper;
import com.hnac.hzims.spare.entity.WtSpBasicEntity;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@ -493,4 +495,30 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
return this.baseMapper.getStationCount();
}
/**
* 查询下拉列表站点
* @param type
* @param serveType
* @return
*/
@Override
public List<StationEntity> select(Integer type, Integer serveType) {
List<Integer> types;
if(ObjectUtil.isEmpty(type)){
types = HomePageConstant.types;
}else{
types = Collections.singletonList(type);
}
List<Integer> serveTypes;
if(ObjectUtil.isEmpty(serveType)){
serveTypes = Arrays.asList(HomePageConstant.HYDROPOWER_SERVETYPE,HomePageConstant.CLOUD_SERVETYPE);
}else{
serveTypes = Collections.singletonList(serveType);
}
return this.list(Wrappers.<StationEntity>lambdaQuery()
.in(StationEntity::getType, types)
.in(StationEntity::getServeType,serveTypes)
);
}
}

Loading…
Cancel
Save