合并代码
This commit is contained in:
@@ -5,6 +5,9 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author hany
|
||||
* @since 2022-10-26
|
||||
@@ -13,69 +16,91 @@ import lombok.EqualsAndHashCode;
|
||||
public class PowerDistributionareaParam {
|
||||
|
||||
@ApiModelProperty("台区编号")
|
||||
@NotBlank(message = "台区编号不可为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(name = "name", value = "台区名称")
|
||||
@NotBlank(message = "台区名称不可为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(name = "orgName", value = "组织机构名称")
|
||||
@NotBlank(message = "组织机构名称不可为空")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty(name = "orgId", value = "组织机构ID")
|
||||
@ApiModelProperty(name = "orgId", value = "组织机构编号")
|
||||
@NotBlank(message = "组织机构编号不可为空")
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty(name = "operationName", value = "运维单位名称")
|
||||
@NotBlank(message = "运维单位名称不可为空")
|
||||
private String operationName;
|
||||
|
||||
@ApiModelProperty(name = "operationId", value = "运维单位ID")
|
||||
@ApiModelProperty(name = "operationId", value = "运维单位编号")
|
||||
@NotBlank(message = "运维单位编号不可为空")
|
||||
private String operationId;
|
||||
|
||||
@ApiModelProperty(name = "powerrName", value = "变电站名称")
|
||||
@NotBlank(message = "变电站名称不可为空")
|
||||
private String powerrName;
|
||||
|
||||
@ApiModelProperty(name = "powerStationId", value = "电站ID")
|
||||
@ApiModelProperty(name = "powerStationId", value = "电站编号")
|
||||
@NotBlank(message = "电站编号不可为空")
|
||||
private String powerStationId;
|
||||
|
||||
@ApiModelProperty(name = "lineName", value = "监测线路名称")
|
||||
@NotBlank(message = "监测线路名称不可为空")
|
||||
private String lineName;
|
||||
|
||||
@ApiModelProperty(name = "lineId", value = "所属线路ID")
|
||||
@ApiModelProperty(name = "lineId", value = "所属线路编号")
|
||||
@NotBlank(message = "所属线路编号不可为空")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(name = "pCapacity", value = "配变容量")
|
||||
@NotNull(message = "配变容量不可为空")
|
||||
private Float pCapacity;
|
||||
|
||||
@ApiModelProperty(name = "regionalism", value = "地区特征")
|
||||
@NotBlank(message = "地区特征不可为空")
|
||||
private String regionalism;
|
||||
|
||||
@ApiModelProperty(name = "ifRuralPowerGrid", value = "是否农网:0-否;1:是")
|
||||
@NotNull(message = "是否农网不可为空")
|
||||
private Integer ifRuralPowerGrid;
|
||||
|
||||
@ApiModelProperty(name = "natureOfUse", value = "使用性质")
|
||||
@NotBlank(message = "使用性质不可为空")
|
||||
private String natureOfUse;
|
||||
|
||||
@ApiModelProperty(name = "powerSupplyRadius", value = "供电半径")
|
||||
@NotNull(message = "供电半径不可为空")
|
||||
private Float powerSupplyRadius;
|
||||
|
||||
@ApiModelProperty(name = "lineLength", value = "供电线路总长度")
|
||||
@NotNull(message = "供电线路总长度不可为空")
|
||||
private Float lineLength;
|
||||
|
||||
@ApiModelProperty(name = "state", value = "运行状态")
|
||||
@NotBlank(message = "运行状态不可为空")
|
||||
private String state;
|
||||
|
||||
@ApiModelProperty(name = "distributedPhotovoltaicNum", value = "分布式光伏用户数")
|
||||
@NotNull(message = "分布式光伏用户数不可为空")
|
||||
private Integer distributedPhotovoltaicNum;
|
||||
|
||||
@ApiModelProperty(name = "photovoltaicCapacity", value = "分布式光伏总装机容量")
|
||||
@NotNull(message = "分布式光伏总装机容量不可为空")
|
||||
private Float photovoltaicCapacity;
|
||||
|
||||
@ApiModelProperty(name = "ifBevAp", value = "是否有电动汽车接入:0-否;1:是")
|
||||
@NotNull(message = "是否有电动汽车接入不可为空")
|
||||
private Integer ifBevAp;
|
||||
|
||||
@ApiModelProperty(name = "apLoadType", value = "接入负荷类型")
|
||||
@NotBlank(message = "接入负荷类型不可为空")
|
||||
private String apLoadType;
|
||||
|
||||
@ApiModelProperty(name = "isUpToGrid", value = "是否是上送国网监测点,0-否 1-是")
|
||||
@NotNull(message = "是否是上送国网监测点不可为空")
|
||||
private Integer isUpToGrid;
|
||||
|
||||
}
|
||||
|
||||
@@ -51,4 +51,7 @@ public class RMpDevEvaluateDetailVO implements Serializable {
|
||||
|
||||
@ApiModelProperty(name = "assessment", value = "综合评价")
|
||||
private Double assessment;
|
||||
|
||||
@ApiModelProperty(name = "devCount", value = "在运终端数量")
|
||||
private Integer devCount;
|
||||
}
|
||||
|
||||
@@ -55,4 +55,10 @@ public class RQualityParameterPollVO implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(name = "problemYearOnYear", value = "存在数据质量问题监测点同比")
|
||||
private String problemYearOnYear;
|
||||
|
||||
/**
|
||||
* 数据类型,字典表(01:主网测点 02:配网测点)
|
||||
*/
|
||||
@ApiModelProperty(name = "dataType",value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
||||
private String dataType;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.device.pms.controller.majornetwork;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
@@ -98,10 +99,19 @@ public class PowerClientController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPowerClientList")
|
||||
@ApiOperation("获取用电用户列表")
|
||||
@ApiImplicitParam(name = "baseParam", value = "基本查询体", required = true)
|
||||
public HttpResult<List<PowerClient>> getPowerClientList(@RequestBody BaseParam baseParam) {
|
||||
public HttpResult<List<PowerClient>> getPowerClientList() {
|
||||
String methodDescribe = getMethodDescribe("getPowerClientList");
|
||||
List<PowerClient> result = iPowerClientService.getPowerClientList(baseParam);
|
||||
List<PowerClient> result = iPowerClientService.getPowerClientList();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPowerClientPageList")
|
||||
@ApiOperation("分页获取用电用户列表")
|
||||
@ApiImplicitParam(name = "baseParam", value = "基本查询体", required = true)
|
||||
public HttpResult<Page<PowerClient>> getPowerClientPageList(@RequestBody BaseParam baseParam) {
|
||||
String methodDescribe = getMethodDescribe("getPowerClientPageList");
|
||||
Page<PowerClient> result = iPowerClientService.getPowerClientPageList(baseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.device.pms.controller.majornetwork;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
@@ -98,10 +99,19 @@ public class PowerGenerationUserController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPowerGenerationUserList")
|
||||
@ApiOperation("获取发电用户列表")
|
||||
@ApiImplicitParam(name = "baseParam", value = "基本查询体", required = true)
|
||||
public HttpResult<List<PowerGenerationUser>> getPowerGenerationUserList(@RequestBody BaseParam baseParam) {
|
||||
public HttpResult<List<PowerGenerationUser>> getPowerGenerationUserList() {
|
||||
String methodDescribe = getMethodDescribe("getPowerGenerationUserList");
|
||||
List<PowerGenerationUser> result = iPowerGenerationUserService.getPowerGenerationUserList(baseParam);
|
||||
List<PowerGenerationUser> result = iPowerGenerationUserService.getPowerGenerationUserList();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getPowerGenerationUserPageList")
|
||||
@ApiOperation("分页获取发电用户列表")
|
||||
@ApiImplicitParam(name = "baseParam", value = "基本查询体", required = true)
|
||||
public HttpResult<Page<PowerGenerationUser>> getPowerGenerationUserPageList(@RequestBody BaseParam baseParam) {
|
||||
String methodDescribe = getMethodDescribe("getPowerGenerationUserPageList");
|
||||
Page<PowerGenerationUser> result = iPowerGenerationUserService.getPowerGenerationUserPageList(baseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
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.UniversalFrontEndParam;
|
||||
import com.njcn.device.pms.pojo.vo.RmpEventDetailVO;
|
||||
import com.njcn.device.pms.service.majornetwork.RmpEventDetailService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 暂态事件明细
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/12
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/rmpEventDetail")
|
||||
@Api(tags = "暂态事件明细")
|
||||
@RequiredArgsConstructor
|
||||
public class RmpEventDetailController extends BaseController {
|
||||
|
||||
private final RmpEventDetailService rmpEventDetailService;
|
||||
|
||||
/**
|
||||
* 获取暂态事件明细
|
||||
*
|
||||
* @param param 前端传入参数
|
||||
* @return 暂态事件明细
|
||||
*/
|
||||
@PostMapping("/getDetailsOfTransientEvents")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("获取区域暂态指标统计")
|
||||
@ApiImplicitParam(name = "param", value = "前端参数", required = true)
|
||||
public HttpResult<List<RmpEventDetailVO>> getRmpEventDetail(@RequestBody UniversalFrontEndParam param) {
|
||||
String methodDescribe = getMethodDescribe("getRmpEventDetail");
|
||||
List<RmpEventDetailVO> list = rmpEventDetailService.getRmpEventDetail(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -19,15 +19,15 @@ public interface RQualityParameterMapper {
|
||||
/**
|
||||
* 获取主网数据质量-台账数据质量统计
|
||||
*
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param dataType 主网测点
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param distributionPoint 配网测点
|
||||
* @return java.util.List<com.njcn.event.pojo.po.RQualityParameterPO>
|
||||
* @author yzh
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
List<RQualityParameterPO> getLedgerDataQualityStat(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("dataType") String dataType);
|
||||
@Param("distributionPoint") String distributionPoint);
|
||||
|
||||
}
|
||||
|
||||
@@ -19,36 +19,42 @@ public interface RStatAccountCheckDataMapper {
|
||||
/**
|
||||
* 获取主网数据质量-台帐类数据质量核查(年)
|
||||
*
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param mainnetPoint 主网字典id
|
||||
* @return java.util.List<com.njcn.event.pojo.po.RStatAccountCheckDataPO>
|
||||
* @author yzh
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
List<RStatAccountCheckDataVO> getYearInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList);
|
||||
List<RStatAccountCheckDataVO> getRStatAccountCheckDataYearInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("mainnetPoint") String mainnetPoint);
|
||||
|
||||
/**
|
||||
* 获取主网数据质量-台帐类数据质量核查(季)
|
||||
*
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param mainnetPoint 主网字典id
|
||||
* @return java.util.List<com.njcn.event.pojo.po.RStatAccountCheckDataPO>
|
||||
* @author yzh
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
List<RStatAccountCheckDataVO> getSeasonInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList);
|
||||
List<RStatAccountCheckDataVO> getRStatAccountCheckDataSeasonInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("mainnetPoint") String mainnetPoint);
|
||||
|
||||
/**
|
||||
* 获取主网数据质量-台帐类数据质量核查(月)
|
||||
*
|
||||
* @param param 单位id
|
||||
* @param deptIdList 条件参数
|
||||
* @param param 单位id
|
||||
* @param deptIdList 条件参数
|
||||
* @param mainnetPoint 主网字典id
|
||||
* @return java.util.List<com.njcn.event.pojo.po.RStatAccountCheckDataPO>
|
||||
* @author yzh
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
List<RStatAccountCheckDataVO> getMonthInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList);
|
||||
List<RStatAccountCheckDataVO> getRStatAccountCheckDataMonthInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("mainnetPoint") String mainnetPoint);
|
||||
}
|
||||
|
||||
@@ -19,36 +19,42 @@ public interface RStatTargetCheckDataMapper {
|
||||
/**
|
||||
* 获取主网数据质量-台帐类数据质量核查(年)
|
||||
*
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param mainnetPoint 主网字典id
|
||||
* @return java.util.List<com.njcn.event.pojo.vo.RStatAccountCheckDataVO>
|
||||
* @author yzh
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
List<RStatTargetCheckDataVO> getYearInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList);
|
||||
List<RStatTargetCheckDataVO> getRStatTargetCheckDataYearInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("mainnetPoint") String mainnetPoint);
|
||||
|
||||
/**
|
||||
* 获取主网数据质量-台帐类数据质量核查(季)
|
||||
*
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param mainnetPoint 主网字典id
|
||||
* @return java.util.List<com.njcn.event.pojo.vo.RStatAccountCheckDataVO>
|
||||
* @author yzh
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
List<RStatTargetCheckDataVO> getSeasonInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList);
|
||||
List<RStatTargetCheckDataVO> getRStatTargetCheckDataSeasonInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("mainnetPoint") String mainnetPoint);
|
||||
|
||||
/**
|
||||
* 获取主网数据质量-台帐类数据质量核查(月)
|
||||
*
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param param 条件参数
|
||||
* @param deptIdList 单位id
|
||||
* @param mainnetPoint 主网字典id
|
||||
* @return java.util.List<com.njcn.event.pojo.vo.RStatAccountCheckDataVO>
|
||||
* @author yzh
|
||||
* @date 2022/11/2
|
||||
*/
|
||||
List<RStatTargetCheckDataVO> getMonthInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList);
|
||||
List<RStatTargetCheckDataVO> getRStatTargetCheckDataMonthInfo(@Param("param") StatisticsBizBaseParam param,
|
||||
@Param("deptIdList") List<String> deptIdList,
|
||||
@Param("mainnetPoint") String mainnetPoint);
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
AND DATE_FORMAT(b.data_date, '%Y-%m-%d') <= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
<if test="dataType != null and dataType != ''">
|
||||
AND b.data_type = #{dataType}
|
||||
<if test="distributionPoint != null and distributionPoint != ''">
|
||||
AND b.data_type = #{distributionPoint}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -30,6 +30,7 @@
|
||||
<foreach collection="deptIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND data_type = #{mainnetPoint}
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
AND DATE_FORMAT(data_date, '%Y-%m-%d') >= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d')
|
||||
</if>
|
||||
@@ -39,7 +40,7 @@
|
||||
</sql>
|
||||
|
||||
<!--获取主网数据质量-台帐类数据质量核查(年)-->
|
||||
<select id="getYearInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO">
|
||||
<select id="getRStatAccountCheckDataYearInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM r_stat_account_check_data_y
|
||||
@@ -48,7 +49,7 @@
|
||||
</select>
|
||||
|
||||
<!--获取主网数据质量-台帐类数据质量核查(季)-->
|
||||
<select id="getSeasonInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO">
|
||||
<select id="getRStatAccountCheckDataSeasonInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO">
|
||||
<include refid="query_field"></include>
|
||||
FROM r_stat_account_check_data_q
|
||||
WHERE
|
||||
@@ -56,7 +57,7 @@
|
||||
</select>
|
||||
|
||||
<!--获取主网数据质量-台帐类数据质量核查(月)-->
|
||||
<select id="getMonthInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO">
|
||||
<select id="getRStatAccountCheckDataMonthInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM r_stat_account_check_data_m
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<foreach collection="deptIdList" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND data_type = #{mainnetPoint}
|
||||
<if test="param.startTime != null and param.startTime != ''">
|
||||
AND DATE_FORMAT( data_date,'%Y-%m-%d') >= DATE_FORMAT(#{param.startTime},'%Y-%m-%d')
|
||||
</if>
|
||||
@@ -41,7 +42,7 @@
|
||||
</sql>
|
||||
|
||||
<!--获取主网数据质量-台帐类数据质量核查(年)-->
|
||||
<select id="getYearInfo" resultType="com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO">
|
||||
<select id="getRStatTargetCheckDataYearInfo" resultType="com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
@@ -51,7 +52,7 @@
|
||||
</select>
|
||||
|
||||
<!--获取主网数据质量-台帐类数据质量核查(季)-->
|
||||
<select id="getSeasonInfo" resultType="com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO">
|
||||
<select id="getRStatTargetCheckDataSeasonInfo" resultType="com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
@@ -61,7 +62,7 @@
|
||||
</select>
|
||||
|
||||
<!--获取主网数据质量-台帐类数据质量核查(月)-->
|
||||
<select id="getMonthInfo" resultType="com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO">
|
||||
<select id="getRStatTargetCheckDataMonthInfo" resultType="com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO">
|
||||
SELECT
|
||||
<include refid="query_field"></include>
|
||||
FROM
|
||||
|
||||
@@ -135,7 +135,7 @@ public class PwDataQualityDetailsServiceImpl implements PwDataQualityDetailsServ
|
||||
vo.setPlatformAreaName("/");
|
||||
}
|
||||
// TODO 地市公司
|
||||
vo.setCityCompany("南京");
|
||||
vo.setCityCompany(dataMap.get(vo.getMonitorId()).getOrgName());
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@@ -76,10 +76,8 @@ implements PwRMpMonitorAlarmCountMService {
|
||||
if (CollUtil.isEmpty(deptDTOList)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
|
||||
//获取配网id
|
||||
String dataType = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId();
|
||||
|
||||
@@ -61,15 +61,15 @@ implements PwRStatAreaAlarmCountMService{
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
//获取配网id
|
||||
String dataType = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData().getId();
|
||||
|
||||
LambdaQueryWrapper<RStatAreaAlarmCountM> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//条件组装: where org_no in (orgNoList) and data_date >= startTime and data_date <= endTime
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgNoList), RStatAreaAlarmCountM::getOrgNo, orgNoList)
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgCodeList), RStatAreaAlarmCountM::getOrgNo, orgCodeList)
|
||||
.ge(StringUtils.isNotBlank(startTime), RStatAreaAlarmCountM::getDataDate, startTime)
|
||||
.le(StringUtils.isNotBlank(endTime), RStatAreaAlarmCountM::getDataDate, endTime)
|
||||
.eq(RStatAreaAlarmCountM::getDataType, dataType);
|
||||
|
||||
@@ -56,9 +56,9 @@ public class RDnOperatingIndexMServiceImpl extends ServiceImpl<RDnOperatingIndex
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
|
||||
//获取监测点类别字典id
|
||||
String monitorSortOne = dicDataFeignClient.getDicDataByCode(DicDataEnum.ONE_LINE.getCode()).getData().getId(); // I类
|
||||
@@ -66,7 +66,7 @@ public class RDnOperatingIndexMServiceImpl extends ServiceImpl<RDnOperatingIndex
|
||||
String monitorSortThree = dicDataFeignClient.getDicDataByCode(DicDataEnum.THREE_LINE.getCode()).getData().getId(); // III类
|
||||
|
||||
HashMap<String, Object> condMap = new HashMap<>();
|
||||
condMap.put("orgIdList", orgNoList);
|
||||
condMap.put("orgIdList", orgCodeList);
|
||||
condMap.put("startTime", startTime);
|
||||
condMap.put("endTime", endTime);
|
||||
condMap.put("monitorSortOne", monitorSortOne);
|
||||
|
||||
@@ -49,9 +49,9 @@ public class RDnOperatingYServiceImpl extends ServiceImpl<RDnOperatingYMapper, R
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
|
||||
//获取监测点类别字典id
|
||||
String monitorSortOne = dicDataFeignClient.getDicDataByCode(DicDataEnum.ONE_LINE.getCode()).getData().getId(); // I类
|
||||
@@ -59,7 +59,7 @@ public class RDnOperatingYServiceImpl extends ServiceImpl<RDnOperatingYMapper, R
|
||||
String monitorSortThree = dicDataFeignClient.getDicDataByCode(DicDataEnum.THREE_LINE.getCode()).getData().getId(); // III类
|
||||
|
||||
HashMap<String, Object> condMap = new HashMap<>();
|
||||
condMap.put("orgIdList", orgNoList);
|
||||
condMap.put("orgIdList", orgCodeList);
|
||||
condMap.put("startTime", startTime);
|
||||
condMap.put("endTime", endTime);
|
||||
condMap.put("monitorSortOne", monitorSortOne);
|
||||
|
||||
@@ -79,14 +79,14 @@ public class RStatPwAlarmCountWServiceImpl extends ServiceImpl<RStatPwAlarmCount
|
||||
if (CollUtil.isEmpty(deptDTOList)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
//单位code集合
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, String> deptNameMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, DeptDTO::getName));
|
||||
Map<String, String> deptNameMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, DeptDTO::getName));
|
||||
|
||||
//设置数据库查询条件
|
||||
Map<String, Object> condMap = new HashMap<>();
|
||||
condMap.put("orgIdList", orgNoList);
|
||||
condMap.put("orgIdList", orgCodeList);
|
||||
condMap.put("startTime", startTime);
|
||||
condMap.put("endTime", endTime);
|
||||
List<RStatPwAlarmCountWVO> list = this.baseMapper.getRStatPwAlarmCountVOList(condMap);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pms.service.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pms.pojo.param.PowerClientParam;
|
||||
import com.njcn.device.pms.pojo.po.PowerClient;
|
||||
@@ -54,6 +55,14 @@ public interface IPowerClientService extends IService<PowerClient> {
|
||||
*/
|
||||
PowerClient getPowerClientById(String powerClientId);
|
||||
|
||||
/**
|
||||
* 查询用电用户列表
|
||||
* @author cdf
|
||||
* @date 2022/10/25
|
||||
* @return boolean
|
||||
*/
|
||||
List<PowerClient> getPowerClientList();
|
||||
|
||||
/**
|
||||
* 查询用电用户列表
|
||||
* @author cdf
|
||||
@@ -61,6 +70,6 @@ public interface IPowerClientService extends IService<PowerClient> {
|
||||
* @param baseParam 基础参数
|
||||
* @return boolean
|
||||
*/
|
||||
List<PowerClient> getPowerClientList(BaseParam baseParam);
|
||||
Page<PowerClient> getPowerClientPageList(BaseParam baseParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pms.service.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pms.pojo.param.PowerGenerationUserParam;
|
||||
import com.njcn.device.pms.pojo.po.PowerGenerationUser;
|
||||
@@ -57,9 +58,17 @@ public interface IPowerGenerationUserService extends IService<PowerGenerationUse
|
||||
* 查询发电用户列表
|
||||
* @author cdf
|
||||
* @date 2022/10/25
|
||||
* @return boolean
|
||||
*/
|
||||
List<PowerGenerationUser> getPowerGenerationUserList();
|
||||
|
||||
/**
|
||||
* 分页查询发电用户列表
|
||||
* @author cdf
|
||||
* @date 2022/10/25
|
||||
* @param baseParam 基础参数
|
||||
* @return boolean
|
||||
*/
|
||||
List<PowerGenerationUser> getPowerGenerationUserList(BaseParam baseParam);
|
||||
Page<PowerGenerationUser> getPowerGenerationUserPageList(BaseParam baseParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.njcn.device.pms.service.majornetwork;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pms.pojo.param.UniversalFrontEndParam;
|
||||
import com.njcn.device.pms.pojo.vo.RmpEventDetailVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 暂态事件明细
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/12
|
||||
*/
|
||||
|
||||
public interface RmpEventDetailService extends IService<RmpEventDetailVO> {
|
||||
|
||||
/**
|
||||
* 获取暂态事件明细
|
||||
* @param param 前端参数
|
||||
* @return 暂态事件明细
|
||||
*/
|
||||
List<RmpEventDetailVO> getRmpEventDetail(UniversalFrontEndParam param);
|
||||
}
|
||||
@@ -11,6 +11,8 @@ import com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO;
|
||||
import com.njcn.device.pms.pojo.vo.RStatTargetCheckDataVO;
|
||||
import com.njcn.device.pms.service.majornetwork.DataQualityCheckService;
|
||||
import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -38,6 +40,8 @@ public class DataQualityCheckServiceImpl implements DataQualityCheckService {
|
||||
|
||||
private final RStatTargetCheckDataMapper rStatTargetCheckDataMapper;
|
||||
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
/**
|
||||
* 获取主网数据质量-台帐类数据质量核查
|
||||
*
|
||||
@@ -56,19 +60,21 @@ public class DataQualityCheckServiceImpl implements DataQualityCheckService {
|
||||
List<String> deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList());
|
||||
// 创建集合封装查询数据
|
||||
List<RStatAccountCheckDataVO> result = new ArrayList<>();
|
||||
// 获取主网字典id
|
||||
String mainnetPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId();
|
||||
// 获取主网数据质量-台帐类数据质量核查
|
||||
switch (param.getType()) {
|
||||
// 年
|
||||
case 1:
|
||||
result = rStatAccountCheckDataMapper.getYearInfo(param, deptIdList);
|
||||
result = rStatAccountCheckDataMapper.getRStatAccountCheckDataYearInfo(param, deptIdList, mainnetPoint);
|
||||
break;
|
||||
// 季
|
||||
case 2:
|
||||
result = rStatAccountCheckDataMapper.getSeasonInfo(param, deptIdList);
|
||||
result = rStatAccountCheckDataMapper.getRStatAccountCheckDataSeasonInfo(param, deptIdList, mainnetPoint);
|
||||
break;
|
||||
// 月
|
||||
case 3:
|
||||
result = rStatAccountCheckDataMapper.getMonthInfo(param, deptIdList);
|
||||
result = rStatAccountCheckDataMapper.getRStatAccountCheckDataMonthInfo(param, deptIdList, mainnetPoint);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -99,21 +105,23 @@ public class DataQualityCheckServiceImpl implements DataQualityCheckService {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList());
|
||||
// 获取主网字典id
|
||||
String mainnetPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId();
|
||||
// 创建集合封装数据
|
||||
List<RStatTargetCheckDataVO> result = new ArrayList<>();
|
||||
// 获取主网数据质量-台帐类数据质量核查
|
||||
switch (param.getType()) {
|
||||
// 年
|
||||
case 1:
|
||||
result = rStatTargetCheckDataMapper.getYearInfo(param, deptIdList);
|
||||
result = rStatTargetCheckDataMapper.getRStatTargetCheckDataYearInfo(param, deptIdList, mainnetPoint);
|
||||
break;
|
||||
// 季
|
||||
case 2:
|
||||
result = rStatTargetCheckDataMapper.getSeasonInfo(param, deptIdList);
|
||||
result = rStatTargetCheckDataMapper.getRStatTargetCheckDataSeasonInfo(param, deptIdList, mainnetPoint);
|
||||
break;
|
||||
// 月
|
||||
case 3:
|
||||
result = rStatTargetCheckDataMapper.getMonthInfo(param, deptIdList);
|
||||
result = rStatTargetCheckDataMapper.getRStatTargetCheckDataMonthInfo(param, deptIdList, mainnetPoint);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -75,8 +75,6 @@ public class DataQualityDetailsServiceImpl implements DataQualityDetailsService
|
||||
public List<RStatMeasurementAccountDetailVO> getQualityProblemsOfMonitoringPointAccountData(DataQualityDetailsParam param) {
|
||||
// 获取单位下的子单位信息
|
||||
List<PmsGeneralDeviceDTO> data = getDeptInfo(param);
|
||||
//获取所有子部门信息
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
||||
if (CollUtil.isEmpty(data)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -99,13 +97,10 @@ public class DataQualityDetailsServiceImpl implements DataQualityDetailsService
|
||||
.stream()
|
||||
.map(RStatMeasurementAccountDetailPO::getMeasurementPointId)
|
||||
.collect(Collectors.toList()));
|
||||
List<PmsMonitorInfoDTO> monitorInfoDTOS = iMonitorService.getMonitorInfo(pmsMonitorInfoParam);
|
||||
// //将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, PmsMonitorInfoDTO> monitorInfoMap = monitorInfoDTOS
|
||||
.stream().collect(Collectors.toMap(PmsMonitorInfoDTO::getMonitorId, PmsMonitorInfoDTO -> PmsMonitorInfoDTO));
|
||||
List<PmsMonitorInfoDTO> monitorInfoList = iMonitorService.getMonitorInfo(pmsMonitorInfoParam);
|
||||
// 属性赋值
|
||||
for (RStatMeasurementAccountDetailPO po : pos) {
|
||||
for (PmsMonitorInfoDTO monitorInfoDTO : monitorInfoDTOS) {
|
||||
for (PmsMonitorInfoDTO monitorInfoDTO : monitorInfoList) {
|
||||
if (po.getMeasurementPointId().equals(monitorInfoDTO.getMonitorId())) {
|
||||
RStatMeasurementAccountDetailVO vo = new RStatMeasurementAccountDetailVO();
|
||||
vo.setOrgId(dto.getIndex());
|
||||
@@ -147,7 +142,7 @@ public class DataQualityDetailsServiceImpl implements DataQualityDetailsService
|
||||
if (CollUtil.isEmpty(tractionStationInfo)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
// 将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, PmsTractionStationDTO> tractionStationInfoMap = getDataMap(tractionStationInfo);
|
||||
// 获取主网数据质量-台账类数据指标核查详情-牵引站台账数据质量问题
|
||||
List<RStatTractionStationAccountDetailPO> pos = rStatTractionStationAccountDetailMapper.getTractionPlatformAccountDataQualityProblem(param,
|
||||
@@ -219,7 +214,7 @@ public class DataQualityDetailsServiceImpl implements DataQualityDetailsService
|
||||
vo.setMonitorName(pmsMonitorInfoMap.get(vo.getMonitorId()).getMonitorName());
|
||||
vo.setMonitorVoltageLevel(pmsMonitorInfoMap.get(vo.getMonitorId()).getMonitorVoltageLevel());
|
||||
// TODO 地市公司
|
||||
vo.setCityCompany("南京");
|
||||
vo.setCityCompany(pmsMonitorInfoMap.get(vo.getMonitorId()).getOrgName());
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
@@ -232,7 +227,6 @@ public class DataQualityDetailsServiceImpl implements DataQualityDetailsService
|
||||
pmsDeviceInfoParam.setDeptIndex(param.getId());
|
||||
pmsDeviceInfoParam.setStatisticalType(new SimpleDTO());
|
||||
return iPmsGeneralDeviceService.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,7 +64,7 @@ public class DataQualityStatServiceImpl implements DataQualityStatService {
|
||||
if (CollUtil.isEmpty(data)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 获取配网字典id
|
||||
// 获取主网字典id
|
||||
String mainnetPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId();
|
||||
// 获取主网数据质量-台账数据质量统计
|
||||
List<RQualityParameterPO> pos = rQualityParameterMapper.getLedgerDataQualityStat(
|
||||
@@ -152,7 +152,7 @@ public class DataQualityStatServiceImpl implements DataQualityStatService {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList());
|
||||
// 获取配网字典id
|
||||
// 获取主网字典id
|
||||
String mainnetPoint = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId();
|
||||
// 获取主网数据质量-监测指标数据质量问题汇总统计
|
||||
List<RQualityParameterPO> pos = rQualityParameterMapper.getLedgerDataQualityStat(param, deptIdList, mainnetPoint);
|
||||
|
||||
@@ -218,13 +218,13 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
||||
|
||||
private void checkOther(MonitorParam monitorParam,Monitor monitor,boolean update){
|
||||
//校验组织机构
|
||||
Dept dept = deptFeignClient.getDeptById(monitorParam.getOrgId()).getData();
|
||||
Dept dept = deptFeignClient.getDeptByCode(monitorParam.getOrgId()).getData();
|
||||
if(Objects.isNull(dept)){
|
||||
throw new BusinessException(PmsDeviceResponseEnum.ORG_ITEM_EMPTY);
|
||||
}
|
||||
|
||||
//校验运维单位
|
||||
Dept deptOp = deptFeignClient.getDeptById(monitorParam.getOperationId()).getData();
|
||||
Dept deptOp = deptFeignClient.getDeptByCode(monitorParam.getOperationId()).getData();
|
||||
if(Objects.isNull(deptOp)){
|
||||
throw new BusinessException(PmsDeviceResponseEnum.Operation_ITEM_EMPTY);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.device.pms.mapper.majornetwork.PowerClientMapper;
|
||||
import com.njcn.device.pms.pojo.param.PowerClientParam;
|
||||
import com.njcn.device.pms.pojo.po.PowerClient;
|
||||
import com.njcn.device.pms.service.majornetwork.IPowerClientService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -48,7 +53,21 @@ public class PowerClientServiceImpl extends ServiceImpl<PowerClientMapper, Power
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PowerClient> getPowerClientList(BaseParam baseParam) {
|
||||
return this.list();
|
||||
public List<PowerClient> getPowerClientList() {
|
||||
LambdaQueryWrapper<PowerClient> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.orderByDesc(PowerClient::getCreateTime).eq(PowerClient::getStatus, DataStateEnum.ENABLE.getCode());
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Page<PowerClient> getPowerClientPageList(BaseParam baseParam) {
|
||||
LambdaQueryWrapper<PowerClient> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.orderByDesc(PowerClient::getCreateTime)
|
||||
.eq(PowerClient::getStatus, DataStateEnum.ENABLE.getCode())
|
||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),PowerClient::getName,baseParam.getSearchValue())
|
||||
.or(StrUtil.isNotBlank(baseParam.getSearchValue()))
|
||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),PowerClient::getOrgName,baseParam.getSearchValue());
|
||||
return this.page(new Page<>(PageFactory.getPageNum(baseParam),PageFactory.getPageSize(baseParam)),lambdaQueryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,8 @@ public class PowerDistributionareaServiceImpl extends ServiceImpl<PowerDistribut
|
||||
.or(StrUtil.isNotBlank(baseParam.getSearchValue()))
|
||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),PowerDistributionarea::getPowerrName,baseParam.getSearchValue())
|
||||
.or(StrUtil.isNotBlank(baseParam.getSearchValue()))
|
||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),PowerDistributionarea::getOrgName,baseParam.getSearchValue());
|
||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),PowerDistributionarea::getOrgName,baseParam.getSearchValue())
|
||||
.eq(PowerDistributionarea::getStatus,DataStateEnum.ENABLE.getCode());
|
||||
//初始化分页数据
|
||||
return this.page(new Page<>(PageFactory.getPageNum(baseParam), PageFactory.getPageSize(baseParam)), lambdaQueryWrapper);
|
||||
}
|
||||
@@ -79,12 +80,12 @@ public class PowerDistributionareaServiceImpl extends ServiceImpl<PowerDistribut
|
||||
public boolean add(PowerDistributionareaParam newParam) {
|
||||
checkName(newParam,true);
|
||||
|
||||
Dept dept = deptFeignClient.getDeptById(newParam.getOrgId()).getData();
|
||||
Dept dept = deptFeignClient.getDeptByCode(newParam.getOrgId()).getData();
|
||||
if(Objects.isNull(dept)){
|
||||
throw new BusinessException(PmsDeviceResponseEnum.ORG_ITEM_EMPTY);
|
||||
}
|
||||
|
||||
Dept opDept = deptFeignClient.getDeptById(newParam.getOperationId()).getData();
|
||||
Dept opDept = deptFeignClient.getDeptByCode(newParam.getOperationId()).getData();
|
||||
if(Objects.isNull(opDept)){
|
||||
throw new BusinessException(PmsDeviceResponseEnum.Operation_ITEM_EMPTY);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||
import com.njcn.device.pms.mapper.majornetwork.PowerGenerationUserMapper;
|
||||
import com.njcn.device.pms.pojo.param.PowerGenerationUserParam;
|
||||
import com.njcn.device.pms.pojo.po.PowerGenerationUser;
|
||||
import com.njcn.device.pms.service.majornetwork.IPowerGenerationUserService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.web.factory.PageFactory;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -47,7 +52,21 @@ public class PowerGenerationUserServiceImpl extends ServiceImpl<PowerGenerationU
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PowerGenerationUser> getPowerGenerationUserList(BaseParam baseParam) {
|
||||
return this.list();
|
||||
public List<PowerGenerationUser> getPowerGenerationUserList() {
|
||||
LambdaQueryWrapper<PowerGenerationUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.orderByDesc(PowerGenerationUser::getCreateTime).eq(PowerGenerationUser::getStatus, DataStateEnum.ENABLE.getCode());
|
||||
return this.list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<PowerGenerationUser> getPowerGenerationUserPageList(BaseParam baseParam) {
|
||||
LambdaQueryWrapper<PowerGenerationUser> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.orderByDesc(PowerGenerationUser::getCreateTime).eq(PowerGenerationUser::getStatus, DataStateEnum.ENABLE.getCode())
|
||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),PowerGenerationUser::getName,baseParam.getSearchValue())
|
||||
.or(StrUtil.isNotBlank(baseParam.getSearchValue()))
|
||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),PowerGenerationUser::getOrgName,baseParam.getSearchValue());
|
||||
return this.page(new Page<>(PageFactory.getPageNum(baseParam),PageFactory.getPageSize(baseParam)),lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -73,14 +74,12 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
if (CollUtil.isEmpty(deptDTOList)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
//单位code集合
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
//查询单位下的终端数据
|
||||
LambdaQueryWrapper<PmsTerminal> terminalWrapper = new LambdaQueryWrapper<>();
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgNoList);
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgCodeList);
|
||||
List<PmsTerminal> terminalList = iTerminalService.list(terminalWrapper);
|
||||
if (CollUtil.isEmpty(terminalList)) {
|
||||
return new ArrayList<>();
|
||||
@@ -89,7 +88,7 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
List<String> terminalIdList = terminalList.stream().map(PmsTerminal::getId).collect(Collectors.toList());
|
||||
//将终端信息转为map集合 key: 终端id value: 终端实体
|
||||
Map<String, PmsTerminal> terminalMap = terminalList.stream().collect(Collectors.toMap(PmsTerminal::getId, terminal -> terminal));
|
||||
//将终端信息按单位分组 key:单位id value:终端集合
|
||||
//将终端信息按单位分组 key:单位id(字段是id实际数据是单位code) value:终端集合
|
||||
Map<String, List<PmsTerminal>> terminalListMapByOrgId = terminalList.stream().collect(Collectors.groupingBy(PmsTerminal::getOrgId));
|
||||
|
||||
//查询终端评价详情表数据【r_mp_dev_evaluate_detail】
|
||||
@@ -100,12 +99,13 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
List<RMpDevEvaluateDetail> list = this.list(businessWrapper);
|
||||
|
||||
//封装返回数据
|
||||
DecimalFormat df = new DecimalFormat("###.00");
|
||||
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
||||
terminalListMapByOrgId.forEach((key, terminalListByOrg) -> {
|
||||
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
||||
|
||||
rMpDevEvaluateDetailVO.setDataDate(startTime); //日期(前端传递的时间)
|
||||
rMpDevEvaluateDetailVO.setOrgId(key); //单位id
|
||||
rMpDevEvaluateDetailVO.setOrgId(key); //单位id(字段是id实际数据是单位code)
|
||||
rMpDevEvaluateDetailVO.setOrgName(terminalListByOrg.get(0).getOrgName()); //单位名称
|
||||
|
||||
//终端有效接入率
|
||||
@@ -121,7 +121,10 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
.mapToDouble(RMpDevEvaluateDetail::getDevDataRate).average().orElse(0);
|
||||
rMpDevEvaluateDetailVO.setDevDataRate(devDataRate);
|
||||
//综合评价
|
||||
rMpDevEvaluateDetailVO.setAssessment((devEffectiveRate + devTargetRate + devDataRate) / 3.0);
|
||||
rMpDevEvaluateDetailVO.setAssessment(Double.parseDouble(df.format((devEffectiveRate + devTargetRate + devDataRate) / 3.0)));
|
||||
|
||||
//在运终端数量
|
||||
rMpDevEvaluateDetailVO.setDevCount(terminalListByOrg.size());
|
||||
|
||||
resultList.add(rMpDevEvaluateDetailVO);
|
||||
});
|
||||
@@ -150,7 +153,7 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
LambdaQueryWrapper<PmsTerminal> terminalWrapper = new LambdaQueryWrapper<>();
|
||||
terminalWrapper.in(CollUtil.isNotEmpty(manufactureIdList), PmsTerminal::getManufacture, manufactureIdList)
|
||||
.isNotNull(CollUtil.isEmpty(manufactureIdList), PmsTerminal::getManufacture)
|
||||
.in(CollUtil.isEmpty(deviceModelIdList), PmsTerminal::getDeviceModel, deviceModelIdList);
|
||||
.in(CollUtil.isNotEmpty(deviceModelIdList), PmsTerminal::getDeviceModel, deviceModelIdList);
|
||||
List<PmsTerminal> terminalList = iTerminalService.list(terminalWrapper);
|
||||
|
||||
if (CollUtil.isEmpty(terminalList)) {
|
||||
@@ -171,6 +174,7 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
List<RMpDevEvaluateDetail> list = this.list(businessWrapper);
|
||||
|
||||
//封装返回数据
|
||||
DecimalFormat df = new DecimalFormat("###.00");
|
||||
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
||||
terminalListMapByManufacture.forEach((key, terminalListByManufacture) -> {
|
||||
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
||||
@@ -191,7 +195,10 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
.mapToDouble(RMpDevEvaluateDetail::getDevDataRate).average().orElse(0);
|
||||
rMpDevEvaluateDetailVO.setDevDataRate(devDataRate);
|
||||
//综合评价
|
||||
rMpDevEvaluateDetailVO.setAssessment((devEffectiveRate + devTargetRate + devDataRate) / 3.0);
|
||||
rMpDevEvaluateDetailVO.setAssessment(Double.parseDouble(df.format((devEffectiveRate + devTargetRate + devDataRate) / 3.0)));
|
||||
|
||||
//在运终端数量
|
||||
rMpDevEvaluateDetailVO.setDevCount(terminalListByManufacture.size());
|
||||
|
||||
resultList.add(rMpDevEvaluateDetailVO);
|
||||
});
|
||||
@@ -215,7 +222,7 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
|
||||
//查询终端厂商下的终端数据
|
||||
LambdaQueryWrapper<PmsTerminal> terminalWrapper = new LambdaQueryWrapper<>();
|
||||
terminalWrapper.in(CollUtil.isEmpty(deviceModelIdList), PmsTerminal::getDeviceModel, deviceModelIdList);
|
||||
terminalWrapper.in(CollUtil.isNotEmpty(deviceModelIdList), PmsTerminal::getDeviceModel, deviceModelIdList);
|
||||
List<PmsTerminal> terminalList = iTerminalService.list(terminalWrapper);
|
||||
|
||||
if (CollUtil.isEmpty(terminalList)) {
|
||||
@@ -236,6 +243,7 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
List<RMpDevEvaluateDetail> list = this.list(businessWrapper);
|
||||
|
||||
//封装返回数据
|
||||
DecimalFormat df = new DecimalFormat("###.00");
|
||||
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
||||
terminalListMapByModel.forEach((key, terminalListByModel) -> {
|
||||
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
||||
@@ -256,7 +264,10 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
||||
.mapToDouble(RMpDevEvaluateDetail::getDevDataRate).average().orElse(0);
|
||||
rMpDevEvaluateDetailVO.setDevDataRate(devDataRate);
|
||||
//综合评价
|
||||
rMpDevEvaluateDetailVO.setAssessment((devEffectiveRate + devTargetRate + devDataRate) / 3.0);
|
||||
rMpDevEvaluateDetailVO.setAssessment(Double.parseDouble(df.format((devEffectiveRate + devTargetRate + devDataRate) / 3.0)));
|
||||
|
||||
//在运终端数量
|
||||
rMpDevEvaluateDetailVO.setDevCount(terminalListByModel.size());
|
||||
|
||||
resultList.add(rMpDevEvaluateDetailVO);
|
||||
});
|
||||
|
||||
@@ -64,13 +64,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
//查询单位下的终端数据
|
||||
LambdaQueryWrapper<PmsTerminal> terminalWrapper = new LambdaQueryWrapper<>();
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgNoList);
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgCodeList);
|
||||
List<PmsTerminal> terminalList = iTerminalService.list(terminalWrapper);
|
||||
//提取终端id
|
||||
List<String> terminalIdList = terminalList.stream().map(PmsTerminal::getId).collect(Collectors.toList());
|
||||
@@ -79,7 +77,7 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
if (CollUtil.isEmpty(terminalIdList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
//将终端信息按单位分组 key:单位id value:终端集合
|
||||
//将终端信息按单位分组 key:单位id(字段是org_id实际数据存的是单位表的org_code) value:终端集合
|
||||
Map<String, List<PmsTerminal>> terminalListMapByOrgId = terminalList.stream().collect(Collectors.groupingBy(PmsTerminal::getOrgId));
|
||||
|
||||
//查询终端消缺数据
|
||||
@@ -161,7 +159,7 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
if (CollUtil.isEmpty(terminalIdList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
//将终端信息按厂商分组 key:单位id value:终端集合
|
||||
//将终端信息按厂商分组 key:厂商id value:终端集合
|
||||
Map<String, List<PmsTerminal>> terminalListMapByManufacture = terminalList.stream().collect(Collectors.groupingBy(PmsTerminal::getManufacture));
|
||||
|
||||
//查询终端消缺数据
|
||||
@@ -216,6 +214,13 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/***
|
||||
* 故障类型消缺统计
|
||||
* @author jianghaifei
|
||||
* @date 2022-11-21 10:11
|
||||
* @param rMpDevAbnormalManageParam
|
||||
* @return java.util.List<com.njcn.device.pms.pojo.vo.RMpDevSolveVO>
|
||||
*/
|
||||
@Override
|
||||
public List<RMpDevSolveVO> getTypeRMpDevSolveList(RMpDevAbnormalManageParam rMpDevAbnormalManageParam) {
|
||||
//提取参数
|
||||
@@ -278,6 +283,14 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* 消缺统计清单
|
||||
* @author jianghaifei
|
||||
* @date 2022-11-21 10:11
|
||||
* @param rMpDevSolveDetailParam
|
||||
* @return java.util.List<com.njcn.device.pms.pojo.vo.RMpDevSolveDetailVO>
|
||||
*/
|
||||
@Override
|
||||
public List<RMpDevSolveDetailVO> getRMpDevSolveDetailList(RMpDevSolveDetailParam rMpDevSolveDetailParam) {
|
||||
//提取参数
|
||||
@@ -294,11 +307,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
//查询单位下的终端数据
|
||||
LambdaQueryWrapper<PmsTerminal> terminalWrapper = new LambdaQueryWrapper<>();
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgNoList) //单位id
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgCodeList) //单位id
|
||||
.in(CollUtil.isNotEmpty(manufactureIdList), PmsTerminal::getManufacture, manufactureIdList); //厂家
|
||||
List<PmsTerminal> terminalList = iTerminalService.list(terminalWrapper);
|
||||
if (CollUtil.isEmpty(terminalList)) {
|
||||
|
||||
@@ -72,10 +72,10 @@ implements RMpMonitorAlarmCountMService {
|
||||
if (CollUtil.isEmpty(deptDTOList)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
//单位code集合
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位code value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
|
||||
//获取电压等级的字典
|
||||
List<DictData> voltageLevelList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||
@@ -90,7 +90,7 @@ implements RMpMonitorAlarmCountMService {
|
||||
|
||||
//根据条件查询单位下面的所有监测点
|
||||
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
monitorLambdaQueryWrapper.in(Monitor::getOrgId, orgNoList) //单位id
|
||||
monitorLambdaQueryWrapper.in(Monitor::getOrgId, orgCodeList) //单位code
|
||||
.eq(StringUtils.isNotBlank(monitorObjectType), Monitor::getMonitorObjectType, monitorObjectType) //监测点对象类型id
|
||||
.in(CollUtil.isNotEmpty(voltageLevelParamList), Monitor::getVoltageLevel, voltageLevelParamList) //电压等级id
|
||||
.like(StringUtils.isNotBlank(monitorName), Monitor::getName, monitorName); //监测点名称
|
||||
|
||||
@@ -47,14 +47,14 @@ public class ROperatingIndexMServiceImpl extends ServiceImpl<ROperatingIndexMMap
|
||||
if (CollUtil.isEmpty(deptDTOList)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
//单位code集合
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位code value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
|
||||
//组装查询条件
|
||||
LambdaQueryWrapper<ROperatingIndexM> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(ROperatingIndexM::getOrgNo, orgNoList)
|
||||
lambdaQueryWrapper.in(ROperatingIndexM::getOrgNo, orgCodeList)
|
||||
.ge(StringUtils.isNotBlank(startTime), ROperatingIndexM::getDataDate, startTime)
|
||||
.le(StringUtils.isNotBlank(endTime), ROperatingIndexM::getDataDate, endTime);
|
||||
//查询数据
|
||||
|
||||
@@ -48,13 +48,13 @@ public class ROperatingIndexYServiceImpl extends ServiceImpl<ROperatingIndexYMap
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
|
||||
//组装查询条件
|
||||
LambdaQueryWrapper<ROperatingIndexY> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(ROperatingIndexY::getOrgNo, orgNoList)
|
||||
lambdaQueryWrapper.in(ROperatingIndexY::getOrgNo, orgCodeList)
|
||||
.ge(StringUtils.isNotBlank(startTime), ROperatingIndexY::getDataDate, startTime)
|
||||
.le(StringUtils.isNotBlank(endTime), ROperatingIndexY::getDataDate, endTime);
|
||||
//查询数据
|
||||
|
||||
@@ -61,15 +61,15 @@ implements RStatAreaAlarmCountMService{
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
//获取主网id
|
||||
String dataType = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData().getId();
|
||||
|
||||
LambdaQueryWrapper<RStatAreaAlarmCountM> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//条件组装: where org_no in (orgNoList) and data_date >= startTime and data_date <= endTime
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgNoList), RStatAreaAlarmCountM::getOrgNo, orgNoList)
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgCodeList), RStatAreaAlarmCountM::getOrgNo, orgCodeList)
|
||||
.ge(StringUtils.isNotBlank(startTime), RStatAreaAlarmCountM::getDataDate, startTime)
|
||||
.le(StringUtils.isNotBlank(endTime), RStatAreaAlarmCountM::getDataDate, endTime)
|
||||
.eq(RStatAreaAlarmCountM::getDataType, dataType);
|
||||
|
||||
@@ -13,6 +13,8 @@ import com.njcn.device.pms.pojo.param.PmsGeneratrixParam;
|
||||
import com.njcn.device.pms.pojo.param.UniversalFrontEndParam;
|
||||
import com.njcn.device.pms.pojo.po.RStatBusbarHarmonicYPO;
|
||||
import com.njcn.device.pms.pojo.vo.RStatBusbarHarmonicYVO;
|
||||
import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService;
|
||||
import com.njcn.device.pms.service.majornetwork.IPmsGeneratrixService;
|
||||
import com.njcn.device.pms.service.majornetwork.RStatBusbarHarmonicService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -37,9 +39,9 @@ public class RStatBusbarHarmonicServiceImpl extends ServiceImpl<RStatBusbarHarmo
|
||||
|
||||
private final RStatBusbarHarmonicMapper rStatBusbarHarmonicMapper;
|
||||
|
||||
private final PmsGeneratrixClient pmsGeneratrixClient;
|
||||
private final IPmsGeneratrixService pmsGeneratrixService;
|
||||
|
||||
private final PmsGeneralDeviceInfoClient pmsGeneralDeviceInfoClient;
|
||||
private final IPmsGeneralDeviceService iPmsGeneralDeviceService;
|
||||
|
||||
/**
|
||||
* 获取变电站母线电压指标年报
|
||||
@@ -53,7 +55,7 @@ public class RStatBusbarHarmonicServiceImpl extends ServiceImpl<RStatBusbarHarmo
|
||||
PmsDeviceInfoParam pmsDeviceInfoParam = new PmsDeviceInfoParam();
|
||||
pmsDeviceInfoParam.setDeptIndex(param.getId());
|
||||
pmsDeviceInfoParam.setStatisticalType(new SimpleDTO());
|
||||
List<PmsGeneralDeviceDTO> data = pmsGeneralDeviceInfoClient.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam).getData();
|
||||
List<PmsGeneralDeviceDTO> data = iPmsGeneralDeviceService.getPmsDeviceInfoWithInOrg(pmsDeviceInfoParam);
|
||||
if (CollUtil.isEmpty(data)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -97,7 +99,7 @@ public class RStatBusbarHarmonicServiceImpl extends ServiceImpl<RStatBusbarHarmo
|
||||
List<String> busbarIds = result.stream().map(RStatBusbarHarmonicYVO::getBusbarId).collect(Collectors.toList());
|
||||
PmsGeneratrixParam pmsGeneratrixParam = new PmsGeneratrixParam();
|
||||
pmsGeneratrixParam.setGeneratrixIds(busbarIds);
|
||||
List<GeneratrixAndPowerStationDTO> dtoS = pmsGeneratrixClient.getGeneratrixAndPowerStationInfo(pmsGeneratrixParam).getData();
|
||||
List<GeneratrixAndPowerStationDTO> dtoS = pmsGeneratrixService.getGeneratrixAndPowerStationInfo(pmsGeneratrixParam);
|
||||
|
||||
for (GeneratrixAndPowerStationDTO dto : dtoS) {
|
||||
for (RStatBusbarHarmonicYVO vo : result) {
|
||||
|
||||
@@ -57,11 +57,11 @@ public class RStatDevSignalDServiceImpl extends ServiceImpl<RStatDevSignalDMappe
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
|
||||
//查询终端数据
|
||||
LambdaQueryWrapper<PmsTerminal> terminalWrapper = new LambdaQueryWrapper<>();
|
||||
terminalWrapper.in(PmsTerminal::getOrgId, orgNoList).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());
|
||||
|
||||
@@ -78,13 +78,13 @@ implements RStatZwAlarmCountWService {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
//单位id集合
|
||||
List<String> orgNoList = deptDTOList.stream().map(DeptDTO::getId).collect(Collectors.toList());
|
||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getId, deptDTO -> deptDTO));
|
||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||
|
||||
LambdaQueryWrapper<RStatZwAlarmCountW> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//条件组装: where org_no in (orgNoList) and data_date >= startTime and data_date <= endTime
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgNoList), RStatZwAlarmCountW::getOrgNo, orgNoList)
|
||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgCodeList), RStatZwAlarmCountW::getOrgNo, orgCodeList)
|
||||
.ge(StringUtils.isNotBlank(startTime), RStatZwAlarmCountW::getDataDate, startTime)
|
||||
.le(StringUtils.isNotBlank(endTime), RStatZwAlarmCountW::getDataDate, endTime);
|
||||
//查询告警统计(周)集合
|
||||
@@ -141,15 +141,20 @@ implements RStatZwAlarmCountWService {
|
||||
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
monitorLambdaQueryWrapper.eq(Monitor::getOrgId, id);
|
||||
List<String> orgMeasurementPointIdList = iMonitorService.list(monitorLambdaQueryWrapper).stream().map(Monitor::getId).collect(Collectors.toList());
|
||||
//以周为时间段,查询告警超过四次的监测点信息 todo
|
||||
//如果单位下没有监测点,直接返回空集合
|
||||
if (CollUtil.isEmpty(orgMeasurementPointIdList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
//以周为时间段,查询告警超过四次的监测点信息
|
||||
LambdaQueryWrapper<RMpTargetWarnD> targetWarnWrapper = new LambdaQueryWrapper<>();
|
||||
targetWarnWrapper.select(RMpTargetWarnD::getMeasurementPointId)
|
||||
.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList)
|
||||
.ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTime)
|
||||
.le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTime)
|
||||
.groupBy(RMpTargetWarnD::getMeasurementPointId)
|
||||
.or() //拼接or条件
|
||||
.eq(RMpTargetWarnD::getIsEffective, 1) //是否是有效接入监测点(0:否 1:是)
|
||||
//拼接or条件
|
||||
.or(qw ->
|
||||
qw.eq(RMpTargetWarnD::getIsEffective, 1) //是否是有效接入监测点(0:否 1:是)
|
||||
.eq(RMpTargetWarnD::getIsHarmonic, 1) //是否是稳态超标监测点(0:否 1:是)
|
||||
.eq(RMpTargetWarnD::getIsEvent, 1) //是否是发生暂态的监测点(0:否 1:是)
|
||||
.eq(RMpTargetWarnD::getIsWarn, 1) //是否是告警监测点数(0:否 1:是)
|
||||
@@ -160,6 +165,7 @@ implements RStatZwAlarmCountWService {
|
||||
.eq(RMpTargetWarnD::getIsFlickerWarn, 1) //闪变是否告警(0:否 1:是)
|
||||
.eq(RMpTargetWarnD::getIsSagWarn, 1) //电压暂降是否告警(0:否 1:是)
|
||||
.eq(RMpTargetWarnD::getIsInterruptWarn, 1) //短时中断是否告警(0:否 1:是)
|
||||
)
|
||||
.having("count(measurement_point_id) >= {0}", 4);
|
||||
|
||||
// LambdaQueryWrapper<RMpPwAlarmDetailD> alarmDetailWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -186,17 +192,14 @@ implements RStatZwAlarmCountWService {
|
||||
int monthDay = Month.of(DateUtil.month(date)).getLastDay(DateUtil.isLeapYear(DateUtil.year(date)));
|
||||
|
||||
//根据单位下监测点idList、月份条件查询监测点告警信息
|
||||
List<RMpTargetWarnD> targetWarnDList; //告警超过四次
|
||||
if (CollUtil.isEmpty(measurementPointIdList)) {
|
||||
targetWarnDList = new ArrayList<>();
|
||||
} else {
|
||||
targetWarnWrapper.clear();
|
||||
//组装查询条件:
|
||||
targetWarnWrapper.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList)
|
||||
.ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTimeOfMonth)
|
||||
.le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTimeOfMonth);
|
||||
targetWarnDList = rMpTargetWarnDService.list(targetWarnWrapper);
|
||||
}
|
||||
List<RMpTargetWarnD> targetWarnDList;
|
||||
|
||||
targetWarnWrapper.clear();
|
||||
//组装查询条件:
|
||||
targetWarnWrapper.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList)
|
||||
.ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTimeOfMonth)
|
||||
.le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTimeOfMonth);
|
||||
targetWarnDList = rMpTargetWarnDService.list(targetWarnWrapper);
|
||||
|
||||
//使用stream的分组方法(Collectors.partitioningBy())对告警记录和没有告警的记录进行分组 true:有告警的记录 false:没有告警的记录
|
||||
// Map<Boolean, List<RMpTargetWarnD>> booleanListMap = targetWarnDList.stream().collect(Collectors.groupingBy(
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.device.pms.mapper.majornetwork.RmpEventDetailMapper;
|
||||
import com.njcn.device.pms.pojo.param.UniversalFrontEndParam;
|
||||
import com.njcn.device.pms.pojo.vo.RmpEventDetailVO;
|
||||
import com.njcn.device.pms.service.majornetwork.RmpEventDetailService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 暂态事件明细
|
||||
*
|
||||
* @author yzh
|
||||
* @date 2022/10/12
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class RmpEventDetailServiceImpl extends ServiceImpl<RmpEventDetailMapper, RmpEventDetailVO> implements RmpEventDetailService {
|
||||
|
||||
private final RmpEventDetailMapper rmpEventDetailMapper;
|
||||
|
||||
/**
|
||||
* 获取暂态事件明细
|
||||
*
|
||||
* @param param 前端参数
|
||||
* @return 暂态事件明细
|
||||
*/
|
||||
@Override
|
||||
public List<RmpEventDetailVO> getRmpEventDetail(UniversalFrontEndParam param) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -78,12 +78,12 @@ public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, PmsTerminal
|
||||
public boolean add(PmsTerminalParam terminalParam) {
|
||||
checkName(terminalParam,true);
|
||||
|
||||
Dept dept = deptFeignClient.getDeptById(terminalParam.getOrgId()).getData();
|
||||
Dept dept = deptFeignClient.getDeptByCode(terminalParam.getOrgId()).getData();
|
||||
if(Objects.isNull(dept)){
|
||||
throw new BusinessException(PmsDeviceResponseEnum.ORG_ITEM_EMPTY);
|
||||
}
|
||||
|
||||
Dept opDept = deptFeignClient.getDeptById(terminalParam.getOperationId()).getData();
|
||||
Dept opDept = deptFeignClient.getDeptByCode(terminalParam.getOperationId()).getData();
|
||||
if(Objects.isNull(opDept)){
|
||||
throw new BusinessException(PmsDeviceResponseEnum.Operation_ITEM_EMPTY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user