Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
ty 6 months ago
parent
commit
320fefa8ba
  1. 102
      hzims-biz-common/src/main/java/com/hnac/hzims/common/enums/ExceptionEnum.java
  2. 5
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java
  3. 12
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/StationSelectionVO.java
  4. 2
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ExtraVO.java
  5. 16
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/FaultSelectionVO.java
  6. 16
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ScadaSelectionVO.java
  7. 2
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/SelectionVO.java
  8. 15
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/StationSelectionVO.java
  9. 16
      hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/VideoSelectionVO.java
  10. 238
      hzims-service-api/digital-twin-display-api/digital-twin-display-api.iml
  11. 8
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/entity/TaskEntity.java
  12. 1
      hzims-service-api/pom.xml
  13. 9
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TestEntity.java
  14. 16
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailImgVO.java
  15. 15
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailStrVO.java
  16. 3
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java
  17. 8
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreSumVO.java
  18. 16
      hzims-service-api/spare-api/pom.xml
  19. 226
      hzims-service-api/spare-api/spare-api.iml
  20. 64
      hzims-service-api/spare-api/src/main/java/com/hnac/hzims/spare/entity/Notice.java
  21. 50
      hzims-service-api/spare-api/src/main/java/com/hnac/hzims/spare/feign/INoticeClient.java
  22. 20
      hzims-service-api/spare-api/src/main/java/com/hnac/hzims/spare/vo/NoticeVO.java
  23. 239
      hzims-service-api/video-image-api/video-image-api.iml
  24. 239
      hzims-service-api/water-quality-api/water-quality-api.iml
  25. 239
      hzims-service-api/water-rain-api/water-rain-api.iml
  26. 54
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java
  27. 4
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmHandleService.java
  28. 18
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleServiceImpl.java
  29. 8
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmServiceImpl.java
  30. 3
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeUrl.java
  31. 17
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java
  32. 22
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/ProjectRemoteTypeEnum.java
  33. 16
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/InteractiveController.java
  34. 20
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java
  35. 128
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/AuthenticationService.java
  36. 115
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java
  37. 91
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java
  38. 31
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java
  39. 4
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamStrategy.java
  40. 39
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java
  41. 33
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataVO.java
  42. 39
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/RemoteParamVO.java
  43. 19
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/SessionContentVO.java
  44. 20
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java
  45. 2
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/XxlJobHandlerConstant.java
  46. 13
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/constants/RedisKeyConstants.java
  47. 130
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java
  48. 129
      hzims-service/hzims-simulate/pom.xml
  49. 28
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/SimulateApplication.java
  50. 43
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/constants/WriteRealDataConstant.java
  51. 31
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/controller/GageController.java
  52. 195
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/controller/SimulationDataController.java
  53. 20
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DataItem.java
  54. 46
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DataModel.java
  55. 66
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/Device.java
  56. 22
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceData.java
  57. 19
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceDataV4.java
  58. 38
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceFacConfig.java
  59. 42
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceField.java
  60. 30
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceFieldGap.java
  61. 33
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceRainGap.java
  62. 18
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/Kvtq.java
  63. 18
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/KvtqV4.java
  64. 19
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFacConfigMapper.java
  65. 13
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFacConfigMapper.xml
  66. 16
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldGapMapper.java
  67. 18
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldGapMapper.xml
  68. 19
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldMapper.java
  69. 34
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldMapper.xml
  70. 15
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceMapper.java
  71. 15
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceMapper.xml
  72. 17
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceRainGapMapper.java
  73. 9
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceRainGapMapper.xml
  74. 53
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/scheduled/WriteRealDataTask.java
  75. 11
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/DeviceFieldGapService.java
  76. 24
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/DeviceFieldService.java
  77. 21
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/DeviceService.java
  78. 280
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/SimulationService.java
  79. 13
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/WriteRealDataService.java
  80. 304
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/impl/WriteRealDataServiceImpl.java
  81. 357
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/DataConstants.java
  82. 105
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/ParseFacUtils.java
  83. 52
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/RealIdConvertUtils.java
  84. 18
      hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/TopicConstant.java
  85. 13
      hzims-service/hzims-simulate/src/main/resources/application-dev.yml
  86. 6
      hzims-service/hzims-simulate/src/main/resources/application-prod.yml
  87. 15
      hzims-service/hzims-simulate/src/main/resources/application.yml
  88. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java
  89. 1
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotTaskServiceImpl.java
  90. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotRealDataVO.java
  91. 4
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotTaskTransParam.java
  92. 1
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/job/service/TaskJobService.java
  93. 3
      hzims-service/message/src/main/java/com/hnac/hzims/message/web/MsgWsRecordHistoryController.java
  94. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HikVideoController.java
  95. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java
  96. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IHikVideoService.java
  97. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java
  98. 21
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/HikVideoServiceImpl.java
  99. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java
  100. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java
  101. Some files were not shown because too many files have changed in this diff Show More

102
hzims-biz-common/src/main/java/com/hnac/hzims/common/enums/ExceptionEnum.java

@ -0,0 +1,102 @@
package com.hnac.hzims.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springblade.core.tool.api.IResultCode;
import javax.servlet.http.HttpServletResponse;
/**
* 异常码枚举类
*/
@Getter
@AllArgsConstructor
public enum ExceptionEnum implements IResultCode {
/**
* 操作成功
*/
SUCCESS(HttpServletResponse.SC_OK, "操作成功"),
/**
* 业务异常
*/
FAILURE(HttpServletResponse.SC_BAD_REQUEST, "业务异常"),
/**
* 请求未授权
*/
UN_AUTHORIZED(HttpServletResponse.SC_UNAUTHORIZED, "请求未授权"),
/**
* 客户端请求未授权
*/
CLIENT_UN_AUTHORIZED(HttpServletResponse.SC_UNAUTHORIZED, "客户端请求未授权"),
/**
* 404 没找到请求
*/
NOT_FOUND(HttpServletResponse.SC_NOT_FOUND, "404 没找到请求"),
/**
* 消息不能读取
*/
MSG_NOT_READABLE(HttpServletResponse.SC_BAD_REQUEST, "消息不能读取"),
/**
* 不支持当前请求方法
*/
METHOD_NOT_SUPPORTED(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "不支持当前请求方法"),
/**
* 不支持当前媒体类型
*/
MEDIA_TYPE_NOT_SUPPORTED(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE, "不支持当前媒体类型"),
/**
* 请求被拒绝
*/
REQ_REJECT(HttpServletResponse.SC_FORBIDDEN, "请求被拒绝"),
/**
* 服务器异常
*/
INTERNAL_SERVER_ERROR(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "服务器异常"),
/**
* 缺少必要的请求参数
*/
PARAM_MISS(HttpServletResponse.SC_BAD_REQUEST, "缺少必要的请求参数"),
/**
* 请求参数类型错误
*/
PARAM_TYPE_ERROR(HttpServletResponse.SC_BAD_REQUEST, "请求参数类型错误"),
/**
* 请求参数绑定错误
*/
PARAM_BIND_ERROR(HttpServletResponse.SC_BAD_REQUEST, "请求参数绑定错误"),
/**
* 参数校验失败
*/
PARAM_VALID_ERROR(HttpServletResponse.SC_BAD_REQUEST, "参数校验失败"),
/**
* 模拟数据失败
*/
SIMULATE_ERROR(400, "模拟数据失败"),
;
/**
* code编码
*/
final int code;
/**
* 中文信息描述
*/
final String message;
}

5
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FunctionConstants.java

@ -20,7 +20,10 @@ public interface FunctionConstants {
LINK("2"), LINK("2"),
/**参数**/ /**参数**/
PARAMS("3"), PARAMS("3"),
CHOOSE("4") /**选项**/
CHOOSE("4"),
/**确认**/
CONFIRM("5")
; ;
@Getter @Getter
private String type; private String type;

12
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/StationSelectionVO.java

@ -1,12 +0,0 @@
package com.hnac.hzims.bigmodel.interactive.constants;
import lombok.Data;
/**
* @Author: huangxing
* @Date: 2024/05/09 16:32
*/
@Data
public class StationSelectionVO extends SelectionVO {
}

2
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ExtraVO.java

@ -1,10 +1,8 @@
package com.hnac.hzims.bigmodel.interactive.vo; package com.hnac.hzims.bigmodel.interactive.vo;
import com.hnac.hzims.bigmodel.interactive.constants.SelectionVO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import net.sf.jsqlparser.statement.select.Select;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;

16
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/FaultSelectionVO.java

@ -0,0 +1,16 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* @Author: huangxing
* @Date: 2024/05/16 15:10
*/
@Data
@EqualsAndHashCode
public class FaultSelectionVO extends SelectionVO implements Serializable {
}

16
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/ScadaSelectionVO.java

@ -0,0 +1,16 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* @Author: huangxing
* @Date: 2024/05/11 16:21
*/
@Data
@EqualsAndHashCode
public class ScadaSelectionVO extends SelectionVO implements Serializable {
}

2
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/SelectionVO.java → hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/SelectionVO.java

@ -1,4 +1,4 @@
package com.hnac.hzims.bigmodel.interactive.constants; package com.hnac.hzims.bigmodel.interactive.vo;
import lombok.Data; import lombok.Data;

15
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/StationSelectionVO.java

@ -0,0 +1,15 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import com.hnac.hzims.bigmodel.interactive.vo.SelectionVO;
import lombok.Data;
import java.io.Serializable;
/**
* @Author: huangxing
* @Date: 2024/05/09 16:32
*/
@Data
public class StationSelectionVO extends SelectionVO implements Serializable {
}

16
hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/VideoSelectionVO.java

@ -0,0 +1,16 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* @Author: huangxing
* @Date: 2024/05/11 16:20
*/
@Data
@EqualsAndHashCode
public class VideoSelectionVO extends SelectionVO implements Serializable {
}

238
hzims-service-api/digital-twin-display-api/digital-twin-display-api.iml

@ -1,238 +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="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<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:5.0.0.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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-tool:5.0.0.RELEASE" 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:5.0.0.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: redis.clients:jedis:2.9.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-cloud:5.0.0.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: io.projectreactor:reactor-core:3.2.19.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.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.2" 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: commons-logging:commons-logging:1.2" 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: 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-cache:5.0.0.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.3.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springblade:blade-core-test:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-launch:5.0.0.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" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" 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: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.17.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
</component>
</module>

8
hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/entity/TaskEntity.java

@ -48,6 +48,14 @@ public class TaskEntity extends TenantEntity {
@ApiModelProperty(value = "计划名称") @ApiModelProperty(value = "计划名称")
@QueryField(condition = SqlCondition.LIKE) @QueryField(condition = SqlCondition.LIKE)
private String planName; private String planName;
/**
* 路线名称
*/
@ApiModelProperty(value = "路线名称")
@QueryField(condition = SqlCondition.LIKE)
private String routeName;
/** /**
* 任务批次号 * 任务批次号
*/ */

1
hzims-service-api/pom.xml

@ -16,7 +16,6 @@
<modules> <modules>
<module>assets-api</module> <module>assets-api</module>
<!-- <module>spare-api</module>-->
<module>topvision-api</module> <module>topvision-api</module>
<module>equipment-api</module> <module>equipment-api</module>
<module>basic-api</module> <module>basic-api</module>

9
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/TestEntity.java

@ -9,6 +9,8 @@ import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.util.Date; import java.util.Date;
@ -58,6 +60,12 @@ public class TestEntity extends BaseEntity {
@ApiModelProperty("考试结束时间") @ApiModelProperty("考试结束时间")
private Date testEndTime; private Date testEndTime;
// @NotNull
// @Min(value = 0, message = "及格分必须大于等于0")
// @Max(value = 100, message = "及格分必须小于等于100")
// @ApiModelProperty("及格分")
// private Integer passingScore;
@NotNull @NotNull
@Size(max = 255, message = "考试地点字段长度不能超过255") @Size(max = 255, message = "考试地点字段长度不能超过255")
@ApiModelProperty("考试地点") @ApiModelProperty("考试地点")
@ -77,7 +85,6 @@ public class TestEntity extends BaseEntity {
@ApiModelProperty("参考人员") @ApiModelProperty("参考人员")
private String peopleName; private String peopleName;
@Size(max = 1000, message = "考试图片字段长度不能超过1000") @Size(max = 1000, message = "考试图片字段长度不能超过1000")
@ApiModelProperty("考试图片") @ApiModelProperty("考试图片")
private String imgPath; private String imgPath;

16
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailImgVO.java

@ -0,0 +1,16 @@
package com.hnac.hzims.safeproduct.vo;
import cn.afterturn.easypoi.entity.ImageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "演练记录表VO类")
public class RehearsalRecordDetailImgVO extends RehearsalRecordDetailVO{
@ApiModelProperty("图片列表")
private List<ImageEntity> images;
}

15
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailStrVO.java

@ -0,0 +1,15 @@
package com.hnac.hzims.safeproduct.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "演练记录表VO类")
public class RehearsalRecordDetailStrVO extends RehearsalRecordDetailVO{
@ApiModelProperty("图片列表")
private List<String> images;
}

3
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/RehearsalRecordDetailVO.java

@ -55,9 +55,6 @@ public class RehearsalRecordDetailVO {
@ApiModelProperty("演练科目") @ApiModelProperty("演练科目")
private String subject; private String subject;
@ApiModelProperty("图片列表")
private List<ImageEntity> images;
@ApiModelProperty("年份") @ApiModelProperty("年份")
private String year; private String year;

8
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/vo/TestScoreSumVO.java

@ -13,12 +13,14 @@ import lombok.Data;
public class TestScoreSumVO { public class TestScoreSumVO {
@ApiModelProperty("应考人数") @ApiModelProperty("应考人数")
private Integer peopleNum=0; private Integer peopleNum = 0;
@ApiModelProperty("实考人数") @ApiModelProperty("实考人数")
private Integer actualPeopleNum=0; private Integer actualPeopleNum = 0;
@ApiModelProperty("及格率") @ApiModelProperty("及格率")
private Double percentage=0.0; private Double percentage = 0.0;
@ApiModelProperty("及格分")
private Integer passingScore;
} }

16
hzims-service-api/spare-api/pom.xml

@ -1,16 +0,0 @@
<?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>spare-api</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging>
</project>

226
hzims-service-api/spare-api/spare-api.iml

@ -1,226 +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="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<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$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<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>

64
hzims-service-api/spare-api/src/main/java/com/hnac/hzims/spare/entity/Notice.java

@ -1,64 +0,0 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.hnac.hzims.spare.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import java.util.Date;
/**
* 实体类
*
* @author Chill
*/
@Data
@TableName("blade_notice")
@EqualsAndHashCode(callSuper = true)
public class Notice extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 标题
*/
@ApiModelProperty(value = "标题")
private String title;
/**
* 通知类型
*/
@ApiModelProperty(value = "通知类型")
private Integer category;
/**
* 发布日期
*/
@ApiModelProperty(value = "发布日期")
private Date releaseTime;
/**
* 内容
*/
@ApiModelProperty(value = "内容")
private String content;
}

50
hzims-service-api/spare-api/src/main/java/com/hnac/hzims/spare/feign/INoticeClient.java

@ -1,50 +0,0 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.hnac.hzims.spare.feign;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.tool.api.R;
import com.hnac.hzims.spare.entity.Notice;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* Notice Feign接口类
*
* @author Chill
*/
@FeignClient(
value = AppConstant.APPLICATION_DESK_NAME
)
public interface INoticeClient {
String API_PREFIX = "/client";
String TOP = API_PREFIX + "/top";
/**
* 获取notice列表
*
* @param number
* @return
*/
@GetMapping(TOP)
R<List<Notice>> top(@RequestParam("number") Integer number);
}

20
hzims-service-api/spare-api/src/main/java/com/hnac/hzims/spare/vo/NoticeVO.java

@ -1,20 +0,0 @@
package com.hnac.hzims.spare.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.hnac.hzims.spare.entity.Notice;
/**
* 通知公告视图类
*
* @author Chill
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class NoticeVO extends Notice {
@ApiModelProperty(value = "通知类型名")
private String categoryName;
}

239
hzims-service-api/video-image-api/video-image-api.iml

@ -1,239 +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="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<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$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<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:5.0.0.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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-tool:5.0.0.RELEASE" 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:5.0.0.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: redis.clients:jedis:2.9.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-cloud:5.0.0.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: io.projectreactor:reactor-core:3.2.19.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.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.2" 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: commons-logging:commons-logging:1.2" 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: 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-cache:5.0.0.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.3.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springblade:blade-core-test:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-launch:5.0.0.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" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" 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: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.17.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
</component>
</module>

239
hzims-service-api/water-quality-api/water-quality-api.iml

@ -1,239 +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="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<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$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<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:5.0.0.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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-tool:5.0.0.RELEASE" 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:5.0.0.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: redis.clients:jedis:2.9.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-cloud:5.0.0.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: io.projectreactor:reactor-core:3.2.19.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.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.2" 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: commons-logging:commons-logging:1.2" 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: 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-cache:5.0.0.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.3.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springblade:blade-core-test:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-launch:5.0.0.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" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" 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: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.17.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
</component>
</module>

239
hzims-service-api/water-rain-api/water-rain-api.iml

@ -1,239 +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="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<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$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<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:5.0.0.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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-tool:5.0.0.RELEASE" 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:5.0.0.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: redis.clients:jedis:2.9.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-cloud:5.0.0.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: io.projectreactor:reactor-core:3.2.19.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.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.2" 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: commons-logging:commons-logging:1.2" 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: 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-starter-cache:5.0.0.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.3.2" 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:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springblade:blade-core-test:5.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springblade:blade-core-launch:5.0.0.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" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.16.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" 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: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.17.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
</component>
</module>

54
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java

@ -6,6 +6,7 @@ import com.hnac.hzims.alarm.config.constants.AlarmConstants;
import com.hnac.hzims.alarm.config.service.AlarmConfigService; import com.hnac.hzims.alarm.config.service.AlarmConfigService;
import com.hnac.hzims.alarm.config.entity.AlarmEntity; import com.hnac.hzims.alarm.config.entity.AlarmEntity;
import com.hnac.hzims.alarm.monitor.service.AlarmSaveService; import com.hnac.hzims.alarm.monitor.service.AlarmSaveService;
import com.hnac.hzims.alarm.show.service.AlarmHandleService;
import com.hnac.hzims.alarm.show.service.AlarmService; import com.hnac.hzims.alarm.show.service.AlarmService;
import com.hnac.hzims.alarm.config.vo.AlarmHandleMarkVo; import com.hnac.hzims.alarm.config.vo.AlarmHandleMarkVo;
import com.hnac.hzims.message.entity.MessagePushRecordEntity; import com.hnac.hzims.message.entity.MessagePushRecordEntity;
@ -21,6 +22,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -35,6 +37,8 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
private final AlarmService alarmService; private final AlarmService alarmService;
private final AlarmHandleService handleService;
private final AlarmConfigService alarmConfigService; private final AlarmConfigService alarmConfigService;
private final IStationClient stationClient; private final IStationClient stationClient;
@ -49,41 +53,55 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
@Override @Override
public Boolean save(List<AlarmEntity> alarms) { public Boolean save(List<AlarmEntity> alarms) {
// 步骤1.查询告警数据对应站点 // 步骤1.查询告警数据对应站点
R<List<StationEntity>> result = stationClient.querySatationByCodes(alarms.stream().map(AlarmEntity::getStationId).collect(Collectors.toList())); R<List<StationEntity>> stations = stationClient.querySatationByCodes(alarms.stream().map(AlarmEntity::getStationId).collect(Collectors.toList()));
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ if(!stations.isSuccess() || CollectionUtil.isEmpty(stations.getData())){
log.error("alarm_query_station_is_null : {}",alarms.stream().map(AlarmEntity::getAlarmId).collect(Collectors.toList())); log.error("alarm_query_station_is_null : {}",alarms.stream().map(AlarmEntity::getAlarmId).collect(Collectors.toList()));
return false; return false;
} }
// 步骤2.查询当天处理的告警
List<String> handlers = handleService.sameDayContent();
// 步骤3.查询延后未完成的告警
List<String> delays = handleService.incompleteContent();
// 步骤4.近5分钟内告警
Set<String> keys = stringRedisTemplate.keys("hzims:queue:filter:alarm" + "*"); Set<String> keys = stringRedisTemplate.keys("hzims:queue:filter:alarm" + "*");
// 步骤2.遍历保存告警数据 // 步骤5.遍历保存告警数据
alarms.forEach(alarm->{ alarms.forEach(alarm->{
List<StationEntity> stations = result.getData().stream().filter(o->o.getCode().equals(alarm.getStationId())).collect(Collectors.toList()); // 未匹配到站点
if(CollectionUtil.isEmpty(stations)){ Optional<StationEntity> optional = stations.getData().stream().filter(o->o.getCode().equals(alarm.getStationId())).findFirst();
if(!optional.isPresent()){
return;
}
// 告警已处理
if(handlers.contains(alarm.getAlarmContext())){
return;
}
// 告警已延后处理
if(delays.contains(alarm.getAlarmContext())){
return; return;
} }
// 根据最近5分钟的数据,做去重 // 近5分钟内告警重复
for (String key : keys) { for (String key : keys) {
String value = stringRedisTemplate.opsForValue().get(key); String value = stringRedisTemplate.opsForValue().get(key);
if (value.equals(stations.get(0).getName()+alarm.getAlarmContext())){ if (value.equals(optional.get().getName()+alarm.getAlarmContext())){
return; return;
} }
} }
// fpd告警拼接 // fpd告警拼接站点名称
if(AlarmConstants.EARLY_WARNING.equals(alarm.getAlarmSource())){ if(AlarmConstants.EARLY_WARNING.equals(alarm.getAlarmSource())){
alarm.setAlarmContext(stations.get(0).getName() + "." + alarm.getAlarmContext()); alarm.setAlarmContext(optional.get().getName() + "." + alarm.getAlarmContext());
} }
// 步骤3.站点参数设置 // 站点参数设置
alarm.setCreateDept(stations.get(0).getCreateDept()); alarm.setCreateDept(optional.get().getCreateDept());
alarm.setStationName(stations.get(0).getName()); alarm.setStationName(optional.get().getName());
alarm.setTenantId(stations.get(0).getTenantId()); alarm.setTenantId(optional.get().getTenantId());
alarm.setStatus(0); alarm.setStatus(0);
// 步骤4.根据站点查询配置标识 // 根据站点查询配置标识
AlarmHandleMarkVo mark = alarmConfigService.mark(alarm.getStationId(),alarm.getAlarmSource(),alarm.getAlarmType()); AlarmHandleMarkVo mark = alarmConfigService.mark(alarm.getStationId(),alarm.getAlarmSource(),alarm.getAlarmType());
if(ObjectUtil.isEmpty(mark)){ if(ObjectUtil.isEmpty(mark)){
log.error("alarm_obtain_mark_is_null : {}",alarm.getAlarmId()); log.error("alarm_obtain_mark_is_null : {}",alarm.getAlarmId());
return; return;
} }
// 步骤5.告警处理标识赋值 // 告警处理标识赋值
alarm.setIsRightTabulation(mark.getIsRightTabulation()); alarm.setIsRightTabulation(mark.getIsRightTabulation());
alarm.setIsBroadcast(mark.getIsBroadcast()); alarm.setIsBroadcast(mark.getIsBroadcast());
alarm.setIsMask(mark.getIsMask()); alarm.setIsMask(mark.getIsMask());
@ -92,16 +110,16 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
alarm.setIsSmallBell(mark.getIsSmallBell()); alarm.setIsSmallBell(mark.getIsSmallBell());
alarm.setIsShortMessage(mark.getIsShortMessage()); alarm.setIsShortMessage(mark.getIsShortMessage());
alarm.setIsWxMessage(mark.getIsWxMessage()); alarm.setIsWxMessage(mark.getIsWxMessage());
// 步骤6.保存当日告警数据 // 保存告警
boolean isSave = alarmService.save(alarm); boolean isSave = alarmService.save(alarm);
if(!isSave){ if(!isSave){
log.error("alarm_save_fail : {}",alarm.getAlarmId()); log.error("alarm_save_fail : {}",alarm.getAlarmId());
return; return;
} }
String key="hzims:queue:filter:alarm"+alarm.getAlarmId(); String key="hzims:queue:filter:alarm"+alarm.getAlarmId();
stringRedisTemplate.opsForValue().set(key,stations.get(0).getName()+alarm.getAlarmContext()); stringRedisTemplate.opsForValue().set(key,optional.get().getName()+alarm.getAlarmContext());
stringRedisTemplate.expire(key,5, TimeUnit.MINUTES); stringRedisTemplate.expire(key,5, TimeUnit.MINUTES);
// 步骤7.发生数据至redis告警队列 // 发送告警数据进行消息推送队列
stringRedisTemplate.opsForList().rightPush("hzims:queue:alarm", JSON.toJSONString(alarm)); stringRedisTemplate.opsForList().rightPush("hzims:queue:alarm", JSON.toJSONString(alarm));
}); });
return true; return true;

4
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmHandleService.java

@ -25,4 +25,8 @@ public interface AlarmHandleService extends BaseService<AlarmHandleEntity> {
List<User> handleUser(); List<User> handleUser();
List<String> handles(); List<String> handles();
List<String> sameDayContent();
List<String> incompleteContent();
} }

18
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleServiceImpl.java

@ -170,4 +170,22 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl<AlarmHandleMapper, A
String end = DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME); String end = DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME);
return this.baseMapper.handles(start,end); return this.baseMapper.handles(start,end);
} }
/**
* 查询当天处理告警的内容
* @return
*/
@Override
public List<String> sameDayContent() {
return null;
}
/**
* 查询未到延后期限告警的内容
* @return
*/
@Override
public List<String> incompleteContent() {
return null;
}
} }

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

@ -3,15 +3,15 @@ package com.hnac.hzims.alarm.show.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.alarm.config.service.AlarmConfigService;
import com.hnac.hzims.alarm.config.constants.AlarmConstants; import com.hnac.hzims.alarm.config.constants.AlarmConstants;
import com.hnac.hzims.alarm.config.entity.AlarmEntity; import com.hnac.hzims.alarm.config.entity.AlarmEntity;
import com.hnac.hzims.alarm.config.service.AlarmConfigService;
import com.hnac.hzims.alarm.config.vo.AlarmCountVo;
import com.hnac.hzims.alarm.config.vo.ChildAlarmCountVo;
import com.hnac.hzims.alarm.show.mapper.AlarmMapper; import com.hnac.hzims.alarm.show.mapper.AlarmMapper;
import com.hnac.hzims.alarm.show.service.AlarmHandleService; import com.hnac.hzims.alarm.show.service.AlarmHandleService;
import com.hnac.hzims.alarm.show.service.AlarmService; import com.hnac.hzims.alarm.show.service.AlarmService;
import com.hnac.hzims.alarm.source.service.MessageService; import com.hnac.hzims.alarm.source.service.MessageService;
import com.hnac.hzims.alarm.config.vo.AlarmCountVo;
import com.hnac.hzims.alarm.config.vo.ChildAlarmCountVo;
import com.hnac.hzims.equipment.entity.EmInfoEntity; import com.hnac.hzims.equipment.entity.EmInfoEntity;
import com.hnac.hzims.equipment.entity.EmVideoBandingEntity; import com.hnac.hzims.equipment.entity.EmVideoBandingEntity;
import com.hnac.hzims.equipment.feign.IEmInfoClient; import com.hnac.hzims.equipment.feign.IEmInfoClient;
@ -20,10 +20,8 @@ import com.hnac.hzims.message.dto.MailMessageDTO;
import com.hnac.hzims.message.fegin.IMessageClient; import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient;
import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient; import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient;
import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceAttrVO; import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceAttrVO;
import com.hnac.hzinfo.sdk.v5.project.ProjectClient;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;

3
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/BigModelInvokeUrl.java

@ -23,6 +23,9 @@ public class BigModelInvokeUrl {
private String updateVideo; private String updateVideo;
private String updateFault;
private String updateCanvas; private String updateCanvas;
private String assistantKnowledgeAsk;
} }

17
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/FuncRouteEnum.java

@ -12,19 +12,26 @@ import java.util.Optional;
*/ */
@AllArgsConstructor @AllArgsConstructor
public enum FuncRouteEnum { public enum FuncRouteEnum {
OPEN_SCADA("open_scada","打开实时画面"), OPEN_CANVAS("open_canvas","打开实时画面",null),
OPEN_VIDEO("open_video","打开视频监控"), OPEN_VIDEO("open_video","打开视频监控",null),
DIAGNOSE("diagnose","智能诊断"), DIAGNOSE("diagnose","智能诊断",null),
CHOOSE_STATION("choose_station","选择站点"), CHOOSE_STATION("choose_station","选择站点",null),
CHOOSE_VIDEO("choose_video","选择视频",null),
CHOOSE_CANVAS("choose_canvas","选择画面",null),
CHOOSE_FAULT("choose_fault","选择故障",null),
CONFIRM_YK("confirm_yk","遥控确认", FunctionConstants.TypeEnum.PARAMS),
SHOW_PARAM("show_param","设备参数查询", FunctionConstants.TypeEnum.PARAMS),
; ;
@Getter @Getter
private String funcCode; private String funcCode;
@Getter @Getter
private String funcName; private String funcName;
@Getter
private FunctionConstants.TypeEnum type;
public static FuncRouteEnum getEnumByFuncCode(String funcCode) { public static FuncRouteEnum getEnumByFuncCode(String funcCode) {
Optional<FuncRouteEnum> FuncRoute = Arrays.stream(FuncRouteEnum.class.getEnumConstants()).filter(e -> funcCode.equals(e.getFuncCode())).findFirst(); Optional<FuncRouteEnum> FuncRoute = Arrays.stream(FuncRouteEnum.class.getEnumConstants()).filter(e -> funcCode.equals(e.getFuncCode())).findFirst();
return FuncRoute.get(); return FuncRoute.orElse(null);
} }
} }

22
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/constants/ProjectRemoteTypeEnum.java

@ -0,0 +1,22 @@
package com.hnac.hzims.bigmodel.interactive.constants;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @Author: huangxing
* @Date: 2024/05/21 16:34
*/
@AllArgsConstructor
public enum ProjectRemoteTypeEnum {
/**不允许发送遥控**/
NOT_ALLOW(0),
/**运行发送遥控并且需要校验权限**/
VALID(1),
/**运行发送遥控并免校验权限**/
ALLOW(2),
;
@Getter
private Integer ctrlType;
}

16
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/InteractiveController.java

@ -1,5 +1,6 @@
package com.hnac.hzims.bigmodel.interactive.controller; package com.hnac.hzims.bigmodel.interactive.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.bigmodel.BigModelConstants; import com.hnac.hzims.bigmodel.BigModelConstants;
@ -12,9 +13,12 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.system.dto.ControlDTO;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
/** /**
* @Author: huangxing * @Author: huangxing
@ -48,8 +52,9 @@ public class InteractiveController {
@RequestMapping(value = "/authentication",method = {RequestMethod.GET,RequestMethod.POST}) @RequestMapping(value = "/authentication",method = {RequestMethod.GET,RequestMethod.POST})
public R authentication(@RequestParam(required = false) @ApiParam("站点编号") String stationId, public R authentication(@RequestParam(required = false) @ApiParam("站点编号") String stationId,
@RequestParam @ApiParam("用户ID") String userId, @RequestParam @ApiParam("用户ID") String userId,
@RequestParam(required = false) @ApiParam("菜单ID") String funcCode) { @RequestParam(required = false) @ApiParam("菜单ID") String func,
return R.status(interactiveService.authentication(stationId,userId,funcCode)); @RequestParam(required = false) @ApiParam("会话ID")String askId) {
return R.status(interactiveService.authentication(stationId,userId,func,askId));
} }
@ApiOperation("获取问答sessionId") @ApiOperation("获取问答sessionId")
@ -66,5 +71,10 @@ public class InteractiveController {
return R.data(interactiveService.removeSessionId(sessionId)); return R.data(interactiveService.removeSessionId(sessionId));
} }
@ApiOperation("下发遥控指令")
@ApiOperationSupport(order = 6)
@PostMapping("/sendRemoteControl")
public R<Object> sendRemoteControl(@RequestBody ControlDTO operate) {
return R.data(interactiveService.sendRemoteControl(operate));
}
} }

20
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/IInteractiveService.java

@ -2,11 +2,9 @@ package com.hnac.hzims.bigmodel.interactive.service;
import com.hnac.hzims.bigmodel.interactive.req.ModelFunctionReq; import com.hnac.hzims.bigmodel.interactive.req.ModelFunctionReq;
import com.hnac.hzims.bigmodel.interactive.vo.AnswerVO; import com.hnac.hzims.bigmodel.interactive.vo.AnswerVO;
import io.swagger.annotations.ApiParam;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.RequestParam; import org.springblade.system.dto.ControlDTO;
import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -26,9 +24,23 @@ public interface IInteractiveService {
Boolean updateCanvas(Map<String,Object> request); Boolean updateCanvas(Map<String,Object> request);
void updateFault(Map<String,Object> request);
List<AnswerVO> getAnswerBySessionIds(String sessionIds); List<AnswerVO> getAnswerBySessionIds(String sessionIds);
Boolean authentication(String stationId, String userId, String funcCode); Boolean authentication(String stationId, String userId, String func,String sessionId);
Boolean removeSessionId(String sessionId); Boolean removeSessionId(String sessionId);
/**
* 发起知识库问答
* @param question 问题
* @param sessionId 会话id
* @param userId 用户id
* @param knowledge 知识库名称
* @return 发起结果
*/
R knowledgeAsk(String question, String sessionId, String userId, String knowledge);
Object sendRemoteControl(ControlDTO operate);
} }

128
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/AuthenticationService.java

@ -0,0 +1,128 @@
package com.hnac.hzims.bigmodel.interactive.service.impl;
import com.google.common.collect.Lists;
import com.hnac.hzims.bigmodel.entity.FunctionEntity;
import com.hnac.hzims.bigmodel.function.service.IFunctionService;
import com.hnac.hzims.bigmodel.interactive.constants.ProjectRemoteTypeEnum;
import com.hnac.hzims.bigmodel.interactive.vo.SessionContentVO;
import com.hnac.hzims.bigmodel.websocket.constants.RedisKeyConstants;
import com.hnac.hzinfo.sdk.core.response.Result;
import com.hnac.hzinfo.sdk.v5.project.ProjectClient;
import com.hnac.hzinfo.sdk.v5.project.vo.ProjectVO;
import lombok.AllArgsConstructor;
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.Func;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.dto.DeptStationDTO;
import org.springblade.system.entity.CtrlAuth;
import org.springblade.system.feign.IDeptClient;
import org.springblade.system.feign.IRemoteClient;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
/**
* @Author: huangxing
* @Date: 2024/05/21 16:10
*/
@Service
@AllArgsConstructor
public class AuthenticationService {
private final IDeptClient deptClient;
private final IFunctionService functionService;
private final IUserClient userClient;
private final ProjectClient projectClient;
private final IRemoteClient remoteClient;
private final RedisTemplate redisTemplate;
/**
* 站点鉴权
* @param stationId 站点ID
* @param userId 用户ID
*/
public void stationAuthentication(String stationId, String userId) {
List<String> stations = this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId)
.filter(StringUtil::isNotBlank).filter(Func::isNotEmpty).collect(Collectors.toList());
Assert.isTrue(stations.contains(stationId),() -> {
throw new ServiceException("人员站点鉴权失败!");
});
}
/**
* 菜单鉴权
* @param userId 用户ID
* @param func 函数编号
*/
public void menuAuthentication(String userId, String func) {
FunctionEntity function = functionService.getFunctionByCode(func);
if(Func.isNotEmpty(function) && Func.isNotEmpty(function.getRoute()) && StringUtil.isNotBlank(function.getRoute())) {
R<Boolean> authenticationR = userClient.permissionMenuById(Long.valueOf(userId), function.getRoute());
Assert.isTrue(authenticationR.isSuccess() && authenticationR.getData(), () -> {
throw new ServiceException("人员菜单鉴权失败!");
});
}
}
/**
* 遥控鉴权
* @param stationId 站点ID
* @param userId 用户ID
*/
public void remoteAuthentication(String stationId, String userId,String sessionId) {
// 查询数据平台站点是否可被遥控
Result<List<ProjectVO>> projectR = projectClient.getProjectIds(Lists.newArrayList(stationId));
Assert.isTrue(projectR.isSuccess() && CollectionUtil.isNotEmpty(projectR.getData()) && projectR.getData().size() == 1,() -> {
throw new ServiceException("未查询到站点,鉴权失败!");
});
ProjectVO project = projectR.getData().get(0);
if(ProjectRemoteTypeEnum.NOT_ALLOW.getCtrlType().equals(project.getCtrlType())) {
// 不允许发送遥控
throw new ServiceException("该站点不允许发送遥控指令,校验失败!");
}
else if(ProjectRemoteTypeEnum.VALID.getCtrlType().equals(project.getCtrlType())) {
// 运行发送遥控并且需要校验权限
R<List<CtrlAuth>> ctrlAuthR = remoteClient.getCtrlAuth(Optional.ofNullable(userId).filter(StringUtil::isNotBlank).map(Long::parseLong).orElse(null));
Assert.isTrue(ctrlAuthR.isSuccess(),() -> {
throw new ServiceException("该站点未设置鉴权用户,校验失败!");
});
List<CtrlAuth> ctrlAuthList = ctrlAuthR.getData();
Optional<CtrlAuth> authOptional = ctrlAuthList.stream().filter(c -> c.getProjectId().equals(stationId)).findFirst();
Assert.isTrue(authOptional.isPresent() && Func.isNotEmpty(authOptional.get().getIsLimitMachine()), () -> {
throw new ServiceException("该用户不存在相应站点权限,校验不通过!");
});
CtrlAuth ctrlAuth = authOptional.get();
// 如限制机器发送遥控指令
if(ctrlAuth.getIsLimitMachine().intValue() == 1) {
SessionContentVO sessionContent = (SessionContentVO) redisTemplate.opsForHash().get(RedisKeyConstants.SESSION_CONTENT_KEY, sessionId);
Assert.isTrue(Func.isNotEmpty(sessionContent),() -> {
throw new ServiceException("获取问题机器码失败,校验不通过!");
});
String machineCode = sessionContent.getMachineCode();
Assert.isTrue(StringUtil.isNotBlank(machineCode) && Func.isNotEmpty(machineCode) ,() -> {
throw new ServiceException("获取问题机器码失败,校验不通过!");
});
Assert.isTrue(machineCode.equals(ctrlAuth.getMachineCode()),() -> {
throw new ServiceException("站点校验码校验失败,校验不通过!");
});
}
}
}
public List<DeptStationDTO> getStationPermissionsById(String userId) {
R<List<DeptStationDTO>> deptSattionR = deptClient.getStationPermissionsById(Long.valueOf(userId));
Assert.isTrue(deptSattionR.isSuccess() && CollectionUtil.isNotEmpty(deptSattionR.getData()),() -> {
throw new ServiceException("获取人员站点权限失败!");
});
return deptSattionR.getData();
}
}

