合并代码
This commit is contained in:
@@ -32,6 +32,7 @@ public enum PmsDeviceResponseEnum {
|
||||
GENWIRE_SAME("A00373","母线编号重复"),
|
||||
POWER_CODE_SAME("A00374","台区名称或编号重复"),
|
||||
POWER_CLIENT_DIS_EMPTY("A00375","发电用电用户参数不可为空"),
|
||||
DIS_ADD_REPEAT("A00376","当前配网中存在该监测点"),
|
||||
|
||||
|
||||
POWER_CLIENT_NOT_FIND("A00380","查无此用电用户"),
|
||||
|
||||
@@ -25,8 +25,8 @@ public class DistributionMonitorParam {
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@ApiModelProperty(value = "监测点类别(字典)")
|
||||
@NotBlank(message = "监测点类别不能为空")
|
||||
@ApiModelProperty(value = "监测点编号")
|
||||
@NotBlank(message = "监测点编号不能为空")
|
||||
private String monitorId;
|
||||
|
||||
/**
|
||||
|
||||
@@ -60,6 +60,34 @@ public class DistributionMonitor extends BaseEntity {
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 关联的监测终端编号(外键)
|
||||
*/
|
||||
private String terminalId;
|
||||
|
||||
/**
|
||||
* 监测终端接线方式(字典)
|
||||
*/
|
||||
private String terminalWiringMethod;
|
||||
|
||||
/**
|
||||
* pt变比
|
||||
*/
|
||||
private Float pt1;
|
||||
|
||||
/**
|
||||
* pt变比
|
||||
*/
|
||||
private Float pt2;
|
||||
|
||||
/**
|
||||
* ct变比
|
||||
*/
|
||||
private Float ct1;
|
||||
|
||||
/**
|
||||
* ct变比
|
||||
*/
|
||||
private Float ct2;
|
||||
|
||||
}
|
||||
|
||||
@@ -187,6 +187,24 @@ public class Monitor extends BaseEntity {
|
||||
*/
|
||||
private Integer isSpecialMonitor;
|
||||
|
||||
/**
|
||||
* pt变比
|
||||
*/
|
||||
private Float pt1;
|
||||
|
||||
/**
|
||||
* pt变比
|
||||
*/
|
||||
private Float pt2;
|
||||
|
||||
/**
|
||||
* ct变比
|
||||
*/
|
||||
private Float ct1;
|
||||
|
||||
/**
|
||||
* ct变比
|
||||
*/
|
||||
private Float ct2;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class SpecialAnalysisMonitorVO implements Serializable {
|
||||
* 监测点信息
|
||||
*/
|
||||
@ApiModelProperty(name = "specialAnalysisVOList", value = "监测点信息")
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> specialAnalysisVOList;
|
||||
Map<String,List<SpecialAnalysisMonitorVO.SpecialAnalysisVO>> specialAnalysisVOList;
|
||||
|
||||
/**
|
||||
* 电压等级分布(监测点)
|
||||
@@ -53,6 +53,18 @@ public class SpecialAnalysisMonitorVO implements Serializable {
|
||||
@ApiModelProperty(name = "name", value = "监测点名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
@ApiModelProperty(name = "orgName", value = "单位名称")
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
@ApiModelProperty(name = "orgId", value = "单位Code")
|
||||
private String orgId;
|
||||
|
||||
/**
|
||||
* 电站ID(外键)
|
||||
*/
|
||||
@@ -92,8 +104,8 @@ public class SpecialAnalysisMonitorVO implements Serializable {
|
||||
/**
|
||||
* 监测点标签
|
||||
*/
|
||||
@ApiModelProperty(name = "monitorTag", value = "监测点标签")
|
||||
private String monitorTag;
|
||||
// @ApiModelProperty(name = "monitorTag", value = "监测点标签")
|
||||
// private String monitorTag;
|
||||
|
||||
/**
|
||||
* 关联的监测终端编号(外键)
|
||||
@@ -219,4 +231,79 @@ public class SpecialAnalysisMonitorVO implements Serializable {
|
||||
private String ringCapacity4;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 专项分析电气化铁路展示详情
|
||||
*/
|
||||
@Data
|
||||
public static class SpecialAnalysisRailwayVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@ApiModelProperty(name = "id", value = "监测点ID")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
@ApiModelProperty(name = "name", value = "监测点名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
@ApiModelProperty(name = "orgName", value = "单位名称")
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
@ApiModelProperty(name = "orgId", value = "单位Code")
|
||||
private String orgId;
|
||||
|
||||
/**
|
||||
* 电站ID(外键)
|
||||
*/
|
||||
@ApiModelProperty(name = "powerrId", value = "电站ID(外键)")
|
||||
private String powerrId;
|
||||
|
||||
/**
|
||||
* 变电站名称
|
||||
*/
|
||||
@ApiModelProperty(name = "powerrName", value = "变电站名称")
|
||||
private String powerrName;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@ApiModelProperty(name = "longitude", value = "经度")
|
||||
private Double longitude;
|
||||
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
@ApiModelProperty(name = "latitude", value = "维度")
|
||||
private Double latitude;
|
||||
|
||||
/**
|
||||
* 电压等级(字典)
|
||||
*/
|
||||
@ApiModelProperty(name = "voltageLevel", value = "电压等级(字典)")
|
||||
private String voltageLevel;
|
||||
|
||||
/**
|
||||
* 监测点容量
|
||||
*/
|
||||
@ApiModelProperty(name = "capacity", value = "监测点容量")
|
||||
private Double capacity;
|
||||
|
||||
|
||||
/**
|
||||
* 关联的监测终端编号(外键)
|
||||
*/
|
||||
@ApiModelProperty(name = "RailwayLineName", value = "铁路名称")
|
||||
private String railwayLineName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -72,16 +73,14 @@ public class SpecialAnalysisController extends BaseController {
|
||||
/**
|
||||
* 获取专项分析-地图展示数据
|
||||
*
|
||||
* @param param 前端传入参数
|
||||
* @return 专项分析-地图展示数据
|
||||
*/
|
||||
@PostMapping("/getDisplayRailway")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("地图展示数据-地图监测点(电气化铁路)")
|
||||
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||
public HttpResult<List<SpecialAnalysisMonitorVO.SpecialAnalysisVO>> getDisplayRailway(@RequestBody SpecialAnalysisParam param) {
|
||||
public HttpResult<Map<String,List<SpecialAnalysisMonitorVO.SpecialAnalysisRailwayVO>>> getDisplayRailway() {
|
||||
String methodDescribe = getMethodDescribe("getDisplayRailway");
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> sm= specialAnalysisService.getDisplayRailway(param);
|
||||
Map<String,List<SpecialAnalysisMonitorVO.SpecialAnalysisRailwayVO>> sm= specialAnalysisService.getDisplayRailway();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,54 @@
|
||||
package com.njcn.device.pms.controller.majornetwork;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.dto.wave.WaveDataDTO;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pms.service.majornetwork.TransientPmsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* 暂态事件列表(PMS暂用)
|
||||
* @author hongawen
|
||||
* @since 2022-10-14
|
||||
*/
|
||||
@Validated
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/pms/transientStasticData")
|
||||
@Api(tags = "暂态事件列表(PMS暂用)")
|
||||
@AllArgsConstructor
|
||||
public class TransientStasticDataController extends BaseController {
|
||||
|
||||
private final TransientPmsService transientPmsService;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTransientAnalyseWavePms")
|
||||
@ApiOperation("暂态事件波形分析")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "timeId", value = "暂态时刻", required = true),
|
||||
@ApiImplicitParam(name = "lineId", value = "暂态监测点Id", required = true),
|
||||
@ApiImplicitParam(name = "lineType", value = "暂态监测点类型(1主网 2配网)", required = true)
|
||||
})
|
||||
public HttpResult<WaveDataDTO> getTransientAnalyseWavePms(@RequestParam("timeId") String timeId, @RequestParam("lineId") String lineId, @RequestParam("lineType") Integer lineType){
|
||||
String methodDescribe = getMethodDescribe("getTransientAnalyseWavePms");
|
||||
WaveDataDTO wave = transientPmsService.getTransientAnalyseWavePms(timeId, lineId,lineType);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, wave, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public interface SpecialAnalysisMapper {
|
||||
* @param deptIdList 部门集合(Code)
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> selectRailwayList(@Param("deptIdList") List<String> deptIdList);
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisRailwayVO> selectRailwayList(@Param("deptIdList") List<String> deptIdList);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,16 +11,23 @@
|
||||
target_type AS targetType
|
||||
FROM
|
||||
r_stat_target_detail
|
||||
WHERE
|
||||
measurement_point_id IN
|
||||
<foreach collection="monitorIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<where>
|
||||
<if test="param!=null and param.checkRules!=null and param.checkRules.size()!=0">
|
||||
AND check_rules IN
|
||||
<foreach collection="param.checkRules" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and measurement_point_id IN
|
||||
<foreach collection="monitorIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') <= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -182,11 +182,12 @@
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectRailwayList"
|
||||
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
|
||||
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisRailwayVO">
|
||||
SELECT
|
||||
pts.Id,
|
||||
pts.`Name`,
|
||||
pts.Org_Name,
|
||||
pts.Railway_Line_Name,
|
||||
pts.Org_Id,
|
||||
pts.Power_Name as powerrName,
|
||||
pts.Power_Id as powerrId,
|
||||
@@ -242,7 +243,7 @@
|
||||
<where>
|
||||
<if test="param != null and param.powerVoltageLevel.size > 0">
|
||||
AND t.voltage_level IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
<foreach collection='param.powerVoltageLevel' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
@@ -269,8 +270,8 @@
|
||||
pms_traction_station_expand t
|
||||
<where>
|
||||
<if test="param != null and param.powerVoltageLevel.size > 0">
|
||||
AND t.power_voltage_level IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
AND t.voltage_level IN
|
||||
<foreach collection='param.powerVoltageLevel' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
@@ -299,8 +300,8 @@
|
||||
pms_traction_station_expand t
|
||||
<where>
|
||||
<if test="param != null and param.powerVoltageLevel.size > 0">
|
||||
AND t.power_voltage_level IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
AND t.voltage_level IN
|
||||
<foreach collection='param.powerVoltageLevel' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
@@ -350,8 +351,17 @@
|
||||
FROM
|
||||
pms_traction_station_expand
|
||||
<where>
|
||||
<if test="param!=null and param.year != null ">
|
||||
and YEAR(Created_Date)=#{param.year}
|
||||
</if>
|
||||
<if test="param != null and param.month!=null and param.month.size > 0">
|
||||
AND MONTH(Created_Date) IN
|
||||
<foreach collection='param.month' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
AND Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <专项分许>
|
||||
@@ -30,10 +31,9 @@ public interface SpecialAnalysisService {
|
||||
|
||||
/**
|
||||
* 专项分析-地图数据展示(电气化铁路)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> getDisplayRailway(SpecialAnalysisParam param);
|
||||
Map<String,List<SpecialAnalysisMonitorVO.SpecialAnalysisRailwayVO>> getDisplayRailway();
|
||||
|
||||
/**
|
||||
* 地图展示数据-按电压展示数据(电气化铁路)
|
||||
|
||||
@@ -75,6 +75,17 @@ public class DistributionMonitorServiceImpl extends ServiceImpl<DistributionMoni
|
||||
if (Objects.isNull(dictData)) {
|
||||
throw new BusinessException(PmsDeviceResponseEnum.NO_LINE_SORT);
|
||||
}
|
||||
|
||||
//判断配网表里是否已经存在监测点
|
||||
LambdaQueryWrapper<DistributionMonitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(DistributionMonitor::getStatus,DataStateEnum.ENABLE.getCode())
|
||||
.eq(DistributionMonitor::getMonitorId,distributionMonitorParam.getMonitorId())
|
||||
.eq(DistributionMonitor::getMonitorSort,dictData.getId());
|
||||
int count = this.count(lambdaQueryWrapper);
|
||||
if(count>0){
|
||||
throw new BusinessException(PmsDeviceResponseEnum.DIS_ADD_REPEAT);
|
||||
}
|
||||
|
||||
DistributionMonitor distributionMonitor = new DistributionMonitor();
|
||||
distributionMonitor.setMonitorSort(dictData.getId());
|
||||
switch (dictData.getCode()) {
|
||||
|
||||
@@ -61,7 +61,8 @@ public class RStatDevSignalDServiceImpl extends ServiceImpl<RStatDevSignalDMappe
|
||||
|
||||
//查询终端数据
|
||||
LambdaQueryWrapper<PmsTerminal> terminalWrapper = new LambdaQueryWrapper<>();
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgCodeList).like(StringUtils.isNotBlank(deviceName), PmsTerminal::getName, deviceName);
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgCodeList)
|
||||
.like(StringUtils.isNotBlank(deviceName), PmsTerminal::getName, deviceName);
|
||||
List<PmsTerminal> terminalList = iTerminalService.list(terminalWrapper);
|
||||
//提取终端id
|
||||
List<String> terminalIdList = terminalList.stream().map(PmsTerminal::getId).collect(Collectors.toList());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.njcn.device.pms.mapper.majornetwork.SpecialAnalysisMapper;
|
||||
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||
@@ -36,10 +37,16 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
||||
public SpecialAnalysisMonitorVO getMonitorList(SpecialAnalysisParam param) {
|
||||
//初始化对象
|
||||
SpecialAnalysisMonitorVO vo=new SpecialAnalysisMonitorVO();
|
||||
|
||||
//获取电压等级的字典
|
||||
List<DictData> voltageLevelList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
//将电压信息转成map,key:id value:name
|
||||
Map<String, String> voltageLevelMap = voltageLevelList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||
|
||||
//专项分析-只是统计当前所在部门及下部门直接挂钩的监测点
|
||||
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
//1.获取原始数据(参数1,部门id。参数2,监测点标签字典id集合)
|
||||
|
||||
DictData data;
|
||||
switch (param.getType()) {
|
||||
//光伏电站
|
||||
@@ -55,9 +62,20 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
||||
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.ONSHORE_WIND.getCode()).getData();
|
||||
break;
|
||||
}
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> infoList = specialAnalysisMapper.selectList(deptIds, null);
|
||||
//1.获取原始数据(参数1,部门id。参数2,监测点标签字典id集合)
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> infoList = specialAnalysisMapper.selectList(deptIds, data.getId());
|
||||
//获取部门区域
|
||||
|
||||
if(CollectionUtil.isNotEmpty(infoList)){
|
||||
vo.setSpecialAnalysisVOList(infoList);
|
||||
infoList.stream().forEach(info->{
|
||||
if(voltageLevelMap.containsKey(info.getVoltageLevel())){
|
||||
String name = voltageLevelMap.get(info.getVoltageLevel());
|
||||
info.setVoltageLevel(name);
|
||||
}
|
||||
});
|
||||
Map<String, List<SpecialAnalysisMonitorVO.SpecialAnalysisVO>> listMap =
|
||||
infoList.stream().collect(Collectors.groupingBy(SpecialAnalysisMonitorVO.SpecialAnalysisVO::getOrgName));
|
||||
vo.setSpecialAnalysisVOList(listMap);
|
||||
|
||||
//2.根据电压等级分组显示数据
|
||||
Map<String, Long> map = infoList.stream().collect(Collectors.groupingBy(su -> su.getVoltageLevel(), Collectors.counting()));
|
||||
@@ -70,29 +88,49 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
||||
maps.add(newMap);
|
||||
}
|
||||
vo.setVoltageLevelMap(maps);
|
||||
}else{
|
||||
vo.setSpecialAnalysisVOList(new HashMap<>());
|
||||
vo.setVoltageLevelMap(new ArrayList<>());
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpecialAnalysisMonitorVO.CompareDetailVO getYoYList(SpecialAnalysisParam.CompareDateParam param) {
|
||||
//todo 获取部门信息
|
||||
//获取部门信息
|
||||
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
return specialAnalysisMapper.selectYoYList(deptIds,param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> getDisplayRailway(SpecialAnalysisParam param) {
|
||||
//todo 获取部门信息
|
||||
public Map<String,List<SpecialAnalysisMonitorVO.SpecialAnalysisRailwayVO>> getDisplayRailway() {
|
||||
// 获取部门信息
|
||||
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
return specialAnalysisMapper.selectRailwayList(deptIds);
|
||||
|
||||
//获取电压等级的字典
|
||||
List<DictData> voltageLevelList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
//将电压信息转成map,key:id value:name
|
||||
Map<String, String> voltageLevelMap = voltageLevelList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisRailwayVO> specialAnalysisRailwayVOS = specialAnalysisMapper.selectRailwayList(deptIds);
|
||||
if(CollUtil.isNotEmpty(specialAnalysisRailwayVOS)){
|
||||
specialAnalysisRailwayVOS.stream().forEach(info->{
|
||||
if(voltageLevelMap.containsKey(info.getVoltageLevel())){
|
||||
String name = voltageLevelMap.get(info.getVoltageLevel());
|
||||
info.setVoltageLevel(name);
|
||||
}
|
||||
});
|
||||
return specialAnalysisRailwayVOS.stream().collect(
|
||||
Collectors.groupingBy(SpecialAnalysisMonitorVO.SpecialAnalysisRailwayVO::getRailwayLineName));
|
||||
}
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SpecialAnalysisMonitorVO.CompareVO> getMapDisplayRailway(SpecialAnalysisParam.CompareParam param) {
|
||||
//todo 获取部门信息
|
||||
// 获取部门信息
|
||||
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
return specialAnalysisMapper.selectMapDisplayRailway(deptIds, param);
|
||||
@@ -100,7 +138,7 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
||||
|
||||
@Override
|
||||
public List<SpecialAnalysisMonitorVO.WiringTypeDetail> getWiringTypeRailway(SpecialAnalysisParam.CompareDateParam param) {
|
||||
//todo 获取部门信息
|
||||
// 获取部门信息
|
||||
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
//子节点获取监测点类别(监测标签)
|
||||
@@ -124,7 +162,11 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
||||
wiringTypeDetail.setRate99("0");
|
||||
wiringTypeRailway.add(wiringTypeDetail);
|
||||
}
|
||||
return wiringTypeRailway;
|
||||
if(CollUtil.isNotEmpty(wiringTypeRailway)){
|
||||
return wiringTypeRailway;
|
||||
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user