Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,36 +1,36 @@
|
|||||||
package com.njcn.device.pms.pojo.po;
|
//package com.njcn.device.pms.pojo.po;
|
||||||
|
//
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
//import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
//import com.njcn.db.bo.BaseEntity;
|
||||||
import lombok.Data;
|
//import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
//import lombok.EqualsAndHashCode;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* pms-device
|
// * pms-device
|
||||||
* 母线
|
// * 母线
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2022/10/26
|
// * @date 2022/10/26
|
||||||
*/
|
// */
|
||||||
@Data
|
//@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
//@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("pms_generatrix")
|
//@TableName("pms_generatrix")
|
||||||
public class Generatrix extends BaseEntity {
|
//public class Generatrix extends BaseEntity {
|
||||||
|
//
|
||||||
private static final long serialVersionUID = 1L;
|
// private static final long serialVersionUID = 1L;
|
||||||
|
//
|
||||||
@TableId
|
// @TableId
|
||||||
private String generatrixId;
|
// private String generatrixId;
|
||||||
|
//
|
||||||
private String generatrixName;
|
// private String generatrixName;
|
||||||
|
//
|
||||||
private String statationId;
|
// private String statationId;
|
||||||
|
//
|
||||||
private String statationName;
|
// private String statationName;
|
||||||
|
//
|
||||||
private String scale;
|
// private String scale;
|
||||||
|
//
|
||||||
private Integer status;
|
// private Integer status;
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/*
|
||||||
package com.njcn.device.pms.controller.ledgerManger;
|
package com.njcn.device.pms.controller.ledgerManger;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
@@ -29,12 +30,14 @@ import javax.validation.constraints.NotEmpty;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* 母线信息
|
* 母线信息
|
||||||
*
|
*
|
||||||
* @author yzh
|
* @author yzh
|
||||||
* @date 2022/10/18
|
* @date 2022/10/18
|
||||||
*/
|
*//*
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/pmsGeneratrix")
|
@RequestMapping("/pmsGeneratrix")
|
||||||
@@ -45,12 +48,14 @@ public class PmsGeneratrixController extends BaseController {
|
|||||||
|
|
||||||
private final IPmsGeneratrixService pmsGeneratrixService;
|
private final IPmsGeneratrixService pmsGeneratrixService;
|
||||||
|
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* 获取指定母线信息
|
* 获取指定母线信息
|
||||||
*
|
*
|
||||||
* @param param 获取指定的监测点信息条件
|
* @param param 获取指定的监测点信息条件
|
||||||
* @return 指定母线信息
|
* @return 指定母线信息
|
||||||
*/
|
*//*
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getGeneratrixInfo")
|
@PostMapping("/getGeneratrixInfo")
|
||||||
@ApiOperation("获取指定母线信息")
|
@ApiOperation("获取指定母线信息")
|
||||||
@@ -65,6 +70,7 @@ public class PmsGeneratrixController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* 获取母线与电站关联信息
|
* 获取母线与电站关联信息
|
||||||
*
|
*
|
||||||
@@ -72,7 +78,8 @@ public class PmsGeneratrixController extends BaseController {
|
|||||||
* @return com.njcn.common.pojo.response.HttpResult<java.util.List < com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>>
|
* @return com.njcn.common.pojo.response.HttpResult<java.util.List < com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>>
|
||||||
* @author yzh
|
* @author yzh
|
||||||
* @date 2022/11/3
|
* @date 2022/11/3
|
||||||
*/
|
*//*
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getGeneratrixAndPowerStationInfo")
|
@PostMapping("/getGeneratrixAndPowerStationInfo")
|
||||||
@ApiOperation("获取母线与电站关联信息")
|
@ApiOperation("获取母线与电站关联信息")
|
||||||
@@ -87,13 +94,15 @@ public class PmsGeneratrixController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @Description: 普测计划页面调用根据条件查询母线信息
|
* @Description: 普测计划页面调用根据条件查询母线信息
|
||||||
* @Param: [param]
|
* @Param: [param]
|
||||||
* @return: com.njcn.common.pojo.response.HttpResult<java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>>
|
* @return: com.njcn.common.pojo.response.HttpResult<java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>>
|
||||||
* @Author: clam
|
* @Author: clam
|
||||||
* @Date: 2022/12/5
|
* @Date: 2022/12/5
|
||||||
*/
|
*//*
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/getGeneratrixByCondition")
|
@PostMapping("/getGeneratrixByCondition")
|
||||||
@ApiOperation("普测计划页面调用根据条件查询母线信息")
|
@ApiOperation("普测计划页面调用根据条件查询母线信息")
|
||||||
@@ -184,3 +193,4 @@ public class PmsGeneratrixController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|||||||
@@ -1,47 +1,47 @@
|
|||||||
package com.njcn.device.pms.mapper.majornetwork;
|
//package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
//
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
//import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
|
//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.ConditionParam;
|
//import com.njcn.device.pms.pojo.param.ConditionParam;
|
||||||
import com.njcn.device.pms.pojo.param.PmsGeneratrixParam;
|
//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 org.apache.ibatis.annotations.Mapper;
|
//import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
//import org.apache.ibatis.annotations.Param;
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author yzh
|
// * @author yzh
|
||||||
* @date 2022/10/18
|
// * @date 2022/10/18
|
||||||
*/
|
// */
|
||||||
@Mapper
|
//@Mapper
|
||||||
public interface PmsGeneratrixMapper extends BaseMapper<Generatrix> {
|
//public interface PmsGeneratrixMapper extends BaseMapper<Generatrix> {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取母线信息
|
// * 获取母线信息
|
||||||
*
|
// *
|
||||||
* @param pmsGeneratrixParam 入参
|
// * @param pmsGeneratrixParam 入参
|
||||||
* @return 母线信息
|
// * @return 母线信息
|
||||||
*/
|
// */
|
||||||
List<PmsGeneratrixDTO> getGeneratrixInfo(@Param("pmsGeneratrixParam") PmsGeneratrixParam pmsGeneratrixParam);
|
// List<PmsGeneratrixDTO> getGeneratrixInfo(@Param("pmsGeneratrixParam") PmsGeneratrixParam pmsGeneratrixParam);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取母线与电站关联信息
|
// * 获取母线与电站关联信息
|
||||||
*
|
// *
|
||||||
* @param param 条件参数
|
// * @param param 条件参数
|
||||||
* @return java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
// * @return java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
||||||
* @author yzh
|
// * @author yzh
|
||||||
* @date 2022/11/3
|
// * @date 2022/11/3
|
||||||
*/
|
// */
|
||||||
List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(@Param("param") PmsGeneratrixParam param);
|
// List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(@Param("param") PmsGeneratrixParam param);
|
||||||
/**
|
// /**
|
||||||
* @Description: 普测计划页面调用根据条件查询母线信息
|
// * @Description: 普测计划页面调用根据条件查询母线信息
|
||||||
* @Param: [data, param]
|
// * @Param: [data, param]
|
||||||
* @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
// * @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
||||||
* @Author: clam
|
// * @Author: clam
|
||||||
* @Date: 2022/12/5
|
// * @Date: 2022/12/5
|
||||||
*/
|
// */
|
||||||
List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(@Param("orgList")List<String> data, @Param("param")ConditionParam param);
|
// List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(@Param("orgList")List<String> data, @Param("param")ConditionParam param);
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,108 +1,108 @@
|
|||||||
package com.njcn.device.pms.service.majornetwork;
|
//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.GeneratrixAndPowerStationDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
|
//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.ConditionParam;
|
//import com.njcn.device.pms.pojo.param.ConditionParam;
|
||||||
import com.njcn.device.pms.pojo.param.GeneratrixParam;
|
//import com.njcn.device.pms.pojo.param.GeneratrixParam;
|
||||||
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.param.PmsGeneratrixParam;
|
||||||
import com.njcn.device.pms.pojo.po.Generatrix;
|
//import com.njcn.device.pms.pojo.po.Generatrix;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
//import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author yzh
|
// * @author yzh
|
||||||
* @date 2022/10/18
|
// * @date 2022/10/18
|
||||||
*/
|
// */
|
||||||
|
//
|
||||||
public interface IPmsGeneratrixService extends IService<Generatrix> {
|
//public interface IPmsGeneratrixService extends IService<Generatrix> {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取母线信息
|
// * 获取母线信息
|
||||||
*
|
// *
|
||||||
* @param param 入参
|
// * @param param 入参
|
||||||
* @return 母线信息
|
// * @return 母线信息
|
||||||
*/
|
// */
|
||||||
List<PmsGeneratrixDTO> getGeneratrixInfo(PmsGeneratrixParam param);
|
// List<PmsGeneratrixDTO> getGeneratrixInfo(PmsGeneratrixParam param);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 新增母线
|
// * 新增母线
|
||||||
*
|
// *
|
||||||
* @param generatrixParam 母线
|
// * @param generatrixParam 母线
|
||||||
* @return boolean
|
// * @return boolean
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2022/10/25
|
// * @date 2022/10/25
|
||||||
*/
|
// */
|
||||||
boolean addGeneratrix(GeneratrixParam generatrixParam);
|
// boolean addGeneratrix(GeneratrixParam generatrixParam);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 修改母线
|
// * 修改母线
|
||||||
*
|
// *
|
||||||
* @param generatrixParam 母线
|
// * @param generatrixParam 母线
|
||||||
* @return boolean
|
// * @return boolean
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2022/10/25
|
// * @date 2022/10/25
|
||||||
*/
|
// */
|
||||||
boolean updateGeneratrix(GeneratrixParam generatrixParam);
|
// boolean updateGeneratrix(GeneratrixParam generatrixParam);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除母线
|
// * 删除母线
|
||||||
*
|
// *
|
||||||
* @param generatrixIds 母线
|
// * @param generatrixIds 母线
|
||||||
* @return boolean
|
// * @return boolean
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2022/10/25
|
// * @date 2022/10/25
|
||||||
*/
|
// */
|
||||||
boolean delGeneratrix(List<String> generatrixIds);
|
// boolean delGeneratrix(List<String> generatrixIds);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询母线
|
// * 查询母线
|
||||||
*
|
// *
|
||||||
* @param generatrixId 母线id
|
// * @param generatrixId 母线id
|
||||||
* @return boolean
|
// * @return boolean
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2022/10/25
|
// * @date 2022/10/25
|
||||||
*/
|
// */
|
||||||
Generatrix getGeneratrixById(String generatrixId);
|
// Generatrix getGeneratrixById(String generatrixId);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询母线列表
|
// * 查询母线列表
|
||||||
*
|
// *
|
||||||
* @return boolean
|
// * @return boolean
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2022/10/25
|
// * @date 2022/10/25
|
||||||
*/
|
// */
|
||||||
List<Generatrix> getGeneratrixList(PmsBaseParam pmsBaseParam);
|
// List<Generatrix> getGeneratrixList(PmsBaseParam pmsBaseParam);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询母线列表
|
// * 查询母线列表
|
||||||
*
|
// *
|
||||||
* @param baseParam 基础参数
|
// * @param baseParam 基础参数
|
||||||
* @return boolean
|
// * @return boolean
|
||||||
* @author cdf
|
// * @author cdf
|
||||||
* @date 2022/10/25
|
// * @date 2022/10/25
|
||||||
*/
|
// */
|
||||||
Page<Generatrix> getGeneratrixPageList(BaseParam baseParam);
|
// Page<Generatrix> getGeneratrixPageList(BaseParam baseParam);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取母线与电站关联信息
|
// * 获取母线与电站关联信息
|
||||||
*
|
// *
|
||||||
* @param param 条件参数
|
// * @param param 条件参数
|
||||||
* @return java.util.List<com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>
|
// * @return java.util.List<com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>
|
||||||
* @author yzh
|
// * @author yzh
|
||||||
* @date 2022/11/3
|
// * @date 2022/11/3
|
||||||
*/
|
// */
|
||||||
List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(PmsGeneratrixParam param);
|
// List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(PmsGeneratrixParam param);
|
||||||
/**
|
// /**
|
||||||
* @Description: 普测计划页面调用根据条件查询母线信息
|
// * @Description: 普测计划页面调用根据条件查询母线信息
|
||||||
* @Param: [param]
|
// * @Param: [param]
|
||||||
* @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
// * @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
||||||
* @Author: clam
|
// * @Author: clam
|
||||||
* @Date: 2022/12/5
|
// * @Date: 2022/12/5
|
||||||
*/
|
// */
|
||||||
List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(ConditionParam param);
|
// List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(ConditionParam param);
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ 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.device.pms.enums.PmsDeviceResponseEnum;
|
import com.njcn.device.pms.enums.PmsDeviceResponseEnum;
|
||||||
import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixWireMapper;
|
import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixWireMapper;
|
||||||
import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixMapper;
|
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
|
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO;
|
import com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO;
|
||||||
@@ -18,7 +17,6 @@ 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.param.PmsGeneratrixParam;
|
||||||
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.pojo.po.StatationStat;
|
||||||
import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService;
|
import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService;
|
||||||
|
|||||||
@@ -1,172 +1,172 @@
|
|||||||
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.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.device.pms.enums.PmsDeviceResponseEnum;
|
//import com.njcn.device.pms.enums.PmsDeviceResponseEnum;
|
||||||
import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixMapper;
|
//import com.njcn.device.pms.mapper.majornetwork.PmsGeneratrixMapper;
|
||||||
import com.njcn.device.pms.mapper.majornetwork.StatationStatMapper;
|
//import com.njcn.device.pms.mapper.majornetwork.StatationStatMapper;
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
//import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationSonDTO;
|
//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.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;
|
||||||
|
//
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
//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;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
//import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
import java.util.Objects;
|
//import java.util.Objects;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author yzh
|
// * @author yzh
|
||||||
* @date 2022/10/18
|
// * @date 2022/10/18
|
||||||
*/
|
// */
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
@Service
|
//@Service
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class PmsGeneratrixServiceImpl extends ServiceImpl<PmsGeneratrixMapper, Generatrix> implements IPmsGeneratrixService {
|
//public class PmsGeneratrixServiceImpl extends ServiceImpl<PmsGeneratrixMapper, Generatrix> implements IPmsGeneratrixService {
|
||||||
|
//
|
||||||
private final PmsGeneratrixMapper pmsGeneratrixMapper;
|
// private final PmsGeneratrixMapper pmsGeneratrixMapper;
|
||||||
|
//
|
||||||
private final StatationStatMapper statationStatMapper;
|
// private final StatationStatMapper statationStatMapper;
|
||||||
|
//
|
||||||
private final DeptFeignClient deptFeignClient;
|
// private final DeptFeignClient deptFeignClient;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取母线信息
|
// * 获取母线信息
|
||||||
*
|
// *
|
||||||
* @param param 入参
|
// * @param param 入参
|
||||||
* @return 母线信息
|
// * @return 母线信息
|
||||||
*/
|
// */
|
||||||
@Override
|
// @Override
|
||||||
public List<PmsGeneratrixDTO> getGeneratrixInfo(PmsGeneratrixParam param) {
|
// public List<PmsGeneratrixDTO> getGeneratrixInfo(PmsGeneratrixParam param) {
|
||||||
if (CollUtil.isEmpty(param.getGeneratrixIds())) {
|
// if (CollUtil.isEmpty(param.getGeneratrixIds())) {
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
return pmsGeneratrixMapper.getGeneratrixInfo(param);
|
// return pmsGeneratrixMapper.getGeneratrixInfo(param);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean addGeneratrix(GeneratrixParam generatrixParam) {
|
// public boolean addGeneratrix(GeneratrixParam generatrixParam) {
|
||||||
checkName(generatrixParam,false);
|
// checkName(generatrixParam,false);
|
||||||
StatationStat statationStat = statationStatMapper.selectById(generatrixParam.getStatationId());
|
// StatationStat statationStat = statationStatMapper.selectById(generatrixParam.getStatationId());
|
||||||
if(Objects.isNull(statationStat)){
|
// if(Objects.isNull(statationStat)){
|
||||||
throw new BusinessException(PmsDeviceResponseEnum.NO_STATION);
|
// throw new BusinessException(PmsDeviceResponseEnum.NO_STATION);
|
||||||
}
|
// }
|
||||||
Generatrix generatrix = new Generatrix();
|
// Generatrix generatrix = new Generatrix();
|
||||||
BeanUtils.copyProperties(generatrixParam, generatrix);
|
// BeanUtils.copyProperties(generatrixParam, generatrix);
|
||||||
generatrix.setStatationName(statationStat.getPowerName());
|
// generatrix.setStatationName(statationStat.getPowerName());
|
||||||
generatrix.setStatus(DataStateEnum.ENABLE.getCode());
|
// generatrix.setStatus(DataStateEnum.ENABLE.getCode());
|
||||||
return this.save(generatrix);
|
// return this.save(generatrix);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean updateGeneratrix(GeneratrixParam generatrixParam) {
|
// public boolean updateGeneratrix(GeneratrixParam generatrixParam) {
|
||||||
checkName(generatrixParam,true);
|
// checkName(generatrixParam,true);
|
||||||
StatationStat statationStat = statationStatMapper.selectById(generatrixParam.getStatationId());
|
// StatationStat statationStat = statationStatMapper.selectById(generatrixParam.getStatationId());
|
||||||
if(Objects.isNull(statationStat)){
|
// if(Objects.isNull(statationStat)){
|
||||||
throw new BusinessException(PmsDeviceResponseEnum.NO_STATION);
|
// throw new BusinessException(PmsDeviceResponseEnum.NO_STATION);
|
||||||
}
|
// }
|
||||||
Generatrix generatrix = new Generatrix();
|
// Generatrix generatrix = new Generatrix();
|
||||||
BeanUtils.copyProperties(generatrixParam, generatrix);
|
// BeanUtils.copyProperties(generatrixParam, generatrix);
|
||||||
generatrix.setStatationName(statationStat.getPowerName());
|
// generatrix.setStatationName(statationStat.getPowerName());
|
||||||
return this.updateById(generatrix);
|
// return this.updateById(generatrix);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public boolean delGeneratrix(List<String> generatrixIds) {
|
// public boolean delGeneratrix(List<String> generatrixIds) {
|
||||||
return this.removeByIds(generatrixIds);
|
// return this.removeByIds(generatrixIds);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public Generatrix getGeneratrixById(String generatrixId) {
|
// public Generatrix getGeneratrixById(String generatrixId) {
|
||||||
return this.getById(generatrixId);
|
// return this.getById(generatrixId);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public List<Generatrix> getGeneratrixList(PmsBaseParam pmsBaseParam) {
|
// public List<Generatrix> getGeneratrixList(PmsBaseParam pmsBaseParam) {
|
||||||
LambdaQueryWrapper<Generatrix> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<Generatrix> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
if(StrUtil.isNotBlank(pmsBaseParam.getStationId())){
|
// if(StrUtil.isNotBlank(pmsBaseParam.getStationId())){
|
||||||
lambdaQueryWrapper.eq(Generatrix::getStatationId,pmsBaseParam.getStationId());
|
// lambdaQueryWrapper.eq(Generatrix::getStatationId,pmsBaseParam.getStationId());
|
||||||
}
|
// }
|
||||||
lambdaQueryWrapper.orderByAsc(Generatrix::getCreateTime);
|
// lambdaQueryWrapper.orderByAsc(Generatrix::getCreateTime);
|
||||||
return this.list(lambdaQueryWrapper);
|
// return this.list(lambdaQueryWrapper);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public Page<Generatrix> getGeneratrixPageList(BaseParam baseParam) {
|
// public Page<Generatrix> getGeneratrixPageList(BaseParam baseParam) {
|
||||||
LambdaQueryWrapper<Generatrix> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<Generatrix> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.like(StrUtil.isNotBlank(baseParam.getSearchValue()),Generatrix::getGeneratrixName,baseParam.getSearchValue())
|
// lambdaQueryWrapper.like(StrUtil.isNotBlank(baseParam.getSearchValue()),Generatrix::getGeneratrixName,baseParam.getSearchValue())
|
||||||
.or(StrUtil.isNotBlank(baseParam.getSearchValue()))
|
// .or(StrUtil.isNotBlank(baseParam.getSearchValue()))
|
||||||
.like(StrUtil.isNotBlank(baseParam.getSearchValue()),Generatrix::getStatationName,baseParam.getSearchValue())
|
// .like(StrUtil.isNotBlank(baseParam.getSearchValue()),Generatrix::getStatationName,baseParam.getSearchValue())
|
||||||
.orderByAsc(Generatrix::getCreateTime);
|
// .orderByAsc(Generatrix::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);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 获取母线与电站关联信息
|
// * 获取母线与电站关联信息
|
||||||
*
|
// *
|
||||||
* @param param 条件参数
|
// * @param param 条件参数
|
||||||
* @return java.util.List<com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>
|
// * @return java.util.List<com.njcn.device.pms.pojo.dto.PmsGeneratrixDTO>
|
||||||
* @author yzh
|
// * @author yzh
|
||||||
* @date 2022/11/3
|
// * @date 2022/11/3
|
||||||
*/
|
// */
|
||||||
@Override
|
// @Override
|
||||||
public List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(PmsGeneratrixParam param) {
|
// public List<GeneratrixAndPowerStationDTO> getGeneratrixAndPowerStationInfo(PmsGeneratrixParam param) {
|
||||||
return pmsGeneratrixMapper.getGeneratrixAndPowerStationInfo(param);
|
// return pmsGeneratrixMapper.getGeneratrixAndPowerStationInfo(param);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* @param param
|
// * @param param
|
||||||
* @Description: 普测计划页面调用根据条件查询母线信息
|
// * @Description: 普测计划页面调用根据条件查询母线信息
|
||||||
* @Param: [param]
|
// * @Param: [param]
|
||||||
* @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
// * @return: java.util.List<com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO>
|
||||||
* @Author: clam
|
// * @Author: clam
|
||||||
* @Date: 2022/12/5
|
// * @Date: 2022/12/5
|
||||||
*/
|
// */
|
||||||
@Override
|
// @Override
|
||||||
public List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(ConditionParam param) {
|
// public List<GeneratrixAndPowerStationSonDTO> getGeneratrixByCondition(ConditionParam param) {
|
||||||
|
//
|
||||||
List<String> data = deptFeignClient.getDepSonSelfCodetByDeptId (param.getDeptId ( )).getData ( );
|
// List<String> data = deptFeignClient.getDepSonSelfCodetByDeptId (param.getDeptId ( )).getData ( );
|
||||||
|
//
|
||||||
return pmsGeneratrixMapper.getGeneratrixByCondition(data,param);
|
// return pmsGeneratrixMapper.getGeneratrixByCondition(data,param);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
private void checkName(GeneratrixParam generatrixParam, Boolean updateFlag){
|
// private void checkName(GeneratrixParam generatrixParam, Boolean updateFlag){
|
||||||
|
//
|
||||||
LambdaQueryWrapper<Generatrix> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<Generatrix> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.eq(Generatrix::getGeneratrixName,generatrixParam.getGeneratrixName())
|
// lambdaQueryWrapper.eq(Generatrix::getGeneratrixName,generatrixParam.getGeneratrixName())
|
||||||
.eq(Generatrix::getGeneratrixId,generatrixParam.getStatationId())
|
// .eq(Generatrix::getGeneratrixId,generatrixParam.getStatationId())
|
||||||
.eq(Generatrix::getStatus, DataStateEnum.ENABLE.getCode());
|
// .eq(Generatrix::getStatus, DataStateEnum.ENABLE.getCode());
|
||||||
|
//
|
||||||
if(updateFlag){
|
// if(updateFlag){
|
||||||
//更新
|
// //更新
|
||||||
lambdaQueryWrapper.ne(Generatrix::getGeneratrixId,generatrixParam.getGeneratrixId());
|
// lambdaQueryWrapper.ne(Generatrix::getGeneratrixId,generatrixParam.getGeneratrixId());
|
||||||
}else {
|
// }else {
|
||||||
//新增校验
|
// //新增校验
|
||||||
LambdaQueryWrapper<Generatrix> lambdaQuery = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<Generatrix> lambdaQuery = new LambdaQueryWrapper<>();
|
||||||
lambdaQuery.eq(Generatrix::getGeneratrixId,generatrixParam.getGeneratrixId());
|
// lambdaQuery.eq(Generatrix::getGeneratrixId,generatrixParam.getGeneratrixId());
|
||||||
int count = this.count(lambdaQuery);
|
// int count = this.count(lambdaQuery);
|
||||||
if(count>0){
|
// if(count>0){
|
||||||
throw new BusinessException(PmsDeviceResponseEnum.GENWIRE_SAME);
|
// throw new BusinessException(PmsDeviceResponseEnum.GENWIRE_SAME);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
int count = this.count(lambdaQueryWrapper);
|
// int count = this.count(lambdaQueryWrapper);
|
||||||
if(count > 0){
|
// if(count > 0){
|
||||||
throw new BusinessException(PmsDeviceResponseEnum.GENERATRIX_NAME_REPEAT);
|
// throw new BusinessException(PmsDeviceResponseEnum.GENERATRIX_NAME_REPEAT);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package com.njcn.device.pms.service.majornetwork.impl;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
|
||||||
import com.njcn.device.pms.api.PmsGeneratrixClient;
|
|
||||||
import com.njcn.device.pms.mapper.majornetwork.RStatBusbarHarmonicMapper;
|
import com.njcn.device.pms.mapper.majornetwork.RStatBusbarHarmonicMapper;
|
||||||
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
import com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
|
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
|
||||||
@@ -15,7 +13,6 @@ import com.njcn.device.pms.pojo.po.RStatBusbarHarmonicYPO;
|
|||||||
import com.njcn.device.pms.pojo.vo.RStatBusbarHarmonicYVO;
|
import com.njcn.device.pms.pojo.vo.RStatBusbarHarmonicYVO;
|
||||||
import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService;
|
import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService;
|
||||||
import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService;
|
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 com.njcn.device.pms.service.majornetwork.RStatBusbarHarmonicService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
Reference in New Issue
Block a user