115
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ExtraResolveStrategyService.java

@ -5,15 +5,23 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum;
import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants; import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants;
import com.hnac.hzims.bigmodel.interactive.constants.StationSelectionVO; import com.hnac.hzims.bigmodel.interactive.vo.*;
import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; import com.hnac.hzims.bigmodel.websocket.constants.RedisKeyConstants;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity;
import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.operational.station.feign.IStationVideoTypeClient;
import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient;
import com.hnac.hzinfo.sdk.v5.device.vo.DeviceInstanceFuncVO;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.dto.ControlDTO;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap; import java.util.HashMap;
@ -31,6 +39,10 @@ import java.util.stream.Collectors;
public class ExtraResolveStrategyService { public class ExtraResolveStrategyService {
private final IStationClient stationClient; private final IStationClient stationClient;
private final IStationVideoTypeClient videoTypeClient;
private final JumpRouteJoinStrategy jumpRouteJoinStrategy;
private final DeviceClient deviceClient;
private final RedisTemplate redisTemplate;
/** /**
* 解析DFP返回extra * 解析DFP返回extra
@ -41,19 +53,73 @@ public class ExtraResolveStrategyService {
JSONObject extra = JSONObject.parseObject(extraStr); JSONObject extra = JSONObject.parseObject(extraStr);
String functionCode = Optional.ofNullable(extra.get("func")).map(String::valueOf).orElse(""); String functionCode = Optional.ofNullable(extra.get("func")).map(String::valueOf).orElse("");
if(StringUtil.isNotBlank(functionCode)) { if(StringUtil.isNotBlank(functionCode)) {
XxlJobLogger.log("函数编号为:" + functionCode);
FuncRouteEnum funcRouteEnum = FuncRouteEnum.getEnumByFuncCode(functionCode); FuncRouteEnum funcRouteEnum = FuncRouteEnum.getEnumByFuncCode(functionCode);
if(Func.isNotEmpty(funcRouteEnum)) {
switch (funcRouteEnum) { switch (funcRouteEnum) {
case DIAGNOSE: case DIAGNOSE:
return this.resolveDiagnose(extra); return this.resolveDiagnose(extra);
case CHOOSE_STATION: case CHOOSE_STATION:
return this.resolveChooseStation(extra); return this.resolveChooseStation(extra);
case CHOOSE_VIDEO:
return this.resolveChooseVideo(extra);
case CHOOSE_CANVAS:
return this.resolveChooseScada(extra);
case CHOOSE_FAULT:
return this.resolveChooseFault(extra);
case CONFIRM_YK:
return this.resolveConfirmRemote(extra);
case SHOW_PARAM:
return this.resolveShowParam(extra);
default: default:
break; break;
} }
} }
}
return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class); return JSONObject.parseObject(JSON.toJSONString(extra),ExtraVO.class);
} }
private ExtraVO resolveShowParam(Map<String,Object> extra) {
ExtraVO result = new ExtraVO();
result.setFuncCode(FuncRouteEnum.SHOW_PARAM.getFuncCode());
result.setType(FuncRouteEnum.SHOW_PARAM.getType().getType());
Map<String,Object> param = new HashMap(1);
DataVO data = JSONObject.parseObject(JSON.toJSONString(extra.get("data")),DataVO.class);
param.put("data", data);
result.setParams(param);
return result;
}
private ExtraVO resolveConfirmRemote(Map<String,Object> extra) {
ExtraVO result = new ExtraVO();
RemoteParamVO remoteParam = JSONObject.parseObject(JSON.toJSONString(extra.get("data")), RemoteParamVO.class);
result.setFuncCode(FuncRouteEnum.CONFIRM_YK.getFuncCode());
result.setType(FuncRouteEnum.CONFIRM_YK.getType().getType());
R<DeviceInstanceFuncVO> funcVOR = deviceClient.getFuncById(remoteParam.getFuncId());
if(funcVOR.isSuccess()) {
Map<String,Object> param = new HashMap(1);
param.put("control",funcVOR.getData());
param.put("deviceName",remoteParam.getDeviceName());
param.put("projectName",remoteParam.getProjectName());
param.put("value",remoteParam.getValue());
result.setParams(param);
}
return result;
}
private ExtraVO resolveChooseFault(Map<String,Object> extra) {
ExtraVO result = new ExtraVO();
JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data")));
if(data.containsKey("faults")) {
List<FaultSelectionVO> faults = JSONArray.parseArray(JSON.toJSONString(data.get("faults")), FaultSelectionVO.class);
result.setSelection(faults);
}
result.setFuncCode(FuncRouteEnum.CHOOSE_FAULT.getFuncCode());
result.setSpecial(true);
result.setType(FunctionConstants.TypeEnum.CHOOSE.getType());
return result;
}
private ExtraVO resolveDiagnose(Map<String,Object> extra) { private ExtraVO resolveDiagnose(Map<String,Object> extra) {
ExtraVO result = new ExtraVO(); ExtraVO result = new ExtraVO();
JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data"))); JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data")));
@ -64,6 +130,7 @@ public class ExtraResolveStrategyService {
params.put("fdpDeviceName",data.getString("device_name")); params.put("fdpDeviceName",data.getString("device_name"));
params.put("fdpOrd",data.getString("ord")); params.put("fdpOrd",data.getString("ord"));
result.setParams(params); result.setParams(params);
result.setFuncCode(FuncRouteEnum.DIAGNOSE.getFuncCode());
result.setType(FunctionConstants.TypeEnum.PARAMS.getType()); result.setType(FunctionConstants.TypeEnum.PARAMS.getType());
return result; return result;
} }
@ -95,4 +162,46 @@ public class ExtraResolveStrategyService {
result.setType(FunctionConstants.TypeEnum.CHOOSE.getType()); result.setType(FunctionConstants.TypeEnum.CHOOSE.getType());
return result; return result;
} }
private ExtraVO resolveChooseVideo(Map<String,Object> extra) {
ExtraVO result = new ExtraVO();
JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data")));
if(data.containsKey("videos")) {
List<JSONObject> videoIds = JSONArray.parseArray(JSON.toJSONString(data.get("videos")), JSONObject.class);
List<VideoSelectionVO> selections = videoIds.stream().map(video -> {
R<StationVideoTypeEntity> videoR = videoTypeClient.getById(Long.valueOf(video.getString("id")));
VideoSelectionVO selectionVO = new VideoSelectionVO();
if (videoR.isSuccess() && Func.isNotEmpty(videoR.getData())) {
selectionVO.setId(video.getString("id"));
selectionVO.setName(videoR.getData().getName());
}
return selectionVO;
}).collect(Collectors.toList());
result.setFuncCode(FuncRouteEnum.CHOOSE_VIDEO.getFuncCode());
result.setSpecial(true);
result.setSelection(selections);
}
result.setType(FunctionConstants.TypeEnum.CHOOSE.getType());
return result;
}
private ExtraVO resolveChooseScada(Map<String,Object> extra) {
ExtraVO result = new ExtraVO();
JSONObject data = JSONObject.parseObject(JSON.toJSONString(extra.get("data")));
if(data.containsKey("canvases")) {
List<JSONObject> canvases = JSONArray.parseArray(JSON.toJSONString(data.get("canvases")), JSONObject.class);
List<ScadaSelectionVO> selections = canvases.stream().map(canvas -> {
ScadaSelectionVO selectionVO = new ScadaSelectionVO();
Map<String, String> resolve = jumpRouteJoinStrategy.resolve(canvas.getString("id"), JumpRouteJoinStrategy.SCADA_PARAMS_SOLVE);
selectionVO.setId(canvas.getString("id"));
selectionVO.setName(resolve.get("name"));
return selectionVO;
}).collect(Collectors.toList());
result.setFuncCode(FuncRouteEnum.CHOOSE_CANVAS.getFuncCode());
result.setSpecial(true);
result.setSelection(selections);
}
result.setType(FunctionConstants.TypeEnum.CHOOSE.getType());
return result;
}
} }

91
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hnac.hzims.bigmodel.configuration.BigModelInvokeUrl; import com.hnac.hzims.bigmodel.configuration.BigModelInvokeUrl;
import com.hnac.hzims.bigmodel.entity.FunctionEntity; import com.hnac.hzims.bigmodel.entity.FunctionEntity;
import com.hnac.hzims.bigmodel.function.service.IFunctionService; import com.hnac.hzims.bigmodel.function.service.IFunctionService;
import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum;
import com.hnac.hzims.bigmodel.interactive.req.ModelFunctionReq; import com.hnac.hzims.bigmodel.interactive.req.ModelFunctionReq;
import com.hnac.hzims.bigmodel.interactive.service.IInteractiveService; import com.hnac.hzims.bigmodel.interactive.service.IInteractiveService;
import com.hnac.hzims.bigmodel.interactive.service.IJumpPageService; import com.hnac.hzims.bigmodel.interactive.service.IJumpPageService;
@ -23,8 +24,10 @@ import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.dto.ControlDTO;
import org.springblade.system.dto.DeptStationDTO; import org.springblade.system.dto.DeptStationDTO;
import org.springblade.system.feign.IDeptClient; import org.springblade.system.feign.IDeptClient;
import org.springblade.system.feign.IRemoteClient;
import org.springblade.system.user.feign.IUserClient; import org.springblade.system.user.feign.IUserClient;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
@ -49,6 +52,8 @@ public class InteractiveServiceImpl implements IInteractiveService {
private final BladeLogger logger; private final BladeLogger logger;
private final IRemoteClient remoteClient;
private final IJumpPageService jumpPageService; private final IJumpPageService jumpPageService;
private final IParamsService paramsService; private final IParamsService paramsService;
@ -57,9 +62,7 @@ public class InteractiveServiceImpl implements IInteractiveService {
private final BigModelInvokeUrl bigModelInvokeUrl; private final BigModelInvokeUrl bigModelInvokeUrl;
private final IDeptClient deptClient; private final AuthenticationService authenticationService;
private final IUserClient userClient;
private final RedisTemplate redisTemplate; private final RedisTemplate redisTemplate;
@ -73,6 +76,9 @@ public class InteractiveServiceImpl implements IInteractiveService {
logger.info("interactive:resolve","开始解析大模型函数,函数内容为:" + JSON.toJSONString(req)); logger.info("interactive:resolve","开始解析大模型函数,函数内容为:" + JSON.toJSONString(req));
FunctionEntity function = functionService.getFunctionByCode(req.getFunctionName()); FunctionEntity function = functionService.getFunctionByCode(req.getFunctionName());
TypeEnum typeEnum = TypeEnum.getTypeEnumByType(function.getType()); TypeEnum typeEnum = TypeEnum.getTypeEnumByType(function.getType());
if(Func.isEmpty(typeEnum)) {
throw new ServiceException("函数解析失败!");
}
switch (typeEnum) { switch (typeEnum) {
// 页面跳转 // 页面跳转
case JUMP: case JUMP:
@ -95,8 +101,8 @@ public class InteractiveServiceImpl implements IInteractiveService {
params.put("id",sessionId); params.put("id",sessionId);
params.put("userid", userId); params.put("userid", userId);
params.put("query",question); params.put("query",question);
params.put("stationids",this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId).filter(StringUtil::isNotBlank).filter(Func::isNotEmpty).toArray()); params.put("stationids",authenticationService.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId).filter(StringUtil::isNotBlank).filter(Func::isNotEmpty).toArray());
params.put("projectids",this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getDeptId).filter(Func::isNotEmpty).map(String::valueOf).toArray()); params.put("projectids",authenticationService.getStationPermissionsById(userId).stream().map(DeptStationDTO::getDeptId).filter(Func::isNotEmpty).map(String::valueOf).toArray());
HttpResponse response = HttpRequest.post(fdpHost + bigModelInvokeUrl.getAssistantAsk()) HttpResponse response = HttpRequest.post(fdpHost + bigModelInvokeUrl.getAssistantAsk())
.body(JSON.toJSONString(params)).execute(); .body(JSON.toJSONString(params)).execute();
logger.info("interactive:ask","问答传参为:" + JSON.toJSONString(params) + "结果为:" + response.body()); logger.info("interactive:ask","问答传参为:" + JSON.toJSONString(params) + "结果为:" + response.body());
@ -129,8 +135,8 @@ public class InteractiveServiceImpl implements IInteractiveService {
params.put("id",sessionId); params.put("id",sessionId);
params.put("userid", userId); params.put("userid", userId);
params.put("extra",extra); params.put("extra",extra);
params.put("stationids",this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId).filter(StringUtil::isNotBlank).filter(Func::isNotEmpty).toArray()); params.put("stationids",authenticationService.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId).filter(StringUtil::isNotBlank).filter(Func::isNotEmpty).toArray());
params.put("projectids",this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getDeptId).filter(Func::isNotEmpty).map(String::valueOf).toArray()); params.put("projectids",authenticationService.getStationPermissionsById(userId).stream().map(DeptStationDTO::getDeptId).filter(Func::isNotEmpty).map(String::valueOf).toArray());
HttpResponse response = HttpRequest.post(fdpHost + bigModelInvokeUrl.getAssistantSpecialAsk()) HttpResponse response = HttpRequest.post(fdpHost + bigModelInvokeUrl.getAssistantSpecialAsk())
.body(JSON.toJSONString(params)).execute(); .body(JSON.toJSONString(params)).execute();
if(response.getStatus() != HttpServletResponse.SC_OK) { if(response.getStatus() != HttpServletResponse.SC_OK) {
@ -162,6 +168,15 @@ public class InteractiveServiceImpl implements IInteractiveService {
} }
@Override @Override
public void updateFault(Map<String, Object> request) {
HttpResponse response = HttpRequest.post(fdpHost + bigModelInvokeUrl.getUpdateFault())
.body(JSON.toJSONString(request)).execute();
Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> {
throw new ServiceException("远程调用大模型【更新故障列表】接口失败!");
});
}
@Override
public List<AnswerVO> getAnswerBySessionIds(String sessionIds) { public List<AnswerVO> getAnswerBySessionIds(String sessionIds) {
Map<String,Object> params = new HashMap<>(); Map<String,Object> params = new HashMap<>();
params.put("ids",Func.toStrList(",",sessionIds).toArray()); params.put("ids",Func.toStrList(",",sessionIds).toArray());
@ -185,25 +200,18 @@ public class InteractiveServiceImpl implements IInteractiveService {
} }
@Override @Override
public Boolean authentication(String stationId, String userId, String funcCode) { public Boolean authentication(String stationId, String userId, String func,String sessionId) {
// 站点鉴权 // 站点鉴权
if(StringUtil.isNotBlank(stationId)) { if(StringUtil.isNotBlank(stationId)) {
List<String> stations = this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId) authenticationService.stationAuthentication(stationId,userId);
.filter(StringUtil::isNotBlank).filter(Func::isNotEmpty).collect(Collectors.toList());
Assert.isTrue(stations.contains(stationId),() -> {
throw new ServiceException("人员站点鉴权失败!");
});
} }
// 菜单鉴权 // 菜单鉴权
if(StringUtil.isNotBlank(funcCode)) { if(StringUtil.isNotBlank(func) && StringUtil.isNotBlank(userId)) {
FunctionEntity function = functionService.getFunctionByCode(funcCode); authenticationService.menuAuthentication(userId,func);
Assert.isTrue(Func.isNotEmpty(function) && StringUtil.isNotBlank(function.getRoute()),() -> { }
throw new ServiceException("传入函数未获取到菜单,鉴权失败!"); // 遥控鉴权
}); if(FuncRouteEnum.CONFIRM_YK.getFuncCode().equals(func)) {
R<Boolean> authenticationR = userClient.permissionMenuById(Long.valueOf(userId), function.getRoute()); authenticationService.remoteAuthentication(stationId,userId,sessionId);
Assert.isTrue(authenticationR.isSuccess() && authenticationR.getData(), () -> {
throw new ServiceException("人员菜单鉴权失败!");
});
} }
return true; return true;
} }
@ -235,11 +243,38 @@ public class InteractiveServiceImpl implements IInteractiveService {
return true; return true;
} }
private List<DeptStationDTO> getStationPermissionsById(String userId) { /**
R<List<DeptStationDTO>> deptSattionR = deptClient.getStationPermissionsById(Long.valueOf(userId)); * 发起知识库问答
Assert.isTrue(deptSattionR.isSuccess() && CollectionUtil.isNotEmpty(deptSattionR.getData()),() -> { */
throw new ServiceException("获取人员站点权限失败!"); @Override
}); public R knowledgeAsk(String question, String sessionId, String userId, String knowledge) {
return deptSattionR.getData(); Map<String,Object> params = new HashMap<>();
params.put("id", sessionId);
params.put("userid", userId);
params.put("query", question);
params.put("knowledge", knowledge);
params.put("stationids", authenticationService.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId)
.filter(StringUtil::isNotBlank).filter(Func::isNotEmpty).toArray());
params.put("projectids", authenticationService.getStationPermissionsById(userId).stream().map(DeptStationDTO::getDeptId)
.filter(Func::isNotEmpty).map(String::valueOf).toArray());
HttpResponse response = HttpRequest.post(fdpHost + bigModelInvokeUrl.getAssistantKnowledgeAsk())
.body(JSON.toJSONString(params)).execute();
logger.info("interactive:knowledgeAsk", "知识库问答传参为:" + JSON.toJSONString(params) + " 结果为:" + response.body());
if (response.getStatus() != HttpServletResponse.SC_OK) {
log.error("远程调用大模型【发起知识库问答】接口失败!");
return R.fail("远程调用大模型【发起知识库问答】接口失败!");
}
this.addQuestionSessionId(sessionId);
return R.success("消息发送成功");
}
/**
* 下发遥控指令
* @param operate
* @return
*/
@Override
public Object sendRemoteControl(ControlDTO operate) {
return remoteClient.sendCtrl(operate);
} }
} }

31
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/JumpRouteJoinStrategy.java

