Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
cd6c1b32
Commit
cd6c1b32
authored
Sep 01, 2023
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(能源管理系统): 基础信息配置
1.修改基础信息配置--输电线路配置模块查询输电线路列表接口,优化代码; BREAKING CHANGE: 无 Closes 无 [skip ci]
parent
e94ee362
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
C09-base/pps-core-base/src/main/java/pps/core/base/service/BasePowerLineService.java
...main/java/pps/core/base/service/BasePowerLineService.java
+3
-7
C09-base/pps-core-base/src/main/java/pps/core/base/utils/DictUtils.java
...ore-base/src/main/java/pps/core/base/utils/DictUtils.java
+7
-4
No files found.
C09-base/pps-core-base/src/main/java/pps/core/base/service/BasePowerLineService.java
View file @
cd6c1b32
...
@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.page.PageMethod
;
import
com.github.pagehelper.page.PageMethod
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
pps.cloud.system.service.data.GetOuListTreeOutput
;
import
pps.cloud.system.service.data.QuerySysDictionaryViewOutput
;
import
pps.cloud.system.service.data.QuerySysDictionaryViewOutput
;
import
pps.core.base.entity.*
;
import
pps.core.base.entity.*
;
import
pps.core.base.mapper.*
;
import
pps.core.base.mapper.*
;
...
@@ -38,6 +37,7 @@ import xstartup.helper.XTransactionHelper;
...
@@ -38,6 +37,7 @@ import xstartup.helper.XTransactionHelper;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -226,7 +226,7 @@ public class BasePowerLineService {
...
@@ -226,7 +226,7 @@ public class BasePowerLineService {
PageInfo
<
BasePowerLineView
>
pageInfo
=
new
PageInfo
<>(
list
);
PageInfo
<
BasePowerLineView
>
pageInfo
=
new
PageInfo
<>(
list
);
List
<
QueryBasePowerLineViewOutput
>
outputs
=
XCopyUtils
.
copyNewList
(
pageInfo
.
getList
(),
QueryBasePowerLineViewOutput
.
class
);
List
<
QueryBasePowerLineViewOutput
>
outputs
=
XCopyUtils
.
copyNewList
(
pageInfo
.
getList
(),
QueryBasePowerLineViewOutput
.
class
);
if
(
CollUtil
.
isNotEmpty
(
outputs
))
{
if
(
CollUtil
.
isNotEmpty
(
outputs
))
{
List
<
GetOuListTreeOutput
>
ouInfos
=
DictUtils
.
getOuListByOuIds
(
Map
<
String
,
String
>
ouMap
=
DictUtils
.
getOuListByOuIds
(
context
,
context
,
outputs
.
stream
()
outputs
.
stream
()
.
map
(
QueryBasePowerLineViewOutput:
:
getOuId
)
.
map
(
QueryBasePowerLineViewOutput:
:
getOuId
)
...
@@ -237,11 +237,7 @@ public class BasePowerLineService {
...
@@ -237,11 +237,7 @@ public class BasePowerLineService {
List
<
QuerySysDictionaryViewOutput
>
lineTypeList
=
DictUtils
.
getDictList
(
context
,
DictTypeConstant
.
LINE_TYPE
);
List
<
QuerySysDictionaryViewOutput
>
lineTypeList
=
DictUtils
.
getDictList
(
context
,
DictTypeConstant
.
LINE_TYPE
);
for
(
QueryBasePowerLineViewOutput
output
:
outputs
)
{
for
(
QueryBasePowerLineViewOutput
output
:
outputs
)
{
output
.
setOuName
(
output
.
setOuName
(
ouInfos
.
stream
()
ouMap
.
get
(
output
.
getOuId
())
.
filter
(
row
->
StringUtils
.
equals
(
row
.
getOuId
(),
output
.
getOuId
()))
.
map
(
GetOuListTreeOutput:
:
getOuName
)
.
findAny
()
.
orElse
(
null
)
);
);
output
.
setGridTypeName
(
output
.
setGridTypeName
(
DictUtils
.
getDicNameByStream
(
gridTypeList
,
output
.
getGridTypeKey
())
DictUtils
.
getDicNameByStream
(
gridTypeList
,
output
.
getGridTypeKey
())
...
...
C09-base/pps-core-base/src/main/java/pps/core/base/utils/DictUtils.java
View file @
cd6c1b32
...
@@ -10,6 +10,7 @@ import xstartup.data.XListResult;
...
@@ -10,6 +10,7 @@ import xstartup.data.XListResult;
import
xstartup.data.XSingleResult
;
import
xstartup.data.XSingleResult
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -94,18 +95,20 @@ public class DictUtils {
...
@@ -94,18 +95,20 @@ public class DictUtils {
*
*
* @param context 上下文
* @param context 上下文
* @param ouIds ou id
* @param ouIds ou id
* @return {@link
List}<{@link GetOuListTreeOutput
}>
* @return {@link
Map}<{@link String}, {@link String
}>
*/
*/
public
static
List
<
GetOuListTreeOutput
>
getOuListByOuIds
(
XContext
context
,
List
<
String
>
ouIds
)
{
public
static
Map
<
String
,
String
>
getOuListByOuIds
(
XContext
context
,
List
<
String
>
ouIds
)
{
GetOuListByOuIdsInput
input
=
new
GetOuListByOuIdsInput
();
GetOuListByOuIdsInput
input
=
new
GetOuListByOuIdsInput
();
input
.
setOuIdList
(
ouIds
);
input
.
setOuIdList
(
ouIds
);
SysOrganizationCloudService
organizationCloudService
=
context
.
getBean
(
SysOrganizationCloudService
.
class
);
SysOrganizationCloudService
organizationCloudService
=
context
.
getBean
(
SysOrganizationCloudService
.
class
);
XListResult
<
GetOuListTreeOutput
>
ouListByOuIds
=
organizationCloudService
.
getOuListByOuIds
(
context
,
input
);
XListResult
<
GetOuListTreeOutput
>
ouListByOuIds
=
organizationCloudService
.
getOuListByOuIds
(
context
,
input
);
ouListByOuIds
.
throwIfFail
();
ouListByOuIds
.
throwIfFail
();
return
ouListByOuIds
.
getResult
();
return
ouListByOuIds
.
getResult
().
stream
()
.
collect
(
Collectors
.
toMap
(
GetOuListTreeOutput:
:
getOuId
,
GetOuListTreeOutput:
:
getOuName
));
}
}
/*-------------------------其他-------------------------*/
/*-------------------------其他-------------------------*/
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment