diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java
index a938a80..ebb82d2 100644
--- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java
+++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmEntity.java
@@ -1,11 +1,14 @@
package com.hnac.hzims.alarm.config.entity;
import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
+import org.springblade.core.tool.utils.DateUtil;
+import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@@ -68,6 +71,8 @@ public class AlarmEntity extends TenantEntity {
private Integer alarmCount;
@ApiModelProperty(value = "告警时间")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.sss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.sss")
private Date alarmTime;
@ApiModelProperty(value = "监测点")
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/constants/FeedbackConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/constants/FeedbackConstant.java
new file mode 100644
index 0000000..92b3c58
--- /dev/null
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/constants/FeedbackConstant.java
@@ -0,0 +1,15 @@
+package com.hnac.hzims.operational.feedback.constants;
+
+/**
+ * 应急抢修常量
+ * @Author: ysj
+ */
+public interface FeedbackConstant {
+
+
+ /**
+ * 问题回复角色别名
+ */
+ String REPLY_ROLE_ALIAS = "feedback_reply";
+
+}
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/entity/UserFeedbackEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/entity/UserFeedbackEntity.java
similarity index 52%
rename from hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/entity/UserFeedbackEntity.java
rename to hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/entity/UserFeedbackEntity.java
index 4e4e4e3..18c022c 100644
--- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/entity/UserFeedbackEntity.java
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/entity/UserFeedbackEntity.java
@@ -1,38 +1,56 @@
-package com.hnac.hzims.operational.main.entity;
+package com.hnac.hzims.operational.feedback.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
-import java.io.Serializable;
+import java.util.Date;
+
/**
- * Created by Sam Huang 2022/5/24 11:03
+ * @author ysj
*/
+@EqualsAndHashCode(callSuper = true)
@Data
@TableName("hzims_user_feedback")
-@ApiModel(value = "UserFeedbackEntity对象", description = "用户反馈表")
-public class UserFeedbackEntity extends TenantEntity implements Serializable {
- private static final long serialVersionUID = 1L;
+@ApiModel(value = "用户反馈信息", description = "用户反馈记录表")
+public class UserFeedbackEntity extends TenantEntity {
- @ApiModelProperty(value = "联系电话")
- private String phone;
+ private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "反馈内容")
private String content;
+ @ApiModelProperty(value = "联系电话")
+ private String phone;
+
@ApiModelProperty(value = "附件名称")
private String fileName;
@ApiModelProperty(value = "附件地址")
private String fileUrl;
+ @ApiModelProperty(value = "反馈人")
+ private Long feedbackUser;
+
+ @ApiModelProperty(value = "反馈人姓名")
+ private String feedbackUserName;
+
+ @ApiModelProperty(value = "反馈类型")
+ private String feedbackType;
+
@ApiModelProperty(value = "回复内容")
private String replyContent;
@ApiModelProperty(value = "回复人")
private Long replyUser;
+ @ApiModelProperty(value = "回复时间")
+ private Date replyTime;
+
+ @ApiModelProperty(value = "回复人姓名")
+ private String replyUserName;
}
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/vo/FeedbackQueryVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/vo/FeedbackQueryVo.java
new file mode 100644
index 0000000..a005165
--- /dev/null
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feedback/vo/FeedbackQueryVo.java
@@ -0,0 +1,29 @@
+package com.hnac.hzims.operational.feedback.vo;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author ysj
+ */
+@Data
+@ApiModel(value = "用户反馈查询对象")
+public class FeedbackQueryVo {
+
+ @ApiModelProperty(value = "反馈开始时间")
+ private String startTime;
+
+ @ApiModelProperty(value = "反馈结束时间")
+ private String endTime;
+
+ @ApiModelProperty(value = "反馈信息")
+ private String content;
+
+ @ApiModelProperty(value = "反馈类型")
+ private String feedbackType;
+
+ @ApiModelProperty(value = "问题状态: 1-未回复 2-已回复")
+ private Integer status;
+}
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java
index ce42a8f..4337c56 100644
--- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/HomePageConstant.java
@@ -88,6 +88,8 @@ public interface HomePageConstant {
*/
Integer HYDROPOWER_SERVETYPE = 2;
+ String HYDROPOWER_SERVETYPE_STRING = "2";
+
/**
* 站点接入方式 : 数据采集
*/
diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
index a080158..f37ce48 100644
--- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
+++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
@@ -50,7 +50,10 @@ public interface MainConstants {
String LOAD_HYDROPOWER_UNIT_TARGET = "loadHydropowerUnitTarget";
// 近年发电量
+ String LOAD_POWER_DATA_NEW = "loadPowerDataNew";
+
String ELECTRICITY_GENERATION_RECENT_YEAR = "electricityGenerationRecentYear";
+
// 風電儲能近年发电量
String WIND_POWER_GENERATION_RECENT_YEAR = "windPowerGenerationRecentYear";
diff --git a/hzims-service/hzims-alarm/pom.xml b/hzims-service/hzims-alarm/pom.xml
index 6525fd7..6483c24 100644
--- a/hzims-service/hzims-alarm/pom.xml
+++ b/hzims-service/hzims-alarm/pom.xml
@@ -118,12 +118,6 @@
com.hnac.hzims
- alarm-api
- 4.0.0-SNAPSHOT
- compile
-
-
- com.hnac.hzims
equipment-api
@@ -142,6 +136,11 @@
org.eclipse.paho
org.eclipse.paho.client.mqttv3
+
+ com.hnac.hzims
+ alarm-api
+ 4.0.0-SNAPSHOT
+
diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java
index 7cc733b..ac42e2c 100644
--- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java
+++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java
@@ -1,18 +1,15 @@
package com.hnac.hzims.alarm.monitor.service.impl;
import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.alarm.config.constants.AlarmConstants;
-import com.hnac.hzims.alarm.config.service.AlarmConfigService;
import com.hnac.hzims.alarm.config.entity.AlarmEntity;
+import com.hnac.hzims.alarm.config.service.AlarmConfigService;
+import com.hnac.hzims.alarm.config.vo.AlarmHandleMarkVo;
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.config.vo.AlarmHandleMarkVo;
-import com.hnac.hzims.message.entity.MessagePushRecordEntity;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.feign.IStationClient;
-import com.hnac.hzims.safeproduct.constants.RedisConstants;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
@@ -69,7 +66,7 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
// 未匹配到站点
Optional optional = stations.getData().stream().filter(o->o.getCode().equals(alarm.getStationId())).findFirst();
if(!optional.isPresent()){
- return;
+ return;
}
// 告警已处理
if(CollectionUtil.isNotEmpty(handlers) && handlers.contains(alarm.getAlarmContext())){
@@ -88,22 +85,22 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
}
}
}
- // fpd告警拼接站点名称
+ // fpd告警拼接
if(AlarmConstants.EARLY_WARNING.equals(alarm.getAlarmSource())){
alarm.setAlarmContext(optional.get().getName() + "." + alarm.getAlarmContext());
}
- // 站点参数设置
+ // 步骤3.站点参数设置
alarm.setCreateDept(optional.get().getCreateDept());
alarm.setStationName(optional.get().getName());
alarm.setTenantId(optional.get().getTenantId());
alarm.setStatus(0);
- // 根据站点查询配置标识
+ // 步骤4.根据站点查询配置标识
AlarmHandleMarkVo mark = alarmConfigService.mark(alarm.getStationId(),alarm.getAlarmSource(),alarm.getAlarmType());
if(ObjectUtil.isEmpty(mark)){
log.error("alarm_obtain_mark_is_null : {}",alarm.getAlarmId());
return;
}
- // 告警处理标识赋值
+ // 步骤5.告警处理标识赋值
alarm.setIsRightTabulation(mark.getIsRightTabulation());
alarm.setIsBroadcast(mark.getIsBroadcast());
alarm.setIsMask(mark.getIsMask());
@@ -112,7 +109,7 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
alarm.setIsSmallBell(mark.getIsSmallBell());
alarm.setIsShortMessage(mark.getIsShortMessage());
alarm.setIsWxMessage(mark.getIsWxMessage());
- // 保存告警
+ // 步骤6.保存当日告警数据
boolean isSave = alarmService.save(alarm);
if(!isSave){
log.error("alarm_save_fail : {}",alarm.getAlarmId());
@@ -121,7 +118,7 @@ public class AlarmSaveServiceImpl implements AlarmSaveService {
String key="hzims:queue:filter:alarm"+alarm.getAlarmId();
stringRedisTemplate.opsForValue().set(key,optional.get().getName()+alarm.getAlarmContext());
stringRedisTemplate.expire(key,5, TimeUnit.MINUTES);
- // 发送告警数据进行消息推送队列
+ // 步骤7.发生数据至redis告警队列
stringRedisTemplate.opsForList().rightPush("hzims:queue:alarm", JSON.toJSONString(alarm));
});
return true;
diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/mqtt/DroolsMqttConsumer.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/mqtt/DroolsMqttConsumer.java
index 25bea94..87acece 100644
--- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/mqtt/DroolsMqttConsumer.java
+++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/mqtt/DroolsMqttConsumer.java
@@ -4,11 +4,14 @@ import com.alibaba.fastjson.JSONObject;
import com.hnac.hzims.alarm.config.entity.AlarmEntity;
import com.hnac.hzims.alarm.source.service.DroolsAlarmService;
import com.hnac.hzims.alarm.monitor.service.AlarmSaveService;
+import com.hnac.hzims.common.utils.DateUtil;
import com.hnac.hzinfo.subscribe.SubscribeCallBack;
import lombok.extern.slf4j.Slf4j;
+import oracle.sql.DATE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.Date;
import java.util.List;
import java.util.Map;
diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml
index 0a0ff34..029edcc 100644
--- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml
+++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml
@@ -4,7 +4,7 @@
+