@ -6,16 +6,17 @@ import com.hnac.hzims.bigmodel.entity.FunctionEntity;
import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum;
import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants; import com.hnac.hzims.bigmodel.interactive.constants.FunctionConstants;
import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.feign.IStationClient;
import lombok.RequiredArgsConstructor;
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.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.util.HashMap; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.IntStream; import java.util.stream.IntStream;
/** /**
@ -23,8 +24,13 @@ import java.util.stream.IntStream;
* @Date: 2024/04/30 11:38 * @Date: 2024/04/30 11:38
*/ */
@Component @Component
@RequiredArgsConstructor
public class JumpRouteJoinStrategy { public class JumpRouteJoinStrategy {
private final IStationClient stationClient;
public static String[] SCADA_PARAMS_SOLVE = new String[]{"picResource","context","stationNum","projectId","taskId","name","id"};
/** /**
* 解析大模型传参 * 解析大模型传参
* @param args 大模型传参 * @param args 大模型传参
@ -34,7 +40,7 @@ public class JumpRouteJoinStrategy {
FuncRouteEnum routeEnum = FuncRouteEnum.getEnumByFuncCode(function.getCode()); FuncRouteEnum routeEnum = FuncRouteEnum.getEnumByFuncCode(function.getCode());
if(Func.isNotEmpty(routeEnum)) { if(Func.isNotEmpty(routeEnum)) {
switch(routeEnum) { switch(routeEnum) {
case OPEN_SCADA: case OPEN_CANVAS:
return this.getScadaExtra(args,function); return this.getScadaExtra(args,function);
default: default:
break; break;
@ -43,14 +49,20 @@ public class JumpRouteJoinStrategy {
return null; return null;
} }
private ExtraVO getScadaExtra(Map<String,String> args,FunctionEntity function) { public ExtraVO getScadaExtra(Map<String,String> args,FunctionEntity function) {
// 跳转页面逻辑 // 跳转页面逻辑
ExtraVO extraVO = new ExtraVO(); ExtraVO extraVO = new ExtraVO();
extraVO.setImmediatelyJump(true); extraVO.setImmediatelyJump(true);
extraVO.setFuncCode(FuncRouteEnum.OPEN_CANVAS.getFuncCode());
Map<String, String> params = this.scadaResolve(args); Map<String, String> params = this.scadaResolve(args);
// 根据hz3000画面版本获取path // 根据hz3000画面版本获取path
Integer picResource = Integer.valueOf(params.get("picResource")); Integer picResource = Integer.valueOf(params.get("picResource"));
JSONObject pathObject = JSONObject.parseObject(function.getPath()); JSONObject pathObject = JSONObject.parseObject(function.getPath());
R<StationEntity> stationR = stationClient.getStationByCode(params.get("projectId"));
extraVO.setLabel(Optional.ofNullable(stationR).filter(r -> r.isSuccess()).map(R::getData).map(StationEntity::getName).orElse("") + "_" + params.get("name"));
Map<String,Object> extraParams = new HashMap<>(1);
extraParams.put("picResource",picResource);
extraVO.setParams(extraParams);
// 云组态 // 云组态
if(picResource == 0) { if(picResource == 0) {
String scada = pathObject.getString("scada"); String scada = pathObject.getString("scada");
@ -84,14 +96,13 @@ public class JumpRouteJoinStrategy {
* @param args 大模型解析参数 * @param args 大模型解析参数
* @return 实时画面路径拼接所需参数 * @return 实时画面路径拼接所需参数
*/ */
private Map<String,String> scadaResolve(Map<String,String> args) { public Map<String,String> scadaResolve(Map<String,String> args) {
String params = args.get("canvas_id"); String params = args.get("canvas_id");
// 参数格式为:picResource^context^stationNum^projectId^taskId^name^id // 参数格式为:picResource^context^stationNum^projectId^taskId^name^id
String[] keys = new String[]{"picResource","context","stationNum","projectId","taskId","name","id"}; return this.resolve(params,SCADA_PARAMS_SOLVE);
return this.resolve(params,keys);
} }
private Map<String,String> resolve(String paramsStr,String... keys) { public Map<String,String> resolve(String paramsStr,String... keys) {
Map<String,String> result = new HashMap<>(); Map<String,String> result = new HashMap<>();
List<String> params = Func.toStrList("\\^", paramsStr); List<String> params = Func.toStrList("\\^", paramsStr);
Assert.isTrue(params.size() == keys.length, () -> { Assert.isTrue(params.size() == keys.length, () -> {

4
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/ParamStrategy.java

@ -46,7 +46,7 @@ public class ParamStrategy {
return null; return null;
} }
private ExtraVO getVideoExtra(Map<String,String> args) { public ExtraVO getVideoExtra(Map<String,String> args) {
// 跳转页面逻辑 // 跳转页面逻辑
ExtraVO extraVO = new ExtraVO(); ExtraVO extraVO = new ExtraVO();
String id = args.get("canvas_id"); String id = args.get("canvas_id");
@ -55,6 +55,8 @@ public class ParamStrategy {
if(videoR.isSuccess()) { if(videoR.isSuccess()) {
StationVideoTypeEntity video = videoR.getData(); StationVideoTypeEntity video = videoR.getData();
extraVO.setType(FunctionConstants.TypeEnum.PARAMS.getType()); extraVO.setType(FunctionConstants.TypeEnum.PARAMS.getType());
extraVO.setImmediatelyJump(true);
extraVO.setFuncCode(FuncRouteEnum.OPEN_VIDEO.getFuncCode());
Map<String,Object> params = new HashMap<>(); Map<String,Object> params = new HashMap<>();
params.put("name", video.getName()); params.put("name", video.getName());
params.put("videoHost", video.getVideoHost()); params.put("videoHost", video.getVideoHost());

39
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java

@ -0,0 +1,39 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.io.Serializable;
/**
* @Author: huangxing
* @Date: 2024/05/22 10:20
*/
@Data
public class DataItemVO implements Serializable {
private String name;
@JSONField(name = "id")
private String attrId;
@JSONField(name = "param_name")
private String attrName;
@JSONField(name = "device_name")
private String deviceName;
@JSONField(name = "device_id")
private String deviceId;
@JSONField(name = "station_id")
private String projectId;
@JSONField(name = "station_name")
private String projectName;
private String signage;
private String units;
}

33
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataVO.java

@ -0,0 +1,33 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.io.Serializable;
import java.util.Map;
/**
* @Author: huangxing
* @Date: 2024/05/22 10:28
*/
@Data
public class DataVO implements Serializable {
/**数据查询类型:实时、历史**/
private String type;
@JSONField(name = "time_begin")
private String startTime;
@JSONField(name = "time_end")
private String endTime;
/**包括:"其它"、"最大值"、"最小值"、"总和值"、"平均值"**/
private String method;
/**实时数据结果集**/
private Map<String,Object> real;
private DataItemVO item;
}

39
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/RemoteParamVO.java

@ -0,0 +1,39 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* @Author: huangxing
* @Date: 2024/05/20 14:46
*/
@Data
@EqualsAndHashCode
public class RemoteParamVO implements Serializable {
@JSONField(name = "id")
private String funcId;
@JSONField(name = "yk_name")
private String remoteName;
@JSONField(name = "device_id")
private String deviceId;
@JSONField(name = "device_name")
private String deviceName;
@JSONField(name = "station_id")
private String projectId;
@JSONField(name = "station_name")
private String projectName;
private String signage;
private String value;
}

19
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/SessionContentVO.java

@ -0,0 +1,19 @@
package com.hnac.hzims.bigmodel.interactive.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* @Author: huangxing
* @Date: 2024/05/20 19:31
*/
@Data
@EqualsAndHashCode
public class SessionContentVO implements Serializable {
/**机器码**/
private String machineCode;
}

20
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/InteractiveSchedule.java

@ -192,4 +192,24 @@ public class InteractiveSchedule {
Boolean status = interactiveService.updateCanvas(param); Boolean status = interactiveService.updateCanvas(param);
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
@XxlJob(SYNCHRONOUS_FAULT_INSTRUCT)
public ReturnT synchronousFaultInstruct(String params) {
Map<String,Object> request = new HashMap<>(2);
// 获取站点列表
R<List<StationEntity>> stationsR = stationClient.list(new StationEntity());
if(!stationsR.isSuccess() || CollectionUtil.isEmpty(stationsR.getData())) {
XxlJobLogger.log("获取站点列表失败!");
return ReturnT.FAIL;
}
List<UpdateStationVO> updateStationList = stationsR.getData().stream().map(station -> {
UpdateStationVO stationVO = new UpdateStationVO();
stationVO.setId(station.getCode());
stationVO.setName(station.getName());
return stationVO;
}).collect(Collectors.toList());
request.put("stations", updateStationList);
interactiveService.updateFault(request);
return ReturnT.SUCCESS;
}
} }

2
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/XxlJobHandlerConstant.java

@ -9,6 +9,8 @@ public interface XxlJobHandlerConstant {
/**获取问答结果**/ /**获取问答结果**/
String GET_INTERACTIVE_RESULT = "getInteractiveResult"; String GET_INTERACTIVE_RESULT = "getInteractiveResult";
String SYNCHRONOUS_FAULT_INSTRUCT = "synchronousFaultInstruct";
/**同步视频指令**/ /**同步视频指令**/
String SYNCHRONOUS_VIDEO_INSTRUCT = "synchronousVideoInstruct"; String SYNCHRONOUS_VIDEO_INSTRUCT = "synchronousVideoInstruct";

13
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/constants/RedisKeyConstants.java

@ -0,0 +1,13 @@
package com.hnac.hzims.bigmodel.websocket.constants;
import com.hnac.hzims.common.constant.CommonConstant;
/**
* @Author: huangxing
* @Date: 2024/05/20 19:11
*/
public interface RedisKeyConstants {
String SESSION_CONTENT_KEY = CommonConstant.TENANT_ID + ":hzims:bigModel:session:content";
}

130
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java

@ -2,16 +2,26 @@ package com.hnac.hzims.bigmodel.websocket.handler;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hnac.hzims.bigmodel.entity.FunctionEntity;
import com.hnac.hzims.bigmodel.function.service.IFunctionService;
import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum;
import com.hnac.hzims.bigmodel.interactive.constants.StationSelectionVO; import com.hnac.hzims.bigmodel.interactive.service.impl.JumpRouteJoinStrategy;
import com.hnac.hzims.bigmodel.interactive.service.impl.ParamStrategy;
import com.hnac.hzims.bigmodel.interactive.vo.*;
import com.hnac.hzims.bigmodel.interactive.service.IInteractiveService; import com.hnac.hzims.bigmodel.interactive.service.IInteractiveService;
import com.hnac.hzims.bigmodel.websocket.constants.RedisKeyConstants;
import com.hnac.hzims.bigmodel.websocket.service.InteractiveWsService;
import com.hnac.hzims.bigmodel.websocket.sessionManager.InteractiveSessionManager; import com.hnac.hzims.bigmodel.websocket.sessionManager.InteractiveSessionManager;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.SpringUtil; import org.springblade.core.tool.utils.SpringUtil;
import org.springframework.util.Assert; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketSession;
@ -20,15 +30,20 @@ import org.springframework.web.socket.handler.TextWebSocketHandler;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.concurrent.TimeUnit;
import java.util.Set; import java.util.function.Function;
/** /**
* @Author: huangxing * @Author: huangxing
* @Date: 2024/04/28 13:45 * @Date: 2024/04/28 13:45
*/ */
@Slf4j @Slf4j
@Component
public class InteractiveHandler extends TextWebSocketHandler { public class InteractiveHandler extends TextWebSocketHandler {
@Autowired
private RedisTemplate redisTemplate;
@Override @Override
public void afterConnectionEstablished(WebSocketSession session) { public void afterConnectionEstablished(WebSocketSession session) {
String[] split = session.getUri().toString().split("/"); String[] split = session.getUri().toString().split("/");
@ -60,27 +75,47 @@ public class InteractiveHandler extends TextWebSocketHandler {
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
}else { } else {
String sessionId = InteractiveSessionManager.getEntryBySession(session).getKey(); String sessionId = InteractiveSessionManager.getEntryBySession(session).getKey();
this.handleMessage(messageJSON,sessionId); if(messageJSON.containsKey("content")) {
// 将发送参数存入redis
redisTemplate.expire(RedisKeyConstants.SESSION_CONTENT_KEY,30, TimeUnit.MINUTES);
redisTemplate.opsForHash().put(RedisKeyConstants.SESSION_CONTENT_KEY,sessionId,messageJSON.getObject("content", SessionContentVO.class));
}
this.handleMessage(messageJSON, sessionId);
} }
} }
private void handleMessage(JSONObject messageContext,String sessionId) { private void handleMessage(JSONObject messageContext, String sessionId) {
Boolean isSpecial = messageContext.getBoolean("isSpecial"); Boolean isSpecial = messageContext.getBoolean("isSpecial");
if(Func.isEmpty(isSpecial) || !isSpecial) { if (Func.isEmpty(isSpecial) || !isSpecial) {
String context = messageContext.getString("context"); String context = messageContext.getString("context");
String userId = messageContext.getString("userId"); String userId = messageContext.getString("userId");
String knowledge = messageContext.getString("knowledge");
IInteractiveService interactiveService = SpringUtil.getBean(IInteractiveService.class); IInteractiveService interactiveService = SpringUtil.getBean(IInteractiveService.class);
if (knowledge != null) {
R askResult = interactiveService.knowledgeAsk(context, sessionId, userId, knowledge);
log.info("知识库问答返回结果:" + JSON.toJSONString(askResult));
} else {
R askResult = interactiveService.ask(context, sessionId, userId); R askResult = interactiveService.ask(context, sessionId, userId);
log.info("返回结果为:"+ JSON.toJSONString(askResult)); log.info("返回结果为:"+ JSON.toJSONString(askResult));
} }
}
else { else {
String funcCode = messageContext.getString("funcCode"); String funcCode = messageContext.getString("funcCode");
FuncRouteEnum funcEnum = FuncRouteEnum.getEnumByFuncCode(funcCode); FuncRouteEnum funcEnum = FuncRouteEnum.getEnumByFuncCode(funcCode);
switch (funcEnum) { switch (funcEnum) {
case CHOOSE_STATION: case CHOOSE_STATION:
this.handleChooseStation(messageContext,sessionId); this.handleDefaultChoose(messageContext,sessionId);
break;
case CHOOSE_VIDEO:
this.handleVideoChoose(messageContext,sessionId);
break;
case CHOOSE_CANVAS:
this.handleScadaChoose(messageContext,sessionId);
break;
case CHOOSE_FAULT:
this.handleFaultChoose(messageContext,sessionId);
break; break;
default: default:
break; break;
@ -88,7 +123,7 @@ public class InteractiveHandler extends TextWebSocketHandler {
} }
} }
private void handleChooseStation(JSONObject messageContext,String sessionId) { private void handleDefaultChoose(JSONObject messageContext,String sessionId) {
IInteractiveService interactiveService = SpringUtil.getBean(IInteractiveService.class); IInteractiveService interactiveService = SpringUtil.getBean(IInteractiveService.class);
String userId = messageContext.getString("userId"); String userId = messageContext.getString("userId");
String funcCode = messageContext.getString("funcCode"); String funcCode = messageContext.getString("funcCode");
@ -101,4 +136,77 @@ public class InteractiveHandler extends TextWebSocketHandler {
extra.put("data",data); extra.put("data",data);
interactiveService.specialAsk(sessionId,userId,extra); interactiveService.specialAsk(sessionId,userId,extra);
} }
private void handleVideoChoose(JSONObject messageContext,String sessionId) {
InteractiveWsService wsService = SpringUtil.getBean(InteractiveWsService.class);
try {
ParamStrategy strategy = SpringUtil.getBean(ParamStrategy.class);
VideoSelectionVO selection = messageContext.getObject("selection", VideoSelectionVO.class);
String videoId = selection.getId();
Map<String,String> param = new HashMap<>(1);
param.put("canvas_id",videoId);
ExtraVO videoExtras = strategy.getVideoExtra(param);
AnswerVO answerVO = new AnswerVO();
answerVO.setSessionId(sessionId);
answerVO.setQuery(selection.getName());
answerVO.setRunning(0);
answerVO.setStatus(0);
answerVO.setAnswer("已成功打开"+selection.getName()+"视频");
answerVO.setExtras(new Object[]{JSON.toJSONString(videoExtras)});
TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO));
wsService.sendMessage(sessionId,textMessage);
}
catch (Exception e) {
AnswerVO answerVO = new AnswerVO();
answerVO.setRunning(0);
answerVO.setStatus(-2);
answerVO.setAnswer("视频解析失败!");
TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO));
wsService.sendMessage(sessionId,textMessage);
}
}
private void handleScadaChoose(JSONObject messageContext,String sessionId) {
InteractiveWsService wsService = SpringUtil.getBean(InteractiveWsService.class);
try {
JumpRouteJoinStrategy strategy = SpringUtil.getBean(JumpRouteJoinStrategy.class);
ScadaSelectionVO selection = messageContext.getObject("selection", ScadaSelectionVO.class);
Map<String,String> param = new HashMap<>(1);
param.put("canvas_id",selection.getId());
IFunctionService functionService = SpringUtil.getBean(IFunctionService.class);
FunctionEntity function = functionService.getFunctionByCode(FuncRouteEnum.OPEN_CANVAS.getFuncCode());
ExtraVO scadaExtra = strategy.getScadaExtra(param, function);
AnswerVO answerVO = new AnswerVO();
answerVO.setSessionId(sessionId);
answerVO.setRunning(0);
answerVO.setStatus(0);
answerVO.setQuery(selection.getName());
answerVO.setAnswer("已成功打开"+selection.getName()+"实时画面");
answerVO.setExtras(new Object[]{JSON.toJSONString(scadaExtra)});
TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO));
wsService.sendMessage(sessionId,textMessage);
}
catch (Exception e) {
AnswerVO answerVO = new AnswerVO();
answerVO.setRunning(0);
answerVO.setStatus(-2);
answerVO.setAnswer("实时画面解析失败!");
TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO));
wsService.sendMessage(sessionId,textMessage);
}
}
private void handleFaultChoose(JSONObject messageContext,String sessionId) {
IInteractiveService interactiveService = SpringUtil.getBean(IInteractiveService.class);
String userId = messageContext.getString("userId");
String funcCode = messageContext.getString("funcCode");
FaultSelectionVO selectionVO = messageContext.getObject("selection",FaultSelectionVO.class);
JSONObject data = new JSONObject();
data.put("id",selectionVO.getId());
data.put("name",selectionVO.getName());
Map<String, Object> extra = new HashMap<>(2);
extra.put("func",funcCode);
extra.put("data",data);
interactiveService.specialAsk(sessionId,userId,extra);
}
} }

129
hzims-service/hzims-simulate/pom.xml

@ -0,0 +1,129 @@
<?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-simulate</artifactId>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>failureaccess</artifactId>
<version>1.0.1</version>
</dependency>
<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-core-cloud</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-http</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-datascope</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>equipment-api</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>weather-api</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.hzinfo.framework</groupId>
<artifactId>hnac-framework-mqtt-starters</artifactId>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
<version>5.1.1.RELEASE.fix.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.name}-${project.version}</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.6.6</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>exec</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

28
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/SimulateApplication.java

@ -0,0 +1,28 @@
package com.hnac.hzims.simulate;
import org.mybatis.spring.annotation.MapperScan;
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;
/**
* @author admin
*/
@EnableBladeFeign
@SpringCloudApplication
@MapperScan(basePackages={"com.hnac.hzims.**.mapper"})
//@ComponentScan(basePackages = {"com.hnac.hzinfo.simulate"})
public class SimulateApplication extends SpringBootServletInitializer {
static String APPLICATION_NAME="hzims-simulate";
public static void main(String[] args) {
BladeApplication.run(APPLICATION_NAME, SimulateApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return BladeApplication.createSpringApplicationBuilder(builder, APPLICATION_NAME, SimulateApplication.class);
}
}

43
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/constants/WriteRealDataConstant.java

@ -0,0 +1,43 @@
package com.hnac.hzims.simulate.constants;
/**
* @author ysj
* @describe 实时数据写入常量
*/
public interface WriteRealDataConstant {
String REAL_DATA_V3 = "3";
String REAL_DATA_V4 = "4";
String GATE_FLOW = "过闸流量(m³/s)";
String OPENING_DEGREE = "开度(m)";
String GATE_STATUS = "闸门状态";
String WRITE_REAL_GATE_DATA = "writeRealGateData";
String WRITE_REAL_RAIN_DATA = "writeRealRainData";
Long OPEN = 0L;
Long CLOSE = 1L;
String WRITE_GATE = "1";
String WRITE_RAIN = "2";
// 降雨站属性标识
String ATTR_RAIN = "attr_rain";
String ATTR_WIND360 = "wind360";
String ATTR_WIND_SCALE = "wind_scale";
String ATTR_WIND_SPEED = "wind_speed ";
String ATTR_HUMIDITY = "humidity";
String ATTR_PRESSURE = "pressure";
String ATTR_VIS = "vis";
String ATTR_CLOUD = "cloud";
String ATTR_DEW = "dew";
String ATTR_FEELS_LIKE = "feels_like";
String ATTR_TEMP = "temp";
}

31
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/controller/GageController.java

@ -0,0 +1,31 @@
package com.hnac.hzims.simulate.controller;
import com.hnac.hzims.simulate.service.WriteRealDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* @author ysj
*/
@RestController
@AllArgsConstructor
@RequestMapping("/gate")
@Api(value = "闸门开关机模拟服务", tags = "闸门开关机模拟服务")
public class GageController {
private final WriteRealDataService writeRealDataService;
@GetMapping("/isOpen")
@ApiOperation(value = "枢纽天气情况")
public R<Boolean> weather(@RequestParam("deviceCode") String deviceCode,
@RequestParam("isOpen") Long isOpen){
return R.data(writeRealDataService.isOpen(deviceCode,isOpen));
}
}

195
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/controller/SimulationDataController.java

@ -0,0 +1,195 @@
package com.hnac.hzims.simulate.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.collect.Maps;
import com.hnac.hzims.common.enums.ExceptionEnum;
import com.hnac.hzims.simulate.entity.DataModel;
import com.hnac.hzims.simulate.entity.Device;
import com.hnac.hzims.simulate.entity.DeviceField;
import com.hnac.hzims.simulate.entity.DeviceFieldGap;
import com.hnac.hzims.simulate.service.DeviceFieldGapService;
import com.hnac.hzims.simulate.service.DeviceFieldService;
import com.hnac.hzims.simulate.service.SimulationService;
import com.hnac.hzims.simulate.util.ParseFacUtils;
import com.hnac.hzims.simulate.util.TopicConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
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.jackson.JsonUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.mqtt.producer.IMqttSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@RestController
@RequestMapping("/simulationData")
@Api(value = "数据模拟服务", tags = "数据模拟服务")
@Slf4j
public class SimulationDataController {
@Autowired
private SimulationService simulationService;
@Autowired
private DeviceFieldService deviceFieldService;
@Autowired
private DeviceFieldGapService deviceFieldGapService;
@Autowired
private IMqttSender mqttSender;
@Value("fac.path")
private String facPath;
public static Map<String, String> cacheMap = Maps.newHashMap();
@ApiOperation(value = "解析v3.0场信息文件", notes = "解析场信息文件")
@GetMapping("/readFac")
public R<Void> readFac() {
InputStream inputStream = null;
try {
inputStream = new FileInputStream(new File(facPath+File.separator+"factory.fac"));
List<DataModel> list = ParseFacUtils.parsePoint(inputStream);
list.forEach(entity -> {
mqttSender.sendToMqtt(TopicConstant.TOPIC_DEVICE_MODEL, JsonUtil.toJson(entity));
});
return R.success("解析场信息文件成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return R.fail("解析场信息文件失败");
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
@ApiOperation(value = "分页范围配置", notes = "分页范围配置")
@GetMapping("/pageGap")
public R<IPage<DeviceFieldGap>> pageGap(String stationId, Query query) {
List<Device> list=simulationService.getDeviceListByStationId(stationId);
List<String> ids=list.stream().map(Device::getId).collect(Collectors.toList());
LambdaQueryWrapper<DeviceFieldGap> lambdaQueryWrapper=new LambdaQueryWrapper();
lambdaQueryWrapper.in(DeviceFieldGap::getFacDeviceId,ids);
IPage<DeviceFieldGap> pageList=deviceFieldGapService.page(Condition.getPage(query),lambdaQueryWrapper);
return R.data(pageList);
}
@ApiOperation(value = "更新设备属性范围配置", notes = "更新设备属性范围配置")
@PostMapping("/updateGap")
public R updateGap(@RequestBody DeviceFieldGap deviceFieldGap) {
deviceFieldGapService.updateById(deviceFieldGap);
return R.status(true);
}
@ApiOperation(value = "第一次同步设备属性", notes = "第一次同步设备属性")
@GetMapping("/syncOneGap")
public R syncGap() {
//存在表
int count=deviceFieldService.existGapTable();
if(count<=0){//建表
deviceFieldService.createGapTable();
}
//同步
List<DeviceField> list=deviceFieldService.list();
List<DeviceFieldGap> gaps=list.stream().map(result -> new DeviceFieldGap(result.getId(), result.getFacDeviceId(),
result.getSignage(),result.getName(), BigDecimal.ZERO,BigDecimal.ZERO))
.collect(Collectors.toList());
deviceFieldGapService.saveOrUpdateBatch(gaps);
return R.status(true);
}
@ApiOperation(value = "第二次同步设备属性", notes = "第二次同步设备属性")
@GetMapping("/syncTwoGap")
public R syncTwoGap() {
//同步
List<DeviceField> list=deviceFieldService.queryNewInsert();
if(list!=null && !list.isEmpty()) {
List<DeviceFieldGap> gaps = list.stream().map(result -> new DeviceFieldGap(result.getId(), result.getFacDeviceId(),
result.getSignage(), result.getName(), BigDecimal.ZERO, BigDecimal.ZERO))
.collect(Collectors.toList());
deviceFieldGapService.saveBatch(gaps);
}
return R.status(true);
}
@ApiOperation(value = "模拟单站的数据(循环,每隔sleepTime时长发送一次整站数据)", notes = "模拟单站的数据")
@GetMapping("/simulationMultiple")
public R<Void> simulationMultipleV3(String stationId, Long sleepTime) {
String key = "simulation:" + stationId;
String hasExc = cacheMap.get(key);
if (Func.isNotBlank(hasExc)) {
return R.fail("该站已经在模拟数据了");
}
try {
simulationService.simulationMultiple(stationId, sleepTime);
}catch (Exception e) {
throw new ServiceException(ExceptionEnum.SIMULATE_ERROR);
}
cacheMap.put(key, "true");
return R.status(true);
}
@ApiOperation(value = "模拟单站的数据(循环,每隔sleepTime时长发送一次整站数据)", notes = "模拟单站的数据")
@GetMapping("/simulationMultipleV4")
public R<Void> simulationMultipleV4(String stationId, Long sleepTime) {
String key = "simulation:" + stationId;
String hasExc = cacheMap.get(key);
if (Func.isNotBlank(hasExc)) {
return R.fail("该站已经在模拟数据了");
}
try {
simulationService.simulationMultipleV4(stationId, sleepTime);
}catch (Exception e) {
throw new ServiceException(ExceptionEnum.SIMULATE_ERROR);
}
cacheMap.put(key, "true");
return R.status(true);
}
// @ApiOperation(value = "模拟单站的数据(循环,每隔sleepTime时长发送一次整站数据)", notes = "模拟单站的数据")
// @GetMapping("/simulationMultipleFlow")
// public R<Void> simulationMultipleInFlow() {
// String key = "simulationMultipleInFlow";
// String hasExc = cacheMap.get(key);
// if (Func.isNotBlank(hasExc)) {
// return R.fail("该站已经在模拟数据了");
// }
// simulationService.simulationMultipleInFlow();
// cacheMap.put(key, "true");
// return R.status(true);
// }
@ApiOperation(value = "停止模拟", notes = "停止模拟")
@GetMapping("/stopStart")
public R<Void> stopStart() {
simulationService.stopStart();
return R.status(true);
}
}

20
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DataItem.java

@ -0,0 +1,20 @@
package com.hnac.hzims.simulate.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DataItem {
private String id;
private String signage;//hz3000定义的id
private String name;
private String type;
private String soeType;
private String eventType;
}

46
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DataModel.java

@ -0,0 +1,46 @@
package com.hnac.hzims.simulate.entity;
import lombok.Data;
import java.util.List;
/**
* {
* "station": "4543",
* "structType": "dataGroup",
* "id": "5016387599_0",
* "pid": "5016387585",
* "name": "温度传感器",
* "children": [{
* "id": "5016387607",
* "name": "温度",
* "type": "YC"
* },{
* "id": "5016387617",
* "name": "高度",
* "type": "YC"
* },{
* "id": "5016387608",
* "name": "工作状态",
* "type": "YX"
* },{
* "id": "5016387609",
* "name": "工作状态",
* "type": "SOE",
* "eventType": ""
* }]
* }
* 数据组
* @author ninglong
*/
@Data
public class DataModel {
private String station;
private String structType;
private String id;
private String signage;//hz3000定义的id
private String pid;
private String name;
private List<DataItem> children;
}

66
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/Device.java

@ -0,0 +1,66 @@
package com.hnac.hzims.simulate.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 数据组
*
* @author ninglong
*/
@TableName(value = "hzinfo_fac_device")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Device implements Serializable {
@ApiModelProperty(value = "id")
@TableId(type = IdType.INPUT)
private String id;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "0-云端cms,1-站端直传")
private Integer source;
@ApiModelProperty("hz3000定义的id,如果定义的是大id则值与id字段值相同")
private String sid;
@ApiModelProperty("version=v3,version=v4")
private String modelKind;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty("创建时间")
private Date createTime;
@JsonSerialize(
using = ToStringSerializer.class
)
@ApiModelProperty("项目id")
private String projectId;
@ApiModelProperty("写入方式")
private String isWrite;
}

22
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceData.java

@ -0,0 +1,22 @@
package com.hnac.hzims.simulate.entity;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 设备数据
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DeviceData {
private String station;
private String time;
private List<Kvtq> children = Lists.newArrayList();
}

19
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceDataV4.java

@ -0,0 +1,19 @@
package com.hnac.hzims.simulate.entity;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DeviceDataV4 {
private String stationId;
private String time;
private List<KvtqV4> children = Lists.newArrayList();
}

38
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceFacConfig.java

@ -0,0 +1,38 @@
package com.hnac.hzims.simulate.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author ysj
*/
@TableName("hzinfo_fac_device_config")
@Data
public class DeviceFacConfig implements Serializable {
@ApiModelProperty("id")
@TableId(type = IdType.INPUT)
private String id;
@ApiModelProperty("设备id")
private String deviceCode;
@ApiModelProperty("字段标识")
private String facDeviceId;
@ApiModelProperty("站点Id")
private String stationId;
@ApiModelProperty("站点类型")
private String modelKind;
@ApiModelProperty("sid")
private String sid;
@ApiModelProperty("数据写入方式: 1-闸门,2-天气")
private String writeMethod;
}

42
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceField.java

@ -0,0 +1,42 @@
package com.hnac.hzims.simulate.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@TableName("hzinfo_fac_device_attr")
@Data
public class DeviceField implements Serializable {
@ApiModelProperty("id")
@TableId(type = IdType.INPUT)
private String id;
@ApiModelProperty("设备id")
private String facDeviceId;
@ApiModelProperty("字段标识")
private String signage;
@ApiModelProperty("字段名称")
private String name;
@ApiModelProperty("最大值")
private String projectId;
@DateTimeFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty("创建时间")
private Date createTime;
private Long modelClassifyId;
private String alarmType;
}

30
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceFieldGap.java

@ -0,0 +1,30 @@
package com.hnac.hzims.simulate.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@TableName("hzinfo_fac_device_attr_gap")
@Data
@AllArgsConstructor
public class DeviceFieldGap implements Serializable {
@ApiModelProperty("id")
@TableId(type = IdType.INPUT)
private String id;
@ApiModelProperty("设备id")
private String facDeviceId;
@ApiModelProperty("字段标识")
private String signage;
@ApiModelProperty("字段名称")
private String name;
@ApiModelProperty("最大值")
private BigDecimal maxVal;
@ApiModelProperty("最小值")
private BigDecimal minVal;
}

33
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/DeviceRainGap.java

@ -0,0 +1,33 @@
package com.hnac.hzims.simulate.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author ysj
*/
@TableName("hzinfo_fac_device_rain_gap")
@Data
public class DeviceRainGap implements Serializable {
@ApiModelProperty("id")
@TableId(type = IdType.INPUT)
private String id;
@ApiModelProperty("设备id")
private String facDeviceId;
@ApiModelProperty("属性标识名称")
private String name;
@ApiModelProperty("属性标识")
private String attribute;
@ApiModelProperty("字段标识")
private String signage;
}

18
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/Kvtq.java

@ -0,0 +1,18 @@
package com.hnac.hzims.simulate.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Kvtq {
private String k;
private String v;
private String t;
private Integer q;
}

18
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/entity/KvtqV4.java

@ -0,0 +1,18 @@
package com.hnac.hzims.simulate.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class KvtqV4 {
private String sid;
private String k;
private String v;
private String t;
private Integer q;
}

19
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFacConfigMapper.java

@ -0,0 +1,19 @@
package com.hnac.hzims.simulate.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.simulate.entity.DeviceFacConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author ysj
*/
@Mapper
public interface DeviceFacConfigMapper extends BaseMapper<DeviceFacConfig> {
List<DeviceFacConfig> queryConfigDevice(@Param("method") String method);
DeviceFacConfig configByDeviceCode(@Param("deviceCode") String deviceCode);
}

13
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFacConfigMapper.xml

@ -0,0 +1,13 @@
<?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.simulate.mapper.DeviceFacConfigMapper">
<select id="queryConfigDevice" resultType="com.hnac.hzims.simulate.entity.DeviceFacConfig">
SELECT * FROM HZINFO_FAC_DEVICE_CONFIG
WHERE WRITE_METHOD = #{method}
</select>
<select id="configByDeviceCode" resultType="com.hnac.hzims.simulate.entity.DeviceFacConfig">
SELECT * FROM HZINFO_FAC_DEVICE_CONFIG
WHERE DEVICE_CODE = #{deviceCode}
</select>
</mapper>

16
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldGapMapper.java

@ -0,0 +1,16 @@
package com.hnac.hzims.simulate.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.simulate.entity.DeviceFieldGap;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
@Mapper
public interface DeviceFieldGapMapper extends BaseMapper<DeviceFieldGap> {
List<DeviceFieldGap> queryDeviceLimits(@Param("signages") List<String> signages);
void updateLimitById(@Param("maxValue") BigDecimal maxValue, @Param("minValue") BigDecimal minValue,@Param("id") String id);
}

18
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldGapMapper.xml

@ -0,0 +1,18 @@
<?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.simulate.mapper.DeviceFieldGapMapper">
<select id="queryDeviceLimits" resultType="com.hnac.hzims.simulate.entity.DeviceFieldGap">
select * from HZINFO_FAC_DEVICE_ATTR_GAP
where signage in
<foreach collection="signages" item="item" open="(" close=")" separator="," >
#{item}
</foreach>
</select>
<update id="updateLimitById">
UPDATE HZINFO_FAC_DEVICE_ATTR_GAP
SET max_val = #{maxValue},
min_val = #{minValue}
WHERE id = #{id}
</update>
</mapper>

19
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldMapper.java

@ -0,0 +1,19 @@
package com.hnac.hzims.simulate.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.simulate.entity.DeviceField;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface DeviceFieldMapper extends BaseMapper<DeviceField> {
int existGapTable();
int createGapTable();
List<DeviceField> queryNewInsert();
List<DeviceField> queryDeviceFields(@Param("devices") List<String> devices);
List<DeviceField> querySignages(@Param("facDeviceId") String facDeviceId);
}

34
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceFieldMapper.xml

@ -0,0 +1,34 @@
<?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.simulate.mapper.DeviceFieldMapper">
<select id="existGapTable" resultType="int">
select count(*) from information_schema.TABLES where table_name = 'hzinfo_device_field_gap'
</select>
<update id="createGapTable">
CREATE TABLE hzinfo_device_field_gap (
id varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '字段类型',
fac_device_id varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT '设备实例id',
signage varchar(25) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '字段标识',
name varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '字段名称',
max_val decimal(9,3) DEFAULT NULL,
min_val decimal(9,3) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='设备字段'
</update>
<select id="queryNewInsert" resultType="com.hnac.hzims.simulate.entity.DeviceField">
select * from hzinfo_fac_device_attr field where NOT EXISTS (select id from hzinfo_fac_device_attr_gap gap where field.id=gap.id)
</select>
<select id="queryDeviceFields" resultType="com.hnac.hzims.simulate.entity.DeviceField">
select * from hzinfo_fac_device_attr
where fac_device_id in
<foreach collection="devices" item="item" open="(" close=")" separator="," >
#{item}
</foreach>
</select>
<select id="querySignages" resultType="com.hnac.hzims.simulate.entity.DeviceField">
SELECT * FROM HZINFO_FAC_DEVICE_ATTR
WHERE FAC_DEVICE_ID = #{facDeviceId}
</select>
</mapper>

15
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceMapper.java

@ -0,0 +1,15 @@
package com.hnac.hzims.simulate.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.simulate.entity.Device;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface DeviceMapper extends BaseMapper<Device> {
String getSid(@Param("stationId") String stationId);
// List<String> selectStcd();
//
// int insertData(@Param("param") Map<String,Object> param);
}

15
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceMapper.xml

@ -0,0 +1,15 @@
<?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.simulate.mapper.DeviceMapper">
<select id="getSid" resultType="java.lang.String">
select sid from hzinfo_fac_device where project_id=#{stationId} limit 1
</select>
<!-- <select id="selectStcd" resultType="java.lang.String">-->
<!-- select rscd from blade_ris.st_rsr_bsin where is_deleted=0-->
<!-- </select>-->
<!-- <insert id="insertData" keyProperty="id" useGeneratedKeys="true">-->
<!-- insert into blade_ris.reservoir_data(STCD,DT,INFLOW) values (#{param.stcd},#{param.dt},#{param.inflow})-->
<!-- </insert>-->
</mapper>

17
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceRainGapMapper.java

@ -0,0 +1,17 @@
package com.hnac.hzims.simulate.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.simulate.entity.DeviceRainGap;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author ysj
*/
@Mapper
public interface DeviceRainGapMapper extends BaseMapper<DeviceRainGap> {
List<DeviceRainGap> RainGapByFacDeviceId(@Param("facDeviceId") String facDeviceId);
}

9
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/mapper/DeviceRainGapMapper.xml

@ -0,0 +1,9 @@
<?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.simulate.mapper.DeviceRainGapMapper">
<select id="RainGapByFacDeviceId" resultType="com.hnac.hzims.simulate.entity.DeviceRainGap">
SELECT * FROM HZINFO_FAC_DEVICE_RAIN_GAP
WHERE FAC_DEVICE_ID = #{facDeviceId}
</select>
</mapper>

53
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/scheduled/WriteRealDataTask.java

@ -0,0 +1,53 @@
package com.hnac.hzims.simulate.scheduled;
import com.hnac.hzims.simulate.constants.WriteRealDataConstant;
import com.hnac.hzims.simulate.service.WriteRealDataService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
/**
* @author ysj
* @describe 实时数据写入定时任务
*/
@Slf4j
@Component
public class WriteRealDataTask {
@Autowired
private WriteRealDataService writeRealDataService;
/**
* 设备模型信息
*/
@XxlJob(WriteRealDataConstant.WRITE_REAL_GATE_DATA)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> writeRealGateData(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
writeRealDataService.writeRealGateData(param);
return new ReturnT<>("SUCCESS");
}
/**
* 设备模型信息
*/
@XxlJob(WriteRealDataConstant.WRITE_REAL_RAIN_DATA)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> writeRealRainData(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
writeRealDataService.writeRealRainData(param);
return new ReturnT<>("SUCCESS");
}
}

11
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/DeviceFieldGapService.java

@ -0,0 +1,11 @@
package com.hnac.hzims.simulate.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.simulate.entity.DeviceFieldGap;
import com.hnac.hzims.simulate.mapper.DeviceFieldGapMapper;
import org.springframework.stereotype.Service;
@Service
public class DeviceFieldGapService extends ServiceImpl<DeviceFieldGapMapper, DeviceFieldGap> {
}

24
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/DeviceFieldService.java

@ -0,0 +1,24 @@
package com.hnac.hzims.simulate.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.simulate.entity.DeviceField;
import com.hnac.hzims.simulate.mapper.DeviceFieldMapper;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class DeviceFieldService extends ServiceImpl<DeviceFieldMapper, DeviceField> {
public int existGapTable(){
return this.baseMapper.existGapTable();
}
public int createGapTable(){
return this.baseMapper.createGapTable();
}
public List<DeviceField> queryNewInsert(){
return this.baseMapper.queryNewInsert();
}
}

21
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/DeviceService.java

@ -0,0 +1,21 @@
package com.hnac.hzims.simulate.service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.simulate.entity.Device;
import com.hnac.hzims.simulate.mapper.DeviceMapper;
import org.springframework.stereotype.Service;
@Service
public class DeviceService extends ServiceImpl<DeviceMapper, Device> {
public String getSid(String stationId){
return this.baseMapper.getSid(stationId);
}
// public List<String> selectStcd(){
// return this.baseMapper.selectStcd();
// }
//
// public int insertData(Map<String,Object> param){
// return this.baseMapper.insertData(param);
// }
}

280
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/SimulationService.java

@ -0,0 +1,280 @@
package com.hnac.hzims.simulate.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.hnac.hzims.simulate.entity.*;
import com.hnac.hzims.simulate.util.DataConstants;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.DateTimeUtil;
import org.springblade.core.tool.utils.ThreadUtil;
import org.springblade.mqtt.producer.IMqttSender;
import com.hnac.hzims.simulate.util.TopicConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
@Service
@Slf4j
public class SimulationService {
@Autowired
IMqttSender mqttSender;
@Autowired
DeviceService deviceService;
@Autowired
DeviceFieldService deviceFieldService;
@Autowired
DeviceFieldGapService deviceFieldGapService;
public List<Device> getDeviceListByStationId(String projectId){
LambdaQueryWrapper<Device> lambdaQueryWrapper=new LambdaQueryWrapper();
lambdaQueryWrapper.eq(Device::getProjectId,projectId);
lambdaQueryWrapper.eq(Device::getIsWrite,"0");
List<Device> list = deviceService.list(lambdaQueryWrapper);
return list;
}
String getSid(String stationId){
return deviceService.getSid(stationId);
}
//模拟启停标识
private volatile boolean flag=true;
public void stopStart(){
flag = !flag;
}
@Async
public void simulationMultiple(String stationId, Long sleepTime) {
List<Device> list = getDeviceListByStationId(stationId);
//查询所有属性
List<DeviceField> fieldList = deviceFieldService.list();
List<DeviceFieldGap> gapList = deviceFieldGapService.list();
log.info("本站{}有{}个设备实例,每{}毫秒发送{}条数据", stationId, list.size(), sleepTime, list.size());
while (true) {
if (flag) {//启动或关闭模拟
for (Device device : list) {
Map<String, DeviceData> map = simulation(stationId, device,fieldList,gapList);
// log.info("map data: "+ JsonUtil.toJson(map));
if (map.get("yc") != null && map.get("yc").getChildren().size() > 0) {
log.info("模拟推送遥测,主题:topic_hzinfo_props:{}", JsonUtil.toJson(map.get("yc")));
mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_PROPS, JsonUtil.toJson(map.get("yc")));
}
// if (map.get("dd") != null && map.get("dd").getChildren().size() > 0) {
// mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_DD, JsonUtil.toJson(map.get("dd")));
// }
if (map.get("yx") != null && map.get("yx").getChildren().size() > 0) {
mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_YX, JsonUtil.toJson(map.get("yx")));
}
}
//最小10毫秒
if (sleepTime == null || sleepTime == 0) {
sleepTime = 10L;
}
ThreadUtil.sleep(sleepTime);
}
}
}
// @Async
// public void simulationMultipleInFlow(){
// List<String> list=deviceService.selectStcd();
// while (true) {
// List<Map<String,Object>> datas = simulationFlow(list);
// for(Map<String,Object> param:datas){
// deviceService.insertData(param);
// }
// ThreadUtil.sleep(3600000);
// }
// }
private List<Map<String,Object>> simulationFlow(List<String> list){
List<Map<String,Object>> datas =new ArrayList<>();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dt=sdf.format(new Date());
for(String stcd:list){
Map<String,Object> data=new HashMap<>();
String value = getRandomRedPacketBetweenMinAndMax(new BigDecimal("0"), new BigDecimal("20")).toString();
data.put("stcd",stcd);
data.put("dt",dt);
data.put("inflow",value);
datas.add(data);
}
return datas;
}
@Async
public void simulationMultipleV4(String stationId, Long sleepTime){
String sid=getSid(stationId);
List<Device> list = getDeviceListByStationId(stationId);
//查询所有属性
List<DeviceField> fieldList = deviceFieldService.list();
List<DeviceFieldGap> gapList = deviceFieldGapService.list();
log.info("本站{}有{}个设备实例,每{}毫秒发送{}条数据", stationId, list.size(), sleepTime, list.size());
while (true) {
if (flag) {//启动或关闭模拟
for (Device device : list) {
Map<String, DeviceDataV4> map = simulationV4(stationId,sid, device,fieldList,gapList);
//log.info("map data: "+ JsonUtil.toJson(map));
if (map.get("yc") != null && map.get("yc").getChildren().size() > 0) {
mqttSender.sendToMqtt("hzinfo_v4_yc", JsonUtil.toJson(map.get("yc")));
}
// if (map.get("dd") != null && map.get("dd").getChildren().size() > 0) {
// mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_DD, JsonUtil.toJson(map.get("dd")));
// }
if (map.get("yx") != null && map.get("yx").getChildren().size() > 0) {
mqttSender.sendToMqtt("hzinfo_v4_yx", JsonUtil.toJson(map.get("yx")));
}
}
//最小10毫秒
if (sleepTime == null || sleepTime == 0) {
sleepTime = 10L;
}
ThreadUtil.sleep(sleepTime);
}
}
}
public static BigDecimal getRandomRedPacketBetweenMinAndMax(BigDecimal min, BigDecimal max){
float minF = min.floatValue();
float maxF = max.floatValue();
//生成随机数
BigDecimal db = new BigDecimal(Math.random() * (maxF - minF) + minF);
//返回保留两位小数的随机数。不进行四舍五入
return db.setScale(3,BigDecimal.ROUND_DOWN);
}
public static int getIntBetweenMinAndMax(int min, int max){
//生成随机数
int randomNum = min + (int)(Math.random() * ((max - min) + 1));
//返回保留两位小数的随机数。不进行四舍五入
return randomNum;
}
/**
* 模拟一条数据
*/
private Map<String, DeviceData> simulation(String stationId, Device device,List<DeviceField> fieldListAll,List<DeviceFieldGap> gapListAll) {
// List<DeviceField> fieldList = getListByDeviceId(device.getId());
// List<DeviceFieldGap> gapList = getListByDeviceGapId(device.getId());
List<DeviceField> fieldList =fieldListAll.stream().filter(e->e.getFacDeviceId().equals(device.getId())).collect(Collectors.toList());
List<DeviceFieldGap> gapList =gapListAll.stream().filter(e->e.getFacDeviceId().equals(device.getId())).collect(Collectors.toList());
// log.info("fieldList data: "+ JsonUtil.toJson(fieldList));
// log.info("gapList data: "+ JsonUtil.toJson(gapList));
List<Kvtq> ycList = Lists.newArrayList();
List<Kvtq> yxList = Lists.newArrayList();
//List<Kvtq> ddList = Lists.newArrayList();
for (DeviceField field : fieldList) {
Optional<DeviceFieldGap> gapOpt=gapList.stream().filter(e->e.getSignage().equals(field.getSignage())).findFirst();
if (DataConstants.DeviceDataType.YC.ordinal()== field.getModelClassifyId().intValue()) {
if(gapOpt!=null) {
DeviceFieldGap gap=gapOpt.get();
String value = getRandomRedPacketBetweenMinAndMax(gap.getMinVal(), gap.getMaxVal()).toString();
Kvtq kvtq = Kvtq.builder().k(field.getSignage()).v(value).t(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).q(0).build();
ycList.add(kvtq);
}
}
// if (DataConstants.DeviceDataType.DD.name().equals(field.getType())) {
// String value = Func.random(1, RandomType.INT) + "." + Func.random(1, RandomType.INT);
// Kvtq kvtq = Kvtq.builder().k(field.getId()).v(value).t(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).q(0).build();
// ddList.add(kvtq);
// }
if (DataConstants.DeviceDataType.YX.ordinal()== field.getModelClassifyId().intValue()) {
if(gapOpt!=null) {
DeviceFieldGap gap=gapOpt.get();
int value = getIntBetweenMinAndMax(gap.getMinVal().intValue(), gap.getMaxVal().intValue());
Kvtq kvtq = Kvtq.builder().k(field.getSignage()).v(String.valueOf(value)).t(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).q(0).build();
yxList.add(kvtq);
}
}
}
Map<String, DeviceData> map = Maps.newHashMap();
if (ycList.size() > 0) {
map.put("yc", DeviceData.builder().station(stationId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ycList).build());
}
// if (ddList.size() > 0) {
// map.put("dd", DeviceData.builder().station(stationId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ddList).build());
// }
if (yxList.size() > 0) {
map.put("yx", DeviceData.builder().station(stationId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxList).build());
}
return map;
}
private Map<String, DeviceDataV4> simulationV4(String stationId,String sid, Device device,List<DeviceField> fieldListAll,List<DeviceFieldGap> gapListAll) {
// List<DeviceField> fieldList = getListByDeviceId(device.getId());
// List<DeviceFieldGap> gapList = getListByDeviceGapId(device.getId());
List<DeviceField> fieldList =fieldListAll.stream().filter(e->e.getFacDeviceId().equals(device.getId())).collect(Collectors.toList());
List<DeviceFieldGap> gapList =gapListAll.stream().filter(e->e.getFacDeviceId().equals(device.getId())).collect(Collectors.toList());
// log.info("fieldList data: "+ JsonUtil.toJson(fieldList));
// log.info("gapList data: "+ JsonUtil.toJson(gapList));
List<KvtqV4> ycList = Lists.newArrayList();
List<KvtqV4> yxList = Lists.newArrayList();
//List<Kvtq> ddList = Lists.newArrayList();
for (DeviceField field : fieldList) {
Optional<DeviceFieldGap> gapOpt=gapList.stream().filter(e->e.getSignage().equals(field.getSignage())).findFirst();
if (DataConstants.DeviceDataType.YC.ordinal()== field.getModelClassifyId().intValue()) {
if(gapOpt!=null) {
DeviceFieldGap gap=gapOpt.get();
String value = getRandomRedPacketBetweenMinAndMax(gap.getMinVal(), gap.getMaxVal()).toString();
KvtqV4 kvtq = KvtqV4.builder().sid(sid).k(field.getSignage()).v(value).t(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).q(0).build();
ycList.add(kvtq);
}
}
// if (DataConstants.DeviceDataType.DD.name().equals(field.getType())) {
// String value = Func.random(1, RandomType.INT) + "." + Func.random(1, RandomType.INT);
// Kvtq kvtq = Kvtq.builder().k(field.getId()).v(value).t(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).q(0).build();
// ddList.add(kvtq);
// }
if (DataConstants.DeviceDataType.YX.ordinal()== field.getModelClassifyId().intValue()) {
if(gapOpt!=null) {
DeviceFieldGap gap=gapOpt.get();
int value = getIntBetweenMinAndMax(gap.getMinVal().intValue(), gap.getMaxVal().intValue());
KvtqV4 kvtq = KvtqV4.builder().sid(sid).k(field.getSignage()).v(String.valueOf(value)).t(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).q(0).build();
yxList.add(kvtq);
}
}
}
Map<String, DeviceDataV4> map = Maps.newHashMap();
if (ycList.size() > 0) {
map.put("yc", DeviceDataV4.builder().stationId(stationId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ycList).build());
}
// if (ddList.size() > 0) {
// map.put("dd", DeviceData.builder().station(stationId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ddList).build());
// }
if (yxList.size() > 0) {
map.put("yx", DeviceDataV4.builder().stationId(stationId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxList).build());
}
return map;
}
private List<DeviceField> getListByDeviceId(String deviceId) {
return deviceFieldService.list(Wrappers.<DeviceField>lambdaQuery().ne(DeviceField::getModelClassifyId, DataConstants.DeviceDataType.SOE.name()).eq(DeviceField::getFacDeviceId, deviceId));
}
private List<DeviceFieldGap> getListByDeviceGapId(String deviceId){
return deviceFieldGapService.list(Wrappers.<DeviceFieldGap>lambdaQuery().eq(DeviceFieldGap::getFacDeviceId, deviceId));
}
}

13
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/WriteRealDataService.java

@ -0,0 +1,13 @@
package com.hnac.hzims.simulate.service;
/**
* @author ysj
*/
public interface WriteRealDataService {
void writeRealGateData(String param);
void writeRealRainData(String param);
Boolean isOpen(String deviceCode, Long isOpen);
}

304
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/service/impl/WriteRealDataServiceImpl.java

@ -0,0 +1,304 @@
package com.hnac.hzims.simulate.service.impl;
import com.hnac.hzims.equipment.entity.EmInfoEntity;
import com.hnac.hzims.equipment.feign.IEmInfoClient;
import com.hnac.hzims.hzimsweather.feign.IHeWeatherWeatherClient;
import com.hnac.hzims.hzimsweather.response.weather.HeWeatherWeatherNowResponse;
import com.hnac.hzims.simulate.constants.WriteRealDataConstant;
import com.hnac.hzims.simulate.entity.*;
import com.hnac.hzims.simulate.mapper.DeviceFacConfigMapper;
import com.hnac.hzims.simulate.mapper.DeviceFieldGapMapper;
import com.hnac.hzims.simulate.mapper.DeviceFieldMapper;
import com.hnac.hzims.simulate.mapper.DeviceRainGapMapper;
import com.hnac.hzims.simulate.service.WriteRealDataService;
import com.hnac.hzims.simulate.util.DataConstants;
import com.hnac.hzims.simulate.util.TopicConstant;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.*;
import org.springblade.mqtt.producer.IMqttSender;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import static com.hnac.hzims.simulate.constants.WriteRealDataConstant.REAL_DATA_V3;
import static com.hnac.hzims.simulate.constants.WriteRealDataConstant.REAL_DATA_V4;
/**
* @author ysj
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class WriteRealDataServiceImpl implements WriteRealDataService {
private final IEmInfoClient deviceClient;
private final IHeWeatherWeatherClient weatherClient;
private final IMqttSender mqttSender;
private final DeviceFieldMapper fieldMapper;
private final DeviceFieldGapMapper limitMapper;
private final DeviceFacConfigMapper configMapper;
private final DeviceRainGapMapper deviceRainGapMapper;
/**
* 实时数据写入
* @param param
*/
@Override
public void writeRealGateData(String param) {
// 查询设备配置
List<DeviceFacConfig> configs = configMapper.queryConfigDevice(WriteRealDataConstant.WRITE_GATE);
if(CollectionUtil.isEmpty(configs)){
return;
}
//#.000 表示三位小数
DecimalFormat df = new DecimalFormat("#0.000");
// 遍历发送mqtt实时数据
configs.stream().collect(Collectors.groupingBy(DeviceFacConfig::getModelKind)).forEach((modeKind,groups)->{
// 查询设备属性
List<DeviceField> fields = fieldMapper.queryDeviceFields(groups.stream().map(DeviceFacConfig::getFacDeviceId).collect(Collectors.toList()));
if(CollectionUtil.isEmpty(fields)){
return;
}
// 查询设备限制
List<DeviceFieldGap> limits = limitMapper.queryDeviceLimits(fields.stream().map(DeviceField::getSignage).collect(Collectors.toList()));
if(CollectionUtil.isEmpty(limits)){
return;
}
// v3
if(REAL_DATA_V3.equals(modeKind)){
fields.stream().collect(Collectors.groupingBy(DeviceField::getModelClassifyId)).forEach((key, models) -> models.stream().collect(Collectors.groupingBy(DeviceField::getProjectId)).forEach((projectId, value)-> {
// 遥测实时数据对象
List<Kvtq> ycs = value.stream().filter(o -> DataConstants.DeviceDataType.YC.ordinal() == o.getModelClassifyId()).map(field -> {
List<DeviceFieldGap> limit = limits.stream().filter(e -> e.getSignage().equals(field.getSignage())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(limit)) {
return new Kvtq();
}
Kvtq real = new Kvtq();
double random = Math.random() * limit.get(0).getMaxVal().subtract(limit.get(0).getMinVal()).doubleValue() + limit.get(0).getMinVal().doubleValue();
real.setK(field.getSignage());
real.setV(df.format(random));
real.setT(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss.SSS"));
real.setQ(0);
return real;
}).filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(ycs)) {
log.error("yc_real_data_v3 : {}", JsonUtil.toJson(DeviceData.builder().station(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ycs).build()));
mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_PROPS, JsonUtil.toJson(DeviceData.builder().station(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ycs).build()));
}
// 遥信实时数据对象
List<Kvtq> yxs = value.stream().filter(o -> DataConstants.DeviceDataType.YX.ordinal() == o.getModelClassifyId()).map(field -> {
List<DeviceFieldGap> limit = limits.stream().filter(e -> e.getSignage().equals(field.getSignage())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(limit)) {
return new Kvtq();
}
Kvtq real = new Kvtq();
double random = limit.get(0).getMaxVal().subtract(limit.get(0).getMinVal()).doubleValue() + limit.get(0).getMinVal().doubleValue();
real.setK(field.getSignage());
real.setV(df.format(random));
real.setT(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss.SSS"));
real.setQ(0);
return real;
}).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(yxs)) {
log.error("yx_real_data_v3 : {}", JsonUtil.toJson(DeviceData.builder().station(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxs).build()));
mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_YX, JsonUtil.toJson(DeviceData.builder().station(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxs).build()));
}
}));
}
// v4
if(REAL_DATA_V4.equals(modeKind)){
fields.stream().collect(Collectors.groupingBy(DeviceField::getModelClassifyId)).forEach((key, models) -> models.stream().collect(Collectors.groupingBy(DeviceField::getProjectId)).forEach((projectId, value)->{
// 遥测实时数据对象
List<KvtqV4> ycs = value.stream().filter(o -> DataConstants.DeviceDataType.YC.ordinal() == o.getModelClassifyId()).map(field -> {
List<DeviceFieldGap> limit = limits.stream().filter(e -> e.getSignage().equals(field.getSignage())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(limit)) {
return new KvtqV4();
}
// 查找sid
Optional<DeviceFacConfig> sid = groups.stream().filter(group->field.getFacDeviceId().equals(group.getFacDeviceId())).findFirst();
if(!sid.isPresent()){
return new KvtqV4();
}
KvtqV4 real = new KvtqV4();
double random = Math.random() * limit.get(0).getMaxVal().subtract(limit.get(0).getMinVal()).doubleValue() + limit.get(0).getMinVal().doubleValue();
real.setSid(sid.get().getSid());
real.setK(field.getSignage());
real.setV(df.format(random));
real.setT(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss.SSS"));
real.setQ(0);
return real;
}).filter(ObjectUtil::isNotEmpty).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(ycs)) {
log.error("yc_real_data_v4 : {}",JsonUtil.toJson(DeviceDataV4.builder().stationId(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ycs).build()));
mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_V4_YC,JsonUtil.toJson(DeviceDataV4.builder().stationId(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(ycs).build()));
}
// 遥信实时数据对象
List<KvtqV4> yxs = value.stream().filter(o -> DataConstants.DeviceDataType.YX.ordinal() == o.getModelClassifyId()).map(field -> {
List<DeviceFieldGap> limit = limits.stream().filter(e -> e.getSignage().equals(field.getSignage())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(limit)) {
return new KvtqV4();
}
// 查找sid
Optional<DeviceFacConfig> sid = groups.stream().filter(group->field.getFacDeviceId().equals(group.getFacDeviceId())).findFirst();
if(!sid.isPresent()){
return new KvtqV4();
}
KvtqV4 real = new KvtqV4();
double random = limit.get(0).getMaxVal().subtract(limit.get(0).getMinVal()).doubleValue() + limit.get(0).getMinVal().doubleValue();
real.setSid(sid.get().getSid());
real.setK(field.getSignage());
real.setV(df.format(random));
real.setT(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss.SSS"));
real.setQ(0);
return real;
}).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(yxs)) {
log.error("yx_real_data_v4 : {}",JsonUtil.toJson(DeviceDataV4.builder().stationId(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxs).build()));
mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_V4_YX,JsonUtil.toJson(DeviceDataV4.builder().stationId(projectId).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxs).build()));
}
}));
}
});
}
/**
* 雨量站实时数据写入
* @param param
*/
@Override
public void writeRealRainData(String param) {
// 查询设备配置
List<DeviceFacConfig> configs = configMapper.queryConfigDevice(WriteRealDataConstant.WRITE_RAIN);
if(CollectionUtil.isEmpty(configs)){
return;
}
R<List<EmInfoEntity>> devices = deviceClient.getEmInfoByEmCodes(configs.stream().map(DeviceFacConfig::getDeviceCode).collect(Collectors.toList()));
if(!devices.isSuccess() || CollectionUtil.isEmpty(devices.getData())){
return;
}
devices.getData().forEach(device->{
if(ObjectUtil.isEmpty(device.getLgtd()) || ObjectUtil.isEmpty(device.getLttd())){
return;
}
// 查询设备经纬度
String location = device.getLgtd() + "," + device.getLttd();
R<HeWeatherWeatherNowResponse> weather = weatherClient.getWeatherNowWithCache(location);
if(!weather.isSuccess() || ObjectUtil.isEmpty(weather.getData()) || ObjectUtil.isEmpty(weather.getData().getNow())){
return;
}
Optional<DeviceFacConfig> optional = configs.stream().filter(o->o.getDeviceCode().equals(device.getNumber())).findFirst();
if(!optional.isPresent()){
return;
}
List<DeviceRainGap> deviceRainGap = deviceRainGapMapper.RainGapByFacDeviceId(optional.get().getFacDeviceId());
if(CollectionUtil.isEmpty(deviceRainGap)){
return;
}
List<KvtqV4> yxs = deviceRainGap.stream().map(o->{
KvtqV4 real = new KvtqV4();
real.setSid(optional.get().getSid());
real.setK(o.getSignage());
real.setT(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss.SSS"));
real.setQ(0);
if(WriteRealDataConstant.ATTR_RAIN.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getPrecip());
}else if(WriteRealDataConstant.ATTR_WIND360.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getWind360());
}else if(WriteRealDataConstant.ATTR_WIND_SCALE.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getWindScale());
}else if(WriteRealDataConstant.ATTR_WIND_SPEED.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getWindSpeed());
}else if(WriteRealDataConstant.ATTR_HUMIDITY.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getHumidity());
}else if(WriteRealDataConstant.ATTR_PRESSURE.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getPressure());
}else if(WriteRealDataConstant.ATTR_VIS.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getVis());
}else if(WriteRealDataConstant.ATTR_CLOUD.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getCloud());
}else if(WriteRealDataConstant.ATTR_DEW.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getDew());
}else if(WriteRealDataConstant.ATTR_FEELS_LIKE.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getFeelsLike());
}else if(WriteRealDataConstant.ATTR_TEMP.equals(o.getAttribute())){
real.setV(weather.getData().getNow().getTemp());
}
if(StringUtil.isEmpty(real.getV())){
real.setV("0.0");
}
return real;
}).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(yxs)) {
log.error("yx_real_data_v4 : {}",JsonUtil.toJson(DeviceDataV4.builder().stationId(optional.get().getStationId()).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxs).build()));
mqttSender.sendToMqtt(TopicConstant.TOPIC_HZINFO_V4_YX,JsonUtil.toJson(DeviceDataV4.builder().stationId(optional.get().getStationId()).time(DateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss.SSS")).children(yxs).build()));
}
});
}
/**
* 开启/关闭闸门数据
* @param deviceCode
* @param isOpen
* @return
*/
@Override
public Boolean isOpen(String deviceCode, Long isOpen) {
// 查询写入设备配置
DeviceFacConfig config = configMapper.configByDeviceCode(deviceCode);
if(ObjectUtil.isEmpty(config)){
return false;
}
// 查询设备属性
List<DeviceField> fields = fieldMapper.querySignages(config.getFacDeviceId());
if(CollectionUtil.isEmpty(fields)){
return false;
}
// 查询属性限制
List<DeviceFieldGap> limits = limitMapper.queryDeviceLimits(fields.stream().map(DeviceField::getSignage).collect(Collectors.toList()));
if(CollectionUtil.isEmpty(limits)){
return false;
}
limits.forEach(limit->{
Optional<DeviceField> optional = fields.stream().filter(o->o.getSignage().equals(limit.getSignage())).findFirst();
if(!optional.isPresent()){
return;
}
String signage = optional.get().getName();
if(WriteRealDataConstant.GATE_STATUS.equals(signage)){
if(WriteRealDataConstant.OPEN.equals(isOpen)){
limitMapper.updateLimitById(BigDecimal.ONE,BigDecimal.ZERO,limit.getId());
}else{
limitMapper.updateLimitById(BigDecimal.ZERO,BigDecimal.ZERO,limit.getId());
}
}else if(WriteRealDataConstant.GATE_FLOW.equals(signage)){
if(WriteRealDataConstant.OPEN.equals(isOpen)){
limitMapper.updateLimitById(BigDecimal.valueOf(3560.000),BigDecimal.valueOf(0.000),limit.getId());
}else{
limitMapper.updateLimitById(BigDecimal.ZERO,BigDecimal.ZERO,limit.getId());
}
}else if(WriteRealDataConstant.OPENING_DEGREE.equals(signage)){
if(WriteRealDataConstant.OPEN.equals(isOpen)){
limitMapper.updateLimitById(BigDecimal.valueOf(10),BigDecimal.valueOf(0.000),limit.getId());
}else{
limitMapper.updateLimitById(BigDecimal.ZERO,BigDecimal.ZERO,limit.getId());
}
}
});
return true;
}
}

