Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
data-center
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
廖鑫
data-center
Commits
61398363
Commit
61398363
authored
Mar 12, 2022
by
沈鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清洗修改
parent
3982af6a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
dataCenter-manager/src/main/java/com/mortals/xhx/modules/implementlist/service/RybMatterListService.java
...x/modules/implementlist/service/RybMatterListService.java
+3
-1
dataCenter-manager/src/main/java/com/mortals/xhx/modules/implementlist/service/impl/RybMatterListServiceImpl.java
.../implementlist/service/impl/RybMatterListServiceImpl.java
+5
-6
dataCenter-manager/src/main/java/com/mortals/xhx/modules/supplement/task/SupplementTaskImpl.java
...rtals/xhx/modules/supplement/task/SupplementTaskImpl.java
+5
-1
No files found.
dataCenter-manager/src/main/java/com/mortals/xhx/modules/implementlist/service/RybMatterListService.java
View file @
61398363
...
...
@@ -2,8 +2,10 @@ package com.mortals.xhx.modules.implementlist.service;
import
com.mortals.xhx.modules.implementlist.model.RybMatterListEntry
;
import
java.util.Map
;
public
interface
RybMatterListService
{
RybMatterListEntry
getThImplement
(
String
event_code
);
RybMatterListEntry
getThImplement
(
Map
<
String
,
RybMatterListEntry
>
map
,
String
event_code
);
}
\ No newline at end of file
dataCenter-manager/src/main/java/com/mortals/xhx/modules/implementlist/service/impl/RybMatterListServiceImpl.java
View file @
61398363
...
...
@@ -10,6 +10,8 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@Service
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
...
...
@@ -18,12 +20,9 @@ public class RybMatterListServiceImpl implements RybMatterListService {
@Resource
private
RybMatterDao
rybMatterDao
;
private
final
Cache
<
String
,
Object
>
caffeineCache
;
@Override
public
RybMatterListEntry
getThImplement
(
String
event_code
)
{
caffeineCache
.
getIfPresent
(
event_code
);
RybMatterListEntry
thImplementList
=
(
RybMatterListEntry
)
caffeineCache
.
asMap
().
get
(
event_code
);
public
RybMatterListEntry
getThImplement
(
Map
<
String
,
RybMatterListEntry
>
map
,
String
event_code
)
{
RybMatterListEntry
thImplementList
=
map
.
get
(
event_code
);
if
(
thImplementList
!=
null
)
{
return
thImplementList
;
}
...
...
@@ -32,7 +31,7 @@ public class RybMatterListServiceImpl implements RybMatterListService {
if
(
rybMatterListEntries
.
size
()
>
0
)
{
for
(
RybMatterListEntry
entity
:
rybMatterListEntries
)
{
thImplementList
=
entity
;
caffeineCache
.
put
(
event_code
,
entity
);
map
.
put
(
event_code
,
entity
);
}
}
return
thImplementList
;
...
...
dataCenter-manager/src/main/java/com/mortals/xhx/modules/supplement/task/SupplementTaskImpl.java
View file @
61398363
...
...
@@ -34,6 +34,8 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -63,6 +65,8 @@ public class SupplementTaskImpl implements ITaskExcuteService {
@Autowired
private
ArameterService
arameterService
;
private
final
Map
<
String
,
RybMatterListEntry
>
map
=
new
ConcurrentHashMap
<>();
@Override
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
//1.查询上月的表是否存在未清洗的数据 //蓉易办
...
...
@@ -91,7 +95,7 @@ public class SupplementTaskImpl implements ITaskExcuteService {
if
(!
supplementEntities
.
isEmpty
())
{
List
<
SupplementEntity
>
collect
=
supplementEntities
.
parallelStream
().
map
(
e
->
{
//TODO:查询实施清单信息,通过事项编码查询有问题(但因数据库存储的事项数据是条件过滤后的,故暂时不改动查询),后期改动
RybMatterListEntry
thImplement
=
rybMatterListService
.
getThImplement
(
e
.
getImplCode
());
RybMatterListEntry
thImplement
=
rybMatterListService
.
getThImplement
(
map
,
e
.
getImplCode
());
try
{
InformationEntity
informationQuery
=
new
InformationEntity
();
//组装第一次业务数据(清洗后的)
...
...
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