Commit 89cad3f0 authored by ZWT's avatar ZWT

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

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

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 57aa20c0
package pps.core.base.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import xstartup.annotation.XText;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
......@@ -14,6 +18,9 @@ import java.util.Date;
* @date 2023/08/25
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class BasePowerLineWellheadView implements Serializable {
@XText("ID")
@TableField
......@@ -59,4 +66,17 @@ public class BasePowerLineWellheadView implements Serializable {
@TableField
private String ouId;
/**
* 井号
*/
@XText("井号")
@TableField
private String wellNumber;
/**
* 运行功率
*/
@XText("运行功率(KW)")
@TableField
private BigDecimal serviceRating;
}
package pps.core.base.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import pps.core.base.entity.BasePowerLineWellheadView;
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 {
BasePowerLineWellheadView selectOne(BasePowerLineWellheadView record);
/**
* 输电线路井口配置列表
*
* @param record 记录
* @return {@link List}<{@link BasePowerLineWellheadView}>
*/
List<BasePowerLineWellheadView> selectList(BasePowerLineWellheadView record);
}
......@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo;
import pps.core.base.entity.*;
import pps.core.base.mapper.*;
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.common.session.PpsUserSession;
import xstartup.annotation.XService;
......@@ -145,6 +146,20 @@ public class BasePowerLineService {
}
GetBasePowerLineViewOutput output = new GetBasePowerLineViewOutput();
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);
}
......
package pps.core.base.service.data.base_power_line;
import jakarta.validation.Valid;
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 java.util.List;
/**
* 输电线路配置
*
......@@ -44,4 +51,32 @@ public class GetBasePowerLineViewOutput {
*/
@XText("上级线路名称")
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;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import xstartup.annotation.XText;
import java.math.BigDecimal;
/**
* 输电线路井口配置
*
......@@ -12,9 +15,23 @@ import xstartup.annotation.XText;
@Data
public class GetBasePowerLineWellheadViewOutput {
@XText("ID")
private String id;
@XText("井口ID")
private String wellheadId;
@XText("组织机构ID")
private String ouId;
/**
* 井号
*/
@XText("井号")
@TableField
private String wellNumber;
/**
* 运行功率
*/
@XText("运行功率(KW)")
@TableField
private BigDecimal serviceRating;
}
......@@ -28,6 +28,12 @@
wellhead_id,
ou_id
</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
<include refid="Base_Column_List"/>
......@@ -35,11 +41,15 @@
where
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from base_power_line_wellhead
where
id=#{id}
<select id="selectList" parameterType="pps.core.base.entity.BasePowerLineWellheadView" resultMap="ExtendsResultMap">
SELECT l.id,
l.wellhead_id,
w.well_number,
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>
</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