新能源场站高低电压穿越新增下拉用于测点台账时维护

This commit is contained in:
guofeihu
2024-08-16 10:23:45 +08:00
parent 813af67b9b
commit b30ad02ac1
7 changed files with 56 additions and 19 deletions

View File

@@ -1,7 +1,6 @@
package com.njcn.device.pq.pojo.param; package com.njcn.device.pq.pojo.param;
import com.njcn.web.pojo.param.BaseParam; import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
@@ -15,56 +14,55 @@ import javax.validation.constraints.NotBlank;
* @since 2024-08-14 * @since 2024-08-14
*/ */
@Data @Data
@ApiModel
public class NewStationQueryParam extends BaseParam { public class NewStationQueryParam extends BaseParam {
@ApiModelProperty(name = "id") @ApiModelProperty("id")
private String id; private String id;
@ApiModelProperty(name = "新能源场站名称") @ApiModelProperty("新能源场站名称")
private String name; private String name;
@ApiModelProperty(name = "新能源场站类型") @ApiModelProperty("新能源场站类型")
private String stationType; private String stationType;
@ApiModelProperty(name = "电压等级Guid") @ApiModelProperty("电压等级Guid")
private String scale; private String scale;
@ApiModelProperty(name = "额定有功功率") @ApiModelProperty("额定有功功率")
private String ratedPower; private String ratedPower;
@ApiModelProperty(name = "经度") @ApiModelProperty("经度")
private String longitude; private String longitude;
@ApiModelProperty(name = "维度") @ApiModelProperty("维度")
private String latitude; private String latitude;
@Data @Data
public static class NewStationEdit{ public static class NewStationEdit{
@ApiModelProperty(name = "id") @ApiModelProperty("id")
private String id; private String id;
@NotBlank(message = "新能源场站名称不能为空") @NotBlank(message = "新能源场站名称不能为空")
@ApiModelProperty(name = "新能源场站名称") @ApiModelProperty("新能源场站名称(*)")
private String name; private String name;
@NotBlank(message = "新能源场站类型不能为空") @NotBlank(message = "新能源场站类型不能为空")
@ApiModelProperty(name = "新能源场站类型") @ApiModelProperty("新能源场站类型(*)")
private String stationType; private String stationType;
@ApiModelProperty(name = "电压等级Guid") @ApiModelProperty("电压等级Guid")
private String scale; private String scale;
@NotBlank(message = "额定有功功率不能为空") @NotBlank(message = "额定有功功率不能为空")
@ApiModelProperty(name = "额定有功功率") @ApiModelProperty("额定有功功率(*)")
private String ratedPower; private String ratedPower;
@NotBlank(message = "经度不能为空") @NotBlank(message = "经度不能为空")
@ApiModelProperty(name = "经度") @ApiModelProperty("经度(*)")
private String longitude; private String longitude;
@NotBlank(message = "维度不能为空") @NotBlank(message = "维度不能为空")
@ApiModelProperty(name = "维度") @ApiModelProperty("维度(*)")
private String latitude; private String latitude;
} }
} }

View File

@@ -31,12 +31,12 @@ public class NewStation extends BaseEntity {
private String name; private String name;
/** /**
* (关联sys_dict_type字典表新能源场站类型风电场、光伏电站 * (关联new_station_type字典表新能源场站类型风电场、光伏电站
*/ */
private String stationType; private String stationType;
/** /**
* (关联sys_dict_type字典表电压等级Guid * (关联Dev_Voltage_Stand字典表电压等级Guid
*/ */
private String scale; private String scale;

View File

@@ -18,6 +18,8 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.njcn.web.controller.BaseController; import com.njcn.web.controller.BaseController;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -65,5 +67,14 @@ public class NewStationController extends BaseController {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
} }
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.QUERY)
@DeleteMapping("/selectDown")
@ApiOperation("获取新能源场站高低电压穿越信息下拉框(用于监测点维护界面)")
public HttpResult<List<Map>> selectDown(@RequestParam(name = "name",required = false) String name) {
String methodDescribe = getMethodDescribe("selectDown");
LogUtil.njcnDebug(log, "{},远程搜索值为:{}", methodDescribe, name);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, iNewStationService.selectDown(name), methodDescribe);
}
} }

View File

@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pq.pojo.param.NewStationQueryParam; import com.njcn.device.pq.pojo.param.NewStationQueryParam;
import com.njcn.device.pq.pojo.po.NewStation; import com.njcn.device.pq.pojo.po.NewStation;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -19,4 +21,6 @@ public interface NewStationMapper extends BaseMapper<NewStation> {
Page<NewStation> queryPage(IPage<NewStation> page, @Param("newStationQueryParam") NewStationQueryParam newStationQueryParam); Page<NewStation> queryPage(IPage<NewStation> page, @Param("newStationQueryParam") NewStationQueryParam newStationQueryParam);
List<Map> selectDown( @Param("name") String name);
} }

View File

@@ -27,4 +27,12 @@
</if> </if>
</select> </select>
<select id="selectDown" parameterType="string" resultType="map">
select id as value,name from pq_new_station ns
where state = 1
<if test="name != null and name !=''">
and ns.name like concat('%',#{name},'%')
</if>
</select>
</mapper> </mapper>

View File

@@ -4,6 +4,8 @@ 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.pq.pojo.param.NewStationQueryParam; import com.njcn.device.pq.pojo.param.NewStationQueryParam;
import com.njcn.device.pq.pojo.po.NewStation; import com.njcn.device.pq.pojo.po.NewStation;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -31,10 +33,16 @@ public interface INewStationService extends IService<NewStation> {
/*** /***
* 新能源场站高低电压穿越表删除 * 新能源场站高低电压穿越表删除
* @author wr
* @param ids * @param ids
* @return Boolean * @return Boolean
*/ */
Boolean delNewStation(String ids); Boolean delNewStation(String ids);
/***
* 获取新能源场站高低电压穿越信息下拉框(用于监测点维护界面)
* @param name
* @return List
*/
List<Map> selectDown(String name);
} }

View File

@@ -12,6 +12,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
@@ -55,4 +57,10 @@ public class NewStationServiceImpl extends ServiceImpl<NewStationMapper, NewStat
boolean update = this.update(lambdaUpdateWrapper); boolean update = this.update(lambdaUpdateWrapper);
return update; return update;
} }
@Override
public List<Map> selectDown(String name) {
return this.baseMapper.selectDown(name);
}
} }