暂降事件处理
This commit is contained in:
@@ -50,5 +50,9 @@
|
|||||||
and pq_line.SUBV_INDEX = PQ_SUBVOLTAGE.SUBV_INDEX
|
and pq_line.SUBV_INDEX = PQ_SUBVOLTAGE.SUBV_INDEX
|
||||||
and PQ_SUBVOLTAGE.DEV_INDEX = pq_device.DEV_INDEX
|
and PQ_SUBVOLTAGE.DEV_INDEX = pq_device.DEV_INDEX
|
||||||
and pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
|
and pq_device.SUB_INDEX = PQ_SUBSTATION.SUB_INDEX
|
||||||
|
and pq_line.line_index in
|
||||||
|
<foreach collection="ids" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -2,6 +2,7 @@ package com.njcn.gather.event.transientes.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.gather.event.transientes.pojo.param.LargeScreenCountParam;
|
import com.njcn.gather.event.transientes.pojo.param.LargeScreenCountParam;
|
||||||
@@ -80,9 +81,6 @@ public class LargeScreenCountController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo
|
@OperateInfo
|
||||||
@PostMapping("/noDealEventList")
|
@PostMapping("/noDealEventList")
|
||||||
@ApiOperation("未处理暂降事件列表")
|
@ApiOperation("未处理暂降事件列表")
|
||||||
@@ -94,8 +92,15 @@ public class LargeScreenCountController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(operateType= OperateType.UPDATE)
|
||||||
|
@PostMapping("/lookEvent")
|
||||||
|
@ApiOperation("处理暂降事件")
|
||||||
|
@ApiImplicitParam(name = "eventIds", value = "暂降事件id", required = true)
|
||||||
|
public HttpResult<Boolean> lookEvent(@RequestBody List<String> eventIds) {
|
||||||
|
String methodDescribe = getMethodDescribe("lookEvent");
|
||||||
|
boolean result = largeScreenCountService.lookEvent(eventIds);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.njcn.gather.event.transientes.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface MsgEventInfoMapper extends BaseMapper<MsgEventInfo> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.njcn.gather.event.transientes.pojo.po;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: cdf
|
||||||
|
* @CreateTime: 2025-06-25
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息事件信息实体
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("MSG_EVENT_INFO")
|
||||||
|
public class MsgEventInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息索引
|
||||||
|
*/
|
||||||
|
private String msgIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime sendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息内容
|
||||||
|
*/
|
||||||
|
private String msgContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件索引
|
||||||
|
*/
|
||||||
|
private String eventIndex;
|
||||||
|
}
|
||||||
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@ public class PqsEventdetail {
|
|||||||
private Integer lineid;
|
private Integer lineid;
|
||||||
|
|
||||||
@TableField(value = "TIMEID")
|
@TableField(value = "TIMEID")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime timeid;
|
private LocalDateTime timeid;
|
||||||
|
|
||||||
@TableField(value = "MS")
|
@TableField(value = "MS")
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.gather.event.transientes.pojo.vo;
|
package com.njcn.gather.event.transientes.pojo.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -15,13 +16,14 @@ import java.time.LocalDateTime;
|
|||||||
@Data
|
@Data
|
||||||
public class EventDetailVO {
|
public class EventDetailVO {
|
||||||
|
|
||||||
private String eventdetailIndex;
|
private String eventdetail_index;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime timeid;
|
private LocalDateTime timeid;
|
||||||
|
|
||||||
private BigDecimal ms;
|
private BigDecimal ms;
|
||||||
|
|
||||||
private Short wavetype;
|
private String wavetype;
|
||||||
|
|
||||||
private Double eventvalue;
|
private Double eventvalue;
|
||||||
|
|
||||||
@@ -29,10 +31,14 @@ public class EventDetailVO {
|
|||||||
|
|
||||||
private Integer noticeFlag;
|
private Integer noticeFlag;
|
||||||
|
|
||||||
private String lineName;
|
private Integer lineid;
|
||||||
|
|
||||||
|
private String pointname;
|
||||||
|
|
||||||
|
private String persisttime;
|
||||||
|
|
||||||
|
|
||||||
private String stationName;
|
private String bdname;
|
||||||
|
|
||||||
private String objName;
|
private String objName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,4 +29,5 @@ public interface LargeScreenCountService {
|
|||||||
List<EventDetailVO> noDealEventList(LargeScreenCountParam largeScreenCountParam);
|
List<EventDetailVO> noDealEventList(LargeScreenCountParam largeScreenCountParam);
|
||||||
|
|
||||||
|
|
||||||
|
boolean lookEvent(List<String> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.njcn.gather.event.transientes.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
|
||||||
|
|
||||||
|
public interface MsgEventInfoService extends IService<MsgEventInfo> {
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.github.yulichang.wrapper.segments.Fun;
|
import com.github.yulichang.wrapper.segments.Fun;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
@@ -277,15 +278,22 @@ public class LargeScreenCountServiceImpl implements LargeScreenCountService {
|
|||||||
}
|
}
|
||||||
List<PqsEventdetail> eventList = pqsEventdetailService.list(lambdaQueryWrapper);
|
List<PqsEventdetail> eventList = pqsEventdetailService.list(lambdaQueryWrapper);
|
||||||
if(CollUtil.isNotEmpty(eventList)){
|
if(CollUtil.isNotEmpty(eventList)){
|
||||||
List<LedgerBaseInfoDTO> pqLineList = pqLineMapper.getBaseLineInfo(deptslineIds);
|
List<Integer> ids = eventList.stream().map(PqsEventdetail::getLineid).distinct().collect(Collectors.toList());
|
||||||
|
List<LedgerBaseInfoDTO> pqLineList = pqLineMapper.getBaseLineInfo(ids);
|
||||||
Map<Integer,LedgerBaseInfoDTO> ledgerBaseInfoDTOMap = pqLineList.stream().collect(Collectors.toMap(LedgerBaseInfoDTO::getLineId, Function.identity()));
|
Map<Integer,LedgerBaseInfoDTO> ledgerBaseInfoDTOMap = pqLineList.stream().collect(Collectors.toMap(LedgerBaseInfoDTO::getLineId, Function.identity()));
|
||||||
eventList.forEach(it->{
|
eventList.forEach(it->{
|
||||||
EventDetailVO eventDetailVO = new EventDetailVO();
|
EventDetailVO eventDetailVO = new EventDetailVO();
|
||||||
BeanUtil.copyProperties(it,eventDetailVO);
|
eventDetailVO.setEventdetail_index(it.getEventdetailIndex());
|
||||||
|
eventDetailVO.setTimeid(it.getTimeid());
|
||||||
|
eventDetailVO.setMs(it.getMs());
|
||||||
|
eventDetailVO.setWavetype(it.getWavetype().toString());
|
||||||
|
eventDetailVO.setPersisttime(it.getPersisttime().toString());
|
||||||
|
eventDetailVO.setEventvalue(it.getEventvalue());
|
||||||
if(ledgerBaseInfoDTOMap.containsKey(it.getLineid())){
|
if(ledgerBaseInfoDTOMap.containsKey(it.getLineid())){
|
||||||
LedgerBaseInfoDTO ledgerBaseInfoDTO = ledgerBaseInfoDTOMap.get(it.getLineid());
|
LedgerBaseInfoDTO ledgerBaseInfoDTO = ledgerBaseInfoDTOMap.get(it.getLineid());
|
||||||
eventDetailVO.setLineName(ledgerBaseInfoDTO.getLineName());
|
eventDetailVO.setLineid(ledgerBaseInfoDTO.getLineId());
|
||||||
eventDetailVO.setStationName(ledgerBaseInfoDTO.getStationName());
|
eventDetailVO.setPointname(ledgerBaseInfoDTO.getLineName());
|
||||||
|
eventDetailVO.setBdname(ledgerBaseInfoDTO.getStationName());
|
||||||
}
|
}
|
||||||
result.add(eventDetailVO);
|
result.add(eventDetailVO);
|
||||||
});
|
});
|
||||||
@@ -293,5 +301,13 @@ public class LargeScreenCountServiceImpl implements LargeScreenCountService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean lookEvent(List<String> ids) {
|
||||||
|
LambdaUpdateWrapper<PqsEventdetail> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.in(PqsEventdetail::getEventdetailIndex,ids).set(PqsEventdetail::getLookFlag,DataStateEnum.ENABLE.getCode());
|
||||||
|
pqsEventdetailService.update(updateWrapper);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.njcn.gather.event.transientes.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.gather.event.transientes.mapper.MsgEventInfoMapper;
|
||||||
|
import com.njcn.gather.event.transientes.pojo.po.MsgEventInfo;
|
||||||
|
import com.njcn.gather.event.transientes.service.MsgEventInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: cdf
|
||||||
|
* @CreateTime: 2025-06-25
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
public class MsgEventInfoServiceImpl extends ServiceImpl<MsgEventInfoMapper, MsgEventInfo> implements MsgEventInfoService {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user