Browse Source

Merge remote-tracking branch 'origin/prod-5.1.3' into prod-5.1.3

zhongwei
haungxing 2 months ago
parent
commit
b95e31b51c
  1. 7
      hzims-biz-common/src/main/java/com/hnac/hzims/common/utils/FileUtil.java
  2. 3
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
  3. 55
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java
  4. 2
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml
  5. 110
      hzims-service/gglm-big-model/src/main/resources/db/2.0.2.sql
  6. 1
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java
  7. 14
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java
  8. 28
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java
  9. 28
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  10. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ShowScheduledTask.java
  11. 14
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/StartStopScheduledTask.java
  12. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java
  13. 6
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java
  14. 44
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  15. 1
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java
  16. 1
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java
  17. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java
  18. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java
  19. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java
  20. 3
      hzims-service/operational/src/main/resources/db/3.0.5.sql

7
hzims-biz-common/src/main/java/com/hnac/hzims/common/utils/FileUtil.java

@ -134,13 +134,8 @@ public class FileUtil {
} }
public static ByteArrayMultipartFile getMultipartFileFromUrl(String urlStr) throws IOException { public static ByteArrayMultipartFile getMultipartFileFromUrl(String urlStr) throws IOException {
String pureUrl = getPureUrl(urlStr);
return getMultipartFileFromPureUrl(pureUrl);
}
public static ByteArrayMultipartFile getMultipartFileFromPureUrl(String pureUrlStr) throws IOException {
ByteArrayMultipartFile result = null; ByteArrayMultipartFile result = null;
URL url = new URL(pureUrlStr); URL url = new URL(urlStr);
byte[] bytes = getUrlByte(url); byte[] bytes = getUrlByte(url);
String name = url.getPath(); String name = url.getPath();
String originalName = getOriginalFilename(name); String originalName = getOriginalFilename(name);

3
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java

@ -88,6 +88,9 @@ public interface MainConstants {
// 站点实时数据 // 站点实时数据
String REAL_TIME_DATA = "realTimeData"; String REAL_TIME_DATA = "realTimeData";
String LOAD_STATION_ON_LINE = "loadStationOnLine";
// 光伏站-机组指标数据 // 光伏站-机组指标数据
String LOAD_PHOTOVOLTAIC_TARGET = "loadPhotovoltaicTarget"; String LOAD_PHOTOVOLTAIC_TARGET = "loadPhotovoltaicTarget";

55
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java

@ -4,14 +4,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO; import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import org.springblade.core.tool.utils.Func; import lombok.NoArgsConstructor;
/** /**
* @Author: ypj * @Author: ypj
* @Date: 2024/9/19 7:55 * @Date: 2024/9/19 7:55
*/ */
@Data @Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class DeviceModelData { public class DeviceModelData {
/** /**
* 模型id * 模型id
@ -157,20 +162,50 @@ public class DeviceModelData {
private String type; private String type;
public static DeviceModelData of(ModelAttrVO data) { public static DeviceModelData of(ModelAttrVO data) {
DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); return DeviceModelData.builder()
deviceModelData.setType("0"); .modelId(null != data.getModelId() ? data.getModelId().toString() : null)
return deviceModelData; .name(data.getName())
.signage(data.getSignage())
.dbType(data.getDbType())
.fieldLength(data.getFieldLength())
.keepFigures(null != data.getKeepFigures() ? data.getKeepFigures().toString() : null)
.accessRules(null != data.getAccessRules() ? data.getAccessRules().toString() : null)
.descs(data.getDescs())
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null)
.type("0").build();
} }
public static DeviceModelData of(ModelFuncVO data) { public static DeviceModelData of(ModelFuncVO data) {
DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); return DeviceModelData.builder()
deviceModelData.setType("1"); .modelId(null != data.getModelId() ? data.getModelId().toString() : null)
return deviceModelData; .name(data.getName())
.signage(data.getSignage())
.parameterJson(data.getParameterJson())
.controlStatus(null != data.getControlStatus() ? data.getControlStatus().toString() : null)
.parameterTag(data.getParameterTag())
.isPopup(null != data.getIsPopup() ? data.getIsPopup().toString() : null)
.isCheck(null != data.getIsCheck() ? data.getIsCheck().toString() : null)
.parameterSource(null != data.getParameterSource() ? data.getParameterSource().toString() : null)
.sourceAttrSignage(data.getSourceAttrSignage())
.controlParameter(null != data.getControlParameter() ? data.getControlParameter().toString() : null)
.intervalLength(null != data.getIntervalLength() ? data.getIntervalLength().toString() : null)
.minValue(null != data.getMinValue() ? data.getMinValue().toString() : null)
.maxValue(null != data.getMaxValue() ? data.getMaxValue().toString() : null)
.coefficient(null != data.getCoefficient() ? data.getCoefficient().toString() : null)
.descs(data.getDescs())
.type("1").build();
} }
public static DeviceModelData of(ModelEventVO data) { public static DeviceModelData of(ModelEventVO data) {
DeviceModelData deviceModelData = Func.copyProperties(data, DeviceModelData.class); return DeviceModelData.builder()
deviceModelData.setType("2"); .modelId(null != data.getModelId() ? data.getModelId().toString() : null)
return deviceModelData; .name(data.getName())
.signage(data.getSignage())
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null)
.level(null != data.getLevel() ? data.getLevel().toString() : null)
.duration(null != data.getDuration() ? data.getDuration().toString() : null)
.descs(data.getDescs())
.modelClassifyId(null != data.getModelClassifyId() ? data.getModelClassifyId().toString() : null)
.type("2").build();
} }
} }

2
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/mapper/KnowledgeFileFragmentMapper.xml

@ -15,5 +15,7 @@
FROM FROM
knowledge_file_segment AS `segment` knowledge_file_segment AS `segment`
LEFT JOIN knowledge_file_info `info` ON `segment`.DOC_ID = `info`.ID LEFT JOIN knowledge_file_info `info` ON `segment`.DOC_ID = `info`.ID
WHERE
`segment`.IS_DELETED = 0
</select> </select>
</mapper> </mapper>

110
hzims-service/gglm-big-model/src/main/resources/db/2.0.2.sql

@ -1,10 +1,11 @@
CREATE TABLE `HZIMS_VECTOR_PARAM` ( CREATE TABLE IF NOT EXISTS `gglm_vector_param` (
`ID` bigint(20) NOT NULL COMMENT '主键ID', `ID` bigint(20) NOT NULL COMMENT '主键ID',
`NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '名称', `NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '名称',
`URL` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'URL', `URL` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'URL',
`PROJECT_PREFIX` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目前缀', `PROJECT_PREFIX` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目前缀',
`TABLE_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库表名', `TABLE_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '数据库表名',
`ATTRIBUTE_MAP` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '向量键值对', `ATTRIBUTE_MAP` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '向量键值对',
`REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
`TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '租户ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态', `STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位', `CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位',
@ -13,5 +14,110 @@ CREATE TABLE `HZIMS_VECTOR_PARAM` (
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人', `UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', `UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除', `IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除',
`SYNCHRONIZATION_TIME` datetime(0) NULL DEFAULT NULL COMMENT '同步时间',
`SYNCHRONIZATION_REMARK` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '同步说明',
PRIMARY KEY (`ID`) USING BTREE PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '向量键值对信息' ROW_FORMAT = Dynamic; ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '向量库配置信息' ROW_FORMAT = Dynamic;
CREATE TABLE IF NOT EXISTS `gglm_vector_param_log` (
`ID` bigint(20) NOT NULL COMMENT '主键ID',
`VECTOR_PARAM_ID` bigint(20) NOT NULL COMMENT '参数id',
`CONTENT` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '日志内容',
`TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '日志类型',
`TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '向量数据库操作日志' ROW_FORMAT = Dynamic;
CREATE TABLE IF NOT EXISTS `gglm_agent_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`chat_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '每轮对话的id',
`q_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题ID',
`model_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'hx自用',
`agent` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'hx自用',
`q` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '问题',
`prompt` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '问题提示',
`system` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`a` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '答案',
`a_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '答案类型,0直接回答、1参数提取、2意图分类',
`user_conclusion` tinyint(4) NULL DEFAULT NULL COMMENT '用户结论,0为错误,1为正确',
`label_status` tinyint(4) NULL DEFAULT 0 COMMENT '标注状态,0为错误,1为正确',
`label_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '标注内容,json字符串',
`label_result` tinyint(4) NULL DEFAULT NULL COMMENT '标注结果,0为错误,1为正确',
`label_operator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标注人名称',
`label_time` datetime(0) NULL DEFAULT NULL COMMENT '标注时间',
`TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1833310958482192892 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE IF NOT EXISTS `knowledge_file_info` (
`ID` bigint(20) NOT NULL COMMENT '主键ID',
`NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '名称',
`URL` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'URL',
`SIZE` bigint(18) NULL DEFAULT NULL COMMENT '文件大小',
`BRIEFS` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '简介',
`TAGS` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '标签',
`DOMAIN` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '业务领域',
`AUTHORITY_CLASS` tinyint(4) NULL DEFAULT NULL COMMENT '权限等级,5个等级',
`VISIBLE` tinyint(4) NULL DEFAULT 1 COMMENT '是否可见,0为不可见,1为可见',
`FILE_STATUS` tinyint(4) NULL DEFAULT 0 COMMENT '文件状态,0为未入库,1为已入库,2为入库中',
`REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
`CREATE_USER_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建人名称',
`TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '知识库文件信息表' ROW_FORMAT = Dynamic;
CREATE TABLE IF NOT EXISTS `knowledge_file_segment` (
`ID` bigint(20) NOT NULL COMMENT '主键ID',
`TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除',
`DOC_QS` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL,
`DOC_CONTENT` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL,
`DOC_PAGE_INDEX` int(11) NULL DEFAULT NULL,
`DOC_ID` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '知识库文件分段表' ROW_FORMAT = Dynamic;
CREATE TABLE IF NOT EXISTS `question_answer_comment` (
`ID` bigint(20) NOT NULL COMMENT '主键ID',
`CHAT_ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '对话id',
`QUESTION_ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '问题id',
`USER_ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户id',
`PRAISE` tinyint(4) NULL DEFAULT 0 COMMENT '点赞',
`CONTENT` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL,
`TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '租户ID',
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态',
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建单位',
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
`CREATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
`UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '问题评价' ROW_FORMAT = Dynamic;

1
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/DutyNoticeScheduledTask.java

@ -109,7 +109,6 @@ public class DutyNoticeScheduledTask {
List<String> userList = userListByRoleAlias.stream().map(s -> s.getId().toString()).collect(Collectors.toList()); List<String> userList = userListByRoleAlias.stream().map(s -> s.getId().toString()).collect(Collectors.toList());
String userIds = String.join(",", userList); String userIds = String.join(",", userList);
if (StringUtils.isBlank(userIds)) { if (StringUtils.isBlank(userIds)) {
log.error("推送的消息不能为空哦,{}", userIds);
throw new ServiceException("推送的消息不能为空"); throw new ServiceException("推送的消息不能为空");
} }
message.setCreateUser(Long.valueOf(userList.get(0))); message.setCreateUser(Long.valueOf(userList.get(0)));

14
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/GenerationScheduledTask.java

@ -63,10 +63,9 @@ public class GenerationScheduledTask {
* @param param * @param param
* @return * @return
*/ */
//@XxlJob(THIS_DAY_POWER_GENERATION) @XxlJob(THIS_DAY_POWER_GENERATION)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayPowerGeneration() { public ReturnT<String> thisDayPowerGeneration(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -79,10 +78,9 @@ public class GenerationScheduledTask {
* @param param * @param param
* @return * @return
*/ */
//@XxlJob(LOAD_THREE_YEAR_POWER_GENERATION) @XxlJob(LOAD_THREE_YEAR_POWER_GENERATION)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadThreeYearPowerGeneration() { public ReturnT<String> loadThreeYearPowerGeneration(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

28
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java

@ -29,10 +29,9 @@ public class MonitorScheduledTask {
/** /**
* realId刷新 * realId刷新
*/ */
//@XxlJob(REAL_ID_DATA) @XxlJob(REAL_ID_DATA)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealId() { public ReturnT<String> loadRealId(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -44,10 +43,9 @@ public class MonitorScheduledTask {
* 实时数据刷新 * 实时数据刷新
* @return ReturnT<String> * @return ReturnT<String>
*/ */
//@XxlJob(REAL_TIME_DATA) @XxlJob(REAL_TIME_DATA)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadRealData() { public ReturnT<String> loadRealData(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -59,10 +57,9 @@ public class MonitorScheduledTask {
* 站点在线状态同步 * 站点在线状态同步
* @return ReturnT<String> * @return ReturnT<String>
*/ */
//@XxlJob(REAL_TIME_DATA) @XxlJob(LOAD_STATION_ON_LINE)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadStationOnLine() { public ReturnT<String> loadStationOnLine(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -75,10 +72,9 @@ public class MonitorScheduledTask {
* 集中监控数据处理 * 集中监控数据处理
* @return ReturnT<String> * @return ReturnT<String>
*/ */
//@XxlJob(CENTRALIZED_MONITORING) @XxlJob(CENTRALIZED_MONITORING)
@Scheduled(cron = "0/4 * * * * ? ") //@Scheduled(cron = "0/4 * * * * ? ")
public ReturnT<String> loadMonitoring() { public ReturnT<String> loadMonitoring(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

28
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java

@ -33,10 +33,9 @@ public class RealTargetScheduledTask {
* @return * @return
* @throws Exception * @throws Exception
*/ */
//@XxlJob(LOAD_EM_INFO) @XxlJob(LOAD_EM_INFO)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> loadEmInfo() { public ReturnT<String> loadEmInfo(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -47,10 +46,9 @@ public class RealTargetScheduledTask {
/** /**
* 水电站-机组实时加载 * 水电站-机组实时加载
*/ */
//@XxlJob(LOAD_HYDROPOWER_UNIT_REAL) @XxlJob(LOAD_HYDROPOWER_UNIT_REAL)
@Scheduled(cron = "0/5 * * * * ? ") //@Scheduled(cron = "0/5 * * * * ? ")
public ReturnT<String> loadHydropowerReal() { public ReturnT<String> loadHydropowerReal(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -61,10 +59,9 @@ public class RealTargetScheduledTask {
/** /**
* 水电站-机组指标加载 * 水电站-机组指标加载
*/ */
//@XxlJob(LOAD_HYDROPOWER_UNIT_TARGET) @XxlJob(LOAD_HYDROPOWER_UNIT_TARGET)
@Scheduled(cron = "0 0/3 * * * ? ") //@Scheduled(cron = "0 0/3 * * * ? ")
public ReturnT<String> loadHydropowerTarget() { public ReturnT<String> loadHydropowerTarget(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -113,10 +110,9 @@ public class RealTargetScheduledTask {
/** /**
* 水利-站点水位数据 * 水利-站点水位数据
*/ */
//@XxlJob(LOAD_WATER_LEVEL) @XxlJob(LOAD_WATER_LEVEL)
@Scheduled(cron = "0 0/5 * * * ? ") //@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadWaterLevel() { public ReturnT<String> loadWaterLevel(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

7
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ShowScheduledTask.java

@ -42,10 +42,9 @@ public class ShowScheduledTask {
/** /**
* 首页-区域班组数据 * 首页-区域班组数据
*/ */
// @XxlJob(REGIONAL_DUTY_INFO) @XxlJob(REGIONAL_DUTY_INFO)
@Scheduled(cron = "0 0/5 * * * ? ") //@Scheduled(cron = "0 0/5 * * * ? ")
public ReturnT<String> loadRegionalDuty() { public ReturnT<String> loadRegionalDuty(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); param = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss");
} }

14
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/StartStopScheduledTask.java

@ -30,10 +30,9 @@ public class StartStopScheduledTask {
/** /**
* 单日开停机记录 * 单日开停机记录
*/ */
//@XxlJob(THIS_DAY_START_STOP_RECORD) @XxlJob(THIS_DAY_START_STOP_RECORD)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> thisDayStartStopRecord() { public ReturnT<String> thisDayStartStopRecord(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }
@ -44,10 +43,9 @@ public class StartStopScheduledTask {
/** /**
* 设备开停机时间记录 * 设备开停机时间记录
*/ */
//@XxlJob(START_STOP_TIME_RECORD) @XxlJob(START_STOP_TIME_RECORD)
@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> startStopTimeRecord() { public ReturnT<String> startStopTimeRecord(String param) {
String param = "";
if (Func.isBlank(param)) { if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM"); param = DateUtil.format(new Date(), "yyyy-MM");
} }

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java

@ -128,7 +128,6 @@ public class AlarmServiceImpl implements AlarmService {
} }
} }
}); });
log.error("start_stop_alarm : {}",refresh);
redisTemplate.opsForValue().set(start_stop_cache_final,refresh); redisTemplate.opsForValue().set(start_stop_cache_final,refresh);
} }
@ -279,7 +278,6 @@ public class AlarmServiceImpl implements AlarmService {
alarm.setRealId(entity.getRealId()); alarm.setRealId(entity.getRealId());
alarm.setContext(entity.getSoeExplain()); alarm.setContext(entity.getSoeExplain());
alarm.setState(entity.getStatus()); alarm.setState(entity.getStatus());
log.error("send_interruption_msg : {}",JsonUtil.toJson(alarm));
mqttSender.sendToMqtt(InterruptionConstants.HZ3000_TOPIC_PREFIX + entity.getStationId(), JsonUtil.toJson(alarm)); mqttSender.sendToMqtt(InterruptionConstants.HZ3000_TOPIC_PREFIX + entity.getStationId(), JsonUtil.toJson(alarm));
}); });
} }

6
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ObtainGenerationServiceImpl.java

@ -206,10 +206,8 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService {
}); });
}); });
countDownLatch.countDown(); countDownLatch.countDown();
log.error("save_generation_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList()));
}catch (Exception e){ }catch (Exception e){
countDownLatch.countDown(); countDownLatch.countDown();
log.error("save_generation_execute_complete_error : {}" ,e.getMessage());
} }
}); });
} }
@ -356,10 +354,8 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService {
}); });
}); });
countDownLatch.countDown(); countDownLatch.countDown();
log.error("save_generation_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList()));
}catch (Exception e){ }catch (Exception e){
countDownLatch.countDown(); countDownLatch.countDown();
log.error("save_generation_execute_complete_error : {}" ,e.getMessage());
} }
}); });
} }
@ -450,10 +446,8 @@ public class ObtainGenerationServiceImpl implements ObtainGenerationService {
threeGenerateService.saveBatch(this.saveFillGenerate(station,start,end)); threeGenerateService.saveBatch(this.saveFillGenerate(station,start,end));
}); });
countDownLatch.countDown(); countDownLatch.countDown();
log.error("save_generation_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList()));
}catch (Exception e){ }catch (Exception e){
countDownLatch.countDown(); countDownLatch.countDown();
log.error("save_generation_execute_complete_error : {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList()));
} }
}); });
} }

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

