diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwMonitorMapper.xml b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwMonitorMapper.xml index ee87206b4..336f52773 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwMonitorMapper.xml +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/mapper/distribution/mapping/PwMonitorMapper.xml @@ -215,4 +215,4 @@ - \ No newline at end of file + diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRMpMonitorAlarmCountMServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRMpMonitorAlarmCountMServiceImpl.java index 54cd0004d..a34e99804 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRMpMonitorAlarmCountMServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/distribution/impl/PwRMpMonitorAlarmCountMServiceImpl.java @@ -23,6 +23,7 @@ import com.njcn.system.pojo.po.DictData; import com.njcn.user.api.DeptFeignClient; import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; import lombok.RequiredArgsConstructor; import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeanUtils; @@ -34,6 +35,7 @@ import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.Stream; /** * 监测点告警统计service @@ -74,15 +76,8 @@ implements PwRMpMonitorAlarmCountMService { // List voltageLevelParamList = StringUtils.isNotBlank(rMpMonitorAlarmCountMParam.getVoltageLevel()) ? Arrays.asList(rMpMonitorAlarmCountMParam.getVoltageLevel().split(",")) : null; //电压等级 String monitorName = rMpMonitorAlarmCountMParam.getMeasurementPointName(); //监测点名称 -// //获取所有子部门信息 -// List deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); -// if (CollUtil.isEmpty(deptDTOList)) { -// throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); -// } -// //将单位信息转为map集合 key: 单位id value: 单位实体 -// Map deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO)); /*获取下级子部门信息*/ - List deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( ); + List deptDTOList = deptFeignClient.getDeptDescendantIndexes (id, WebUtil.filterDeptType()).getData (); if (CollUtil.isEmpty(deptDTOList)) { return Collections.emptyList(); } diff --git a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsSummaryStatisticsServiceImpl.java b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsSummaryStatisticsServiceImpl.java index dde6913a8..7543c1bf9 100644 --- a/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsSummaryStatisticsServiceImpl.java +++ b/pqs-device/pms-device/pms-device-boot/src/main/java/com/njcn/device/pms/service/majornetwork/impl/PmsSummaryStatisticsServiceImpl.java @@ -13,6 +13,7 @@ import com.njcn.device.pms.service.distribution.IPwMonitorService; import com.njcn.device.pms.service.majornetwork.PmsSummaryStatisticsService; import com.njcn.user.api.DeptFeignClient; import com.njcn.user.pojo.dto.DeptDTO; +import com.njcn.web.utils.WebUtil; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -38,7 +39,7 @@ public class PmsSummaryStatisticsServiceImpl implements PmsSummaryStatisticsServ public List getSeparate(PmsSummaryStatisticsParam param) { List vos = new ArrayList<>(); //获取当前部门下的子部门 - List data = deptFeignClient.getDepSonDetailByDeptId(param.getOrgId()).getData(); + List data = deptFeignClient.getDeptDescendantIndexes(param.getOrgId(), WebUtil.filterDeptType()).getData(); List deptIds = data.stream().map(DeptDTO::getCode).collect(Collectors.toList()); Map deptMap = data.stream().collect(Collectors.toMap(DeptDTO::getCode, DeptDTO::getName)); diff --git a/pqs-event/event-api/src/main/java/com/njcn/event/pojo/po/RmpEventDetailPO.java b/pqs-event/event-api/src/main/java/com/njcn/event/pojo/po/RmpEventDetailPO.java index 26549f424..7461b39c8 100644 --- a/pqs-event/event-api/src/main/java/com/njcn/event/pojo/po/RmpEventDetailPO.java +++ b/pqs-event/event-api/src/main/java/com/njcn/event/pojo/po/RmpEventDetailPO.java @@ -1,5 +1,6 @@ package com.njcn.event.pojo.po; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -35,6 +36,7 @@ public class RmpEventDetailPO implements Serializable { * 开始时间 */ @ApiModelProperty(name = "startTime",value = "开始时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS",timezone = "GMT+8") private Date startTime; /** * 持续时间 diff --git a/pqs-event/event-api/src/main/java/com/njcn/event/pojo/vo/PwRmpEventDetailVO.java b/pqs-event/event-api/src/main/java/com/njcn/event/pojo/vo/PwRmpEventDetailVO.java index 80d1f981f..4ffacd9d0 100644 --- a/pqs-event/event-api/src/main/java/com/njcn/event/pojo/vo/PwRmpEventDetailVO.java +++ b/pqs-event/event-api/src/main/java/com/njcn/event/pojo/vo/PwRmpEventDetailVO.java @@ -1,5 +1,6 @@ package com.njcn.event.pojo.vo; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -75,6 +76,7 @@ public class PwRmpEventDetailVO implements Serializable { * 开始时间 */ @ApiModelProperty(name = "startTime", value = "开始时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS",timezone = "GMT+8") private Date startTime; /** diff --git a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/StatisticsOfTransientIndicatorssServiceImpl.java b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/StatisticsOfTransientIndicatorssServiceImpl.java index c95342e41..7f23c28cd 100644 --- a/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/StatisticsOfTransientIndicatorssServiceImpl.java +++ b/pqs-event/event-boot/src/main/java/com/njcn/event/service/majornetwork/Impl/StatisticsOfTransientIndicatorssServiceImpl.java @@ -53,7 +53,7 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf private final RStatSubstationMapper rStatSubstationMapper; - private final DecimalFormat df = new DecimalFormat("###.00"); + private final DecimalFormat df = new DecimalFormat("###.0000"); private final DeptFeignClient deptFeignClient;