代码合并终端模块

This commit is contained in:
2023-01-17 13:47:32 +08:00
parent 9b9ab96582
commit 0949b1ee34
33 changed files with 361 additions and 157 deletions

View File

@@ -17,7 +17,7 @@ import java.util.List;
* @date 2022/10/18 * @date 2022/10/18
*/ */
@FeignClient(value = ServerInfo.DEVICE, @FeignClient(value = ServerInfo.DEVICE,
path = "/pmsGeneratrix", path = "/pmsGeneratrixWire",
fallbackFactory = PmsGeneratrixClientFallbackFactory.class) fallbackFactory = PmsGeneratrixClientFallbackFactory.class)
public interface PmsGeneratrixClient { public interface PmsGeneratrixClient {

View File

@@ -17,7 +17,7 @@ public enum PmsDeviceResponseEnum {
DEVICE_COMMON_ERROR("A00349","终端模块异常"), DEVICE_COMMON_ERROR("A00349","终端模块异常"),
ORG_ITEM_EMPTY("A00360","未查询到指定组织机构"), ORG_ITEM_EMPTY("A00360","未查询到指定组织机构"),
Operation_ITEM_EMPTY("A00361","未查询到指定运维单位"), Operation_ITEM_EMPTY("A00361","未查询到指定运维单位"),
VOLTAGE_EMPTY("A00362","未查询到指定线"), VOLTAGE_EMPTY("A00362","未查询到指定线"),
LINE_EMPTY("A00363","未查询到指定线路"), LINE_EMPTY("A00363","未查询到指定线路"),
NO_USER_TYPE("A00364","未查询字典用户类型"), NO_USER_TYPE("A00364","未查询字典用户类型"),
NO_STATION("A00365","未查询指定电站信息"), NO_STATION("A00365","未查询指定电站信息"),

View File

@@ -15,16 +15,26 @@ import javax.validation.constraints.NotBlank;
public class GeneratrixWireParam { public class GeneratrixWireParam {
@ApiModelProperty(value = "线路id",required = true) @ApiModelProperty(value = "线路id",required = true)
@NotBlank(message = "线路id不可为空") private String id;
private String wireId;
@ApiModelProperty(value = "线路名称",required = true) @ApiModelProperty(value = "线路名称",required = true)
@NotBlank(message = "线路名称不可为空") @NotBlank(message = "线路名称不可为空")
private String wireName; private String name;
@ApiModelProperty(value = "母线id",required = true) @ApiModelProperty(value = "电站编号",required = true)
@NotBlank(message = "母线id不可为空") @NotBlank(message = "电站编号不可为空")
private String generatrixId; private String stationId;
@ApiModelProperty(value = "电站名称",required = true)
@NotBlank(message = "电站名称不可为空")
private String stationName;
@ApiModelProperty(value = "母线名称",required = true)
private String generatrixName;
@ApiModelProperty(value = "电压等级(字典)",required = true)
@NotBlank(message = "电压等级不可为空")
private String scale;

View File

@@ -72,18 +72,18 @@ public class MonitorParam {
private String powerrName; private String powerrName;
/** /**
* 母线编号(外键) * 线路编号
*/ */
@ApiModelProperty(value = "线编号(外键)") @ApiModelProperty(value = "线编号(外键)")
@NotBlank(message = "线编号不能为空") @NotBlank(message = "线编号不能为空")
private String generatrixId; private String lineId;
/** /**
* 线名称 * 线名称
*/ */
@ApiModelProperty(value = "线名称") @ApiModelProperty(value = "线名称")
@NotBlank(message = "线名称不能为空") @NotBlank(message = "线名称不能为空")
private String generatrixName; private String lineName;
/** /**
* 电压等级(字典) * 电压等级(字典)

View File

@@ -19,12 +19,22 @@ public class GeneratrixWire extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId @TableId
private String wireId; private String id;
private String wireName; private String name;
private String generatrixId; private String scale;
private String stationId;
/**
* 电站名称
*/
private String stationName;
/**
* 母线名称
*/
private String generatrixName; private String generatrixName;
private Integer status; private Integer status;

View File

@@ -63,7 +63,7 @@ public class Monitor extends BaseEntity {
/** /**
* 母线名称 * 母线名称
*/ */
private String generatrixName; private String generatrixWireName;
/** /**
* 母线ID(外键) * 母线ID(外键)

View File

@@ -39,7 +39,7 @@ import java.util.List;
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
@Api(tags = "台账-配网监测点") @Api(tags = "台账-配网监测点")
public class DistributionMonitorController extends BaseController { public class PmsDistributionMonitorController extends BaseController {
private final IDistributionMonitorService iDistributionMonitorService; private final IDistributionMonitorService iDistributionMonitorService;

View File

@@ -1,5 +1,6 @@
package com.njcn.device.pms.controller.majornetwork; package com.njcn.device.pms.controller.majornetwork;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType; import com.njcn.common.pojo.constant.OperateType;
@@ -7,8 +8,13 @@ import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil; import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO;
import com.njcn.device.pms.pojo.param.ConditionParam;
import com.njcn.device.pms.pojo.param.GeneratrixWireParam; import com.njcn.device.pms.pojo.param.GeneratrixWireParam;
import com.njcn.device.pms.pojo.param.PmsBaseParam; import com.njcn.device.pms.pojo.param.PmsBaseParam;
import com.njcn.device.pms.pojo.param.PmsGeneratrixParam;
import com.njcn.device.pms.pojo.po.GeneratrixWire; import com.njcn.device.pms.pojo.po.GeneratrixWire;
import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService; import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService;
import com.njcn.web.controller.BaseController; import com.njcn.web.controller.BaseController;
@@ -18,8 +24,10 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@@ -31,7 +39,7 @@ import java.util.Objects;
* @date 2022/10/26 * @date 2022/10/26
*/ */
@RestController @RestController
@RequestMapping("/pms/GeneratrixWireWire") @RequestMapping("/pms/generatrixWire")
@Slf4j @Slf4j
@Api(tags = "台账-线路") @Api(tags = "台账-线路")
@RequiredArgsConstructor @RequiredArgsConstructor
@@ -43,7 +51,7 @@ public class PmsGeneratrixWireController extends BaseController {
@PostMapping("/addGeneratrixWire") @PostMapping("/addGeneratrixWire")
@ApiOperation("新增线路") @ApiOperation("新增线路")
@ApiImplicitParam(name = "generatrixWireParam", value = "线路实体", required = true) @ApiImplicitParam(name = "generatrixWireParam", value = "线路实体", required = true)
public HttpResult<Boolean> addGeneratrixWire(@RequestBody GeneratrixWireParam generatrixWireParam) { public HttpResult<Boolean> addGeneratrixWire(@RequestBody @Validated GeneratrixWireParam generatrixWireParam) {
String methodDescribe = getMethodDescribe("addGeneratrixWire"); String methodDescribe = getMethodDescribe("addGeneratrixWire");
boolean result = iGeneratrixWireService.addGeneratrixWire(generatrixWireParam); boolean result = iGeneratrixWireService.addGeneratrixWire(generatrixWireParam);
if(result){ if(result){
@@ -57,7 +65,7 @@ public class PmsGeneratrixWireController extends BaseController {
@PostMapping("/updateGeneratrixWire") @PostMapping("/updateGeneratrixWire")
@ApiOperation("修改线路") @ApiOperation("修改线路")
@ApiImplicitParam(name = "generatrixWireParam", value = "线路实体", required = true) @ApiImplicitParam(name = "generatrixWireParam", value = "线路实体", required = true)
public HttpResult<Boolean> updateGeneratrixWire(@RequestBody GeneratrixWireParam generatrixWireParam) { public HttpResult<Boolean> updateGeneratrixWire(@RequestBody @Validated GeneratrixWireParam generatrixWireParam) {
String methodDescribe = getMethodDescribe("updateGeneratrixWire"); String methodDescribe = getMethodDescribe("updateGeneratrixWire");
boolean result = iGeneratrixWireService.updateGeneratrixWire(generatrixWireParam); boolean result = iGeneratrixWireService.updateGeneratrixWire(generatrixWireParam);
if(result){ if(result){
@@ -85,7 +93,7 @@ public class PmsGeneratrixWireController extends BaseController {
@GetMapping("/getGeneratrixWireById") @GetMapping("/getGeneratrixWireById")
@ApiOperation("根据线路id获取线路") @ApiOperation("根据线路id获取线路")
@ApiImplicitParam(name = "generatrixWireId", value = "线路id", required = true) @ApiImplicitParam(name = "generatrixWireId", value = "线路id", required = true)
public HttpResult<GeneratrixWire> getGeneratrixWireById(@RequestParam("generatrixWireId") String generatrixWireId) { public HttpResult<GeneratrixWire> getGeneratrixWireById(@RequestParam("generatrixWireId") @NotBlank(message = "线路id为空") String generatrixWireId) {
String methodDescribe = getMethodDescribe("getGeneratrixWireById"); String methodDescribe = getMethodDescribe("getGeneratrixWireById");
GeneratrixWire result = iGeneratrixWireService.getGeneratrixWireById(generatrixWireId); GeneratrixWire result = iGeneratrixWireService.getGeneratrixWireById(generatrixWireId);
if(Objects.nonNull(result)){ if(Objects.nonNull(result)){
@@ -113,4 +121,68 @@ public class PmsGeneratrixWireController extends BaseController {
Page<GeneratrixWire> result = iGeneratrixWireService.getGeneratrixWirePageList(baseParam); Page<GeneratrixWire> result = iGeneratrixWireService.getGeneratrixWirePageList(baseParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
} }
/**
* 获取指定母线信息
*
* @param param 获取指定的监测点信息条件
* @return 指定母线信息
*/
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getGeneratrixInfo")
@ApiOperation("获取指定母线信息")
@ApiImplicitParam(name = "param", value = "获取指定母线信息条件", required = true)
public HttpResult<List<PmsGeneratrixDTO>> getGeneratrixInfo(@RequestBody @Validated PmsGeneratrixParam param) {
String methodDescribe = getMethodDescribe("getGeneratrixInfo");
List<PmsGeneratrixDTO> monitorInfo = iGeneratrixWireService.getGeneratrixInfo(param);
if (CollectionUtil.isEmpty(monitorInfo)) {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
} else {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorInfo, methodDescribe);
}
}
/**
* 获取母线与电站关联信息
*
* @param param 条件参数
* @return com.njcn.common.pojo.response.HttpResult<java.util.List < com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>>
* @author yzh
* @date 2022/11/3
*/
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getGeneratrixAndPowerStationInfo")
@ApiOperation("获取母线与电站关联信息")
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
public HttpResult<List<GeneratrixAndPowerStationDTO>> getGeneratrixAndPowerStationInfo(@RequestBody @Validated PmsGeneratrixParam param) {
String methodDescribe = getMethodDescribe("getGeneratrixAndPowerStationInfo");
List<GeneratrixAndPowerStationDTO> monitorInfo = iGeneratrixWireService.getGeneratrixAndPowerStationInfo(param);
if (CollectionUtil.isEmpty(monitorInfo)) {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
} else {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorInfo, methodDescribe);
}
}
/**
* @Description: 普测计划页面调用根据条件查询母线信息
* @Param: [param]
* @return: com.njcn.common.pojo.response.HttpResult<java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>>
* @Author: clam
* @Date: 2022/12/5
*/
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getGeneratrixByCondition")
@ApiOperation("普测计划页面调用根据条件查询母线信息")
@ApiImplicitParam(name = "param", value = "条件参数", required = true)
public HttpResult<List<GeneratrixAndPowerStationSonDTO>> getGeneratrixByCondition(@RequestBody @Validated ConditionParam param) {
String methodDescribe = getMethodDescribe("getGeneratrixByCondition");
List<GeneratrixAndPowerStationSonDTO> monitorInfo = iGeneratrixWireService.getGeneratrixByCondition(param);
if (CollectionUtil.isEmpty(monitorInfo)) {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
} else {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, monitorInfo, methodDescribe);
}
}
} }

View File

@@ -45,7 +45,7 @@ import java.util.Objects;
@Slf4j @Slf4j
@Api(tags = "台账-主网监测点信息") @Api(tags = "台账-主网监测点信息")
@RequiredArgsConstructor @RequiredArgsConstructor
public class MonitorController extends BaseController { public class PmsMonitorController extends BaseController {
private final IMonitorService monitorService; private final IMonitorService monitorService;

View File

@@ -37,7 +37,7 @@ import java.util.Objects;
@RequestMapping("/pms/powerClient") @RequestMapping("/pms/powerClient")
@RequiredArgsConstructor @RequiredArgsConstructor
@Api(tags = "台账-用电用户") @Api(tags = "台账-用电用户")
public class PowerClientController extends BaseController { public class PmsPowerClientController extends BaseController {
private final IPowerClientService iPowerClientService; private final IPowerClientService iPowerClientService;

View File

@@ -42,7 +42,7 @@ import java.util.Objects;
@Api(tags = "台账-台区信息") @Api(tags = "台账-台区信息")
@RequiredArgsConstructor @RequiredArgsConstructor
@Validated @Validated
public class PowerDistributionareaController extends BaseController { public class PmsPowerDistributionareaController extends BaseController {
private final IPowerDistributionareaService iPowerDistributionareaService; private final IPowerDistributionareaService iPowerDistributionareaService;

View File

@@ -38,7 +38,7 @@ import java.util.Objects;
@RequestMapping("/pms/powerGenerationUser") @RequestMapping("/pms/powerGenerationUser")
@Api(tags = "台账-发电用户") @Api(tags = "台账-发电用户")
@RequiredArgsConstructor @RequiredArgsConstructor
public class PowerGenerationUserController extends BaseController { public class PmsPowerGenerationUserController extends BaseController {
private final IPowerGenerationUserService iPowerGenerationUserService; private final IPowerGenerationUserService iPowerGenerationUserService;

View File

@@ -16,7 +16,7 @@ import com.njcn.web.controller.BaseController;
*/ */
@RestController @RestController
@RequestMapping("/pms/powerQualityMatter") @RequestMapping("/pms/powerQualityMatter")
public class PowerQualityMatterController extends BaseController { public class PmsPowerQualityMatterController extends BaseController {
} }

View File

@@ -1,16 +0,0 @@
package com.njcn.device.pms.mapper.majornetwork;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.device.pms.pojo.po.GeneratrixWire;
import org.apache.ibatis.annotations.Mapper;
/**
* pms-device
*
* @author cdf
* @date 2022/10/26
*/
@Mapper
public interface GeneratrixWireMapper extends BaseMapper<GeneratrixWire> {
}

View File

@@ -0,0 +1,51 @@
package com.njcn.device.pms.mapper.majornetwork;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO;
import com.njcn.device.pms.pojo.param.ConditionParam;
import com.njcn.device.pms.pojo.param.PmsGeneratrixParam;
import com.njcn.device.pms.pojo.po.GeneratrixWire;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* pms-device
*
* @author cdf
* @date 2022/10/26
*/
@Mapper
public interface PmsGeneratrixWireMapper extends BaseMapper<GeneratrixWire> {
/**
* 获取母线信息
*
* @param pmsGeneratrixParam 入参
* @return 母线信息
*/
List<PmsGeneratrixDTO> getGeneratrixInfo(@Param("pmsGeneratrixParam") PmsGeneratrixParam pmsGeneratrixParam);
/**
* 获取母线与电站关联信息
*
* @param param 条件参数
* @return java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
* @author yzh
* @date 2022/11/3
*/
List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(@Param("param") PmsGeneratrixParam param);
/**
* @Description: 普测计划页面调用根据条件查询母线信息
* @Param: [data, param]
* @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
* @Author: clam
* @Date: 2022/12/5
*/
List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(@Param("orgList")List<String> data, @Param("param") ConditionParam param);
}

View File

@@ -4,10 +4,9 @@ package com.njcn.device.pms.mapper.majornetwork;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pms.pojo.po.Generatrix; import com.njcn.device.pms.pojo.po.GeneratrixWire;
import com.njcn.device.pms.pojo.po.PowerDistributionarea; import com.njcn.device.pms.pojo.po.PowerDistributionarea;
import com.njcn.device.pms.pojo.vo.PowerDistributionareaVO; import com.njcn.device.pms.pojo.vo.PowerDistributionareaVO;
import com.njcn.system.pojo.vo.EventTemplateVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
/** /**
@@ -20,14 +19,6 @@ import org.apache.ibatis.annotations.Param;
*/ */
public interface PowerDistributionareaMapper extends BaseMapper<PowerDistributionarea> { public interface PowerDistributionareaMapper extends BaseMapper<PowerDistributionarea> {
Page<PowerDistributionareaVO> page(@Param("page")Page<PowerDistributionareaVO> page, @Param("ew") QueryWrapper<PowerDistributionareaVO> queryWrapper);
/**
* 获取台区电压等级(使用台区所属母线电压等级)
* @param distribution 台区编号
* @author cdf
* @date 2022/11/28
*/
Generatrix getGeneratrixByDistributionId(@Param("distribution") String distribution);
} }

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.PmsGeneratrixMapper"> <mapper namespace="com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixWireMapper">
<!--获取母线信息--> <!--获取母线信息-->
<select id="getGeneratrixInfo" resultType="com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO"> <select id="getGeneratrixInfo" resultType="com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO">
@@ -15,12 +15,12 @@
pm.`Name` AS monitorName, pm.`Name` AS monitorName,
pg.Scale AS generatrixVoltageLevel pg.Scale AS generatrixVoltageLevel
FROM FROM
pms_generatrix AS pg pms_generatrix_wire AS pg
LEFT JOIN pms_monitor AS pm ON pm.Generatrix_Id = pg.Generatrix_Id LEFT JOIN pms_monitor AS pm ON pm.Generatrix_wire_Id = pg.id
WHERE WHERE
pm.`Status` = 1 pm.`Status` = 1
AND pg.`Status` =1 AND pg.`Status` =1
AND pg.Generatrix_Id IN AND pg.id IN
<foreach collection="pmsGeneratrixParam.generatrixIds" item="item" open="(" close=")" separator=","> <foreach collection="pmsGeneratrixParam.generatrixIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
@@ -32,7 +32,7 @@
</foreach> </foreach>
</if> </if>
<if test="pmsGeneratrixParam.generatrixName != null and pmsGeneratrixParam.generatrixName != ''"> <if test="pmsGeneratrixParam.generatrixName != null and pmsGeneratrixParam.generatrixName != ''">
AND pm.Generatrix_Name LIKE CONCAT('%',#{pmsGeneratrixParam.generatrixName},'%') AND pm.Generatrix_wire_Name LIKE CONCAT('%',#{pmsGeneratrixParam.generatrixName},'%')
</if> </if>
</select> </select>
@@ -50,8 +50,8 @@
pss.Voltage_Level AS voltageLevel pss.Voltage_Level AS voltageLevel
FROM FROM
pms_generatrix AS pg pms_generatrix_wire AS pg
LEFT JOIN pms_statation_stat AS pss ON pg.Statation_Id = pss.Power_Id LEFT JOIN pms_statation_stat AS pss ON pg.station = pss.Power_Id
WHERE WHERE
pg.`Status` = 1 pg.`Status` = 1
AND pss.`Status` = 1 AND pss.`Status` = 1
@@ -78,13 +78,13 @@
pss.Power_Name AS powerName, pss.Power_Name AS powerName,
pss.Voltage_Level AS powerVoltageLevel pss.Voltage_Level AS powerVoltageLevel
FROM FROM
pms_generatrix AS pg pms_generatrix_wire AS pg
LEFT JOIN pms_statation_stat AS pss ON pg.Statation_Id = pss.Power_Id LEFT JOIN pms_statation_stat AS pss ON pg.station = pss.Power_Id
WHERE WHERE
pg.`Status` = 1 pg.`Status` = 1
AND pss.`Status` = 1 AND pss.`Status` = 1
<if test="param.generatrixIds != null and param.generatrixIds.size() >0 "> <if test="param.generatrixIds != null and param.generatrixIds.size() >0 ">
AND pg.Generatrix_Id IN AND pg.id IN
<foreach collection="param.generatrixIds" item="item" open="(" close=")" separator=","> <foreach collection="param.generatrixIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
@@ -108,11 +108,15 @@
</foreach> </foreach>
</if> </if>
<if test="param.generatrixName != null and param.generatrixName !='' "> <if test="param.generatrixName != null and param.generatrixName !='' ">
AND pg.Generatrix_Name LIKE CONCAT('%',#{param.generatrixName},'%') AND pg.name LIKE CONCAT('%',#{param.generatrixName},'%')
</if> </if>
<if test="param.powerStationName != null and param.powerStationName !='' "> <if test="param.powerStationName != null and param.powerStationName !='' ">
AND pss.Power_Name LIKE CONCAT('%',#{param.powerStationName},'%') AND pss.stationName LIKE CONCAT('%',#{param.powerStationName},'%')
</if> </if>
</select> </select>
</mapper> </mapper>

View File

@@ -2,17 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!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.PowerDistributionareaMapper"> <mapper namespace="com.njcn.device.pms.mapper.majornetwork.PowerDistributionareaMapper">
<select id="page" resultType="com.njcn.device.pms.pojo.vo.PowerDistributionareaVO">
SELECT pms_power_distributionarea.*
FROM pms_power_distributionarea pms_power_distributionarea
WHERE ${ew.sqlSegment}
</select>
<select id="getGeneratrixByDistributionId" resultType="Generatrix">
select c.* from pms_power_distributionarea a
inner join pms_generatrix_wire b on a.Line_Id = b.Wire_Id
inner join pms_generatrix c on b.Generatrix_Id = c.Generatrix_Id
where a.id = #{distribution}
and a.status = 1
</select>
</mapper> </mapper>

View File

@@ -50,6 +50,7 @@
<!--获取主网数据质量-台帐类数据质量核查(季)--> <!--获取主网数据质量-台帐类数据质量核查(季)-->
<select id="getRStatAccountCheckDataSeasonInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO"> <select id="getRStatAccountCheckDataSeasonInfo" resultType="com.njcn.device.pms.pojo.vo.RStatAccountCheckDataVO">
SELECT
<include refid="query_field"></include> <include refid="query_field"></include>
FROM r_stat_account_check_data_q FROM r_stat_account_check_data_q
WHERE WHERE

View File

@@ -11,7 +11,7 @@
measurement_point_id AS measurementPointId measurement_point_id AS measurementPointId
FROM FROM
r_stat_measurement_account_detail r_stat_measurement_account_detail
WHERE <where>
measurement_point_id IN measurement_point_id IN
<foreach collection="monitorIdList" item="item" open="(" close=")" separator=","> <foreach collection="monitorIdList" item="item" open="(" close=")" separator=",">
#{item} #{item}
@@ -28,5 +28,6 @@
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
AND DATE_FORMAT(data_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d') AND DATE_FORMAT(data_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d')
</if> </if>
</where>
</select> </select>
</mapper> </mapper>

View File

@@ -11,16 +11,23 @@
substation_id AS substationId substation_id AS substationId
FROM FROM
r_stat_traction_station_account_detail r_stat_traction_station_account_detail
WHERE <where>
substation_id IN substation_id IN
<foreach collection="substationIds" item="item" open="(" close=")" separator=","> <foreach collection="substationIds" item="item" open="(" close=")" separator=",">
#{item} #{item}
</foreach> </foreach>
<if test="param.checkRules!=null and param.checkRules.size()!=0">
AND check_rules IN
<foreach collection="param.checkRules" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
AND DATE_FORMAT(data_date, '%Y-%m-%d') &gt;= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d') AND DATE_FORMAT(data_date, '%Y-%m-%d') &gt;= DATE_FORMAT(#{param.startTime}, '%Y-%m-%d')
</if> </if>
<if test="param.endTime != null and param.endTime != ''"> <if test="param.endTime != null and param.endTime != ''">
AND DATE_FORMAT(data_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d') AND DATE_FORMAT(data_date, '%Y-%m-%d') &lt;= DATE_FORMAT(#{param.endTime}, '%Y-%m-%d')
</if> </if>
</where>
</select> </select>
</mapper> </mapper>

View File

@@ -88,11 +88,10 @@ public class IPwMonitorServiceImpl implements IPwMonitorService {
@Override @Override
public List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam) { public List<PwPmsMonitorDTO> getPwPhotovoltaicMonitorList(PwPmsMonitorParam pwPmsMonitorParam) {
//定义待返回终端信息 //定义待返回终端信息
List<Dept> deptInfos = deptFeignClient.getDirectSonSelf(pwPmsMonitorParam.getOrgId()).getData(); List<DeptDTO> deptInfos = deptFeignClient.getDepSonDetailByDeptId(pwPmsMonitorParam.getOrgId()).getData();
// 过滤出传入id的子单位id // 过滤出传入id的子单位id
List<String> deptIdList = deptInfos.stream() List<String> deptIdList = deptInfos.stream()
.filter(r-> !r.getId().equals(pwPmsMonitorParam.getOrgId())) .map(DeptDTO::getCode)
.map(Dept::getCode)
.distinct() .distinct()
.collect(Collectors.toList()); .collect(Collectors.toList());
//获取monitor详细数据 //获取monitor详细数据

View File

@@ -2,8 +2,13 @@ package com.njcn.device.pms.service.majornetwork;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO;
import com.njcn.device.pms.pojo.param.ConditionParam;
import com.njcn.device.pms.pojo.param.GeneratrixWireParam; import com.njcn.device.pms.pojo.param.GeneratrixWireParam;
import com.njcn.device.pms.pojo.param.PmsBaseParam; import com.njcn.device.pms.pojo.param.PmsBaseParam;
import com.njcn.device.pms.pojo.param.PmsGeneratrixParam;
import com.njcn.device.pms.pojo.po.GeneratrixWire; import com.njcn.device.pms.pojo.po.GeneratrixWire;
import com.njcn.web.pojo.param.BaseParam; import com.njcn.web.pojo.param.BaseParam;
@@ -72,5 +77,30 @@ public interface IGeneratrixWireService extends IService<GeneratrixWire> {
Page<GeneratrixWire> getGeneratrixWirePageList(BaseParam baseParam); Page<GeneratrixWire> getGeneratrixWirePageList(BaseParam baseParam);
/**
* 获取母线信息
*
* @param param 入参
* @return 母线信息
*/
List<PmsGeneratrixDTO> getGeneratrixInfo(PmsGeneratrixParam param);
/**
* 获取母线与电站关联信息
*
* @param param 条件参数
* @return java.util.List<com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>
* @author yzh
* @date 2022/11/3
*/
List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(PmsGeneratrixParam param);
/**
* @Description: 普测计划页面调用根据条件查询母线信息
* @Param: [param]
* @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
* @Author: clam
* @Date: 2022/12/5
*/
List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(ConditionParam param);
} }

View File

@@ -1,21 +1,28 @@
package com.njcn.device.pms.service.majornetwork.impl; package com.njcn.device.pms.service.majornetwork.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.common.pojo.enums.common.DataStateEnum; import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.db.bo.BaseEntity;
import com.njcn.device.pms.enums.PmsDeviceResponseEnum; import com.njcn.device.pms.enums.PmsDeviceResponseEnum;
import com.njcn.device.pms.mapper.majornetwork.GeneratrixWireMapper; import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixWireMapper;
import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixMapper; import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixMapper;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO;
import com.njcn.device.pms.pojo.param.ConditionParam;
import com.njcn.device.pms.pojo.param.GeneratrixWireParam; import com.njcn.device.pms.pojo.param.GeneratrixWireParam;
import com.njcn.device.pms.pojo.param.PmsBaseParam; import com.njcn.device.pms.pojo.param.PmsBaseParam;
import com.njcn.device.pms.pojo.param.PmsGeneratrixParam;
import com.njcn.device.pms.pojo.po.Generatrix; import com.njcn.device.pms.pojo.po.Generatrix;
import com.njcn.device.pms.pojo.po.GeneratrixWire; import com.njcn.device.pms.pojo.po.GeneratrixWire;
import com.njcn.device.pms.pojo.po.StatationStat;
import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService; import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService;
import com.njcn.user.api.DeptFeignClient;
import com.njcn.web.factory.PageFactory; import com.njcn.web.factory.PageFactory;
import com.njcn.web.pojo.param.BaseParam; import com.njcn.web.pojo.param.BaseParam;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@@ -32,20 +39,16 @@ import java.util.Objects;
*/ */
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class GeneratrixWireImpl extends ServiceImpl<GeneratrixWireMapper, GeneratrixWire> implements IGeneratrixWireService { public class GeneratrixWireImpl extends ServiceImpl<PmsGeneratrixWireMapper, GeneratrixWire> implements IGeneratrixWireService {
private final PmsGeneratrixMapper pmsGeneratrixMapper; private final DeptFeignClient deptFeignClient;
@Override @Override
public boolean addGeneratrixWire(GeneratrixWireParam generatrixWireParam) { public boolean addGeneratrixWire(GeneratrixWireParam generatrixWireParam) {
checkName(generatrixWireParam,false); checkName(generatrixWireParam,false);
Generatrix generatrix = pmsGeneratrixMapper.selectById(generatrixWireParam.getGeneratrixId());
if(Objects.isNull(generatrix)){
throw new BusinessException(PmsDeviceResponseEnum.VOLTAGE_EMPTY);
}
GeneratrixWire generatrixWire = new GeneratrixWire(); GeneratrixWire generatrixWire = new GeneratrixWire();
BeanUtils.copyProperties(generatrixWireParam, generatrixWire); BeanUtils.copyProperties(generatrixWireParam, generatrixWire);
generatrixWire.setGeneratrixName(generatrix.getGeneratrixName());
generatrixWire.setStatus(DataStateEnum.ENABLE.getCode()); generatrixWire.setStatus(DataStateEnum.ENABLE.getCode());
return this.save(generatrixWire); return this.save(generatrixWire);
} }
@@ -53,13 +56,12 @@ public class GeneratrixWireImpl extends ServiceImpl<GeneratrixWireMapper, Genera
@Override @Override
public boolean updateGeneratrixWire(GeneratrixWireParam generatrixWireParam) { public boolean updateGeneratrixWire(GeneratrixWireParam generatrixWireParam) {
checkName(generatrixWireParam,true); checkName(generatrixWireParam,true);
Generatrix generatrix = pmsGeneratrixMapper.selectById(generatrixWireParam.getGeneratrixId()); GeneratrixWire generatrixWireVa = this.getById(generatrixWireParam.getId());
if(Objects.isNull(generatrix)){ if(Objects.isNull(generatrixWireVa)){
throw new BusinessException(PmsDeviceResponseEnum.VOLTAGE_EMPTY); throw new BusinessException(PmsDeviceResponseEnum.VOLTAGE_EMPTY);
} }
GeneratrixWire generatrixWire = new GeneratrixWire(); GeneratrixWire generatrixWire = new GeneratrixWire();
BeanUtils.copyProperties(generatrixWireParam, generatrixWire); BeanUtils.copyProperties(generatrixWireParam, generatrixWire);
generatrixWire.setGeneratrixName(generatrix.getGeneratrixName());
return this.updateById(generatrixWire); return this.updateById(generatrixWire);
} }
@@ -77,7 +79,7 @@ public class GeneratrixWireImpl extends ServiceImpl<GeneratrixWireMapper, Genera
public List<GeneratrixWire> getGeneratrixWireList(PmsBaseParam pmsBaseParam) { public List<GeneratrixWire> getGeneratrixWireList(PmsBaseParam pmsBaseParam) {
LambdaQueryWrapper<GeneratrixWire> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GeneratrixWire> lambdaQueryWrapper = new LambdaQueryWrapper<>();
if(StrUtil.isNotBlank(pmsBaseParam.getGeneratrixId())){ if(StrUtil.isNotBlank(pmsBaseParam.getGeneratrixId())){
lambdaQueryWrapper.eq(GeneratrixWire::getGeneratrixId,pmsBaseParam.getGeneratrixId()); lambdaQueryWrapper.eq(GeneratrixWire::getId,pmsBaseParam.getGeneratrixId());
} }
lambdaQueryWrapper.eq(GeneratrixWire::getStatus,DataStateEnum.ENABLE.getCode()) lambdaQueryWrapper.eq(GeneratrixWire::getStatus,DataStateEnum.ENABLE.getCode())
.orderByAsc(GeneratrixWire::getCreateTime); .orderByAsc(GeneratrixWire::getCreateTime);
@@ -89,8 +91,9 @@ public class GeneratrixWireImpl extends ServiceImpl<GeneratrixWireMapper, Genera
LambdaQueryWrapper<GeneratrixWire> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GeneratrixWire> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.like(StrUtil.isNotBlank(baseParam.getSearchValue()),GeneratrixWire::getGeneratrixName,baseParam.getSearchValue()) lambdaQueryWrapper.like(StrUtil.isNotBlank(baseParam.getSearchValue()),GeneratrixWire::getGeneratrixName,baseParam.getSearchValue())
.or(StrUtil.isNotBlank(baseParam.getSearchValue())) .or(StrUtil.isNotBlank(baseParam.getSearchValue()))
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),GeneratrixWire::getWireName,baseParam.getSearchValue()) .like(StrUtil.isNotBlank(baseParam.getSearchValue()),GeneratrixWire::getName,baseParam.getSearchValue())
.orderByAsc(GeneratrixWire::getCreateTime); .eq(GeneratrixWire::getStatus,DataStateEnum.ENABLE.getCode())
.orderByDesc(GeneratrixWire::getCreateTime);
return this.page(new Page<>(PageFactory.getPageNum(baseParam),PageFactory.getPageSize(baseParam)),lambdaQueryWrapper); return this.page(new Page<>(PageFactory.getPageNum(baseParam),PageFactory.getPageSize(baseParam)),lambdaQueryWrapper);
} }
@@ -100,26 +103,72 @@ public class GeneratrixWireImpl extends ServiceImpl<GeneratrixWireMapper, Genera
LambdaQueryWrapper<GeneratrixWire> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GeneratrixWire> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(GeneratrixWire::getGeneratrixName,generatrixWireParam.getWireName()) lambdaQueryWrapper.eq(GeneratrixWire::getName,generatrixWireParam.getName())
.eq(GeneratrixWire::getGeneratrixId,generatrixWireParam.getGeneratrixId()) .eq(GeneratrixWire::getStationId,generatrixWireParam.getStationId())
.eq(GeneratrixWire::getStatus,DataStateEnum.ENABLE.getCode()); .eq(GeneratrixWire::getStatus,DataStateEnum.ENABLE.getCode());
if(updateFlag){ if(updateFlag){
//更新 //更新
lambdaQueryWrapper.ne(GeneratrixWire::getWireId,generatrixWireParam.getWireId()); lambdaQueryWrapper.ne(GeneratrixWire::getId,generatrixWireParam.getId());
}else { }else {
//新增校验 //新增校验
if(StrUtil.isNotBlank(generatrixWireParam.getId())) {
LambdaQueryWrapper<GeneratrixWire> lambdaQuery = new LambdaQueryWrapper<>(); LambdaQueryWrapper<GeneratrixWire> lambdaQuery = new LambdaQueryWrapper<>();
lambdaQuery.eq(GeneratrixWire::getWireId,generatrixWireParam.getWireId()); lambdaQuery.eq(GeneratrixWire::getId, generatrixWireParam.getId());
int count = this.count(lambdaQuery); int count = this.count(lambdaQuery);
if (count > 0) { if (count > 0) {
throw new BusinessException(PmsDeviceResponseEnum.WIRE_SAME); throw new BusinessException(PmsDeviceResponseEnum.WIRE_SAME);
} }
} }
}
int count = this.count(lambdaQueryWrapper); int count = this.count(lambdaQueryWrapper);
if(count > 0){ if(count > 0){
throw new BusinessException(PmsDeviceResponseEnum.GENERATRIXWIRE_NAME_REPEAT); throw new BusinessException(PmsDeviceResponseEnum.GENERATRIXWIRE_NAME_REPEAT);
} }
} }
/**
* 获取母线信息
*
* @param param 入参
* @return 母线信息
*/
@Override
public List<PmsGeneratrixDTO> getGeneratrixInfo(PmsGeneratrixParam param) {
if (CollUtil.isEmpty(param.getGeneratrixIds())) {
return null;
}
return this.baseMapper.getGeneratrixInfo(param);
}
/**
* 获取母线与电站关联信息
*
* @param param 条件参数
* @return java.util.List<com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>
* @author yzh
* @date 2022/11/3
*/
@Override
public List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(PmsGeneratrixParam param) {
return this.baseMapper.getGeneratrixAndPowerStationInfo(param);
}
/**
* @param param
* @Description: 普测计划页面调用根据条件查询母线信息
* @Param: [param]
* @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
* @Author: clam
* @Date: 2022/12/5
*/
@Override
public List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(ConditionParam param) {
List<String> data = deptFeignClient.getDepSonSelfCodetByDeptId (param.getDeptId ( )).getData ( );
return this.baseMapper.getGeneratrixByCondition(data,param);
}
} }

View File

@@ -17,7 +17,6 @@ import com.njcn.device.pms.pojo.param.MonitorParam;
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam; import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam; import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
import com.njcn.device.pms.pojo.param.PmsMonitorParam; import com.njcn.device.pms.pojo.param.PmsMonitorParam;
import com.njcn.device.pms.pojo.po.Generatrix;
import com.njcn.device.pms.pojo.po.GeneratrixWire; import com.njcn.device.pms.pojo.po.GeneratrixWire;
import com.njcn.device.pms.pojo.po.Monitor; import com.njcn.device.pms.pojo.po.Monitor;
import com.njcn.device.pms.pojo.po.SpecialMonitor; import com.njcn.device.pms.pojo.po.SpecialMonitor;
@@ -48,7 +47,7 @@ import java.util.stream.Collectors;
* 服务实现类 * 服务实现类
* </p> * </p>
* *
* @author hongawen * @author cdf
* @since 2022-10-14 * @since 2022-10-14
*/ */
@Slf4j @Slf4j
@@ -64,7 +63,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
private final DeptFeignClient deptFeignClient; private final DeptFeignClient deptFeignClient;
private final PmsGeneratrixMapper generatrixMapper; private final PmsGeneratrixWireMapper generatrixWireMapper;
private final SpecialMonitorMapper specialMonitorMapper; private final SpecialMonitorMapper specialMonitorMapper;
@@ -311,8 +310,8 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
throw new BusinessException(PmsDeviceResponseEnum.Operation_ITEM_EMPTY); throw new BusinessException(PmsDeviceResponseEnum.Operation_ITEM_EMPTY);
} }
//校验线 //校验线
Generatrix generatrix = generatrixMapper.selectById(monitorParam.getGeneratrixId()); GeneratrixWire generatrix = generatrixWireMapper.selectById(monitorParam.getLineId());
if(Objects.isNull(generatrix)){ if(Objects.isNull(generatrix)){
throw new BusinessException(PmsDeviceResponseEnum.VOLTAGE_EMPTY); throw new BusinessException(PmsDeviceResponseEnum.VOLTAGE_EMPTY);
} }
@@ -320,7 +319,7 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
monitor.setOperationName(dept.getName()); monitor.setOperationName(dept.getName());
monitor.setOperationName(deptOp.getName()); monitor.setOperationName(deptOp.getName());
monitor.setGeneratrixName(generatrix.getGeneratrixName()); monitor.setGeneratrixWireName(generatrix.getName());
} }

View File

@@ -74,8 +74,8 @@ public class OverviewServiceImpl implements OverviewService {
overviewVO.setSumNum("0"); overviewVO.setSumNum("0");
overviewVO.setYtbSumNum("0"); overviewVO.setYtbSumNum("0");
overviewVO.setYhbSumNum("0"); overviewVO.setYhbSumNum("0");
overviewVO.setSameNum("10"); overviewVO.setSameNum("0");
overviewVO.setRingNum("-50"); overviewVO.setRingNum("0");
overviewVOS.add(overviewVO); overviewVOS.add(overviewVO);
} }
} }

View File

@@ -15,7 +15,6 @@ import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO; import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO;
import com.njcn.device.pms.pojo.param.*; import com.njcn.device.pms.pojo.param.*;
import com.njcn.device.pms.pojo.po.Generatrix; import com.njcn.device.pms.pojo.po.Generatrix;
import com.njcn.device.pms.pojo.po.GeneratrixWire;
import com.njcn.device.pms.pojo.po.StatationStat; import com.njcn.device.pms.pojo.po.StatationStat;
import com.njcn.device.pms.service.majornetwork.IPmsGeneratrixService; import com.njcn.device.pms.service.majornetwork.IPmsGeneratrixService;
@@ -29,7 +28,6 @@ import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* @author yzh * @author yzh

View File

@@ -70,9 +70,9 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
// pmsDeviceInfoWithInOrg.get(0); // pmsDeviceInfoWithInOrg.get(0);
//获取所有子部门信息 //获取所有子部门信息
// List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
/*获取下级子部门信息*/ /*获取下级子部门信息*/
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( ); // List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
if (CollUtil.isEmpty(deptDTOList)) { if (CollUtil.isEmpty(deptDTOList)) {
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
} }

View File

@@ -59,9 +59,9 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
String endTime = rMpDevAbnormalManageParam.getEndTime(); //结束时间 String endTime = rMpDevAbnormalManageParam.getEndTime(); //结束时间
//获取所有子部门信息 //获取所有子部门信息
// List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
/*获取下一级子部门信息*/ /*获取下一级子部门信息*/
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( ); // List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
if (CollUtil.isEmpty(deptDTOList)) { if (CollUtil.isEmpty(deptDTOList)) {
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
} }
@@ -304,9 +304,9 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
/**根据条件查询终端**/ /**根据条件查询终端**/
//获取所有子部门信息 //获取所有子部门信息
// List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
/*获取下级子部门信息*/ /*获取下级子部门信息*/
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( ); // List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
if (CollUtil.isEmpty(deptDTOList)) { if (CollUtil.isEmpty(deptDTOList)) {
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
} }

View File

@@ -68,7 +68,9 @@ implements RMpMonitorAlarmCountMService {
String monitorName = rMpMonitorAlarmCountMParam.getMeasurementPointName(); //监测点名称 String monitorName = rMpMonitorAlarmCountMParam.getMeasurementPointName(); //监测点名称
//获取所有子部门信息 //获取所有子部门信息
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); // List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
/*获取下级子部门信息*/
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
if (CollUtil.isEmpty(deptDTOList)) { if (CollUtil.isEmpty(deptDTOList)) {
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
} }

View File

@@ -56,7 +56,10 @@ implements RStatAreaAlarmCountMService{
String startTime = rStatAreaAlarmCountMParam.getStartTime(); //开始时间 yyyy-MM-dd String startTime = rStatAreaAlarmCountMParam.getStartTime(); //开始时间 yyyy-MM-dd
String endTime = rStatAreaAlarmCountMParam.getEndTime(); //截止时间 yyyy-MM-dd String endTime = rStatAreaAlarmCountMParam.getEndTime(); //截止时间 yyyy-MM-dd
//获取所有子部门信息 //获取所有子部门信息
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); // List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
/*获取下级子部门信息*/
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
if (CollUtil.isEmpty(deptDTOList)) { if (CollUtil.isEmpty(deptDTOList)) {
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
} }

View File

@@ -73,7 +73,10 @@ implements RStatZwAlarmCountWService {
String startTime = rStatZwAlarmCountWParam.getStartTime(); //开始时间 yyyy-MM-dd String startTime = rStatZwAlarmCountWParam.getStartTime(); //开始时间 yyyy-MM-dd
String endTime = rStatZwAlarmCountWParam.getEndTime(); //截止时间 yyyy-MM-dd String endTime = rStatZwAlarmCountWParam.getEndTime(); //截止时间 yyyy-MM-dd
//获取所有子部门信息 //获取所有子部门信息
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData(); // List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
/*获取下级子部门信息*/
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
if (CollUtil.isEmpty(deptDTOList)) { if (CollUtil.isEmpty(deptDTOList)) {
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在"); throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
} }