代码提交
This commit is contained in:
@@ -60,7 +60,7 @@ public class DevCountVO {
|
|||||||
private Integer currentProjectCount;
|
private Integer currentProjectCount;
|
||||||
|
|
||||||
@ApiModelProperty(value = "项目数")
|
@ApiModelProperty(value = "项目数")
|
||||||
private Long feedBackCount;
|
private Integer feedBackCount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -185,11 +185,11 @@ public class CsDeviceUserPOServiceImpl extends ServiceImpl<CsDeviceUserPOMapper,
|
|||||||
List<EventDetailVO> run = data.stream().filter(temp -> temp.getType() == 2).collect(Collectors.toList());
|
List<EventDetailVO> run = data.stream().filter(temp -> temp.getType() == 2).collect(Collectors.toList());
|
||||||
CsFeedbackQueryParm csFeedbackQueryParm = new CsFeedbackQueryParm();
|
CsFeedbackQueryParm csFeedbackQueryParm = new CsFeedbackQueryParm();
|
||||||
csFeedbackQueryParm.setPageNum(1);
|
csFeedbackQueryParm.setPageNum(1);
|
||||||
csFeedbackQueryParm.setPageSize(10);
|
csFeedbackQueryParm.setPageSize(100000);
|
||||||
csFeedbackQueryParm.setStatus("1");
|
csFeedbackQueryParm.setStatus("1");
|
||||||
Page<CsFeedbackVO> data1 = feedBackFeignClient.queryFeedBackPage(csFeedbackQueryParm).getData();
|
Page<CsFeedbackVO> data1 = feedBackFeignClient.queryFeedBackPage(csFeedbackQueryParm).getData();
|
||||||
long total = data1.getTotal();
|
List<CsFeedbackVO> collect = data1.getRecords().stream().filter(temp -> !Objects.equals(temp.getUserId(), RequestUtil.getUserIndex())).collect(Collectors.toList());
|
||||||
devCountVO.setFeedBackCount(total);
|
devCountVO.setFeedBackCount(collect.size());
|
||||||
//todo 后续添加警告数,事件数
|
//todo 后续添加警告数,事件数
|
||||||
devCountVO.setEventCount(event.size());
|
devCountVO.setEventCount(event.size());
|
||||||
devCountVO.setAlarmCount(harmonic.size());
|
devCountVO.setAlarmCount(harmonic.size());
|
||||||
|
|||||||
@@ -79,6 +79,16 @@ public class EventDetailVO {
|
|||||||
|
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 瞬时波形图,存在多张的情况
|
||||||
|
*/
|
||||||
|
private String instantPics;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RMS波形图,存在多张的情况
|
||||||
|
*/
|
||||||
|
private String rmsPics;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<select id="queryUserEventList" resultType="com.njcn.csharmonic.pojo.vo.EventDetailVO">
|
<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,
|
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
|
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 !=''">
|
<if test="csEventUserQueryParam!=null and csEventUserQueryParam.endTime != null and csEventUserQueryParam.endTime !=''">
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.csharmonic.service.impl;
|
|||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
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.api.CsLedgerFeignClient;
|
||||||
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
||||||
import com.njcn.csdevice.pojo.po.AppTopologyDiagramPO;
|
import com.njcn.csdevice.pojo.po.AppTopologyDiagramPO;
|
||||||
@@ -67,6 +68,9 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
|||||||
public List<EventDetailVO> queryUserEventList(CsEventUserQueryParam csEventUserQueryParam) {
|
public List<EventDetailVO> queryUserEventList(CsEventUserQueryParam csEventUserQueryParam) {
|
||||||
csEventUserQueryParam.setUserId(RequestUtil.getUserIndex());
|
csEventUserQueryParam.setUserId(RequestUtil.getUserIndex());
|
||||||
String role = RequestUtil.getUserRole();
|
String role = RequestUtil.getUserRole();
|
||||||
|
if(Objects.equals(role, LogInfo.UNKNOWN_ROLE)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
List<String> strings = JSONArray.parseArray(role, String.class);
|
List<String> strings = JSONArray.parseArray(role, String.class);
|
||||||
if(CollectionUtils.isEmpty(strings)){
|
if(CollectionUtils.isEmpty(strings)){
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user