@ -34,12 +34,10 @@ import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO;
import com.hnac.hzinfo.datasearch.history.IHistoryDataSearchClient; import com.hnac.hzinfo.datasearch.history.IHistoryDataSearchClient;
import com.hnac.hzinfo.datasearch.history.OriginalDataQuery; import com.hnac.hzinfo.datasearch.history.OriginalDataQuery;
import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO;
import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO;
import com.hnac.hzinfo.sdk.core.response.HzPage; import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.core.response.Result;
import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient; import com.hnac.hzinfo.sdk.v5.device.DeviceDataClient;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
@ -698,21 +696,17 @@ public class RealTargetServiceImpl implements RealTargetService {
list.add(waterLevelVo); list.add(waterLevelVo);
} }
countDownLatch.countDown(); countDownLatch.countDown();
XxlJobLogger.log("load_water_level : 子线程执行完成 {}", item.getInstanceCode());
} catch (Exception exception) { } catch (Exception exception) {
countDownLatch.countDown(); countDownLatch.countDown();
XxlJobLogger.log("load_water_level_error : 子线程执行失败 {}", exception.getMessage());
} }
}); });
} }
try { try {
XxlJobLogger.log("load_water_level :等待线程执行");
countDownLatch.await(); countDownLatch.await();
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }
XxlJobLogger.log("load_water_level :线程执行结束");
redisTemplate.opsForValue().set(loadwater_level_key,list); redisTemplate.opsForValue().set(loadwater_level_key,list);
} }
@ -1444,7 +1438,6 @@ public class RealTargetServiceImpl implements RealTargetService {
powerMap.put(station.getCode(),generateMap); powerMap.put(station.getCode(),generateMap);
}); });
countDownLatch.countDown(); countDownLatch.countDown();
log.error("pool_item_execute_complete: {}" ,item.stream().map(StationEntity::getName).collect(Collectors.toList()));
}catch (Exception e){ }catch (Exception e){
countDownLatch.countDown(); countDownLatch.countDown();
} }
@ -1461,43 +1454,6 @@ public class RealTargetServiceImpl implements RealTargetService {
} }
private Map<String, Float> lastReduceFirst(StationEntity station, List<EminfoAndEmParamVo> devices, String start, String end) {
List<PowerMonthVo> datas = new ArrayList<>();
// 设备采集发电量
if(CollectionUtil.isNotEmpty(devices)){
devices.forEach(device->{
List<Map<String, String>> records = dataService.lastFirstBySignage(start,end,7,5,device.getEmCode(),HomePageConstant.HYDROPOWER_GENERATE_POWER);
if(CollectionUtil.isEmpty(records)){
return;
}
datas.addAll(records.stream().map(record -> {
PowerMonthVo generate = new PowerMonthVo();
Date time;
if(record.get("ts").contains(".0")){
time = DateUtil.parse(record.get("ts"), "yyyy-MM-dd HH:mm:ss.s");
}else{
time = DateUtil.parse(record.get("ts") + ".0", "yyyy-MM-dd HH:mm:ss.s");
}
generate.setStrMonth(DateUtil.format(time,DateUtil.PATTERN_DATE));
String val = record.get(HomePageConstant.HYDROPOWER_GENERATE_POWER);
if(StringUtil.isEmpty(val)){
generate.setPower(0f);
}else{
generate.setPower(Float.parseFloat(String.valueOf(Double.parseDouble(val) * device.getRideCount())));
}
return generate;
}).collect(Collectors.toList()));
});
}
// 补充填报数据
datas.addAll(this.generateFill(station,start,end));
if(CollectionUtil.isEmpty(datas)){
return null;
}
return datas.stream().collect(Collectors.toMap(PowerMonthVo::getStrMonth, PowerMonthVo::getPower, Float::sum));
}
/** /**
* 近年发电量数据 * 近年发电量数据
* *

1
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java

@ -627,7 +627,6 @@ public class ShowServiceImpl implements ShowService {
target.setTaget_three(0.0); target.setTaget_three(0.0);
target.setTaget_four(0.0); target.setTaget_four(0.0);
target.setCharge(0); target.setCharge(0);
log.error("charge_target_exception: {} ", e.getMessage());
} }
return target; return target;
} }

1
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java

@ -211,7 +211,6 @@ public class MonitorServiceImpl implements MonitorService {
if(CollectionUtil.isEmpty(realIds)){ if(CollectionUtil.isEmpty(realIds)){
return; return;
} }
log.error("real_time_data: {},{}",stationReal.getStation(),realIds);
List<String> objects = redisClient.getBatchRealDataByRealId(stationReal.getStation(),realIds); List<String> objects = redisClient.getBatchRealDataByRealId(stationReal.getStation(),realIds);
for(int i = 0; i < realIds.size() ;i++){ for(int i = 0; i < realIds.size() ;i++){
if(ObjectUtil.isNotEmpty(objects.get(i))){ if(ObjectUtil.isNotEmpty(objects.get(i))){

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java

@ -109,12 +109,10 @@ public class DataServiceImpl implements DataService {
analyzeDataConditionPO.setEndTime(LocalDateTime.parse(DateUtil.format(new Date(), endTime), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME))); analyzeDataConditionPO.setEndTime(LocalDateTime.parse(DateUtil.format(new Date(), endTime), DateTimeFormatter.ofPattern(DateUtil.PATTERN_DATETIME)));
signboardConditions.add(analyzeDataConditionPO); signboardConditions.add(analyzeDataConditionPO);
po.setSignboardConditions(signboardConditions); po.setSignboardConditions(signboardConditions);
log.error("period_target_data_request {}",po);
R<List<AnalyzeDataConditionVO>> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po); R<List<AnalyzeDataConditionVO>> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po);
if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) {
return new ArrayList<>(); return new ArrayList<>();
} }
log.error("period_target_data_resp {}",result);
return result.getData().get(0).getList(); return result.getData().get(0).getList();
} }
@ -147,12 +145,10 @@ public class DataServiceImpl implements DataService {
signboardConditions.add(analyzeDataConditionPO); signboardConditions.add(analyzeDataConditionPO);
}); });
po.setSignboardConditions(signboardConditions); po.setSignboardConditions(signboardConditions);
log.error("period_targets_data_request {}",po);
R<List<AnalyzeDataConditionVO>> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po); R<List<AnalyzeDataConditionVO>> result = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po);
if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) {
return new ArrayList<>(); return new ArrayList<>();
} }
log.error("period_targets_data_resp {}",result);
return result.getData(); return result.getData();
} }

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java

@ -168,6 +168,10 @@ public class HydroelectricServiceImpl implements HydroelectricService {
device.setStartupDurationYear(-1.0); device.setStartupDurationYear(-1.0);
device.setShutDownDurationYear(-1.0); device.setShutDownDurationYear(-1.0);
} }
if(CollectionUtil.isEmpty(startStopTimes)){
device.setStartDownTime("-1");
device.setStartupDownDuration(-1.0);
}else{
// 开停机数据 // 开停机数据
Optional<StartStopTimeVO> startStop = startStopTimes.stream().filter(o->iter.getEmCode().equals(o.getDeviceCode())).findFirst(); Optional<StartStopTimeVO> startStop = startStopTimes.stream().filter(o->iter.getEmCode().equals(o.getDeviceCode())).findFirst();
if(startStop.isPresent()){ if(startStop.isPresent()){
@ -188,6 +192,7 @@ public class HydroelectricServiceImpl implements HydroelectricService {
device.setStartDownTime("-1"); device.setStartDownTime("-1");
device.setStartupDownDuration(-1.0); device.setStartupDownDuration(-1.0);
} }
}
return device; return device;
}).collect(Collectors.toList())); }).collect(Collectors.toList()));
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java

@ -225,7 +225,6 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
if(CollectionUtil.isEmpty(realStationVoList)){ if(CollectionUtil.isEmpty(realStationVoList)){
return null; return null;
} }
log.info("步骤1获取所有监控缓存数据 耗时 : {}",System.currentTimeMillis() - beginTime);
beginTime = System.currentTimeMillis(); beginTime = System.currentTimeMillis();
// 集中监控响应站点数据 // 集中监控响应站点数据
List<RealStationVo> validList = realStationVoList.stream().filter(o -> message.getDeptIds().contains(o.getStationDeptId())).collect(Collectors.toList()); List<RealStationVo> validList = realStationVoList.stream().filter(o -> message.getDeptIds().contains(o.getStationDeptId())).collect(Collectors.toList());
@ -240,11 +239,9 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
Map<String, HeWeatherWeatherNowResponse> nowWeather = this.weatherService.getNowWeather(codes); Map<String, HeWeatherWeatherNowResponse> nowWeather = this.weatherService.getNowWeather(codes);
// 七日内天气 // 七日内天气
Map<String, HeWeatherWeatherDailyResponse> weekWeather = this.weatherService.getWeekWeather(codes); Map<String, HeWeatherWeatherDailyResponse> weekWeather = this.weatherService.getWeekWeather(codes);
log.info("步骤2获取天气 耗时 : {}",System.currentTimeMillis() - beginTime);
beginTime = System.currentTimeMillis(); beginTime = System.currentTimeMillis();
// 站点水位数据 // 站点水位数据
List<WaterLevelVo> levelList = (List<WaterLevelVo>) redisTemplate.opsForValue().get(loadwater_level_key); List<WaterLevelVo> levelList = (List<WaterLevelVo>) redisTemplate.opsForValue().get(loadwater_level_key);
log.info("步骤3获取水位数据 耗时 : {}",System.currentTimeMillis() - beginTime);
beginTime = System.currentTimeMillis(); beginTime = System.currentTimeMillis();
// 遍历站点 // 遍历站点
validList.forEach(item->{ validList.forEach(item->{
@ -253,7 +250,6 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
// 前池水位 // 前池水位
this.waterLevel(levelList,item); this.waterLevel(levelList,item);
}); });
log.info("步骤4站点数据处理 耗时 : {}",System.currentTimeMillis() - beginTime);
return new TextMessage(JSONObject.toJSONString(validList.stream().peek(o->{ return new TextMessage(JSONObject.toJSONString(validList.stream().peek(o->{
if(ObjectUtil.isEmpty(o.getSort())){ if(ObjectUtil.isEmpty(o.getSort())){
o.setSort(999); o.setSort(999);

3
hzims-service/operational/src/main/resources/db/3.0.5.sql

@ -0,0 +1,3 @@
-- 月报告添加结论修改和评价
ALTER TABLE `hzims_run_month_report` ADD COLUMN `CONCLUSION` text NULL COMMENT '重新判定的结论';
ALTER TABLE `hzims_run_month_report` ADD COLUMN `EVALUATION` text NULL COMMENT '评价';
Loading…
Cancel
Save