Commit 1db0bd6d authored by ZWT's avatar ZWT

feat(能源管理系统): 间开制度管理

1.开发定期校准模块-校准周期新增接口,完成接口冒烟测试并生成接口文档;
2.开发定期校准模块-校准周期修改接口,完成接口冒烟测试并生成接口文档;
3.开发定期校准模块-校准周期详情接口,完成接口冒烟测试并生成接口文档;
4.开发定期校准模块-校准历史分页列表接口,完成接口冒烟测试并生成接口文档;
5.开发定期校准模块-校准历史获取线路及井口树接口,完成接口冒烟测试并生成接口文档;
6.开发定期校准模块-校准历史重新优化接口,完成接口冒烟测试并生成接口文档;
7.开发系统管理-组织机构管理查询组织和线路列表接口,完成接口冒烟测试并生成接口文档;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 3621dd7e
package pps.core.system.entity;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import xstartup.annotation.XText;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
public class SysOrganizationView implements Serializable {
@XText("主键")
@TableField
......@@ -148,291 +149,10 @@ public class SysOrganizationView implements Serializable {
@TableField
private BigDecimal elevation;
public List<String> getOuIds() {
return ouIds;
}
public void setOuIds(List<String> ouIds) {
this.ouIds = ouIds;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getMediaType() {
return mediaType;
}
public void setMediaType(String mediaType) {
this.mediaType = mediaType;
}
public Integer getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Integer isDeleted) {
this.isDeleted = isDeleted;
}
public Integer getIsHasChildren() {
return isHasChildren;
}
public void setIsHasChildren(Integer isHasChildren) {
this.isHasChildren = isHasChildren;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getParentOuId() {
return parentOuId;
}
public void setParentOuId(String parentOuId) {
this.parentOuId = parentOuId;
}
public String getLevelDicName() {
return levelDicName;
}
public void setLevelDicName(String levelDicName) {
this.levelDicName = levelDicName;
}
public String getCountryName() {
return countryName;
}
public void setCountryName(String countryName) {
this.countryName = countryName;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getPropertyName() {
return propertyName;
}
public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}
public String getSorId() {
return sorId;
}
public void setSorId(String sorId) {
this.sorId = sorId;
}
public String getId() {
return this.id;
}
public void setId(String value) {
this.id = value;
}
public String getOuCode() {
return this.ouCode;
}
public void setOuCode(String value) {
this.ouCode = value;
}
public String getOuName() {
return this.ouName;
}
public void setOuName(String value) {
this.ouName = value;
}
public String getShortName() {
return this.shortName;
}
public void setShortName(String value) {
this.shortName = value;
}
public String getOuLevel() {
return this.ouLevel;
}
public void setOuLevel(String value) {
this.ouLevel = value;
}
public String getDescription() {
return this.description;
}
public void setDescription(String value) {
this.description = 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 Date getEndTime() {
return this.endTime;
}
public void setEndTime(Date value) {
this.endTime = value;
}
public String getPostCode() {
return this.postCode;
}
public void setPostCode(String value) {
this.postCode = value;
}
public String getPostAddress() {
return this.postAddress;
}
public void setPostAddress(String value) {
this.postAddress = value;
}
public String getFaxNo() {
return this.faxNo;
}
public void setFaxNo(String value) {
this.faxNo = value;
}
public String getPhone() {
return this.phone;
}
public void setPhone(String value) {
this.phone = value;
}
public String getCountry() {
return this.country;
}
public void setCountry(String value) {
this.country = value;
}
public Integer getProvince() {
return this.province;
}
public void setProvince(Integer value) {
this.province = value;
}
public String getPartentName() {
return partentName;
}
public void setPartentName(String partentName) {
this.partentName = partentName;
}
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public BigDecimal getElevation() {
return elevation;
}
public void setElevation(BigDecimal elevation) {
this.elevation = elevation;
}
/**
* 线路ID
*/
@XText("线路ID")
@TableField(exist = false)
private String lineId;
}
......@@ -60,4 +60,12 @@ public interface SysOrganizationViewMapper {
* @return {@link List}<{@link SysOrganizationView}>
*/
List<SysOrganizationView> selectOrgListDynamicQuery(SysOrganizationView record);
/**
* 查询组织和线路列表
*
* @param record 记录
* @return {@link List}<{@link SysOrganizationView}>
*/
List<SysOrganizationView> selectOrgAndLineList(SysOrganizationView record);
}
......@@ -40,6 +40,7 @@ import xstartup.data.XPageResult;
import xstartup.data.XServiceResult;
import xstartup.data.XSingleResult;
import xstartup.error.XError;
import xstartup.feature.api.annotation.XApiAnonymous;
import xstartup.feature.api.annotation.XApiGet;
import xstartup.feature.api.annotation.XApiPost;
import xstartup.helper.XTransactionHelper;
......@@ -448,6 +449,37 @@ public class SysOrganizationService {
return XListResult.success(outputs);
}
/**
* 组织机构管理--查询组织和线路列表
*
* @param context 上下文
* @param input 输入
* @return {@link XListResult}<{@link DynamicQuerySysOrganizationOutput}>
*/
@XApiAnonymous
@XText("组织机构管理--查询组织和线路列表")
@XApiGet
public XListResult<DynamicQuerySysOrganizationOutput> queryOrgAndLineList(XContext context, DynamicQuerySysOrganizationInput input) {
SysOrganizationViewMapper mapper = context.getBean(SysOrganizationViewMapper.class);
SysOrganizationView view;
if (StringUtils.isAllBlank(input.getId(), input.getOuName())) {
//如果条件都为空,则从登录信息获取条件
view = new SysOrganizationView();
PpsUserSession session = context.getSession(PpsUserSession.class);
if (UserConstant.ISSUPERADMIN_TRUE.equals(session.getIsSuperAdmin())) {
view.setParentOuId("00000000-0000-0000-0000-000000000000");
} else {
view.setId(session.getOuId());
}
} else {
view = XCopyUtils.copyNewObject(input, SysOrganizationView.class);
}
List<SysOrganizationView> viewList = mapper.selectOrgAndLineList(view);
List<DynamicQuerySysOrganizationOutput> outputs = XCopyUtils.copyNewList(viewList, DynamicQuerySysOrganizationOutput.class);
return XListResult.success(outputs);
}
@XText("根据父级id查询儿子级-特殊")
@XApiPost
public XListResult<GetSysOrganizationViewOutput> selectSpecailOuInfoByParentOuId(XContext context, GetSysOrganizationRelInput input) {
......
......@@ -17,4 +17,10 @@ public class DynamicQuerySysOrganizationOutput {
@XText("组织机构名称")
private String ouName;
@XText("单位级别(从系统字典中来)")
private String ouLevel;
@XText("线路ID")
private String lineId;
}
......@@ -552,4 +552,25 @@
ORDER BY
r.sort
</select>
<resultMap id="ExtendResultMap" type="pps.core.system.entity.SysOrganizationView" extends="BaseResultMap">
<result column="line_id" property="lineId" jdbcType="VARCHAR"/>
</resultMap>
<select id="selectOrgAndLineList" parameterType="pps.core.system.entity.SysOrganizationView"
resultMap="ExtendResultMap">
(SELECT o.id,
o.ou_name AS ou_name,
'' AS line_id,
'ORG' AS ou_level
FROM sys_organization_rel r
LEFT JOIN sys_organization o ON o.id = r.ou_id
WHERE r.parent_ou_id = #{id}
ORDER BY r.sort)
UNION ALL
(SELECT ou_id AS id, line_name AS ou_name, id AS line_id, 'LINE' AS ou_level
FROM base_power_line
WHERE ou_id = #{id}
ORDER BY modify_time DESC)
</select>
</mapper>
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