代码提交

This commit is contained in:
huangzj
2023-09-22 13:29:50 +08:00
parent c676ea51da
commit d3ddf00cad
5 changed files with 19 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ public class DevCountVO {
private Integer currentProjectCount;
@ApiModelProperty(value = "项目数")
private Long feedBackCount;
private Integer feedBackCount;

View File

@@ -185,11 +185,11 @@ public class CsDeviceUserPOServiceImpl extends ServiceImpl<CsDeviceUserPOMapper,
List<EventDetailVO> run = data.stream().filter(temp -> temp.getType() == 2).collect(Collectors.toList());
CsFeedbackQueryParm csFeedbackQueryParm = new CsFeedbackQueryParm();
csFeedbackQueryParm.setPageNum(1);
csFeedbackQueryParm.setPageSize(10);
csFeedbackQueryParm.setPageSize(100000);
csFeedbackQueryParm.setStatus("1");
Page<CsFeedbackVO> data1 = feedBackFeignClient.queryFeedBackPage(csFeedbackQueryParm).getData();
long total = data1.getTotal();
devCountVO.setFeedBackCount(total);
List<CsFeedbackVO> collect = data1.getRecords().stream().filter(temp -> !Objects.equals(temp.getUserId(), RequestUtil.getUserIndex())).collect(Collectors.toList());
devCountVO.setFeedBackCount(collect.size());
//todo 后续添加警告数,事件数
devCountVO.setEventCount(event.size());
devCountVO.setAlarmCount(harmonic.size());

View File

@@ -79,6 +79,16 @@ public class EventDetailVO {
private String userId;
/**
* 瞬时波形图,存在多张的情况
*/
private String instantPics;
/**
* RMS波形图存在多张的情况
*/
private String rmsPics;
/**

View File

@@ -30,7 +30,7 @@
<select id="queryUserEventList" resultType="com.njcn.csharmonic.pojo.vo.EventDetailVO">
select a.event_id id,a.user_id userId,a.status status,b.device_id deviceId,b.line_id lineId,
b.start_time startTime,b.tag tag ,b.wave_path wavePath, b.type type
b.start_time startTime,b.tag tag ,b.wave_path wavePath,b.instant_pics,b.rms_pics , b.type type
from cs_event_user a inner join cs_event b on a.event_id=b.id where 1=1
<if test="csEventUserQueryParam!=null and csEventUserQueryParam.endTime != null and csEventUserQueryParam.endTime !=''">

View File

@@ -3,6 +3,7 @@ package com.njcn.csharmonic.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.constant.LogInfo;
import com.njcn.csdevice.api.CsLedgerFeignClient;
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
import com.njcn.csdevice.pojo.po.AppTopologyDiagramPO;
@@ -67,6 +68,9 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
public List<EventDetailVO> queryUserEventList(CsEventUserQueryParam csEventUserQueryParam) {
csEventUserQueryParam.setUserId(RequestUtil.getUserIndex());
String role = RequestUtil.getUserRole();
if(Objects.equals(role, LogInfo.UNKNOWN_ROLE)){
return new ArrayList<>();
}
List<String> strings = JSONArray.parseArray(role, String.class);
if(CollectionUtils.isEmpty(strings)){
return new ArrayList<>();