357
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/DataConstants.java

@ -0,0 +1,357 @@
package com.hnac.hzims.simulate.util;
public interface DataConstants {
String REDIS_MESSAGE_TOPIC = "hzinfo_config_message_topic";
String TIME_COLUMN = "ts";
String VALUE_COLUMN = "val";
String Q_COLUMN = "q";
String REAL_ID_COLUMN = "realid";
String TBNAME = "tbname";
String YC_TABLE_PREFIX = "yc_";
String YX_TABLE_PREFIX = "yx_";
String SOE_TABLE_PREFIX = "soe_";
String SOE_ALARM_TABLE_PREFIX = "soe_alarm_";
String YC = "YC";
String YX = "YX";
String SOE = "SOE";
String YK_RETURN_PREFIX = "ykfj:";
String REALID_CALCULATE = "16777215";
String DEVICE_SUPER_TABLE_PREFIX = "hz_";
String DEVICE_TABLE_PREFIX = "d_";
public static enum DataStructTypeEnum {
struct,
dataGroup;
private DataStructTypeEnum() {
}
}
public static enum EYkRetStatus {
yrsSuccess,
yrsServerErr,
yrsChannelErr,
yrsModuleErr,
yrsDeviceTimeOut,
yrsDeviceFail,
yrsExpired;
private EYkRetStatus() {
}
}
public static enum SoeType {
skNone(0, "0", "默认"),
skSys(1, "1", "系统"),
skAlarm(2, "2", "报警"),
skAct(3, "3", "事故"),
skOperate(4, "4", "用户操作"),
skYcOut(5, "5,11,12", "遥测越限"),
skYxChange(6, "6,10", "遥信变位"),
skReg(7, "7", "注册信息"),
skHint(8, "8", "信息提示"),
skInspect(9, "9", "设备巡检"),
skMonitorOperate(10, "13,14", "遥控操作"),
skRDSYcOutOfLimitResume(11, "15", "遥测越限恢复"),
skUndefine(12, "16,17,18", "未定义"),
skNetworkAnomaly(13, "-1", "通讯异常"),
skCommunicateAnomaly(14, "-2", "数据异常");
private Integer index;
private String soeKind;
private String name;
private SoeType(Integer index, String soeKind, String name) {
this.index = index;
this.soeKind = soeKind;
this.name = name;
}
public static String getName(Integer id) {
SoeType[] values = values();
for (int i = 0; i < values.length; ++i) {
if (values[i].index.equals(id)) {
return values[i].getName();
}
}
return null;
}
public static Integer getIndexBySoeKind(String soeType) {
SoeType[] values = values();
SoeType[] var2 = values;
int var3 = values.length;
for (int var4 = 0; var4 < var3; ++var4) {
SoeType type = var2[var4];
if (type.getSoeKind().contains(soeType)) {
return type.getIndex();
}
}
return skUndefine.getIndex();
}
public static String getSoeKindByIndex(Integer index) {
SoeType[] values = values();
SoeType[] var2 = values;
int var3 = values.length;
for (int var4 = 0; var4 < var3; ++var4) {
SoeType type = var2[var4];
if (type.getIndex().equals(index)) {
return type.getSoeKind();
}
}
return "";
}
public Integer getIndex() {
return this.index;
}
public String getSoeKind() {
return this.soeKind;
}
public String getName() {
return this.name;
}
}
public static enum SoeKind {
skNone(0, "默认"),
skSys(1, "系统"),
skAlarm(2, "报警"),
skAct(3, "事故"),
skOperate(4, "操作"),
skYcOut(5, "遥测越限(告警)"),
skYxChange(6, "遥信变位(告警)"),
skReg(7, "注册信息"),
skHint(8, "信息提示"),
skInspect(9, "设备巡检"),
skRDSYxChange(10, "遥信变位(数据)"),
skRDSYcOutOfLimit(11, "遥测越上/下限(数据)"),
skRDSYcOutOfLimit2(12, "遥测越上上/下下限(数据)"),
skMonitorOperate(13, "操作记录(遥控)"),
skMonitorOperateII(14, "操作记录(写定值)"),
skRDSYcOutOfLimitResume(15, "越限恢复"),
bak_7(16, "备用7"),
bak_8(17, "备用8"),
skUndefine(18, "未定义");
private Integer index;
private String name;
private SoeKind(Integer index, String name) {
this.index = index;
this.name = name;
}
public static String getName(Integer id) {
SoeKind[] values = values();
for (int i = 0; i < values.length; ++i) {
if (values[i].index.equals(id)) {
return values[i].getName();
}
}
return null;
}
public Integer getIndex() {
return this.index;
}
public String getName() {
return this.name;
}
}
public static enum DeviceDataType {
YC("遥测"),
YX("遥信"),
DD("电渡"),
YK("遥控"),
YT("遥调"),
SOE("事件"),
STR("字符串"),
OTHER("其它");
private String displayName;
private DeviceDataType(String displayName) {
this.displayName = displayName;
}
public static String getDisplayName(String name) {
DeviceDataType type = valueOf(name);
return type.getDisplayName();
}
public String getDisplayName() {
return this.displayName;
}
}
public static enum YkDelayType {
none_store,
store,
delay_store;
private YkDelayType() {
}
}
public static enum RedisGroupMessageTypeEnum {
NOTICE_CLEAN_LOCAL_CACHE_DEVICE("clean.local.cache.device"),
NOTICE_CLEAN_LOCAL_CACHE_DEVICE_GROUP("clean.local.cache.group"),
NOTICE_CLEAN_LOCAL_CACHE_ALARM("clean.local.cache.alarm"),
NOTICE_CLEAN_LOCAL_CACHE_YK("clean.local.cache.yk");
private String value;
private RedisGroupMessageTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return this.value;
}
}
public static enum DataStatusEnum {
offline,
online;
private DataStatusEnum() {
}
}
public static enum StatisticsType {
avg("AVG"),
max("MAX"),
min("MIN");
private String computeStrategy;
private StatisticsType(String fun) {
this.computeStrategy = fun;
}
public static StatisticsType getStatisticsType(int index) {
StatisticsType[] values = values();
StatisticsType[] var2 = values;
int var3 = values.length;
for (int var4 = 0; var4 < var3; ++var4) {
StatisticsType value = var2[var4];
if (index == value.ordinal()) {
return value;
}
}
return null;
}
public String getComputeStrategy() {
return this.computeStrategy;
}
public void setComputeStrategy(final String computeStrategy) {
this.computeStrategy = computeStrategy;
}
}
public static enum AnalyzeInstanceAlarmConfType {
changeAlarm("变化告警"),
supassAlarm("越限告警");
private String name;
private AnalyzeInstanceAlarmConfType(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
public static enum StatisticsAnalyEnum {
Hour("h"),
Day("d"),
Month("n"),
Year("h");
private String type;
private StatisticsAnalyEnum(String fun) {
this.type = fun;
}
public static StatisticsAnalyEnum getStatisticsAnalyEnum(int index) {
StatisticsAnalyEnum[] values = values();
StatisticsAnalyEnum[] var2 = values;
int var3 = values.length;
for (int var4 = 0; var4 < var3; ++var4) {
StatisticsAnalyEnum value = var2[var4];
if (value.ordinal() == index) {
return value;
}
}
return null;
}
public String getType() {
return this.type;
}
}
public static enum StationFromSouceEnum {
cloud,
station;
private StationFromSouceEnum() {
}
}
public static enum AnalyzeInstanceDataResoureEnum {
deviceUp("设备上报"),
hz3000Up("华自网关上报");
private String name;
private AnalyzeInstanceDataResoureEnum(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}
public static enum ThresholdLevelEnum {
one,
two,
three;
private ThresholdLevelEnum() {
}
}
public static enum Hz3000VersionEnum {
v3,
v4;
private Hz3000VersionEnum() {
}
}
}

105
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/ParseFacUtils.java

@ -0,0 +1,105 @@
package com.hnac.hzims.simulate.util;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.collect.Lists;
import com.hnac.hzims.simulate.entity.DataItem;
import com.hnac.hzims.simulate.entity.DataModel;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.xml.sax.SAXException;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.List;
/**
* 解析厂信息工具类
* @author ninglong
*/
public class ParseFacUtils {
public static List<DataModel> parsePoint(InputStream inputStream) throws SAXException, DocumentException, JsonProcessingException {
SAXReader saxReader = new SAXReader();
Document document = saxReader.read(inputStream);
List groupElements = document.selectNodes("/Factorys/Factory/Group");
List<DataModel> list = parseDataGroup(groupElements);
List ycElements = document.selectNodes("/Factorys/Factory/Group/AIS/AI");
list = pastePointElement(ycElements, DataConstants.DeviceDataType.YC.name(),list);
List yxElements = document.selectNodes("/Factorys/Factory/Group/DIS/DI");
list = pastePointElement(yxElements, DataConstants.DeviceDataType.YX.name(),list);
List ddElements = document.selectNodes("/Factorys/Factory/Group/DDS/DD");
list = pastePointElement(ddElements, DataConstants.DeviceDataType.DD.name(),list);
List soeElements = document.selectNodes("/Factorys/Factory/Group/SOES/SOE");
list = pastePointElement(soeElements, DataConstants.DeviceDataType.SOE.name(),list);
List ykElements = document.selectNodes("/Factorys/Factory/Group/DOS/DO");
list = pastePointElement(ykElements, DataConstants.DeviceDataType.YK.name(),list);
return list;
}
/**
* 解析数据组
*/
private static List<DataModel> parseDataGroup(List elements){
List<DataModel> list = Lists.newArrayList();
for (Element element : (List<Element>) elements) {
DataModel model = new DataModel();
model.setStructType(DataConstants.DataStructTypeEnum.dataGroup.name());
model.setId(element.attribute("ID").getValue());
model.setSignage(bigId2SmallId(element.attribute("ID").getValue()));
model.setName(element.attribute("Name").getValue());
String stationNumStr = element.getParent().attribute("StationNum").getValue();
model.setStation(stationNumStr);
list.add(model);
}
return list;
}
/**
* 将大id转换成小id
*/
public static String bigId2SmallId(String realId){
BigInteger bigRealId = new BigInteger(realId);
return bigRealId.and(new BigInteger(DataConstants.REALID_CALCULATE)).toString();
}
/**
* 解析数据点
*/
private static List<DataModel> pastePointElement(List elements, String type, List<DataModel> list) throws JsonProcessingException {
for (Element element : (List<Element>) elements) {
String groupId = element.getParent().getParent().attribute("ID").getValue();
for(DataModel dm:list){
if(!groupId.equals(dm.getId())){
continue;
}
DataItem dataItem = DataItem.builder()
.id(element.attribute("ID").getValue())
.signage(bigId2SmallId(element.attribute("ID").getValue()))
.name(element.attribute("Name").getValue())
.type(type)
.build();
if(DataConstants.DeviceDataType.SOE.name().equals(type)){
dataItem.setEventType(element.attribute("SOEAlarmType").getValue());
dataItem.setSoeType(element.attribute("SOEType").getValue());
}
if(DataConstants.DeviceDataType.YX.name().equals(type)){
dataItem.setEventType(element.attribute("YXAlarmType").getValue());
dataItem.setSoeType(element.attribute("SOEType").getValue());
}
List<DataItem> childrens = dm.getChildren();
if(childrens==null){
childrens = Lists.newArrayList();
}
childrens.add(dataItem);
dm.setChildren(childrens);
}
}
return list;
}
}

52
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/RealIdConvertUtils.java

@ -0,0 +1,52 @@
package com.hnac.hzims.simulate.util;
import java.math.BigInteger;
public class RealIdConvertUtils {
private void demo() {
BigInteger ss = new BigInteger("16777215");
BigInteger s = new BigInteger("15122982502953650999");
BigInteger stationId = s.shiftRight(24);
System.out.println(stationId.toString());
BigInteger realId = s.and(ss);
System.out.println(realId.toString());
BigInteger xxx = stationId.shiftLeft(24);
BigInteger yyy = xxx.or(realId);
System.out.println(s.toString());
System.out.println(yyy.toString());
}
/**
* 将大id转换成小id
*/
public static String bigId2SmallId(String realId) {
BigInteger bigRealId = new BigInteger(realId);
return bigRealId.and(new BigInteger(DataConstants.REALID_CALCULATE)).toString();
}
/**
* 将小id转换成大id
*/
public static String smallId2BigId(String station, String realId) {
BigInteger stationId = new BigInteger(station);
BigInteger BigRealId = stationId.shiftLeft(24).or(new BigInteger(realId));
return BigRealId.toString();
}
// public static void main(String[] args) {
// System.out.println(RealIdConvertUtils.getStationId("262952509021093892"));
// System.out.println(RealIdConvertUtils.bigId2SmallId("262952509021093892"));
// System.out.println(smallId2BigId("15673190893", "32"));
// }
/**
* 获取站点id
*/
public static String getStationId(String realId) {
BigInteger bigRealId = new BigInteger(realId);
return bigRealId.shiftRight(24).toString();
}
}

18
hzims-service/hzims-simulate/src/main/java/com/hnac/hzims/simulate/util/TopicConstant.java

@ -0,0 +1,18 @@
package com.hnac.hzims.simulate.util;
public interface TopicConstant {
String TOPIC_DEVICE_MODEL = "topic_device_model";
String TOPIC_HZINFO_PROPS = "topic_hzinfo_props";
String TOPIC_HZINFO_V4_YC = "hzinfo_v4_yc";
String TOPIC_HZINFO_V4_YX = "hzinfo_v4_yx";
String TOPIC_HZINFO_YX = "topic_hzinfo_yx";
String TOPIC_HZINFO_DD = "topic_hzinfo_dd";
String TOPIC_HZINFO_EVENTS = "topic_hzinfo_events";
String TOPIC_HZINFO_EVENTS_ALARM = "topic_hzinfo_events_alarm";
String TOPIC_HZINFO_CONTROL_RETURN = "topic_hzinfo_control_return";
String TOPIC_HZINFO_HEART_BEAT = "topic_hzinfo_heart_beat";
String TOPIC_HZINFO_BROADCAST = "topic_hzinfo_broadcast";
String TOPIC_HZINFO_DATA = "topic_hzinfo_data";
}

13
hzims-service/hzims-simulate/src/main/resources/application-dev.yml

@ -0,0 +1,13 @@
#服务器端口
server:
port: 8211
#数据源配置
spring:
datasource:
url: ${blade.datasource.dev.url}
username: ${blade.datasource.dev.username}
password: ${blade.datasource.dev.password}
cloud:
inetutils:
preferred-networks: 192.168.65

6
hzims-service/hzims-simulate/src/main/resources/application-prod.yml

@ -0,0 +1,6 @@
#数据源配置
spring:
datasource:
url: ${blade.datasource.prod.url}
username: ${blade.datasource.prod.username}
password: ${blade.datasource.prod.password}

15
hzims-service/hzims-simulate/src/main/resources/application.yml

@ -0,0 +1,15 @@
spring:
application:
name: lewa-simulate
#mybatis-plus配置
mybatis-plus:
mapper-locations: classpath:org/springbalde/**/mapper/*Mapper.xml,classpath:com/hnac/hzinfo/**/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: org.springbalde.**.entity,com.hnac.hzinfo.**.entity
#swagger扫描路径配置
swagger:
base-packages:
- org.springbalde
- com.hnac.hzinfo

3
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotServiceImpl.java

@ -129,6 +129,7 @@ public class RobotServiceImpl extends BaseServiceImpl<RobotMapper, RobotEntity>
Optional<DeviceInstanceAttrVO> attrOptional = paramDeviceAttrR.getData().stream().filter(deviceAttr -> k.getValue().getN().equals(deviceAttr.getName())).findFirst(); Optional<DeviceInstanceAttrVO> attrOptional = paramDeviceAttrR.getData().stream().filter(deviceAttr -> k.getValue().getN().equals(deviceAttr.getName())).findFirst();
data.setModelClassifyId(attrOptional.get().getModelClassifyId()); data.setModelClassifyId(attrOptional.get().getModelClassifyId());
data.setModelClassifyName(attrOptional.get().getModelClassifyName()); data.setModelClassifyName(attrOptional.get().getModelClassifyName());
data.setUnits(attrOptional.get().getUnits());
return data; return data;
})).collect(Collectors.toList()); })).collect(Collectors.toList());
return result.stream().collect(Collectors.groupingBy(RobotRealDataVO::getModelClassifyName)); return result.stream().collect(Collectors.groupingBy(RobotRealDataVO::getModelClassifyName));
@ -145,7 +146,7 @@ public class RobotServiceImpl extends BaseServiceImpl<RobotMapper, RobotEntity>
Result<Map<String, Object>> deviceSoeDataResult = deviceDataClient.getDeviceSoeData(robot.getStationCode(), 1, robotCode, null, Result<Map<String, Object>> deviceSoeDataResult = deviceDataClient.getDeviceSoeData(robot.getStationCode(), 1, robotCode, null,
startTime, endTime, true, query.getCurrent(), query.getSize()); startTime, endTime, true, query.getCurrent(), query.getSize());
Assert.isTrue(deviceSoeDataResult.isSuccess(), () -> { Assert.isTrue(deviceSoeDataResult.isSuccess(), () -> {
throw new ServiceException("获取机器人告警信息失败!"); throw new ServiceException(deviceSoeDataResult.getMsg());
}); });
Map<String, Object> deviceSoeData = deviceSoeDataResult.getData(); Map<String, Object> deviceSoeData = deviceSoeDataResult.getData();
IPage result = Condition.getPage(query); IPage result = Condition.getPage(query);

