合并代码
This commit is contained in:
@@ -51,6 +51,13 @@ public interface DistributionMonitorClient {
|
||||
*/
|
||||
@PostMapping("distributionMonitorList")
|
||||
HttpResult<List<DistributionMonitor>> distributionMonitorList(@RequestBody List<String> monitorIds);
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 获取配网所有监测点数据
|
||||
* @Param: []
|
||||
* @return: com.njcn.common.pojo.response.HttpResult<java.util.List<com.njcn.device.pms.pojo.po.DistributionMonitor>>
|
||||
* @Author: clam
|
||||
* @Date: 2022/12/13
|
||||
*/
|
||||
@PostMapping("distributionMonitorListByCondition")
|
||||
public HttpResult<List<DistributionMonitor>> distributionMonitorListByCondition(@RequestParam("orgId")String orgId,@RequestParam("monitorSort")String monitorSort);
|
||||
}
|
||||
|
||||
@@ -31,4 +31,12 @@ public interface PwMonitorClient {
|
||||
*/
|
||||
@PostMapping("/getPwMonitorList")
|
||||
HttpResult<List<PwPmsMonitorDTO>> getPwMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
|
||||
|
||||
/**
|
||||
* 获取分布式光伏配网所有监测点信息
|
||||
* @param pwPmsMonitorParam 参数条件
|
||||
* @return 配网所有监测点信息
|
||||
*/
|
||||
@PostMapping("/getPwPhotovoltaicMonitorList")
|
||||
HttpResult<List<PwPmsMonitorDTO>> getPwPhotovoltaicMonitorList(@RequestBody PwPmsMonitorParam pwPmsMonitorParam);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,12 @@ public class DistributionMonitorClientFallbackFactory implements FallbackFactory
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DistributionMonitor>> distributionMonitorListByCondition(@RequestParam("orgId")String orgId,@RequestParam("monitorSort")String monitorSort) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取配网所有监测点", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -38,6 +38,12 @@ public class PwMonitorClientFallbackFactory implements FallbackFactory<PwMonitor
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取配网所有监测点信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<PwPmsMonitorDTO>> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取分布式光伏配网所有监测点信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.njcn.device.pms.pojo.dto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* (PmsTractionStation)实体类
|
||||
@@ -22,6 +22,10 @@ public class PmsTractionStationDTO implements Serializable {
|
||||
* 牵引站名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 铁路类型
|
||||
*/
|
||||
private Integer railwayType;
|
||||
/**
|
||||
* 组织机构名称
|
||||
*/
|
||||
@@ -77,7 +81,7 @@ public class PmsTractionStationDTO implements Serializable {
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private Date createdDate;
|
||||
private LocalDateTime createdDate;
|
||||
/**
|
||||
* 用户标签
|
||||
*/
|
||||
@@ -97,7 +101,7 @@ public class PmsTractionStationDTO implements Serializable {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
@@ -105,7 +109,7 @@ public class PmsTractionStationDTO implements Serializable {
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.device.pms.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <专项分析-入参>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-01
|
||||
*/
|
||||
@Data
|
||||
public class SpecialAnalysisParam {
|
||||
|
||||
// @ApiModelProperty(name = "id", value = "按单位统计,id为单位索引")
|
||||
// private String id;
|
||||
|
||||
@ApiModelProperty(name = "type", value = "类型(0-风电场 1-光伏电站 2冶炼负荷)")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 数据传参
|
||||
*/
|
||||
@Data
|
||||
public static class CompareDateParam {
|
||||
|
||||
@ApiModelProperty(name = "year", value = "年份")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(name = "month", value = "月份")
|
||||
private List<String> month;
|
||||
}
|
||||
/**
|
||||
* 数据传参
|
||||
*/
|
||||
@Data
|
||||
public static class CompareParam {
|
||||
|
||||
@ApiModelProperty(name = "powerVoltageLevel", value = "电压等级")
|
||||
private List<String> powerVoltageLevel;
|
||||
|
||||
@ApiModelProperty(name = "year", value = "年份")
|
||||
private String year;
|
||||
|
||||
@ApiModelProperty(name = "month", value = "月份")
|
||||
private List<String> month;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 牵引站台账数据质量问题-核查详情(RStatTractionStationAccountDetail)实体类
|
||||
* 台账数据质量问题-核查详情(RStatTractionStationAccountDetail)实体类
|
||||
*
|
||||
* @author yzh
|
||||
* @since 2022-11-09 09:42:42
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
package com.njcn.device.pms.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 专项分析
|
||||
* @author wr
|
||||
*/
|
||||
@Data
|
||||
public class SpecialAnalysisMonitorVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 监测点信息
|
||||
*/
|
||||
@ApiModelProperty(name = "specialAnalysisVOList", value = "监测点信息")
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> specialAnalysisVOList;
|
||||
|
||||
/**
|
||||
* 电压等级分布(监测点)
|
||||
*/
|
||||
@ApiModelProperty(name = "voltageLevelMap", value = "电压等级分布(监测点)")
|
||||
List<Map<String,String>> voltageLevelMap;
|
||||
|
||||
/**
|
||||
* 同环比详细数据
|
||||
*/
|
||||
// @ApiModelProperty(name = "compareVOMap", value = "同比环比详细数据")
|
||||
// Map<String,CompareVO> compareVOMap;
|
||||
|
||||
/**
|
||||
* 监测点信息
|
||||
*/
|
||||
@Data
|
||||
public static class SpecialAnalysisVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@ApiModelProperty(name = "id", value = "监测点ID")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 监测点名称
|
||||
*/
|
||||
@ApiModelProperty(name = "name", value = "监测点名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 电站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 = "monitorTag", value = "监测点标签")
|
||||
private String monitorTag;
|
||||
|
||||
/**
|
||||
* 关联的监测终端编号(外键)
|
||||
*/
|
||||
@ApiModelProperty(name = "terminalId", value = "关联的监测终端编号(外键)")
|
||||
private String terminalId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 数据比较
|
||||
*/
|
||||
@Data
|
||||
public static class CompareVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "tractionStation", value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(name = "tractionStation", value = "牵引站数量")
|
||||
private String tractionStation;
|
||||
|
||||
@ApiModelProperty(name = "num", value = "监测点数量")
|
||||
private String num;
|
||||
|
||||
@ApiModelProperty(name = "ytbSumNum", value = "同比数量")
|
||||
private String ytbSumNum;
|
||||
|
||||
@ApiModelProperty(name = "yhbSumNum", value = "环比数量")
|
||||
private String yhbSumNum;
|
||||
|
||||
@ApiModelProperty(name = "sameNum", value = "监测点数量同比")
|
||||
private String sameNum;
|
||||
|
||||
@ApiModelProperty(name = "ringNum", value = "监测点数量环比")
|
||||
private String ringNum;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 接线类型详细信息
|
||||
*/
|
||||
@Data
|
||||
public static class WiringTypeDetail {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(name = "connet_group_way", value = "接线类型")
|
||||
private String connetGroupWay;
|
||||
|
||||
@ApiModelProperty(name = "num", value = "牵引站数量")
|
||||
private String num;
|
||||
|
||||
@ApiModelProperty(name = "rateAvg", value = "负载量(平均值)")
|
||||
private String rateAvg;
|
||||
|
||||
@ApiModelProperty(name = "rate95", value = "负载量(95值)")
|
||||
private String rate95;
|
||||
|
||||
@ApiModelProperty(name = "rate99", value = "负载量(99值)")
|
||||
private String rate99;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class CompareDetailVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 风电场 same同比 ring环比
|
||||
*/
|
||||
private String sumNum;
|
||||
private String ytbSumNum;
|
||||
private String yhbSumNum;
|
||||
private String sameNum;
|
||||
private String ringNum;
|
||||
private String capacity;
|
||||
private String ytbCapacity;
|
||||
private String yhbCapacity;
|
||||
private String sameCapacity;
|
||||
private String ringCapacity;
|
||||
|
||||
/**
|
||||
* 光伏电站 same同比 ring环比
|
||||
*/
|
||||
private String sumNum2;
|
||||
private String ytbSumNum2;
|
||||
private String yhbSumNum2;
|
||||
private String sameNum2;
|
||||
private String ringNum2;
|
||||
private String capacity2;
|
||||
private String ytbCapacity2;
|
||||
private String yhbCapacity2;
|
||||
private String sameCapacity2;
|
||||
private String ringCapacity2;
|
||||
|
||||
/**
|
||||
* 电气化铁路 same同比 ring环比
|
||||
*/
|
||||
private String sumNum3;
|
||||
private String ytbSumNum3;
|
||||
private String yhbSumNum3;
|
||||
private String sameNum3;
|
||||
private String ringNum3;
|
||||
private String capacity3;
|
||||
private String ytbCapacity3;
|
||||
private String yhbCapacity3;
|
||||
private String sameCapacity3;
|
||||
private String ringCapacity3;
|
||||
|
||||
/**
|
||||
* 冶炼负荷 same同比 ring环比
|
||||
*/
|
||||
private String sumNum4;
|
||||
private String ytbSumNum4;
|
||||
private String yhbSumNum4;
|
||||
private String sameNum4;
|
||||
private String ringNum4;
|
||||
private String capacity4;
|
||||
private String ytbCapacity4;
|
||||
private String yhbCapacity4;
|
||||
private String sameCapacity4;
|
||||
private String ringCapacity4;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,25 @@ public class PwMonitorController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取分布式光伏配网所有监测点信息
|
||||
*
|
||||
* @param pwPmsMonitorParam 参数条件
|
||||
* @return 配网所有监测点信息
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPwPhotovoltaicMonitorList")
|
||||
@ApiOperation("获取分布式光伏配网所有监测点信息")
|
||||
@ApiImplicitParam(name = "pwPmsMonitorParam",value = "获取分布式光伏配网所有监测点信息",required = true)
|
||||
public HttpResult<List<PwPmsMonitorDTO>> getPwPhotovoltaicMonitorList(@RequestBody @Validated PwPmsMonitorParam pwPmsMonitorParam) {
|
||||
String methodDescribe = getMethodDescribe("getPwPhotovoltaicMonitorList");
|
||||
List<PwPmsMonitorDTO> monitorList = iPwMonitorService.getPwPhotovoltaicMonitorList(pwPmsMonitorParam);
|
||||
if (CollectionUtil.isEmpty(monitorList)) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorList, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.njcn.device.pms.pojo.vo.DoubleUserVO;
|
||||
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -76,6 +77,25 @@ public class DistributionMonitorController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按部门获取旗下配网所有监测点(分一类,二类,三类)
|
||||
* @author clam
|
||||
* @date 2022/11/29
|
||||
*/
|
||||
@PostMapping("distributionMonitorListByCondition")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("按部门获取旗下配网所有监测点(分一类,二类,三类)")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orgId", value = "机构编号", required = true),
|
||||
@ApiImplicitParam(name = "monitorSort", value = "监测点分类",required = true),
|
||||
|
||||
})
|
||||
public HttpResult<List<DistributionMonitor>> distributionMonitorListByCondition(@RequestParam("orgId")String orgId,@RequestParam("monitorSort")String monitorSort){
|
||||
String methodDescribe = getMethodDescribe("distributionMonitorList");
|
||||
List<DistributionMonitor> res = iDistributionMonitorService.distributionMonitorListByCondition(orgId,monitorSort);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, res, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取指定组织下的发电用电用户
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.njcn.device.pms.controller.majornetwork;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
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.pojo.param.SpecialAnalysisParam;
|
||||
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||
import com.njcn.device.pms.service.majornetwork.SpecialAnalysisService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 专项分析-地图展示数据
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2022-11-30
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "专项分析-地图展示数据")
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/SpecialAnalysisController")
|
||||
public class SpecialAnalysisController extends BaseController {
|
||||
|
||||
private final SpecialAnalysisService specialAnalysisService;
|
||||
|
||||
/**
|
||||
* 获取专项分析-地图展示数据
|
||||
*
|
||||
* @param param 前端传入参数
|
||||
* @return 专项分析-地图展示数据
|
||||
*/
|
||||
@PostMapping("/getMapDisplay")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("地图展示数据-地图监测点(风电场,光伏电站,冶炼负荷)")
|
||||
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||
public HttpResult<SpecialAnalysisMonitorVO> getMapDisplay(@RequestBody SpecialAnalysisParam param) {
|
||||
String methodDescribe = getMethodDescribe("getMapDisplay");
|
||||
SpecialAnalysisMonitorVO sm= specialAnalysisService.getMonitorList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专项分析-地图展示数据
|
||||
*
|
||||
* @param param 前端传入参数
|
||||
* @return 专项分析-地图展示数据
|
||||
*/
|
||||
@PostMapping("/getYoYList")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("地图展示数据-数据同比环比(风电场,光伏电站,冶炼负荷)")
|
||||
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||
public HttpResult<SpecialAnalysisMonitorVO.CompareDetailVO> getYoYList(@RequestBody SpecialAnalysisParam.CompareDateParam param) {
|
||||
String methodDescribe = getMethodDescribe("getYoYList");
|
||||
SpecialAnalysisMonitorVO.CompareDetailVO vo = specialAnalysisService.getYoYList(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专项分析-地图展示数据
|
||||
*
|
||||
* @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) {
|
||||
String methodDescribe = getMethodDescribe("getDisplayRailway");
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> sm= specialAnalysisService.getDisplayRailway(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专项分析-地图展示数据
|
||||
*
|
||||
* @param param 前端传入参数
|
||||
* @return 专项分析-地图展示数据
|
||||
*/
|
||||
@PostMapping("/getMapDisplayRailway")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("地图展示数据-按电压展示数据(电气铁路)")
|
||||
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||
public HttpResult<List<SpecialAnalysisMonitorVO.CompareVO>> getMapDisplayRailway(@RequestBody SpecialAnalysisParam.CompareParam param) {
|
||||
String methodDescribe = getMethodDescribe("getMapDisplayRailway");
|
||||
List<SpecialAnalysisMonitorVO.CompareVO> sm= specialAnalysisService.getMapDisplayRailway(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专项分析-地图展示数据
|
||||
*
|
||||
* @param param 前端传入参数
|
||||
* @return 专项分析-地图展示数据
|
||||
*/
|
||||
@PostMapping("/getWiringTypeRailway")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("地图展示数据-按接线类型展示(电气化铁路)")
|
||||
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
|
||||
public HttpResult<List<SpecialAnalysisMonitorVO.WiringTypeDetail>> getWiringTypeRailway(@RequestBody SpecialAnalysisParam.CompareDateParam param) {
|
||||
String methodDescribe = getMethodDescribe("getWiringTypeRailway");
|
||||
List<SpecialAnalysisMonitorVO.WiringTypeDetail> sm= specialAnalysisService.getWiringTypeRailway(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, sm, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -23,4 +23,14 @@ public interface PwMonitorMapper {
|
||||
*/
|
||||
List<PwPmsMonitorDTO> getPwMonitorDataList(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("pwPmsMonitorParam") PwPmsMonitorParam pwPmsMonitorParam);
|
||||
|
||||
/**
|
||||
* 获取分布式光伏配网所有监测点信息
|
||||
*
|
||||
* @param deptIdList 所有子部门索引
|
||||
* @param pwPmsMonitorParam 查询条件
|
||||
* @return 配网监测点信息
|
||||
*/
|
||||
List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("pwPmsMonitorParam") PwPmsMonitorParam pwPmsMonitorParam);
|
||||
}
|
||||
|
||||
@@ -123,5 +123,94 @@
|
||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPwPhotovoltaicMonitorList" resultType="com.njcn.device.pms.pojo.dto.PwPmsMonitorDTO">
|
||||
SELECT DISTINCT
|
||||
monitor.Org_Id AS orgId,
|
||||
monitor.Org_Name AS orgName,
|
||||
monitor.`Powerr_Id` AS powerId,
|
||||
monitor.`Powerr_Name` AS powerName,
|
||||
monitor.id AS monitorId,
|
||||
monitor.`Name` AS monitorName,
|
||||
monitor.Line_Id,
|
||||
monitor.Line_Name,
|
||||
pdm.Monitor_Sort AS monitorSort,
|
||||
pdm.Voltage_Level AS voltageLevel,
|
||||
pdm.If_Power_User AS if_powerUser,
|
||||
pdm.Monitor_State AS monitorState,
|
||||
pdm.Created_Date AS createdDate,
|
||||
pdm.STATUS AS STATUS,
|
||||
pdm.Create_By AS createBy,
|
||||
pdm.Create_Time AS createTime,
|
||||
pdm.Update_By AS updateBy,
|
||||
pdm.Update_Time AS updateTime
|
||||
FROM
|
||||
((
|
||||
SELECT
|
||||
pm.id,
|
||||
pm.`Name`,
|
||||
pm.`Status`,
|
||||
pm.Org_Id,
|
||||
pm.Org_Name,
|
||||
pm.Powerr_Id,
|
||||
pm.Powerr_Name,
|
||||
pm.Line_Id,
|
||||
pm.Line_Name
|
||||
FROM
|
||||
pms_monitor AS pm
|
||||
) UNION ALL
|
||||
(
|
||||
SELECT
|
||||
ppd.id,
|
||||
ppd.`Name`,
|
||||
ppd.`Status`,
|
||||
ppd.Org_Id,
|
||||
ppd.Org_Name,
|
||||
ppd.Power_Station_Id,
|
||||
ppd.Powerr_Name,
|
||||
ppd.Line_Id,
|
||||
ppd.Line_Name
|
||||
FROM
|
||||
pms_power_distributionarea AS ppd
|
||||
)
|
||||
) AS monitor
|
||||
INNER JOIN pms_distribution_monitor AS pdm ON monitor.id = pdm.Monitor_Id
|
||||
WHERE
|
||||
monitor.`Status` = 1
|
||||
AND pdm.`Status` = 1
|
||||
AND monitor.Org_Id IN
|
||||
<foreach collection="deptIdList" item="orgId" open="(" close=")" separator=",">
|
||||
#{orgId}
|
||||
</foreach>
|
||||
<if test="pwPmsMonitorParam.voltageLevels!=null and pwPmsMonitorParam.voltageLevels.size()!=0">
|
||||
AND pdm.Voltage_Level IN
|
||||
<foreach collection="pwPmsMonitorParam.voltageLevels" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.powerId!=null and pwPmsMonitorParam.powerId.size()!=0">
|
||||
AND monitor.Powerr_Id IN
|
||||
<foreach collection="pwPmsMonitorParam.powerId" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.monitorSort!=null and pwPmsMonitorParam.monitorSort.size()!=0">
|
||||
AND pdm.Monitor_Sort IN
|
||||
<foreach collection="pwPmsMonitorParam.monitorSort" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.monitorState!=null and pwPmsMonitorParam.monitorState.size()!=0">
|
||||
AND pdm.Monitor_State IN
|
||||
<foreach collection="pwPmsMonitorParam.monitorState" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.ifPowerUser != null and pwPmsMonitorParam.ifPowerUser != ''">
|
||||
AND pdm.If_Power_User = #{pwPmsMonitorParam.ifPowerUser}
|
||||
</if>
|
||||
<if test="pwPmsMonitorParam.monitorName !=null and pwPmsMonitorParam.monitorName != ''">
|
||||
AND monitor.`Name` LIKE CONCAT('%',#{pwPmsMonitorParam.monitorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -12,6 +12,7 @@ import com.njcn.device.pms.pojo.po.PowerDistributionarea;
|
||||
import com.njcn.device.pms.pojo.vo.DoubleUserVO;
|
||||
import com.njcn.device.pms.pojo.vo.PmsPowerTreeMonitorVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -63,4 +64,5 @@ public interface DistributionMonitorMapper extends BaseMapper<DistributionMonito
|
||||
Page<PmsPowerTreeMonitorVO> getThreeMonitorByOrgIdFa(Page<Monitor> page, @Param("taiZhangParam")TaiZhangParam taiZhangParam, @Param("deptIds")List<String> deptIds);
|
||||
|
||||
|
||||
List<DistributionMonitor> distributionMonitorListByCondition(@Param("deptIds")List<String> deptIds, @Param("monitorSort")String monitorSort);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.njcn.device.pms.mapper.majornetwork;
|
||||
|
||||
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <专项分析-电气化铁路>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-01
|
||||
*/
|
||||
public interface SpecialAnalysisMapper {
|
||||
|
||||
/**
|
||||
* 专项分析-地图数据展示
|
||||
* @param deptIdList 部门集合(Code)
|
||||
* @param monitorTags 监测标签(字典)
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> selectList(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("monitorTags") String monitorTags);
|
||||
|
||||
/**
|
||||
* 同比环比数据(风电场,光伏电站,冶炼负荷)
|
||||
* @param deptIdList
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
SpecialAnalysisMonitorVO.CompareDetailVO selectYoYList(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("param")SpecialAnalysisParam.CompareDateParam param);
|
||||
|
||||
/**
|
||||
* 专项分析-地图数据展示
|
||||
* @param deptIdList 部门集合(Code)
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> selectRailwayList(@Param("deptIdList") List<String> deptIdList);
|
||||
|
||||
|
||||
/**
|
||||
* 地图展示数据-按电压展示数据(电气铁路)
|
||||
* @param deptIdList 部门集合(Code)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.CompareVO> selectMapDisplayRailway(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("param")SpecialAnalysisParam.CompareParam param);
|
||||
|
||||
/**
|
||||
* 地图展示数据-按接线类型展示(电气化铁路)
|
||||
* @param deptIdList
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.WiringTypeDetail> selectWiringTypeRailway(@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("param")SpecialAnalysisParam.CompareDateParam param);
|
||||
}
|
||||
@@ -57,7 +57,7 @@
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||
and a.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||
</if>
|
||||
and a.status = 1
|
||||
@@ -71,7 +71,7 @@
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||
and a.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||
</if>
|
||||
and a.status = 1
|
||||
@@ -87,7 +87,7 @@
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||
and yong.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||
</if>
|
||||
and dis.status = 1
|
||||
@@ -104,11 +104,72 @@
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=nlll">
|
||||
<if test="taiZhangParam.searchValue!='' and taiZhangParam.searchValue !=null">
|
||||
and fa.name like concat('%',#{taiZhangParam.searchValue},'%')
|
||||
</if>
|
||||
and dis.status = 1
|
||||
</select>
|
||||
<select id="distributionMonitorListByCondition" resultType="com.njcn.device.pms.pojo.po.DistributionMonitor">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
pms_distribution_monitor a
|
||||
WHERE
|
||||
1 = 1
|
||||
and a.Monitor_State in (select id from sys_dict_data sdd where sdd.code='Run' )
|
||||
<if test="monitorSort!='' and monitorSort !=null">
|
||||
|
||||
AND a.Monitor_Sort = #{monitorSort}
|
||||
</if>
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
pms_monitor b
|
||||
WHERE
|
||||
b.Org_Id IN
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
UNION
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
pms_power_client c
|
||||
WHERE
|
||||
c.Org_Id IN
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
UNION
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
pms_power_distributionarea d
|
||||
WHERE
|
||||
d.Org_Id IN
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
UNION
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
pms_power_generation_user e
|
||||
WHERE
|
||||
e.Org_Id IN
|
||||
<foreach collection="deptIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
) temp
|
||||
WHERE
|
||||
a.Monitor_Id = temp.id
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,5 +22,11 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<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>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,363 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.device.pms.mapper.majornetwork.SpecialAnalysisMapper">
|
||||
|
||||
<select id="selectList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
|
||||
SELECT
|
||||
pm.Id,
|
||||
pm.`Name`,
|
||||
pm.Org_Name,
|
||||
pm.Org_Id,
|
||||
pm.Powerr_Name,
|
||||
pm.Powerr_Id,
|
||||
pm.Terminal_Id,
|
||||
pm.Voltage_Level,
|
||||
psm.capacity,
|
||||
ps.Longitude,
|
||||
ps.Latitude
|
||||
FROM
|
||||
pms_monitor pm
|
||||
LEFT JOIN pms_statation_stat ps ON pm.Powerr_Id = ps.Power_Id
|
||||
LEFT JOIN pms_special_monitor psm ON pm.Id = psm.id
|
||||
<where>
|
||||
pm.`Status` = 1
|
||||
AND ps.`Status` = 1
|
||||
AND pm.Is_Special_Monitor = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND pm.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="monitorTags != null and monitorTags!=''">
|
||||
AND pm.Monitor_Tag = #{monitorTags}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectYoYList" resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$CompareDetailVO">
|
||||
SELECT
|
||||
SUM(ta.sumNum) as sumNum,
|
||||
IFNULL(SUM(tb.sumNum),0) as ytbSumNum,
|
||||
IFNULL(SUM(tc.sumNum),0) as yhbSumNum,
|
||||
ifnull(round((SUM(ta.sumNum)-SUM(tb.sumNum))/SUM(tb.sumNum)*100,2),0) as sameNum,
|
||||
ifnull(round((SUM(ta.sumNum)-SUM(tc.sumNum))/SUM(tc.sumNum)*100,2),0) as ringNum,
|
||||
|
||||
SUM(ta.sumNum2) as sumNum2,
|
||||
IFNULL(SUM(tb.sumNum2),0) as ytbSumNum2,
|
||||
IFNULL(SUM(tc.sumNum2),0) as yhbSumNum2,
|
||||
ifnull(round((SUM(ta.sumNum2)-SUM(tb.sumNum2))/SUM(tb.sumNum2)*100,2),0) as sameNum2,
|
||||
ifnull(round((SUM(ta.sumNum2)-SUM(tc.sumNum2))/SUM(tc.sumNum2)*100,2),0) as ringNum2,
|
||||
|
||||
SUM(ta.sumNum3) as sumNum3,
|
||||
IFNULL(SUM(tb.sumNum3),0) as ytbSumNum3,
|
||||
IFNULL(SUM(tc.sumNum3),0) as yhbSumNum3,
|
||||
ifnull(round((SUM(ta.sumNum3)-SUM(tb.sumNum3))/SUM(tb.sumNum3)*100,2),0) as sameNum3,
|
||||
ifnull(round((SUM(ta.sumNum3)-SUM(tc.sumNum3))/SUM(tc.sumNum3)*100,2),0) as ringNum3,
|
||||
|
||||
SUM(ta.sumNum4) as sumNum4,
|
||||
IFNULL(SUM(tb.sumNum4),0) as ytbSumNum4,
|
||||
IFNULL(SUM(tc.sumNum4),0) as yhbSumNum4,
|
||||
ifnull(round((SUM(ta.sumNum4)-SUM(tb.sumNum4))/SUM(tb.sumNum4)*100,2),0) as sameNum4,
|
||||
ifnull(round((SUM(ta.sumNum4)-SUM(tc.sumNum4))/SUM(tc.sumNum4)*100,2),0) as ringNum4,
|
||||
|
||||
SUM(ta.capacity) as capacity,
|
||||
IFNULL(SUM(tb.capacity),0) as ytbCapacity,
|
||||
IFNULL(SUM(tc.capacity),0) as yhbCapacity,
|
||||
ifnull(round((SUM(ta.capacity)-SUM(tb.capacity))/SUM(tb.capacity)*100,2),0) as sameCapacity,
|
||||
ifnull(round((SUM(ta.capacity)-SUM(tc.capacity))/SUM(tc.capacity)*100,2),0) as ringCapacity,
|
||||
|
||||
SUM(ta.capacity2) as capacity2,
|
||||
IFNULL(SUM(tb.capacity2),0) as ytbCapacity2,
|
||||
IFNULL(SUM(tc.capacity2),0) as yhbCapacity2,
|
||||
ifnull(round((SUM(ta.capacity2)-SUM(tb.capacity2))/SUM(tb.capacity2)*100,2),0) as sameCapacity2,
|
||||
ifnull(round((SUM(ta.capacity2)-SUM(tc.capacity2))/SUM(tc.capacity2)*100,2),0) as ringCapacity2,
|
||||
|
||||
SUM(ta.capacity3) as capacity3,
|
||||
IFNULL(SUM(tb.capacity3),0) as ytbCapacity3,
|
||||
IFNULL(SUM(tc.capacity3),0) as yhbCapacity3,
|
||||
ifnull(round((SUM(ta.capacity3)-SUM(tb.capacity3))/SUM(tb.capacity3)*100,2),0) as sameCapacity3,
|
||||
ifnull(round((SUM(ta.capacity3)-SUM(tc.capacity3))/SUM(tc.capacity3)*100,2),0) as ringCapacity3,
|
||||
|
||||
SUM(ta.capacity3) as capacity4,
|
||||
IFNULL(SUM(tb.capacity4),0) as ytbCapacity4,
|
||||
IFNULL(SUM(tc.capacity4),0) as yhbCapacity4,
|
||||
ifnull(round((SUM(ta.capacity4)-SUM(tb.capacity4))/SUM(tb.capacity4)*100,2),0) as sameCapacity4,
|
||||
ifnull(round((SUM(ta.capacity4)-SUM(tc.capacity4))/SUM(tc.capacity4)*100,2),0) as ringCapacity4
|
||||
FROM (
|
||||
SELECT
|
||||
t.Org_Id,
|
||||
year(t.Data_Date) as yy,
|
||||
month(t.Data_Date) as mm,
|
||||
sum(t.Wind_Power_Num) as sumNum,
|
||||
sum(t.Pv_Num) as sumNum2,
|
||||
sum(t.Electric_Track_Num) as sumNum3,
|
||||
sum(t.Smelting_Load_Num) as sumNum4,
|
||||
|
||||
sum(t.Wind_Power_Capacity) as capacity,
|
||||
sum(t.Pv_Capacity) as capacity2,
|
||||
sum(t.Electric_Track_Capacity) as capacity3,
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY t.Org_Id,yy,mm
|
||||
) ta
|
||||
-- 同比:上年同月
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
t.Org_Id,
|
||||
year(t.Data_Date) as yy,
|
||||
month(t.Data_Date) as mm,
|
||||
sum(t.Wind_Power_Num) as sumNum,
|
||||
sum(t.Pv_Num) as sumNum2,
|
||||
sum(t.Electric_Track_Num) as sumNum3,
|
||||
sum(t.Smelting_Load_Num) as sumNum4,
|
||||
|
||||
sum(t.Wind_Power_Capacity) as capacity,
|
||||
sum(t.Pv_Capacity) as capacity2,
|
||||
sum(t.Electric_Track_Capacity) as capacity3,
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY t.Org_Id,yy,mm
|
||||
) tb
|
||||
ON tb.mm = ta.mm and tb.yy = ta.yy-1 and tb.Org_Id = ta.Org_Id
|
||||
-- 环比:上月
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
t.Org_Id,
|
||||
year(t.Data_Date) as yy,
|
||||
month(t.Data_Date) as mm,
|
||||
sum(t.Wind_Power_Num) as sumNum,
|
||||
sum(t.Pv_Num) as sumNum2,
|
||||
sum(t.Electric_Track_Num) as sumNum3,
|
||||
sum(t.Smelting_Load_Num) as sumNum4,
|
||||
|
||||
sum(t.Wind_Power_Capacity) as capacity,
|
||||
sum(t.Pv_Capacity) as capacity2,
|
||||
sum(t.Electric_Track_Capacity) as capacity3,
|
||||
sum(t.Smelting_Load_Capacity) as capacity4
|
||||
FROM pms_statistics_special_monitor t
|
||||
<where>
|
||||
AND t.`Status` = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY t.Org_Id,yy,mm
|
||||
) tc
|
||||
ON (
|
||||
(tc.yy = ta.yy and tc.mm = ta.mm - 1 and tc.Org_Id = ta.Org_Id)
|
||||
OR
|
||||
(tc.yy=ta.yy - 1 AND tc.mm = 12 AND ta.mm = 1 and tc.Org_Id = ta.Org_Id)
|
||||
)
|
||||
<where>
|
||||
<if test="param.year != null and param.year!=''">
|
||||
AND ta.yy = #{param.year}
|
||||
</if>
|
||||
<if test="param.month != null and param.month.size > 0">
|
||||
AND ta.mm IN
|
||||
<foreach collection='param.month' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectRailwayList"
|
||||
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$SpecialAnalysisVO">
|
||||
SELECT
|
||||
pts.Id,
|
||||
pts.`Name`,
|
||||
pts.Org_Name,
|
||||
pts.Org_Id,
|
||||
pts.Power_Name as powerrName,
|
||||
pts.Power_Id as powerrId,
|
||||
pts.Voltage_Level,
|
||||
ptse.capacity,
|
||||
ps.Longitude,
|
||||
ps.Latitude
|
||||
FROM
|
||||
pms_traction_station pts
|
||||
LEFT JOIN pms_statation_stat ps ON pts.Power_Id = ps.Power_Id
|
||||
LEFT JOIN pms_traction_station_expand ptse ON ptse.traction_Station_Id = pts.Id
|
||||
<where>
|
||||
pts.`Status` = 1
|
||||
AND ps.`Status` = 1
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND pts.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectMapDisplayRailway"
|
||||
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$CompareVO">
|
||||
SELECT
|
||||
CASE
|
||||
ta.railway_type
|
||||
WHEN 1 THEN
|
||||
"高铁" ELSE "普铁"
|
||||
END as name,
|
||||
SUM( ta.sumNum2 ) AS tractionStation,
|
||||
SUM( ta.sumNum ) AS num,
|
||||
IFNULL( SUM( tb.sumNum ), 0 ) AS ytbSumNum,
|
||||
IFNULL( SUM( tc.sumNum ), 0 ) AS yhbSumNum,
|
||||
concat(
|
||||
ifnull( round(( SUM( ta.sumNum )- SUM( tb.sumNum ))/ SUM( tb.sumNum )* 100, 2 ), 0 ),
|
||||
'%'
|
||||
) AS sameNum,
|
||||
concat(
|
||||
ifnull( round(( SUM( ta.sumNum )- SUM( tc.sumNum ))/ SUM( tc.sumNum )* 100, 2 ), 0 ),
|
||||
'%'
|
||||
) AS ringNum
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t.railway_type,
|
||||
YEAR ( t.Created_Date ) AS yy,
|
||||
MONTH ( t.Created_Date ) AS mm,
|
||||
sum( t.traction_Station_num ) AS sumNum2,
|
||||
sum( t.monitor_num ) AS sumNum
|
||||
FROM
|
||||
pms_traction_station_expand t
|
||||
<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=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
t.railway_type,
|
||||
yy,
|
||||
mm
|
||||
) ta -- 同比:上年同月
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
t.railway_type,
|
||||
YEAR ( t.Created_Date ) AS yy,
|
||||
MONTH ( t.Created_Date ) AS mm,
|
||||
sum( t.traction_Station_num ) AS sumNum2,
|
||||
sum( t.monitor_num ) AS sumNum
|
||||
FROM
|
||||
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=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
t.railway_type,
|
||||
yy,
|
||||
mm
|
||||
) tb ON tb.mm = ta.mm
|
||||
AND tb.yy = ta.yy - 1
|
||||
AND tb.railway_type = ta.railway_type -- 环比:上月
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
t.railway_type,
|
||||
YEAR ( t.Created_Date ) AS yy,
|
||||
MONTH ( t.Created_Date ) AS mm,
|
||||
sum( t.traction_Station_num ) AS sumNum2,
|
||||
sum( t.monitor_num ) AS sumNum
|
||||
FROM
|
||||
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=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
t.railway_type,
|
||||
yy,
|
||||
mm
|
||||
) tc ON (
|
||||
( tc.yy = ta.yy AND tc.mm = ta.mm - 1 AND tc.railway_type = ta.railway_type )
|
||||
OR (
|
||||
tc.yy = ta.yy - 1
|
||||
AND tc.mm = 12
|
||||
AND ta.mm = 1
|
||||
AND tc.railway_type = ta.railway_type
|
||||
)
|
||||
)
|
||||
<where>
|
||||
<if test="param.year != null and param.year!=''">
|
||||
AND ta.yy = #{param.year}
|
||||
</if>
|
||||
<if test="param.month != null and param.month.size > 0">
|
||||
AND ta.mm IN
|
||||
<foreach collection='param.month' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
ta.railway_type
|
||||
|
||||
</select>
|
||||
<select id="selectWiringTypeRailway"
|
||||
resultType="com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO$WiringTypeDetail">
|
||||
SELECT
|
||||
connet_group_way,
|
||||
sum( traction_Station_num ) as num,
|
||||
sum( load_rate_avg ) as rateAvg,
|
||||
sum( load_rate_95 ) as rate95,
|
||||
sum( load_rate_99 ) as rate99
|
||||
FROM
|
||||
pms_traction_station_expand
|
||||
<where>
|
||||
<if test="deptIdList != null and deptIdList.size > 0">
|
||||
AND t.Org_Id IN
|
||||
<foreach collection='deptIdList' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY
|
||||
connet_group_way
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -5,33 +5,35 @@
|
||||
<!--获取牵引站详细信息-->
|
||||
<select id="getPmsTractionStationInfo" resultType="com.njcn.device.pms.pojo.dto.PmsTractionStationDTO">
|
||||
SELECT
|
||||
Id AS id,
|
||||
`NAME` AS name,
|
||||
Org_Name AS orgName,
|
||||
Org_Id AS orgId,
|
||||
Operation_Name AS operationName,
|
||||
Operation_Id AS operationId,
|
||||
Voltage_Level AS voltageLevel,
|
||||
Railway_Line_Id AS railwayLineId,
|
||||
Railway_Line_Name AS railwayLineName,
|
||||
Connet_Group_Way AS connetGroupWay,
|
||||
Rated_Capacity AS ratedCapacity,
|
||||
Power_Id AS powerId,
|
||||
Power_Name AS powerName,
|
||||
Power_Voltage_Level AS powerVoltageLevel,
|
||||
If_Special AS ifSpecial,
|
||||
Created_Date AS createdDate,
|
||||
User_Tag AS userTag,
|
||||
Is_Up_To_Grid AS isUpToGrid,
|
||||
`STATUS` AS `status`,
|
||||
Create_By AS createBy,
|
||||
Create_Time AS createTime,
|
||||
Update_By AS updateBy,
|
||||
Update_Time AS updateTime
|
||||
pts.Id AS id,
|
||||
pts.`NAME` AS name,
|
||||
ptse.`railway_type` AS railwayType,
|
||||
pts.Org_Name AS orgName,
|
||||
pts.Org_Id AS orgId,
|
||||
pts.Operation_Name AS operationName,
|
||||
pts.Operation_Id AS operationId,
|
||||
pts.Voltage_Level AS voltageLevel,
|
||||
pts.Railway_Line_Id AS railwayLineId,
|
||||
pts.Railway_Line_Name AS railwayLineName,
|
||||
pts.Connet_Group_Way AS connetGroupWay,
|
||||
pts.Rated_Capacity AS ratedCapacity,
|
||||
pts.Power_Id AS powerId,
|
||||
pts.Power_Name AS powerName,
|
||||
pts.Power_Voltage_Level AS powerVoltageLevel,
|
||||
pts.If_Special AS ifSpecial,
|
||||
pts.Created_Date AS createdDate,
|
||||
pts.User_Tag AS userTag,
|
||||
pts.Is_Up_To_Grid AS isUpToGrid,
|
||||
pts.`STATUS` AS `status`,
|
||||
pts.Create_By AS createBy,
|
||||
pts.Create_Time AS createTime,
|
||||
pts.Update_By AS updateBy,
|
||||
pts.Update_Time AS updateTime
|
||||
FROM
|
||||
pms_traction_Station
|
||||
pms_traction_Station pts
|
||||
LEFT JOIN pms_traction_station_expand ptse on ptse.traction_Station_Id=pts.id and ptse.Org_Id=pts.Org_Id
|
||||
WHERE
|
||||
Org_Id IN
|
||||
pts.Org_Id IN
|
||||
<foreach collection="param.orgIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
@@ -19,4 +19,11 @@ public interface IPwMonitorService {
|
||||
* @return 配网所有监测点信息
|
||||
*/
|
||||
List<PwPmsMonitorDTO> getPwMonitorList(PwPmsMonitorParam pwPmsMonitorParam);
|
||||
|
||||
/**
|
||||
* 获取分布式光伏配网所有监测点信息
|
||||
* @param pwPmsMonitorParam
|
||||
* @return
|
||||
*/
|
||||
List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.njcn.device.pms.pojo.param.PwPmsMonitorParam;
|
||||
import com.njcn.device.pms.service.distribution.IPwMonitorService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -83,5 +84,20 @@ public class IPwMonitorServiceImpl implements IPwMonitorService {
|
||||
}
|
||||
return pwPmsMonitorDTOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam) {
|
||||
//定义待返回终端信息
|
||||
List<PwPmsMonitorDTO> pwPmsMonitorDTOS = new ArrayList<>();
|
||||
List<Dept> deptInfos = deptFeignClient.getDirectSonSelf(pwPmsMonitorParam.getOrgId()).getData();
|
||||
// 过滤出传入id的子单位id
|
||||
List<String> deptIdList = deptInfos.stream()
|
||||
.map(Dept::getCode)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
//获取monitor详细数据
|
||||
return pwMonitorMapper.getPwPhotovoltaicMonitorList(deptIdList, pwPmsMonitorParam);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,4 +58,12 @@ public interface IDistributionMonitorService extends IService<DistributionMonito
|
||||
* @date 2022/12/5
|
||||
*/
|
||||
Boolean delDistributionMonitor(TaiZhangDelParam taiZhangDelParam);
|
||||
/**
|
||||
* @Description: 按部门获取旗下配网所有监测点(分一类,二类,三类)
|
||||
* @Param: [orgId, monitorSort]
|
||||
* @return: java.util.List<com.njcn.device.pms.pojo.po.DistributionMonitor>
|
||||
* @Author: clam
|
||||
* @Date: 2022/12/14
|
||||
*/
|
||||
List<DistributionMonitor> distributionMonitorListByCondition(String orgId, String monitorSort);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.device.pms.service.majornetwork;
|
||||
|
||||
|
||||
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <专项分许>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-01
|
||||
*/
|
||||
public interface SpecialAnalysisService {
|
||||
|
||||
/**
|
||||
* 专项分析-地图数据展示(风电场,光伏电站,冶炼负荷)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
SpecialAnalysisMonitorVO getMonitorList(SpecialAnalysisParam param);
|
||||
|
||||
/**
|
||||
* 同比环比数据(风电场,光伏电站,冶炼负荷)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
SpecialAnalysisMonitorVO.CompareDetailVO getYoYList(SpecialAnalysisParam.CompareDateParam param);
|
||||
|
||||
/**
|
||||
* 专项分析-地图数据展示(电气化铁路)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> getDisplayRailway(SpecialAnalysisParam param);
|
||||
|
||||
/**
|
||||
* 地图展示数据-按电压展示数据(电气化铁路)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.CompareVO> getMapDisplayRailway(SpecialAnalysisParam.CompareParam param);
|
||||
|
||||
/**
|
||||
* 地图展示数据-按接线类型展示(电气化铁路)
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SpecialAnalysisMonitorVO.WiringTypeDetail> getWiringTypeRailway(SpecialAnalysisParam.CompareDateParam param);
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
@@ -19,6 +20,7 @@ import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.constant.DicDataConstant;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -51,6 +53,11 @@ public class DistributionMonitorServiceImpl extends ServiceImpl<DistributionMoni
|
||||
|
||||
private final PowerGenerationUserMapper powerGenerationUserMapper;
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
|
||||
private final DistributionMonitorMapper distributionMonitorMapper;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<PmsMonitorBaseDTO> getMonitorByCondition(List<String> deptIdList, PmsDeviceInfoParam pmsDeviceInfoParam) {
|
||||
@@ -175,4 +182,22 @@ public class DistributionMonitorServiceImpl extends ServiceImpl<DistributionMoni
|
||||
lambdaQueryWrapper.in(DistributionMonitor::getMonitorId, taiZhangDelParam.getIds());
|
||||
return this.remove(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param orgId
|
||||
* @param monitorSort
|
||||
* @Description: 按部门获取旗下配网所有监测点(分一类,二类,三类)
|
||||
* @Param: [orgId, monitorSort]
|
||||
* @return: java.util.List<com.njcn.device.pms.pojo.po.DistributionMonitor>
|
||||
* @Author: clam
|
||||
* @Date: 2022/12/14
|
||||
*/
|
||||
@Override
|
||||
public List<DistributionMonitor> distributionMonitorListByCondition(String orgId, String monitorSort) {
|
||||
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByDeptId(orgId).getData();
|
||||
|
||||
List<DistributionMonitor> distributionMonitorList = distributionMonitorMapper.distributionMonitorListByCondition (deptIds,monitorSort);
|
||||
return distributionMonitorList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.njcn.device.pms.mapper.majornetwork.SpecialAnalysisMapper;
|
||||
import com.njcn.device.pms.pojo.param.SpecialAnalysisParam;
|
||||
import com.njcn.device.pms.pojo.vo.SpecialAnalysisMonitorVO;
|
||||
import com.njcn.device.pms.service.majornetwork.SpecialAnalysisService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <专项分析>
|
||||
*
|
||||
* @author wr
|
||||
* @createTime: 2022-12-01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
||||
|
||||
private final DeptFeignClient deptFeignClient;
|
||||
private final SpecialAnalysisMapper specialAnalysisMapper;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
@Override
|
||||
public SpecialAnalysisMonitorVO getMonitorList(SpecialAnalysisParam param) {
|
||||
//初始化对象
|
||||
SpecialAnalysisMonitorVO vo=new SpecialAnalysisMonitorVO();
|
||||
//专项分析-只是统计当前所在部门及下部门直接挂钩的监测点
|
||||
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()) {
|
||||
//光伏电站
|
||||
case 1:
|
||||
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.POWER_STATION.getCode()).getData();
|
||||
break;
|
||||
//冶炼负荷
|
||||
case 2:
|
||||
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.SMELT_LOAD.getCode()).getData();
|
||||
break;
|
||||
//风电场
|
||||
default:
|
||||
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.ONSHORE_WIND.getCode()).getData();
|
||||
break;
|
||||
}
|
||||
List<SpecialAnalysisMonitorVO.SpecialAnalysisVO> infoList = specialAnalysisMapper.selectList(deptIds, null);
|
||||
if(CollectionUtil.isNotEmpty(infoList)){
|
||||
vo.setSpecialAnalysisVOList(infoList);
|
||||
|
||||
//2.根据电压等级分组显示数据
|
||||
Map<String, Long> map = infoList.stream().collect(Collectors.groupingBy(su -> su.getVoltageLevel(), Collectors.counting()));
|
||||
List<Map<String,String>> maps=new ArrayList<>();
|
||||
Map<String, String> newMap;
|
||||
for (String key : map.keySet()) {
|
||||
newMap=new HashMap<>();
|
||||
newMap.put("name",key);
|
||||
newMap.put("value",map.get(key).toString());
|
||||
maps.add(newMap);
|
||||
}
|
||||
vo.setVoltageLevelMap(maps);
|
||||
}
|
||||
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 获取部门信息
|
||||
List<Dept> deptList = deptFeignClient.getSpecialDeptList().getData();
|
||||
List<String> deptIds = deptList.stream().map(Dept::getCode).collect(Collectors.toList());
|
||||
return specialAnalysisMapper.selectRailwayList(deptIds);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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());
|
||||
//子节点获取监测点类别(监测标签)
|
||||
List<DictData> lineData = dicDataFeignClient.getDicDataByTypeCode(
|
||||
DicDataTypeEnum.CONNET_GROUP_WAY.getCode()).getData();
|
||||
|
||||
|
||||
List<SpecialAnalysisMonitorVO.WiringTypeDetail> wiringTypeRailway = specialAnalysisMapper.selectWiringTypeRailway(deptIds, param);
|
||||
Map<String, SpecialAnalysisMonitorVO.WiringTypeDetail> detailMap = wiringTypeRailway.stream()
|
||||
.collect(Collectors.toMap(SpecialAnalysisMonitorVO.WiringTypeDetail::getConnetGroupWay, Function.identity()));
|
||||
//处理主节点不存在的集合
|
||||
List<DictData> notMeasurementList = lineData.stream().filter(r -> !detailMap.containsKey(r.getId()))
|
||||
.collect(Collectors.toList());
|
||||
SpecialAnalysisMonitorVO.WiringTypeDetail wiringTypeDetail ;
|
||||
for (DictData notData : notMeasurementList) {
|
||||
wiringTypeDetail = new SpecialAnalysisMonitorVO.WiringTypeDetail();
|
||||
wiringTypeDetail.setConnetGroupWay(notData.getId());
|
||||
wiringTypeDetail.setNum("0");
|
||||
wiringTypeDetail.setRateAvg("0");
|
||||
wiringTypeDetail.setRate95("0");
|
||||
wiringTypeDetail.setRate99("0");
|
||||
wiringTypeRailway.add(wiringTypeDetail);
|
||||
}
|
||||
return wiringTypeRailway;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user