Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-bi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林锐标
slm-bi
Commits
0a9e69e4
Commit
0a9e69e4
authored
May 26, 2021
by
梁光意
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
920ee549
9ec9b401
Pipeline
#9274
passed with stages
in 2 minutes 28 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
6 deletions
+32
-6
InstrumentPanelConfigService.java
...m/syc/slm/slmbi/service/InstrumentPanelConfigService.java
+9
-0
InstrumentPanelConfigServiceImpl.java
.../slmbi/service/impl/InstrumentPanelConfigServiceImpl.java
+18
-0
InstrumentPanelServiceImpl.java
...yc/slm/slmbi/service/impl/InstrumentPanelServiceImpl.java
+4
-5
VariableServiceImpl.java
...a/com/syc/slm/slmbi/service/impl/VariableServiceImpl.java
+1
-1
No files found.
src/main/java/com/syc/slm/slmbi/service/InstrumentPanelConfigService.java
View file @
0a9e69e4
...
@@ -8,6 +8,7 @@ import com.syc.slm.slmbi.vo.InstrumentPanelConfigVo;
...
@@ -8,6 +8,7 @@ import com.syc.slm.slmbi.vo.InstrumentPanelConfigVo;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
/**
/**
* slm-bi
* slm-bi
...
@@ -90,4 +91,12 @@ public interface InstrumentPanelConfigService extends IService<InstrumentPanelCo
...
@@ -90,4 +91,12 @@ public interface InstrumentPanelConfigService extends IService<InstrumentPanelCo
* @param panelId
* @param panelId
*/
*/
Map
<
String
,
String
>
getAssemblyConfig
(
@NotNull
String
panelId
);
Map
<
String
,
String
>
getAssemblyConfig
(
@NotNull
String
panelId
);
/**
* 根据仪表板id获取对应已发布配置
* @param ids
* @return
*/
Set
<
String
>
getConfigByPanelIds
(
@NotNull
Set
<
String
>
ids
);
}
}
src/main/java/com/syc/slm/slmbi/service/impl/InstrumentPanelConfigServiceImpl.java
View file @
0a9e69e4
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.syc.slm.common.core.constant.SlmConstants
;
import
com.syc.slm.common.core.constant.SlmConstants
;
import
com.syc.slm.slmbi.dao.InstrumentPanelConfigMapper
;
import
com.syc.slm.slmbi.dao.InstrumentPanelConfigMapper
;
import
com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO
;
import
com.syc.slm.slmbi.dto.InstrumentPanelConfigDTO
;
...
@@ -30,6 +31,7 @@ import java.net.URLEncoder;
...
@@ -30,6 +31,7 @@ import java.net.URLEncoder;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -177,6 +179,7 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
...
@@ -177,6 +179,7 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
log
.
info
(
"更新发布版本的groupId"
);
log
.
info
(
"更新发布版本的groupId"
);
draft
.
setGroupId
(
permission
.
getGroupId
());
draft
.
setGroupId
(
permission
.
getGroupId
());
draftService
.
updateById
(
draft
);
draftService
.
updateById
(
draft
);
panel
.
setPublished
(
PublishedStatus
.
PUBLISHED
.
value
);
}
else
{
}
else
{
//修改
//修改
...
@@ -360,6 +363,21 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
...
@@ -360,6 +363,21 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
return
maps
;
return
maps
;
}
}
@Override
@Transactional
public
Set
<
String
>
getConfigByPanelIds
(
@NotNull
Set
<
String
>
ids
)
{
LambdaQueryWrapper
<
InstrumentPanelConfig
>
where
=
new
LambdaQueryWrapper
<>();
where
.
eq
(
BaseEntity:
:
getRecordStatus
,
SlmConstants
.
DATA_VALID
);
where
.
in
(
InstrumentPanelConfig:
:
getPanelId
,
ids
);
where
.
eq
(
InstrumentPanelConfig:
:
getPublished
,
PublishedStatus
.
WAIT_PUBLISHED
.
value
);
List
<
InstrumentPanelConfig
>
configs
=
baseMapper
.
selectList
(
where
);
if
(
CollectionUtils
.
isNotEmpty
(
configs
)){
return
configs
.
stream
().
map
(
InstrumentPanelConfig:
:
getPanelId
).
collect
(
Collectors
.
toSet
());
}
return
Sets
.
newHashSet
();
}
private
InstrumentPanelConfigVo
getInstrumentPanelConfigVo
(
String
instrumentPanelId
,
PublishedStatus
published
)
{
private
InstrumentPanelConfigVo
getInstrumentPanelConfigVo
(
String
instrumentPanelId
,
PublishedStatus
published
)
{
LambdaQueryWrapper
<
InstrumentPanelConfig
>
where
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
InstrumentPanelConfig
>
where
=
new
LambdaQueryWrapper
<>();
...
...
src/main/java/com/syc/slm/slmbi/service/impl/InstrumentPanelServiceImpl.java
View file @
0a9e69e4
...
@@ -95,15 +95,14 @@ public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMappe
...
@@ -95,15 +95,14 @@ public class InstrumentPanelServiceImpl extends ServiceImpl<InstrumentPanelMappe
if
(
CollectionUtils
.
isNotEmpty
(
response
.
getRecords
())){
if
(
CollectionUtils
.
isNotEmpty
(
response
.
getRecords
())){
Set
<
String
>
ids
=
response
.
getRecords
()
Set
<
String
>
ids
=
response
.
getRecords
()
.
stream
()
.
stream
()
.
filter
(
x
->
"
未
发布"
.
equals
(
x
.
getPublished
()))
.
filter
(
x
->
"
已
发布"
.
equals
(
x
.
getPublished
()))
.
map
(
BaseEntity:
:
getId
)
.
map
(
BaseEntity:
:
getId
)
.
collect
(
Collectors
.
toSet
());
.
collect
(
Collectors
.
toSet
());
if
(
CollectionUtils
.
isNotEmpty
(
ids
)){
if
(
CollectionUtils
.
isNotEmpty
(
ids
)){
List
<
InstrumentPanelDraft
>
drafts
=
draftService
.
getByIds
(
ids
);
Set
<
String
>
waitIds
=
configService
.
getConfigByPanelIds
(
ids
);
if
(
CollectionUtils
.
isNotEmpty
(
drafts
)){
if
(
CollectionUtils
.
isNotEmpty
(
waitIds
)){
Set
<
String
>
draftIds
=
drafts
.
stream
().
map
(
InstrumentPanelDraft:
:
getPanelId
).
collect
(
Collectors
.
toSet
());
response
.
getRecords
().
forEach
(
x
->{
response
.
getRecords
().
forEach
(
x
->{
if
(
draf
tIds
.
contains
(
x
.
getId
())){
if
(
wai
tIds
.
contains
(
x
.
getId
())){
x
.
setHasWaitPublish
(
"有未发布版本"
);
x
.
setHasWaitPublish
(
"有未发布版本"
);
}
}
});
});
...
...
src/main/java/com/syc/slm/slmbi/service/impl/VariableServiceImpl.java
View file @
0a9e69e4
...
@@ -76,7 +76,7 @@ public class VariableServiceImpl implements VariableService {
...
@@ -76,7 +76,7 @@ public class VariableServiceImpl implements VariableService {
List
<
VariableSourceVo
>
vos
=
Lists
.
newArrayList
();
List
<
VariableSourceVo
>
vos
=
Lists
.
newArrayList
();
VariableSourceVo
vo
=
new
VariableSourceVo
();
VariableSourceVo
vo
=
new
VariableSourceVo
();
vo
.
setSourceId
(
"6"
);
vo
.
setSourceId
(
"6"
);
vo
.
setSourceName
(
"
请选择变量来源
"
);
vo
.
setSourceName
(
"
--全部--
"
);
VariableSourceVo
vo1
=
new
VariableSourceVo
();
VariableSourceVo
vo1
=
new
VariableSourceVo
();
vo1
.
setSourceId
(
"1"
);
vo1
.
setSourceId
(
"1"
);
vo1
.
setSourceName
(
"基础采集点"
);
vo1
.
setSourceName
(
"基础采集点"
);
...
...
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