1
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/service/impl/RobotTaskServiceImpl.java

@ -236,6 +236,7 @@ public class RobotTaskServiceImpl extends BaseServiceImpl<RobotTaskMapper, Robot
RobotTaskTransParam transParam = new RobotTaskTransParam(); RobotTaskTransParam transParam = new RobotTaskTransParam();
transParam.setTaskId(taskvo.getId()); transParam.setTaskId(taskvo.getId());
transParam.setName(taskvo.getPlanName()); transParam.setName(taskvo.getPlanName());
transParam.setRouteName(taskvo.getRouteName());
transParam.setStatus(taskvo.getStatus()); transParam.setStatus(taskvo.getStatus());
transParam.setStartTime(taskvo.getPlanStartTime()); transParam.setStartTime(taskvo.getPlanStartTime());
transParam.setEndTime(taskvo.getPlanEndTime()); transParam.setEndTime(taskvo.getPlanEndTime());

3
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotRealDataVO.java

@ -49,4 +49,7 @@ public class RobotRealDataVO implements Serializable {
@ApiModelProperty("启停状态") @ApiModelProperty("启停状态")
private Integer state; private Integer state;
@ApiModelProperty("单位")
private String units;
} }

4
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/vo/robot/RobotTaskTransParam.java

@ -28,6 +28,10 @@ public class RobotTaskTransParam {
@ApiModelProperty(value = "任务名称") @ApiModelProperty(value = "任务名称")
private String name; private String name;
@ApiModelProperty(value = "巡检路线")
private String routeName;
/** /**
* 任务状态 * 任务状态
* 0未开始 1进行中 2暂停 3已完成 4未完成, 程序只会返回以下状态任务 0未开始 1进行中 2暂停 * 0未开始 1进行中 2暂停 3已完成 4未完成, 程序只会返回以下状态任务 0未开始 1进行中 2暂停

1
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/job/service/TaskJobService.java

@ -400,6 +400,7 @@ public class TaskJobService {
task.setDutyId(plan.getDutyId()); task.setDutyId(plan.getDutyId());
task.setPlanId(plan.getId()); task.setPlanId(plan.getId());
task.setPlanName(plan.getName()); task.setPlanName(plan.getName());
task.setRouteName(plan.getRouteName());
task.setType(plan.getType()); task.setType(plan.getType());
task.setCycle(plan.getCycle()); task.setCycle(plan.getCycle());
if(PlanCycleEnum.NEVER_CYCLE.getCycle().equals(plan.getCycle())) { if(PlanCycleEnum.NEVER_CYCLE.getCycle().equals(plan.getCycle())) {

3
hzims-service/message/src/main/java/com/hnac/hzims/message/web/MsgWsRecordHistoryController.java

@ -1,4 +1,4 @@
package com.hnac.hzims.message.controller; package com.hnac.hzims.message.web;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
* @author xiashandong * @author xiashandong
* @created 2021-06-28 16:45 * @created 2021-06-28 16:45
**/ **/
@Deprecated
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/msg/ws/record/history") @RequestMapping("/msg/ws/record/history")

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

@ -28,8 +28,8 @@ public class HikVideoController extends BladeController {
@ApiOperation("查询区域列表") @ApiOperation("查询区域列表")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@GetMapping("/nodesByParams") @GetMapping("/nodesByParams")
public R<List<HikVideoAreaVO>> nodesByParams(@ApiParam("区域父级编号")@RequestParam(required = false) String parentIndexCode) { public R<List<HikVideoAreaVO>> nodesByParams(@RequestParam(value = "platformId",required = false) Long platformId,@ApiParam("区域父级编号")@RequestParam(value = "parentIndexCode",required = false) String parentIndexCode) {
return R.data(hikVideoService.nodesByParams(parentIndexCode)); return R.data(hikVideoService.nodesByParams(platformId,parentIndexCode));
} }
@ApiOperation("根据区域获取下级编码设备列表") @ApiOperation("根据区域获取下级编码设备列表")

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

@ -319,8 +319,8 @@ public class StationVideoTypeController extends BladeController {
@GetMapping("/getHikVideoAreaTree") @GetMapping("/getHikVideoAreaTree")
@ApiOperationSupport(order = 150) @ApiOperationSupport(order = 150)
@ApiOperation(value = "获取海康区域树", notes = "获取海康区域树") @ApiOperation(value = "获取海康区域树", notes = "获取海康区域树")
public R<List<HikVideoAreaTreeVO>> getHikVideoAreaTree() { public R<List<HikVideoAreaTreeVO>> getHikVideoAreaTree(@RequestParam(value = "platformId",required = false)Long platformId) {
return R.data(stationVideoTypeService.getHikVideoAreaTree()); return R.data(stationVideoTypeService.getHikVideoAreaTree(platformId));
} }
@GetMapping("/getVideoPointByRegion") @GetMapping("/getVideoPointByRegion")
@ -354,4 +354,10 @@ public class StationVideoTypeController extends BladeController {
return R.data(false); return R.data(false);
} }
@GetMapping ("/getVideoByPointCodes")
@ApiOperationSupport(order = 190)
@ApiOperation(value = "通过视频编号获取视频")
public R<List<StationVideoTypeEntity>> getVideoByPointCodes(@RequestParam @ApiParam("视频设备编号") String pointCodes) {
return R.data(stationVideoTypeService.getVideoByPointCodes(pointCodes));
}
} }

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

