Commit 89cad3f0 authored by ZWT's avatar ZWT

feat(能源管理系统): 基础信息配置

1.开发基础信息配置-输电线路配置模块修改功能,完成接口冒烟测试并生成接口文档;
2.开发基础信息配置-输电线路配置模块删除功能,完成接口冒烟测试并生成接口文档;
3.开发基础信息配置-输电线路配置模块详情功能,完成接口冒烟测试并生成接口文档;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 57aa20c0
package pps.core.base.entity; package pps.core.base.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
...@@ -14,6 +18,9 @@ import java.util.Date; ...@@ -14,6 +18,9 @@ import java.util.Date;
* @date 2023/08/25 * @date 2023/08/25
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class BasePowerLineWellheadView implements Serializable { public class BasePowerLineWellheadView implements Serializable {
@XText("ID") @XText("ID")
@TableField @TableField
...@@ -59,4 +66,17 @@ public class BasePowerLineWellheadView implements Serializable { ...@@ -59,4 +66,17 @@ public class BasePowerLineWellheadView implements Serializable {
@TableField @TableField
private String ouId; private String ouId;
/**
* 井号
*/
@XText("井号")
@TableField
private String wellNumber;
/**
* 运行功率
*/
@XText("运行功率(KW)")
@TableField
private BigDecimal serviceRating;
} }
package pps.core.base.mapper; package pps.core.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import pps.core.base.entity.BasePowerLineWellheadView; import pps.core.base.entity.BasePowerLineWellheadView;
import java.util.List; import java.util.List;
@Repository(value="pps.core.base.mapper.BasePowerLineWellheadViewMapper") /**
* 输电线路井口配置
*
* @author ZWT
* @date 2023/08/28
*/
@Repository(value = "pps.core.base.mapper.BasePowerLineWellheadViewMapper")
public interface BasePowerLineWellheadViewMapper { public interface BasePowerLineWellheadViewMapper {
BasePowerLineWellheadView selectOne(BasePowerLineWellheadView record); BasePowerLineWellheadView selectOne(BasePowerLineWellheadView record);
/**
* 输电线路井口配置列表
*
* @param record 记录
* @return {@link List}<{@link BasePowerLineWellheadView}>
*/
List<BasePowerLineWellheadView> selectList(BasePowerLineWellheadView record); List<BasePowerLineWellheadView> selectList(BasePowerLineWellheadView record);
} }
...@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo; ...@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo;
import pps.core.base.entity.*; import pps.core.base.entity.*;
import pps.core.base.mapper.*; import pps.core.base.mapper.*;
import pps.core.base.service.data.base_power_line.*; import pps.core.base.service.data.base_power_line.*;
import pps.core.base.service.data.base_power_line_wellhead.GetBasePowerLineWellheadViewOutput;
import pps.core.base.utils.BaseEntUtils; import pps.core.base.utils.BaseEntUtils;
import pps.core.common.session.PpsUserSession; import pps.core.common.session.PpsUserSession;
import xstartup.annotation.XService; import xstartup.annotation.XService;
...@@ -145,6 +146,20 @@ public class BasePowerLineService { ...@@ -145,6 +146,20 @@ public class BasePowerLineService {
} }
GetBasePowerLineViewOutput output = new GetBasePowerLineViewOutput(); GetBasePowerLineViewOutput output = new GetBasePowerLineViewOutput();
XCopyUtils.copyObject(entity, output); XCopyUtils.copyObject(entity, output);
//设置关联井口
BasePowerLineWellheadViewMapper wellheadViewMapper = context.getBean(BasePowerLineWellheadViewMapper.class);
List<BasePowerLineWellheadView> wellheadViewList = wellheadViewMapper.selectList(BasePowerLineWellheadView.builder()
.lineId(lineId)
.build());
if (!wellheadViewList.isEmpty()) {
output.setWellheadOutputs(XCopyUtils.copyNewList(wellheadViewList, GetBasePowerLineWellheadViewOutput.class));
}
//设置关联光伏
BasePowerLinePlantViewMapper plantViewMapper = context.getBean(BasePowerLinePlantViewMapper.class);
//设置关联储能
BasePowerLineStorageViewMapper storageViewMapper = context.getBean(BasePowerLineStorageViewMapper.class);
//设置关联柴发
BasePowerLineDieselViewMapper dieselViewMapper = context.getBean(BasePowerLineDieselViewMapper.class);
return XSingleResult.success(output); return XSingleResult.success(output);
} }
......
package pps.core.base.service.data.base_power_line; package pps.core.base.service.data.base_power_line;
import jakarta.validation.Valid;
import lombok.Data; import lombok.Data;
import pps.core.base.service.data.base_power_line_diesel.GetBasePowerLineDieselViewOutput;
import pps.core.base.service.data.base_power_line_plant.GetBasePowerLinePlantViewOutput;
import pps.core.base.service.data.base_power_line_storage.GetBasePowerLineStorageViewOutput;
import pps.core.base.service.data.base_power_line_wellhead.GetBasePowerLineWellheadViewOutput;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import java.util.List;
/** /**
* 输电线路配置 * 输电线路配置
* *
...@@ -44,4 +51,32 @@ public class GetBasePowerLineViewOutput { ...@@ -44,4 +51,32 @@ public class GetBasePowerLineViewOutput {
*/ */
@XText("上级线路名称") @XText("上级线路名称")
private String upperLineName; private String upperLineName;
/**
* 输电线路柴发设备配置
*/
@XText("输电线路柴发设备配置")
@Valid
private List<GetBasePowerLineDieselViewOutput> dieselOutputs;
/**
* 输电线路光伏配置
*/
@XText("输电线路光伏配置")
@Valid
private List<GetBasePowerLinePlantViewOutput> plantOutputs;
/**
* 输电线路储能配置
*/
@XText("输电线路储能配置")
@Valid
private List<GetBasePowerLineStorageViewOutput> storageOutputs;
/**
* 输电线路井口配置
*/
@XText("输电线路井口配置")
@Valid
private List<GetBasePowerLineWellheadViewOutput> wellheadOutputs;
} }
package pps.core.base.service.data.base_power_line_wellhead; package pps.core.base.service.data.base_power_line_wellhead;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data; import lombok.Data;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import java.math.BigDecimal;
/** /**
* 输电线路井口配置 * 输电线路井口配置
* *
...@@ -12,9 +15,23 @@ import xstartup.annotation.XText; ...@@ -12,9 +15,23 @@ import xstartup.annotation.XText;
@Data @Data
public class GetBasePowerLineWellheadViewOutput { public class GetBasePowerLineWellheadViewOutput {
@XText("ID")
private String id;
@XText("井口ID") @XText("井口ID")
private String wellheadId; private String wellheadId;
@XText("组织机构ID") /**
private String ouId; * 井号
*/
@XText("井号")
@TableField
private String wellNumber;
/**
* 运行功率
*/
@XText("运行功率(KW)")
@TableField
private BigDecimal serviceRating;
} }
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
wellhead_id, wellhead_id,
ou_id ou_id
</sql> </sql>
<resultMap id="ExtendsResultMap" type="pps.core.base.entity.BasePowerLineWellheadView" extends="BaseResultMap">
<result column="well_number" property="wellNumber" jdbcType="VARCHAR"/>
<result column="service_rating" property="serviceRating" jdbcType="DECIMAL"/>
</resultMap>
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="BaseResultMap"> <select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -35,11 +41,15 @@ ...@@ -35,11 +41,15 @@
where where
id=#{id} id=#{id}
</select> </select>
<select id="selectList" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="BaseResultMap">
select <select id="selectList" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="ExtendsResultMap">
<include refid="Base_Column_List"/> SELECT l.id,
from base_power_line_wellhead l.wellhead_id,
where w.well_number,
id=#{id} w.service_rating
FROM base_power_line_wellhead l
LEFT JOIN base_wellhead w ON l.wellhead_id = w.id
AND w.is_deleted = 1
WHERE l.line_id = #{lineId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment