Commit 704db289 authored by ZWT's avatar ZWT

feat(零碳): 长庆

1.系统管理模块,查询线路及组织机构树接口修改,增加查询逻辑,通过线路名称模糊查询树列表,完成接口冒烟测试并同步线上接口文档;
2.系统管理模块,查询光伏电站及组织机构树接口修改,增加查询逻辑,通过电站名称模糊查询树列表,完成接口冒烟测试并同步线上接口文档;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent ed5d51de
...@@ -271,8 +271,15 @@ public class BasePhotovoltaicPlantService { ...@@ -271,8 +271,15 @@ public class BasePhotovoltaicPlantService {
return XMapperHelper.query(mapper, input, queryWrapper, QueryBasePhotovoltaicPlantOutput.class); return XMapperHelper.query(mapper, input, queryWrapper, QueryBasePhotovoltaicPlantOutput.class);
} }
/**
* 按母公司ou-id选择ou和光伏发电厂信息
*
* @param context 上下文
* @param input 输入
* @return {@link XListResult }<{@link GetSysOrganizationAndPlantViewOutput }>
*/
@XText("根据父级id查询儿子级(含电站)") @XText("根据父级id查询儿子级(含电站)")
@XApiGet @XApiPost
public XListResult<GetSysOrganizationAndPlantViewOutput> selectOuAndPhotovoltaicPlantInfoByParentOuId(XContext context, GetSysOrganizationAndPlantInput input) { public XListResult<GetSysOrganizationAndPlantViewOutput> selectOuAndPhotovoltaicPlantInfoByParentOuId(XContext context, GetSysOrganizationAndPlantInput input) {
SysOrganizationViewMapper mapper = context.getBean(SysOrganizationViewMapper.class); SysOrganizationViewMapper mapper = context.getBean(SysOrganizationViewMapper.class);
BasePhotovoltaicPlantMapper plantMapper = context.getBean(BasePhotovoltaicPlantMapper.class); BasePhotovoltaicPlantMapper plantMapper = context.getBean(BasePhotovoltaicPlantMapper.class);
...@@ -298,9 +305,15 @@ public class BasePhotovoltaicPlantService { ...@@ -298,9 +305,15 @@ public class BasePhotovoltaicPlantService {
ouId = input.getParentOuId(); ouId = input.getParentOuId();
viewList = mapper.selectOuSonByParentOuId(record); viewList = mapper.selectOuSonByParentOuId(record);
} }
String ouName = input.getOuName();
queryWrapper.lambda().eq(BasePhotovoltaicPlantEnt::getOuId, ouId).eq(BasePhotovoltaicPlantEnt::getIsDeleted, BusinessConstant.ONE) queryWrapper.lambda().eq(BasePhotovoltaicPlantEnt::getOuId, ouId).eq(BasePhotovoltaicPlantEnt::getIsDeleted, BusinessConstant.ONE)
.orderByAsc(BasePhotovoltaicPlantEnt::getStationName); .orderByAsc(BasePhotovoltaicPlantEnt::getStationName);
List<BasePhotovoltaicPlantEnt> plantList = plantMapper.selectList(queryWrapper); List<BasePhotovoltaicPlantEnt> plantList = plantMapper.selectList(new LambdaQueryWrapper<BasePhotovoltaicPlantEnt>()
.eq(CharSequenceUtil.isNotBlank(ouName), BasePhotovoltaicPlantEnt::getOuId, ouId)
.like(CharSequenceUtil.isNotBlank(ouName), BasePhotovoltaicPlantEnt::getStationName, ouName)
.eq(BasePhotovoltaicPlantEnt::getIsDeleted, BusinessConstant.ONE)
.orderByAsc(BasePhotovoltaicPlantEnt::getStationName)
);
plantList.forEach(item -> { plantList.forEach(item -> {
SysOrganizationView view = new SysOrganizationView(); SysOrganizationView view = new SysOrganizationView();
view.setId(item.getId()); view.setId(item.getId());
......
package pps.core.base.service.data.base_photovoltaic_plant; package pps.core.base.service.data.base_photovoltaic_plant;
import lombok.Data;
import xstartup.annotation.XText; import xstartup.annotation.XText;
import java.util.Date; import java.util.Date;
...@@ -10,6 +11,7 @@ import java.util.Date; ...@@ -10,6 +11,7 @@ import java.util.Date;
* @author ZWT * @author ZWT
* @date 2024/05/09 * @date 2024/05/09
*/ */
@Data
public class GetSysOrganizationAndPlantInput { public class GetSysOrganizationAndPlantInput {
@XText("主键") @XText("主键")
private String id; private String id;
...@@ -17,6 +19,9 @@ public class GetSysOrganizationAndPlantInput { ...@@ -17,6 +19,9 @@ public class GetSysOrganizationAndPlantInput {
@XText("组织机构表id") @XText("组织机构表id")
private String ouId; private String ouId;
@XText("组织机构名称")
private String ouName;
@XText("上级组织机构表id") @XText("上级组织机构表id")
private String parentOuId; private String parentOuId;
...@@ -57,133 +62,4 @@ public class GetSysOrganizationAndPlantInput { ...@@ -57,133 +62,4 @@ public class GetSysOrganizationAndPlantInput {
@XText("修改时间") @XText("修改时间")
private Date modifyTime; private Date modifyTime;
public String getOuLevel() {
return ouLevel;
}
public void setOuLevel(String ouLevel) {
this.ouLevel = ouLevel;
}
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuId() {
return this.ouId;
}
public void setOuId(String value) {
this.ouId = value;
}
public String getParentOuId() {
return this.parentOuId;
}
public void setParentOuId(String value) {
this.parentOuId = value;
}
public Integer getLevels() {
return this.levels;
}
public void setLevels(Integer value) {
this.levels = value;
}
public String getOuIdPath() {
return this.ouIdPath;
}
public void setOuIdPath(String value) {
this.ouIdPath = value;
}
public Integer getIsHasChildren() {
return this.isHasChildren;
}
public void setIsHasChildren(Integer value) {
this.isHasChildren = value;
}
public Date getEffectTime() {
return this.effectTime;
}
public void setEffectTime(Date value) {
this.effectTime = value;
}
public Date getEndTime() {
return this.endTime;
}
public void setEndTime(Date value) {
this.endTime = value;
}
public Integer getSort() {
return this.sort;
}
public void setSort(Integer value) {
this.sort = 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;
}
} }
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