Commit 57aa20c0 authored by ZWT's avatar ZWT

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

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

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent d6e62a24
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;
...@@ -14,6 +17,9 @@ import java.util.Date; ...@@ -14,6 +17,9 @@ import java.util.Date;
* @date 2023/08/25 * @date 2023/08/25
*/ */
@Data @Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class BasePowerLineView implements Serializable { public class BasePowerLineView implements Serializable {
@XText("ID") @XText("ID")
@TableField @TableField
...@@ -78,4 +84,10 @@ public class BasePowerLineView implements Serializable { ...@@ -78,4 +84,10 @@ public class BasePowerLineView implements Serializable {
@XText("是否激活返输调度(0_激活;1_关闭)") @XText("是否激活返输调度(0_激活;1_关闭)")
@TableField @TableField
private Integer isReverseDispatch; private Integer isReverseDispatch;
/**
* 上级线路名称
*/
@XText("上级线路名称")
private String upperLineName;
} }
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.BasePowerLineView; import pps.core.base.entity.BasePowerLineView;
import java.util.List; import java.util.List;
/**
* 输电线路配置
*
* @author ZWT
* @date 2023/08/28
*/
@Repository(value="pps.core.base.mapper.BasePowerLineViewMapper") @Repository(value="pps.core.base.mapper.BasePowerLineViewMapper")
public interface BasePowerLineViewMapper { public interface BasePowerLineViewMapper {
/**
* 查询输电线路详情
*
* @param record 记录
* @return {@link BasePowerLineView}
*/
BasePowerLineView selectOne(BasePowerLineView record); BasePowerLineView selectOne(BasePowerLineView record);
List<BasePowerLineView> selectList(BasePowerLineView record); List<BasePowerLineView> selectList(BasePowerLineView record);
} }
...@@ -134,20 +134,20 @@ public class BasePowerLineService { ...@@ -134,20 +134,20 @@ public class BasePowerLineService {
@XApiAnonymous @XApiAnonymous
@XApiGet @XApiGet
@XText("输电线路配置--详情") @XText("输电线路配置--详情")
public XSingleResult<GetBasePowerLineOutput> getBasePowerLine(XContext context, GetBasePowerLineInput input) { public XSingleResult<GetBasePowerLineViewOutput> getBasePowerLineView(XContext context, GetBasePowerLineInput input) {
BasePowerLineMapper mapper = context.getBean(BasePowerLineMapper.class); String lineId = input.getId();
QueryWrapper<BasePowerLineEnt> queryWrapper = new QueryWrapper<>(); BasePowerLineViewMapper mapper = context.getBean(BasePowerLineViewMapper.class);
queryWrapper.lambda().eq(BasePowerLineEnt::getId, input.getId()); BasePowerLineView entity = mapper.selectOne(BasePowerLineView.builder()
BasePowerLineEnt entity = mapper.selectOne(queryWrapper); .id(lineId)
if (entity == null) { .build());
if (Objects.isNull(entity)) {
return XSingleResult.error(context, XError.NotFound); return XSingleResult.error(context, XError.NotFound);
} }
GetBasePowerLineOutput output = new GetBasePowerLineOutput(); GetBasePowerLineViewOutput output = new GetBasePowerLineViewOutput();
XCopyUtils.copyObject(entity, output); XCopyUtils.copyObject(entity, output);
return XSingleResult.success(output); return XSingleResult.success(output);
} }
@XApiAnonymous @XApiAnonymous
@XApiGet @XApiGet
public XPageResult<QueryBasePowerLineViewOutput> queryBasePowerLineView(XContext context, QueryBasePowerLineViewInput input) { public XPageResult<QueryBasePowerLineViewOutput> queryBasePowerLineView(XContext context, QueryBasePowerLineViewInput input) {
......
package pps.core.base.service.data.base_power_line; package pps.core.base.service.data.base_power_line;
import lombok.Data;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import java.util.Date;
import java.math.BigDecimal;
/**
* 输电线路配置
*
* @author ZWT
* @date 2023/08/28
*/
@Data
public class GetBasePowerLineViewOutput { public class GetBasePowerLineViewOutput {
@XText("ID") @XText("ID")
private String id; private String id;
@XText("是否删除(0_是;1_否)")
private Integer isDeleted;
@XText("创建人ID")
private String createById;
@XText("创建人名称")
private String createByName;
@XText("创建时间")
private Date createTime;
@XText("修改人ID")
private String modifyById;
@XText("修改人名称")
private String modifyByName;
@XText("修改时间")
private Date modifyTime;
@XText("组织机构ID") @XText("组织机构ID")
private String ouId; private String ouId;
...@@ -53,132 +39,9 @@ public class GetBasePowerLineViewOutput { ...@@ -53,132 +39,9 @@ public class GetBasePowerLineViewOutput {
@XText("是否激活返输调度(0_激活;1_关闭)") @XText("是否激活返输调度(0_激活;1_关闭)")
private Integer isReverseDispatch; private Integer isReverseDispatch;
public String getId() { /**
return this.id; * 上级线路名称
} */
@XText("上级线路名称")
public void setId(String value) { private String upperLineName;
this.id = value;
}
public Integer getIsDeleted() {
return this.isDeleted;
}
public void setIsDeleted(Integer value) {
this.isDeleted = value;
}
public String getCreateById() {
return this.createById;
}
public void setCreateById(String value) {
this.createById = value;
}
public String getCreateByName() {
return this.createByName;
}
public void setCreateByName(String value) {
this.createByName = value;
}
public Date getCreateTime() {
return this.createTime;
}
public void setCreateTime(Date value) {
this.createTime = value;
}
public String getModifyById() {
return this.modifyById;
}
public void setModifyById(String value) {
this.modifyById = value;
}
public String getModifyByName() {
return this.modifyByName;
}
public void setModifyByName(String value) {
this.modifyByName = value;
}
public Date getModifyTime() {
return this.modifyTime;
}
public void setModifyTime(Date value) {
this.modifyTime = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getUpperLineId() {
return this.upperLineId;
}
public void setUpperLineId(String value) {
this.upperLineId = value;
}
public String getLineName() {
return this.lineName;
}
public void setLineName(String value) {
this.lineName = value;
}
public String getGridTypeKey() {
return this.gridTypeKey;
}
public void setGridTypeKey(String value) {
this.gridTypeKey = value;
}
public String getLineTypeKey() {
return this.lineTypeKey;
}
public void setLineTypeKey(String value) {
this.lineTypeKey = value;
}
public String getStrategyId() {
return this.strategyId;
}
public void setStrategyId(String value) {
this.strategyId = value;
}
public Integer getIsShareDispatch() {
return this.isShareDispatch;
}
public void setIsShareDispatch(Integer value) {
this.isShareDispatch = value;
}
public Integer getIsReverseDispatch() {
return this.isReverseDispatch;
}
public void setIsReverseDispatch(Integer value) {
this.isReverseDispatch = value;
}
} }
...@@ -38,9 +38,15 @@ ...@@ -38,9 +38,15 @@
is_share_dispatch, is_share_dispatch,
is_reverse_dispatch is_reverse_dispatch
</sql> </sql>
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineView" resultMap="BaseResultMap">
<resultMap id="ExtendsResultMap" type="pps.core.base.entity.BasePowerLineView" extends="BaseResultMap">
<result column="upper_line_name" property="upperLineName" jdbcType="VARCHAR"/>
</resultMap>
<select id="selectOne" parameterType="pps.core.base.entity.BasePowerLineView" resultMap="ExtendsResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
, ( SELECT line_name FROM base_power_line l WHERE l.id = base_power_line.upper_line_id ) AS upper_line_name
from base_power_line from base_power_line
where where
id=#{id} id=#{id}
......
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