@ -15,7 +15,7 @@ public interface IHikVideoService {
* 查询区域列表 * 查询区域列表
* @return 区域列表 * @return 区域列表
*/ */
List<HikVideoAreaVO> nodesByParams(String parentIndexCode); List<HikVideoAreaVO> nodesByParams(Long platformId,String parentIndexCode);
List subResources(String regionIndexCode); List subResources(String regionIndexCode);

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationVideoTypeService.java

@ -10,6 +10,7 @@ import com.hnac.hzims.operational.station.response.HikMonitorResp;
import com.hnac.hzims.operational.station.vo.HikVideoAreaTreeVO; import com.hnac.hzims.operational.station.vo.HikVideoAreaTreeVO;
import com.hnac.hzims.operational.station.vo.StationVideoTypeVO; import com.hnac.hzims.operational.station.vo.StationVideoTypeVO;
import com.hnac.hzims.operational.station.vo.VideoMonitorVO; import com.hnac.hzims.operational.station.vo.VideoMonitorVO;
import io.swagger.annotations.ApiParam;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -77,10 +78,12 @@ public interface IStationVideoTypeService extends BaseService<StationVideoTypeEn
*/ */
Map<String,Object> getWsUrlByPointCode(String pointCodes,String host,String appKey,String appSecret,Integer streamType); Map<String,Object> getWsUrlByPointCode(String pointCodes,String host,String appKey,String appSecret,Integer streamType);
List<HikVideoAreaTreeVO> getHikVideoAreaTree(); List<HikVideoAreaTreeVO> getHikVideoAreaTree(Long platformId);
Map getVideoPointByRegion(Long refDept,String regionCode); Map getVideoPointByRegion(Long refDept,String regionCode);
String getRtspAddressByVideo(StationVideoTypeEntity req); String getRtspAddressByVideo(StationVideoTypeEntity req);
List<StationVideoTypeEntity> getVideoByPointCodes(String pointCodes);
} }

