Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 9 months ago
parent
commit
1260862181
  1. 2
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmHandleFlowEntity.java
  2. 3
      hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/show/vo/HandleQueryVo.java
  3. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/AlarmHandleController.java
  4. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.java
  5. 16
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml
  6. 2
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/AlarmHandleService.java
  7. 183
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleFlowServiceImpl.java
  8. 16
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleServiceImpl.java
  9. 1
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/FdpAlarmServiceImpl.java
  10. 76
      hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql
  11. 3
      hzims-service/inspect/src/main/resources/db/2.0.0.sql.1

2
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/entity/AlarmHandleFlowEntity.java

@ -39,7 +39,7 @@ public class AlarmHandleFlowEntity extends BaseEntity {
@ApiModelProperty("告警内容") @ApiModelProperty("告警内容")
private String alarmContent; private String alarmContent;
@ApiModelProperty("告警状态 1L,2L,3L,4L,5L 误报 、延后、缺陷 、检修、处理 ") @ApiModelProperty("告警状态 1L,2L,3L,4L,5L,6L 误报 、延后、缺陷 、检修、处理、处理完成 ")
private Long handleWay; private Long handleWay;
// @ApiModelProperty("处理详情ID") // @ApiModelProperty("处理详情ID")

3
hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/show/vo/HandleQueryVo.java

@ -1,4 +1,4 @@
package com.hnac.hzims.operational.alert.vo; package com.hnac.hzims.alarm.show.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -28,3 +28,4 @@ public class HandleQueryVo {
@ApiModelProperty("处理类型:1-延后 2-误报 3-缺陷 4-检修") @ApiModelProperty("处理类型:1-延后 2-误报 3-缺陷 4-检修")
private Long handleWay; private Long handleWay;
} }

3
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/controller/AlarmHandleController.java

