pv终端台账
This commit is contained in:
@@ -25,6 +25,7 @@ public enum PvDeviceResponseEnum {
|
|||||||
SUB_AREA_EMPTY("A0357","台区不能为空"),
|
SUB_AREA_EMPTY("A0357","台区不能为空"),
|
||||||
VOLTAGE_PARAM_EMPTY("A0358","所属母线不可为空"),
|
VOLTAGE_PARAM_EMPTY("A0358","所属母线不可为空"),
|
||||||
VOLTAGE_PARAM_EMPTY_MUST("A0359","所属母线必须为空"),
|
VOLTAGE_PARAM_EMPTY_MUST("A0359","所属母线必须为空"),
|
||||||
|
LV_USER_REPEAT("A0360","低压用户名称重复"),
|
||||||
|
|
||||||
|
|
||||||
TEN_VOLTAGE_NULL("A0360","未查询到指定10kV线路"),
|
TEN_VOLTAGE_NULL("A0360","未查询到指定10kV线路"),
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.njcn.device.pojo.vo.pv;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/7/25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PvSubstationVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站表Id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属单位Id
|
||||||
|
*/
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属单位名称
|
||||||
|
*/
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级Id,字典表
|
||||||
|
*/
|
||||||
|
private String scale;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级名称
|
||||||
|
*/
|
||||||
|
private String scaleName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站总容量(MVA)(手动填写)
|
||||||
|
*/
|
||||||
|
private Double totalCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维班组Code
|
||||||
|
*/
|
||||||
|
private String teamCode;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.device.pojo.param.pv.PvSubstationParam;
|
import com.njcn.device.pojo.param.pv.PvSubstationParam;
|
||||||
import com.njcn.device.pojo.param.pv.SubstationQueryParam;
|
import com.njcn.device.pojo.param.pv.SubstationQueryParam;
|
||||||
import com.njcn.device.pojo.po.pv.PvSubstation;
|
import com.njcn.device.pojo.po.pv.PvSubstation;
|
||||||
|
import com.njcn.device.pojo.vo.pv.PvSubstationVO;
|
||||||
import com.njcn.pvdevice.service.IPvSubstationService;
|
import com.njcn.pvdevice.service.IPvSubstationService;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -88,9 +89,9 @@ public class PvSubstationController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
@ApiOperation("分页查询变电站")
|
@ApiOperation("分页查询变电站")
|
||||||
@ApiImplicitParam(name = "substationQueryParam",value = "变电站实体",required = true)
|
@ApiImplicitParam(name = "substationQueryParam",value = "变电站实体",required = true)
|
||||||
public HttpResult<Page<PvSubstation>> getPvSubstationList(@RequestBody SubstationQueryParam substationQueryParam){
|
public HttpResult<Page<PvSubstationVO>> getPvSubstationList(@RequestBody SubstationQueryParam substationQueryParam){
|
||||||
String methodDescribe = getMethodDescribe("getPvSubstationList");
|
String methodDescribe = getMethodDescribe("getPvSubstationList");
|
||||||
Page<PvSubstation> page = iPvSubstationService.getPvSubstationList(substationQueryParam);
|
Page<PvSubstationVO> page = iPvSubstationService.getPvSubstationList(substationQueryParam);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.njcn.device.pojo.param.pv.SubstationQueryParam;
|
import com.njcn.device.pojo.param.pv.SubstationQueryParam;
|
||||||
import com.njcn.device.pojo.po.pv.PvSubstation;
|
import com.njcn.device.pojo.po.pv.PvSubstation;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pojo.vo.pv.PvSubstationVO;
|
||||||
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
import com.njcn.user.pojo.vo.PvTerminalTreeVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface PvSubstationMapper extends BaseMapper<PvSubstation> {
|
public interface PvSubstationMapper extends BaseMapper<PvSubstation> {
|
||||||
|
|
||||||
Page<PvSubstation> getPvSubstationList(Page<PvSubstation> page,@Param("substationQueryParam") SubstationQueryParam substationQueryParam);
|
Page<PvSubstationVO> getPvSubstationList(Page<PvSubstation> page, @Param("substationQueryParam") SubstationQueryParam substationQueryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端树结构的变电站
|
* 终端树结构的变电站
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<!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.pvdevice.mapper.PvSubstationMapper">
|
<mapper namespace="com.njcn.pvdevice.mapper.PvSubstationMapper">
|
||||||
|
|
||||||
<select id="getPvSubstationList" resultType="PvSubstation">
|
<select id="getPvSubstationList" resultType="PvSubstationVO">
|
||||||
SELECT
|
SELECT
|
||||||
sub.id,
|
sub.id,
|
||||||
unit.NAME unitId,
|
dept.NAME unitId,
|
||||||
dic.NAME scale,
|
dic.NAME scale,
|
||||||
sub.NAME,
|
sub.NAME,
|
||||||
sub.Total_Capacity,
|
sub.Total_Capacity,
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
pv_substation sub
|
pv_substation sub
|
||||||
LEFT JOIN pv_unit unit ON sub.unit_id = unit.id
|
LEFT JOIN pv_unit unit ON sub.unit_id = unit.id
|
||||||
LEFT JOIN sys_dict_data dic ON sub.scale = dic.id
|
LEFT JOIN sys_dict_data dic ON sub.scale = dic.id
|
||||||
|
LEFT JOIN sys_dept dept ON sub.unit_id = dept.id
|
||||||
<where>
|
<where>
|
||||||
<if test="substationQueryParam.searchValue!=null and substationQueryParam.searchValue!=''">
|
<if test="substationQueryParam.searchValue!=null and substationQueryParam.searchValue!=''">
|
||||||
and sub.name like CONCAT('%',#{substationQueryParam.searchValue},'%')
|
and sub.name like CONCAT('%',#{substationQueryParam.searchValue},'%')
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.njcn.device.pojo.param.pv.SubstationQueryParam;
|
|||||||
import com.njcn.device.pojo.po.pv.PvSubstation;
|
import com.njcn.device.pojo.po.pv.PvSubstation;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.njcn.device.pojo.po.pv.PvSubstation;
|
import com.njcn.device.pojo.po.pv.PvSubstation;
|
||||||
|
import com.njcn.device.pojo.vo.pv.PvSubstationVO;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -46,7 +47,7 @@ public interface IPvSubstationService extends IService<PvSubstation> {
|
|||||||
* @date 2022/7/5
|
* @date 2022/7/5
|
||||||
* @return Page<PvSubstation>
|
* @return Page<PvSubstation>
|
||||||
*/
|
*/
|
||||||
Page<PvSubstation> getPvSubstationList(SubstationQueryParam substationQueryParam);
|
Page<PvSubstationVO> getPvSubstationList(SubstationQueryParam substationQueryParam);
|
||||||
|
|
||||||
List<PvSubstation> getAllPvSubstationList();
|
List<PvSubstation> getAllPvSubstationList();
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class PvDeviceServiceImpl extends ServiceImpl<PvDeviceMapper, PvDevice> i
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvDeviceParam instanceof PvDeviceParam.UpdatePvDeviceParam) {
|
if (pvDeviceParam instanceof PvDeviceParam.UpdatePvDeviceParam) {
|
||||||
lambdaQueryWrapper.eq(PvDevice::getId, ((PvDeviceParam.UpdatePvDeviceParam) pvDeviceParam).getId());
|
lambdaQueryWrapper.ne(PvDevice::getId, ((PvDeviceParam.UpdatePvDeviceParam) pvDeviceParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = this.count(lambdaQueryWrapper);
|
int count = this.count(lambdaQueryWrapper);
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class PvDistributedServiceImpl extends ServiceImpl<PvDistributedMapper, P
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvDistributedParam instanceof PvDistributedParam.UpdatePvDistributedParam) {
|
if (pvDistributedParam instanceof PvDistributedParam.UpdatePvDistributedParam) {
|
||||||
lambdaQueryWrapper.eq(PvDistributed::getId, ((PvDistributedParam.UpdatePvDistributedParam) pvDistributedParam).getId());
|
lambdaQueryWrapper.ne(PvDistributed::getId, ((PvDistributedParam.UpdatePvDistributedParam) pvDistributedParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = this.count(lambdaQueryWrapper);
|
int count = this.count(lambdaQueryWrapper);
|
||||||
@@ -110,7 +110,7 @@ public class PvDistributedServiceImpl extends ServiceImpl<PvDistributedMapper, P
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvDistributedParam instanceof PvDistributedParam.UpdatePvDistributedParam) {
|
if (pvDistributedParam instanceof PvDistributedParam.UpdatePvDistributedParam) {
|
||||||
lambdaQueryWrapper.eq(PvDistributed::getId, ((PvDistributedParam.UpdatePvDistributedParam) pvDistributedParam).getId());
|
lambdaQueryWrapper.ne(PvDistributed::getId, ((PvDistributedParam.UpdatePvDistributedParam) pvDistributedParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int countUserCode = this.count(lambdaQueryWrapper);
|
int countUserCode = this.count(lambdaQueryWrapper);
|
||||||
|
|||||||
@@ -97,12 +97,12 @@ public class PvLvUserServiceImpl extends ServiceImpl<PvLvUserMapper, PvLvUser> i
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvLvUserParam instanceof PvLvUserParam.UpdatePvLvUserParam) {
|
if (pvLvUserParam instanceof PvLvUserParam.UpdatePvLvUserParam) {
|
||||||
lambdaQueryWrapper.eq(PvLvUser::getId, ((PvLvUserParam.UpdatePvLvUserParam) pvLvUserParam).getId());
|
lambdaQueryWrapper.ne(PvLvUser::getId, ((PvLvUserParam.UpdatePvLvUserParam) pvLvUserParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = this.count(lambdaQueryWrapper);
|
int count = this.count(lambdaQueryWrapper);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new BusinessException(PvDeviceResponseEnum.SUB_AREA_REPEAT);
|
throw new BusinessException(PvDeviceResponseEnum.LV_USER_REPEAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ public class PvLvUserServiceImpl extends ServiceImpl<PvLvUserMapper, PvLvUser> i
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvLvUserParam instanceof PvLvUserParam.UpdatePvLvUserParam) {
|
if (pvLvUserParam instanceof PvLvUserParam.UpdatePvLvUserParam) {
|
||||||
lambdaQueryWrapper.eq(PvLvUser::getId, ((PvLvUserParam.UpdatePvLvUserParam) pvLvUserParam).getId());
|
lambdaQueryWrapper.ne(PvLvUser::getId, ((PvLvUserParam.UpdatePvLvUserParam) pvLvUserParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int countUserCode = this.count(lambdaQueryWrapper);
|
int countUserCode = this.count(lambdaQueryWrapper);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public class PvSubAreaServiceImpl extends ServiceImpl<PvSubAreaMapper, PvSubArea
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvSubAreaParam instanceof PvSubAreaParam.UpdatePvSubAreaParam) {
|
if (pvSubAreaParam instanceof PvSubAreaParam.UpdatePvSubAreaParam) {
|
||||||
lambdaQueryWrapper.eq(PvSubArea::getId, ((PvSubAreaParam.UpdatePvSubAreaParam) pvSubAreaParam).getId());
|
lambdaQueryWrapper.ne(PvSubArea::getId, ((PvSubAreaParam.UpdatePvSubAreaParam) pvSubAreaParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = this.count(lambdaQueryWrapper);
|
int count = this.count(lambdaQueryWrapper);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.njcn.device.pojo.param.pv.SubstationQueryParam;
|
|||||||
import com.njcn.device.pojo.po.Node;
|
import com.njcn.device.pojo.po.Node;
|
||||||
import com.njcn.device.pojo.po.pv.PvSubstation;
|
import com.njcn.device.pojo.po.pv.PvSubstation;
|
||||||
import com.njcn.device.pojo.po.pv.PvSubstation;
|
import com.njcn.device.pojo.po.pv.PvSubstation;
|
||||||
|
import com.njcn.device.pojo.vo.pv.PvSubstationVO;
|
||||||
import com.njcn.pvdevice.mapper.PvSubstationMapper;
|
import com.njcn.pvdevice.mapper.PvSubstationMapper;
|
||||||
import com.njcn.pvdevice.service.IPvSubstationService;
|
import com.njcn.pvdevice.service.IPvSubstationService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -68,7 +69,7 @@ public class PvSubstationServiceImpl extends ServiceImpl<PvSubstationMapper, PvS
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<PvSubstation> getPvSubstationList(SubstationQueryParam substationQueryParam) {
|
public Page<PvSubstationVO> getPvSubstationList(SubstationQueryParam substationQueryParam) {
|
||||||
Page<PvSubstation> page = new Page<>(PageFactory.getPageNum(substationQueryParam),PageFactory.getPageSize(substationQueryParam));
|
Page<PvSubstation> page = new Page<>(PageFactory.getPageNum(substationQueryParam),PageFactory.getPageSize(substationQueryParam));
|
||||||
return this.baseMapper.getPvSubstationList(page,substationQueryParam);
|
return this.baseMapper.getPvSubstationList(page,substationQueryParam);
|
||||||
}
|
}
|
||||||
@@ -102,7 +103,7 @@ public class PvSubstationServiceImpl extends ServiceImpl<PvSubstationMapper, PvS
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvSubstationParam instanceof PvSubstationParam.UpdatePvSubstationParam) {
|
if (pvSubstationParam instanceof PvSubstationParam.UpdatePvSubstationParam) {
|
||||||
lambdaQueryWrapper.eq(PvSubstation::getId, ((PvSubstationParam.UpdatePvSubstationParam) pvSubstationParam).getId());
|
lambdaQueryWrapper.ne(PvSubstation::getId, ((PvSubstationParam.UpdatePvSubstationParam) pvSubstationParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = this.count(lambdaQueryWrapper);
|
int count = this.count(lambdaQueryWrapper);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class PvTenVoltageServiceImpl extends ServiceImpl<PvTenVoltageMapper, PvT
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvTenVoltageParam instanceof PvTenVoltageParam.UpdatePvTenVoltageParam) {
|
if (pvTenVoltageParam instanceof PvTenVoltageParam.UpdatePvTenVoltageParam) {
|
||||||
lambdaQueryWrapper.eq(PvTenVoltage::getId, ((PvTenVoltageParam.UpdatePvTenVoltageParam) pvTenVoltageParam).getId());
|
lambdaQueryWrapper.ne(PvTenVoltage::getId, ((PvTenVoltageParam.UpdatePvTenVoltageParam) pvTenVoltageParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = this.count(lambdaQueryWrapper);
|
int count = this.count(lambdaQueryWrapper);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class PvVoltageServiceImpl extends ServiceImpl<PvVoltageMapper, PvVoltage
|
|||||||
if (isUpdate) {
|
if (isUpdate) {
|
||||||
//更新操作
|
//更新操作
|
||||||
if (pvVoltageParam instanceof PvVoltageParam.UpdatePvVoltageParam) {
|
if (pvVoltageParam instanceof PvVoltageParam.UpdatePvVoltageParam) {
|
||||||
lambdaQueryWrapper.eq(PvVoltage::getId, ((PvVoltageParam.UpdatePvVoltageParam) pvVoltageParam).getId());
|
lambdaQueryWrapper.ne(PvVoltage::getId, ((PvVoltageParam.UpdatePvVoltageParam) pvVoltageParam).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count = this.count(lambdaQueryWrapper);
|
int count = this.count(lambdaQueryWrapper);
|
||||||
|
|||||||
Reference in New Issue
Block a user