21
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/HikVideoServiceImpl.java

@ -7,15 +7,20 @@ import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig; import com.hikvision.artemis.sdk.config.ArtemisConfig;
import com.hnac.hzims.operational.station.service.IHikVideoService; import com.hnac.hzims.operational.station.service.IHikVideoService;
import com.hnac.hzims.operational.station.vo.HikVideoAreaVO; import com.hnac.hzims.operational.station.vo.HikVideoAreaVO;
import com.hnac.hzims.operational.video.entity.VideoPlatformEntity;
import com.hnac.hzims.operational.video.service.IVideoPlatformService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -27,6 +32,8 @@ import static com.hnac.hzims.operational.station.constants.HikApiConstants.*;
@Service @Service
public class HikVideoServiceImpl implements IHikVideoService { public class HikVideoServiceImpl implements IHikVideoService {
private final IVideoPlatformService videoPlatformService;
@Value("${hzims.videoProperties.appKey}") @Value("${hzims.videoProperties.appKey}")
private String videoAppKey; private String videoAppKey;
@ -53,8 +60,20 @@ public class HikVideoServiceImpl implements IHikVideoService {
} }
@Override @Override
public List<HikVideoAreaVO> nodesByParams(String parentIndexCode) { public List<HikVideoAreaVO> nodesByParams(Long platformId,String parentIndexCode) {
if(ObjectUtil.isEmpty(platformId)){
init(); init();
}else{
// 查询多平台配置
VideoPlatformEntity platform = videoPlatformService.getById(platformId);
if(ObjectUtil.isEmpty(platform)){
return new ArrayList<>();
}
ArtemisConfig.host = platform.getVideoHost();
ArtemisConfig.appKey = platform.getAppKey();
ArtemisConfig.appSecret = platform.getAppSecret();
}
Map<String, String> path = new HashMap<>(); Map<String, String> path = new HashMap<>();
path.put("https://", ARTEMIS_PATH + NODE_BY_PARAMS); path.put("https://", ARTEMIS_PATH + NODE_BY_PARAMS);
HashMap<String, Object> body = new HashMap<String, Object>() {{ HashMap<String, Object> body = new HashMap<String, Object>() {{

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

@ -690,6 +690,14 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
throw new ServiceException("站点两票标识平台已存在,请检查后重新填入!"); throw new ServiceException("站点两票标识平台已存在,请检查后重新填入!");
}); });
} }
// 检查站点编号唯一性
if(StringUtil.isNotBlank(entity.getCode())) {
LambdaQueryWrapper<StationEntity> wq = Wrappers.<StationEntity>lambdaQuery().eq(StationEntity::getCode, entity.getCode());
List<StationEntity> stations = this.getBaseMapper().listWithOutAuth(wq);
Assert.isTrue(CollectionUtil.isEmpty(stations),() -> {
throw new ServiceException("站点编号平台已存在,请检查后重新填入!");
});
}
Integer maxSort = this.baseMapper.getMaxSort(); Integer maxSort = this.baseMapper.getMaxSort();
entity.setSort(Optional.ofNullable(maxSort).map(sort -> sort + 1).orElse(1)); entity.setSort(Optional.ofNullable(maxSort).map(sort -> sort + 1).orElse(1));
// 创建站点机构 // 创建站点机构

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationVideoTypeServiceImpl.java

@ -235,8 +235,8 @@ public class StationVideoTypeServiceImpl extends BaseServiceImpl<StationVideoTyp
} }
@Override @Override
public List<HikVideoAreaTreeVO> getHikVideoAreaTree() { public List<HikVideoAreaTreeVO> getHikVideoAreaTree(Long platformId) {
List<HikVideoAreaVO> hikVideoAreaList = hikVideoService.nodesByParams(null); List<HikVideoAreaVO> hikVideoAreaList = hikVideoService.nodesByParams(platformId,null);
Map<String, List<HikVideoAreaVO>> videoAreaMapByParent = hikVideoAreaList.stream().collect(Collectors.groupingBy(HikVideoAreaVO::getParentIndexCode)); Map<String, List<HikVideoAreaVO>> videoAreaMapByParent = hikVideoAreaList.stream().collect(Collectors.groupingBy(HikVideoAreaVO::getParentIndexCode));
List<HikVideoAreaVO> firstLevelArea = videoAreaMapByParent.get("-1"); List<HikVideoAreaVO> firstLevelArea = videoAreaMapByParent.get("-1");
List<HikVideoAreaTreeVO> result = firstLevelArea.stream().map(area -> this.generateAreaTree(videoAreaMapByParent, area)).collect(Collectors.toList()); List<HikVideoAreaTreeVO> result = firstLevelArea.stream().map(area -> this.generateAreaTree(videoAreaMapByParent, area)).collect(Collectors.toList());
@ -279,6 +279,14 @@ public class StationVideoTypeServiceImpl extends BaseServiceImpl<StationVideoTyp
return null; return null;
} }
@Override
public List<StationVideoTypeEntity> getVideoByPointCodes(String pointCodes) {
List<String> pointCodeList = Func.toStrList(",", pointCodes);
LambdaQueryWrapper<StationVideoTypeEntity> qw = Wrappers.<StationVideoTypeEntity>lambdaQuery().in(StationVideoTypeEntity::getPointCode, pointCodeList);
List<StationVideoTypeEntity> videoList = this.list(qw);
return videoList;
}
private HikVideoAreaTreeVO generateAreaTree(Map<String, List<HikVideoAreaVO>> videoAreaMapByParent,HikVideoAreaVO area) { private HikVideoAreaTreeVO generateAreaTree(Map<String, List<HikVideoAreaVO>> videoAreaMapByParent,HikVideoAreaVO area) {
HikVideoAreaTreeVO parentTree = BeanUtil.copy(area,HikVideoAreaTreeVO.class); HikVideoAreaTreeVO parentTree = BeanUtil.copy(area,HikVideoAreaTreeVO.class);
if(CollectionUtil.isNotEmpty(videoAreaMapByParent.get(area.getIndexCode()))) { if(CollectionUtil.isNotEmpty(videoAreaMapByParent.get(area.getIndexCode()))) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save