@ -6,6 +6,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.alarm.config.entity.AlarmHandleFlowEntity; import com.hnac.hzims.alarm.config.entity.AlarmHandleFlowEntity;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo; import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.alarm.show.service.AlarmHandleService; import com.hnac.hzims.alarm.show.service.AlarmHandleService;
import com.hnac.hzims.alarm.show.vo.HandleQueryVo;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzims.common.logs.enums.OperatorType;
@ -55,7 +56,7 @@ public class AlarmHandleController extends BladeController {
@OperationAnnotation(moduleName = "分页查询告警处理记录", title = "查询告警处理记录", operatorType = OperatorType.MOBILE, businessType = @OperationAnnotation(moduleName = "分页查询告警处理记录", title = "查询告警处理记录", operatorType = OperatorType.MOBILE, businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页") action = "分页")
public R<IPage<AlarmHandleVo>> list(com.hnac.hzims.operational.alert.vo.HandleQueryVo param, Query query) { public R<IPage<AlarmHandleVo>> list(HandleQueryVo param, Query query) {
IPage<AlarmHandleVo> pages = service.pageCondition(query, param); IPage<AlarmHandleVo> pages = service.pageCondition(query, param);
return R.data(pages); return R.data(pages);
} }

2
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.java

@ -3,7 +3,7 @@ package com.hnac.hzims.alarm.show.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity; import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo; import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.operational.alert.vo.HandleQueryVo; import com.hnac.hzims.alarm.show.vo.HandleQueryVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springblade.core.datascope.annotation.UserDataAuth; import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;

16
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/mapper/AlarmHandleMapper.xml

@ -4,17 +4,15 @@
<select id="selectHandlePage" resultType="com.hnac.hzims.alarm.config.vo.AlarmHandleVo"> <select id="selectHandlePage" resultType="com.hnac.hzims.alarm.config.vo.AlarmHandleVo">
SELECT H.*,HANDLE_USER,D.PHENOMENON_ID,D.ACCESS_ID,D.DELAY_TIME,D.DELAY_CAUSE, SELECT H.*,HANDLE_USER,H.PHENOMENON_ID,H.ACCESS_ID,H.DELAY_TIME,H.DELAY_CAUSE,
D.FALSE_ALARM_DESC,D.FILE_PATH,S.NAME AS STATION_NAME,P.CHECK_PROCESS_INSTANCE_ID,A.PROCESS_INSTANCE_ID H.FALSE_ALARM_DESC,H.FILE_PATH,S.NAME AS STATION_NAME,P.CHECK_PROCESS_INSTANCE_ID,A.PROCESS_INSTANCE_ID
FROM HZIMS_ALARM_HANDLE H FROM HZIMS_ALARM_HANDLE H
LEFT JOIN HZIMS_ALARM_HANDLE_DETAIL D LEFT JOIN HZIMS_OPERATION.HZIMS_STATION S
ON H.DETAIL_ID = D.ID
LEFT JOIN DEV_HZIMS_OPERATION.HZIMS_STATION S
ON H.STATION_CODE = S.CODE ON H.STATION_CODE = S.CODE
LEFT JOIN DEV_HZIMS_OPERATION.HZIMS_OPER_PHENOMENON P LEFT JOIN HZIMS_OPERATION.HZIMS_OPER_PHENOMENON P
ON D.PHENOMENON_ID = P.ID ON H.PHENOMENON_ID = P.ID
LEFT JOIN DEV_HZIMS_OPERATION.HZIMS_OPER_ACCESS_PLAN A LEFT JOIN HZIMS_OPERATION.HZIMS_OPER_ACCESS_PLAN A
ON D.ACCESS_ID = A.ID ON H.ACCESS_ID = A.ID
<where> <where>
H.IS_DELETED = 0 H.IS_DELETED = 0
<if test="param.stationCode != null"> <if test="param.stationCode != null">

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

@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity; import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity;
import com.hnac.hzims.alarm.config.entity.AlarmHandleFlowEntity; import com.hnac.hzims.alarm.config.entity.AlarmHandleFlowEntity;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo; import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.operational.alert.vo.HandleQueryVo; import com.hnac.hzims.alarm.show.vo.HandleQueryVo;
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;
import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.User;

183
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleFlowServiceImpl.java

@ -35,103 +35,106 @@ import java.util.*;
@Slf4j @Slf4j
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class AlarmHandleFlowServiceImpl extends BaseServiceImpl<AlarmHandleFlowMapper, AlarmHandleFlowEntity> implements AlarmHandleFlowService{ public class AlarmHandleFlowServiceImpl extends BaseServiceImpl<AlarmHandleFlowMapper, AlarmHandleFlowEntity> implements AlarmHandleFlowService {
private final IMessageClient messageClient; private final IMessageClient messageClient;
private final ISysClient sysClient; private final ISysClient sysClient;
private final IFlowClient processClient; private final IFlowClient processClient;
@Autowired @Autowired
private AlarmHandleMapper alarmHandleMapper; private AlarmHandleMapper alarmHandleMapper;
private final IFdpDiagnoseClient iFdpDiagnoseClient; private final IFdpDiagnoseClient iFdpDiagnoseClient;
@Override @Override
public R listenAndUpdate(ProcessWorkFlowResponse processWorkFlowResponse) { public R listenAndUpdate(ProcessWorkFlowResponse processWorkFlowResponse) {
long taskId; long taskId;
AlarmHandleFlowEntity alarmHandleFlowEntity; AlarmHandleFlowEntity alarmHandleFlowEntity;
log.info("消缺消息开始转换"+processWorkFlowResponse); log.info("消缺消息开始转换" + processWorkFlowResponse);
try { try {
Map<String, Object> variables = (Map<String, Object>) processWorkFlowResponse.getVariables(); Map<String, Object> variables = (Map<String, Object>) processWorkFlowResponse.getVariables();
//现象缺陷全表更新 //现象缺陷全表更新
alarmHandleFlowEntity= JSONObject.parseObject(JSONObject.toJSONString(variables), new TypeReference<AlarmHandleFlowEntity>(){}); alarmHandleFlowEntity = JSONObject.parseObject(JSONObject.toJSONString(variables), new TypeReference<AlarmHandleFlowEntity>() {
} catch (Exception e) { });
log.info("消息转换失败:"+e.getMessage()); } catch (Exception e) {
return R.fail("消息转换失败"); log.info("消息转换失败:" + e.getMessage());
} return R.fail("消息转换失败");
taskId=alarmHandleFlowEntity.getId(); }
//设置当前环节+当前环节处理人 taskId = alarmHandleFlowEntity.getId();
if (StringUtils.isNotEmpty(processWorkFlowResponse.getNextStepOperator())) { //设置当前环节+当前环节处理人
alarmHandleFlowEntity.setCurrentOperator(processWorkFlowResponse.getTaskName()); if (StringUtils.isNotEmpty(processWorkFlowResponse.getNextStepOperator())) {
alarmHandleFlowEntity.setCurrentLinkHandler(processWorkFlowResponse.getNextStepOperator()); alarmHandleFlowEntity.setCurrentOperator(processWorkFlowResponse.getTaskName());
}else { alarmHandleFlowEntity.setCurrentLinkHandler(processWorkFlowResponse.getNextStepOperator());
alarmHandleFlowEntity.setCurrentOperator("流程结束"); } else {
alarmHandleFlowEntity.setCurrentLinkHandler(""); alarmHandleFlowEntity.setCurrentOperator("流程结束");
// 预警 alarmHandleFlowEntity.setCurrentLinkHandler("");
if(AlarmHandleConstant.EARLY_WARNING.equals(alarmHandleFlowEntity.getAlarmType())){ if (1l == alarmHandleFlowEntity.getHandleWay()) {
Map<String, Object> map=new HashMap<>(); //如果是误诊,把处理结果复制到误报原因
map.put("uuid",alarmHandleFlowEntity.getAlarmId()); alarmHandleFlowEntity.setFalseAlarmDesc(alarmHandleFlowEntity.getDealDesc());
map.put("result",alarmHandleFlowEntity.getHandleWay()); alarmHandleMapper.update(null, Wrappers.<AlarmHandleEntity>lambdaUpdate()
if (1l==alarmHandleFlowEntity.getHandleWay()){ .set(AlarmHandleEntity::getHandleWay, alarmHandleFlowEntity.getHandleWay())
//处理发现误报,修改对应状态 .set(AlarmHandleEntity::getFalseAlarmDesc, alarmHandleFlowEntity.getDealDesc())
map.put("result_info",alarmHandleFlowEntity.getDealDesc()); .eq(AlarmHandleEntity::getAlarmId, alarmHandleFlowEntity.getAlarmId()));
alarmHandleMapper.update(null,Wrappers.<AlarmHandleEntity>lambdaUpdate() } else {
.set(AlarmHandleEntity::getHandleWay, alarmHandleFlowEntity.getHandleWay()) //流程结束把告警状态修改为结束
.set(AlarmHandleEntity::getFalseAlarmDesc, alarmHandleFlowEntity.getDealDesc()) alarmHandleFlowEntity.setHandleWay(6L);
.eq(AlarmHandleEntity::getAlarmId, alarmHandleFlowEntity.getAlarmId())); //设置处理完成
alarmHandleMapper.update(null, Wrappers.<AlarmHandleEntity>lambdaUpdate()
.set(AlarmHandleEntity::getHandleWay, 6l)
.set(AlarmHandleEntity::getFalseAlarmDesc, alarmHandleFlowEntity.getDealDesc())
.eq(AlarmHandleEntity::getAlarmId, alarmHandleFlowEntity.getAlarmId()));
}
// 预警,调用fdp
if (AlarmHandleConstant.EARLY_WARNING.equals(alarmHandleFlowEntity.getAlarmType())) {
Map<String, Object> map = new HashMap<>();
map.put("uuid", alarmHandleFlowEntity.getAlarmId());
map.put("result", alarmHandleFlowEntity.getHandleWay());
map.put("result_info", alarmHandleFlowEntity.getDealDesc());
//流程结束后才,调用fdp修改状态的接口
R r = iFdpDiagnoseClient.setFaultStatusInfo(map);
if (!r.isSuccess()) {
throw new ServiceException("修改告警状态异常,请稍后重试!");
}
}
}else { }
//设置处理完成 this.updateById(alarmHandleFlowEntity);
alarmHandleMapper.update(null,Wrappers.<AlarmHandleEntity>lambdaUpdate() //推送消息中心相关消息
.set(AlarmHandleEntity::getHandleWay, 6l) sendMessage(processWorkFlowResponse, alarmHandleFlowEntity, taskId);
.set(AlarmHandleEntity::getFalseAlarmDesc, alarmHandleFlowEntity.getDealDesc()) log.info("消缺消息转换结束" + processWorkFlowResponse);
.eq(AlarmHandleEntity::getAlarmId, alarmHandleFlowEntity.getAlarmId())); return R.success("消息保存成功");
map.put("result_info",alarmHandleFlowEntity.getDealDesc()); }
}
//流程结束后才,调用fdp修改状态的接口
R r = iFdpDiagnoseClient.setFaultStatusInfo(map);
if (!r.isSuccess()){
throw new ServiceException("修改告警状态异常,请稍后重试!");
}
}
}
this.updateById(alarmHandleFlowEntity);
//推送消息中心相关消息
sendMessage(processWorkFlowResponse, alarmHandleFlowEntity,taskId);
log.info("消缺消息转换结束"+processWorkFlowResponse);
return R.success("消息保存成功");
}
private void sendMessage(ProcessWorkFlowResponse processWorkFlowResponse, AlarmHandleFlowEntity alarmHandleFlowEntity,Long taskId) { private void sendMessage(ProcessWorkFlowResponse processWorkFlowResponse, AlarmHandleFlowEntity alarmHandleFlowEntity, Long taskId) {
//推送消息 //推送消息
if (processWorkFlowResponse.getTaskId() != null) { if (processWorkFlowResponse.getTaskId() != null) {
BusinessMessageDTO message = new BusinessMessageDTO(); BusinessMessageDTO message = new BusinessMessageDTO();
message.setBusinessClassify("system"); message.setBusinessClassify("system");
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey()); message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey());
message.setSubject(MessageConstants.BusinessClassifyEnum.WARNING.getDescription()); message.setSubject(MessageConstants.BusinessClassifyEnum.WARNING.getDescription());
message.setTaskId(Optional.ofNullable(taskId).orElse(System.currentTimeMillis())); message.setTaskId(Optional.ofNullable(taskId).orElse(System.currentTimeMillis()));
message.setTenantId("200000"); message.setTenantId("200000");
String countent = String countent =
"您的告警处理流程待审批!告警内容:".concat(Optional.ofNullable(alarmHandleFlowEntity.getAlarmContent()).orElse("")) "您的告警处理流程待审批!告警内容:".concat(Optional.ofNullable(alarmHandleFlowEntity.getAlarmContent()).orElse(""))
.concat(",审批环节:") .concat(",审批环节:")
.concat(processWorkFlowResponse.getTaskName()); .concat(processWorkFlowResponse.getTaskName());
message.setContent(countent); message.setContent(countent);
message.setDeptId(alarmHandleFlowEntity.getCreateDept()); message.setDeptId(alarmHandleFlowEntity.getCreateDept());
R<String> deptName = sysClient.getDeptName(alarmHandleFlowEntity.getCreateDept()); R<String> deptName = sysClient.getDeptName(alarmHandleFlowEntity.getCreateDept());
if (deptName.isSuccess()) { if (deptName.isSuccess()) {
message.setDeptName(deptName.getData()); message.setDeptName(deptName.getData());
} }
String userIds = processWorkFlowResponse.getUserId(); String userIds = processWorkFlowResponse.getUserId();
if (StringUtils.isBlank(userIds)) { if (StringUtils.isBlank(userIds)) {
log.error("推送的消息不能为空哦,{}", userIds); log.error("推送的消息不能为空哦,{}", userIds);
return; return;
} }
message.setUserIds(userIds); message.setUserIds(userIds);
message.setCreateUser(alarmHandleFlowEntity.getCreateUser()); message.setCreateUser(alarmHandleFlowEntity.getCreateUser());
messageClient.sendAppAndWsMsgByUsers(message); messageClient.sendAppAndWsMsgByUsers(message);
} }
} }
} }

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

@ -2,20 +2,18 @@ package com.hnac.hzims.alarm.show.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.alarm.config.constants.AlarmHandleConstant;
import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity; import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity;
import com.hnac.hzims.alarm.config.entity.AlarmHandleFlowEntity; import com.hnac.hzims.alarm.config.entity.AlarmHandleFlowEntity;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.alarm.show.mapper.AlarmHandleFlowMapper; import com.hnac.hzims.alarm.show.mapper.AlarmHandleFlowMapper;
import com.hnac.hzims.alarm.show.mapper.AlarmHandleMapper; import com.hnac.hzims.alarm.show.mapper.AlarmHandleMapper;
import com.hnac.hzims.alarm.show.service.AlarmHandleDetailService; import com.hnac.hzims.alarm.show.service.AlarmHandleDetailService;
import com.hnac.hzims.alarm.show.service.AlarmHandleService; import com.hnac.hzims.alarm.show.service.AlarmHandleService;
import com.hnac.hzims.alarm.show.vo.HandleQueryVo;
import com.hnac.hzims.alarm.show.wrapper.HandleWrapper; import com.hnac.hzims.alarm.show.wrapper.HandleWrapper;
import com.hnac.hzims.alarm.config.vo.AlarmHandleVo;
import com.hnac.hzims.common.logs.utils.StringUtils; import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.fdp.feign.IFdpDiagnoseClient; import com.hnac.hzims.fdp.feign.IFdpDiagnoseClient;
import com.hnac.hzims.fdp.feign.IFdpMonitorClient;
import com.hnac.hzims.fdp.vo.UpdateFaultStateVo;
import com.hnac.hzims.alarm.config.constants.AlarmHandleConstant;
import com.hnac.hzims.operational.alert.vo.HandleQueryVo;
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;
@ -24,7 +22,6 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.secure.utils.AuthUtil;
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.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.flow.core.entity.BladeFlow; import org.springblade.flow.core.entity.BladeFlow;
import org.springblade.flow.core.feign.IFlowClient; import org.springblade.flow.core.feign.IFlowClient;
@ -34,7 +31,6 @@ import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient; import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.xml.ws.WebServiceException;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -57,7 +53,7 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl<AlarmHandleMapper, A
private final IUserClient userClient; private final IUserClient userClient;
private final IFdpMonitorClient fdpMonitorClient; // private final IFdpMonitorClient fdpMonitorClient;
private final IFlowClient processClient; private final IFlowClient processClient;
@ -106,13 +102,13 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl<AlarmHandleMapper, A
// entity.setAccessId(param.getAccessId()); // entity.setAccessId(param.getAccessId());
// entity.setPhenomenonId(param.getPhenomenonId()); // entity.setPhenomenonId(param.getPhenomenonId());
entity.setHandleUser(param.getHandleUser()); entity.setHandleUser(param.getHandleUser());
entity.setHandleUser(param.getHandleUser());
entity.setDelayTime(param.getDelayTime()); entity.setDelayTime(param.getDelayTime());
entity.setDelayCause(param.getDelayCause()); entity.setDelayCause(param.getDelayCause());
entity.setFalseAlarmDesc(param.getFalseAlarmDesc()); entity.setFalseAlarmDesc(param.getFalseAlarmDesc());
entity.setFilePath(param.getFilePath()); entity.setFilePath(param.getFilePath());
if (StringUtils.isNotBlank(AuthUtil.getUserName())){ if (StringUtils.isNotBlank(AuthUtil.getUserName())){
entity.setCreateUserName(AuthUtil.getNickName()); entity.setCreateUserName(AuthUtil.getUserName());
param.setCreateUserName(AuthUtil.getUserName());
entity.setCreateDeptName(param.getCreateDeptName()); entity.setCreateDeptName(param.getCreateDeptName());
} }
this.save(entity); this.save(entity);

1
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/FdpAlarmServiceImpl.java

@ -91,6 +91,7 @@ public class FdpAlarmServiceImpl implements FdpAlarmService {
entity.setDeviceCode(item.getDeviceId()); entity.setDeviceCode(item.getDeviceId());
entity.setDeviceName(item.getDeviceName()); entity.setDeviceName(item.getDeviceName());
entity.setAlarmStatus(Integer.valueOf(item.getStatus())); entity.setAlarmStatus(Integer.valueOf(item.getStatus()));
entity.setAlarmValue(item.getInfo());
entity.setStationId(item.getStation()); entity.setStationId(item.getStation());
entity.setAlarmSource(EARLY_WARNING); entity.setAlarmSource(EARLY_WARNING);
entity.setTenantId("200000"); entity.setTenantId("200000");

76
hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql

@ -207,42 +207,42 @@ CREATE TABLE `HZIMS_INTERRUPTION_ALARM` (
DROP TABLE IF EXISTS `hzims_alarm_handle_flow`; DROP TABLE IF EXISTS `hzims_alarm_handle_flow`;
CREATE TABLE `hzims_alarm_handle_flow` ( CREATE TABLE `hzims_alarm_handle_flow` (
`ID` bigint(20) NOT NULL COMMENT '主键ID', `ID` bigint(20) NOT NULL COMMENT '主键ID',
`ALARM_ID` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警主键ID', `ALARM_ID` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警主键ID',
`STATION_CODE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点编号', `STATION_CODE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点编号',
`ALARM_TYPE` smallint(6) NULL DEFAULT NULL COMMENT '告警类型', `ALARM_TYPE` smallint(6) NULL DEFAULT NULL COMMENT '告警类型',
`ALARM_TIME` datetime(0) NULL DEFAULT NULL COMMENT '告警时间', `ALARM_TIME` datetime(0) NULL DEFAULT NULL COMMENT '告警时间',
`ALARM_CONTENT` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警内容', `ALARM_CONTENT` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警内容',
`TYPE` tinyint(1) NULL DEFAULT NULL COMMENT '类型:0-系统告警 1-智能告警', `TYPE` tinyint(1) NULL DEFAULT NULL COMMENT '类型:0-系统告警 1-智能告警',
`HANDLE_WAY` smallint(6) NULL DEFAULT NULL COMMENT '告警状态 1L,2L,3L,4L,5L 误报 、延后、缺陷 、检修、处理', `HANDLE_WAY` smallint(6) NULL DEFAULT NULL COMMENT '告警状态 1L,2L,3L,4L,5L 误报 、延后、缺陷 、检修、处理',
`HANDLE_USER` bigint(20) NULL DEFAULT NULL COMMENT '通知处理人', `HANDLE_USER` bigint(20) NULL DEFAULT NULL COMMENT '通知处理人',
`PHENOMENON_ID` bigint(20) NULL DEFAULT NULL COMMENT '现象ID', `PHENOMENON_ID` bigint(20) NULL DEFAULT NULL COMMENT '现象ID',
`ACCESS_ID` bigint(20) NULL DEFAULT NULL COMMENT '检修ID', `ACCESS_ID` bigint(20) NULL DEFAULT NULL COMMENT '检修ID',
`DELAY_TIME` datetime(0) NULL DEFAULT NULL COMMENT '延后时间', `DELAY_TIME` datetime(0) NULL DEFAULT NULL COMMENT '延后时间',
`DELAY_CAUSE` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '延后原因', `DELAY_CAUSE` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '延后原因',
`FALSE_ALARM_DESC` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '误报描述', `FALSE_ALARM_DESC` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '误报描述',
`FILE_PATH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件路径', `FILE_PATH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件路径',
`DEAL_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理方式', `DEAL_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理方式',
`DEAL_RESULT` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理结果', `DEAL_RESULT` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理结果',
`DEAL_DESC` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理描述', `DEAL_DESC` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理描述',
`DEAL_PATH` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理附件', `DEAL_PATH` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理附件',
`CHECK_FLAG` tinyint(4) NULL DEFAULT NULL COMMENT '审批结果 0,不通过;1为通过', `CHECK_FLAG` tinyint(4) NULL DEFAULT NULL COMMENT '审批结果 0,不通过;1为通过',
`CHECK_DESC` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批说明', `CHECK_DESC` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批说明',
`CURRENT_OPERATOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前处理环节', `CURRENT_OPERATOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前处理环节',
`CURRENT_LINK_HANDLER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前环节处理人', `CURRENT_LINK_HANDLER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前环节处理人',
`PROCESS_INSTANCE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程实例', `PROCESS_INSTANCE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程实例',
`CREATE_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户姓名', `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户姓名',
`HANDLE_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理人姓名', `HANDLE_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理人姓名',
`APPROVAL_USER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批人', `APPROVAL_USER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批人',
`APPROVAL_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批人姓名', `APPROVAL_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批人姓名',
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', `TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID',
`CREATE_TIME` datetime(0) NOT NULL COMMENT '创建时间', `CREATE_TIME` datetime(0) NOT NULL COMMENT '创建时间',
`UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', `UPDATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', `CREATE_USER` bigint(20) NOT NULL COMMENT '创建人',
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', `UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人',
`IS_DELETED` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否删除', `IS_DELETED` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否删除',
`STATUS` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态', `STATUS` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态',
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', `CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
`CREATE_DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建机构名称', `CREATE_DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建机构名称',
PRIMARY KEY (`ID`) USING BTREE PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC; ) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC;

3
hzims-service/inspect/src/main/resources/db/2.0.0.sql.1

@ -0,0 +1,3 @@
ALTER TABLE `hzims-inspect`.`hz_st_ex_task_user` MODIFY COLUMN `CLAIM_STATUS` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '领用状态 0:未领用 1:已领用 每条任务可以存在多个用户,但是只有一个领用人' AFTER `USER_ID`;
ALTER TABLE `hzims-inspect`.`hz_st_ex_task_user` ADD COLUMN `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `TENANT_ID`;
Loading…
Cancel
Save