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
cea4f206
Commit
cea4f206
authored
Mar 12, 2022
by
沈鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清洗修改
parent
61398363
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
19 deletions
+14
-19
dataCenter-manager/src/main/java/com/mortals/xhx/modules/implementlist/service/RybMatterListService.java
...x/modules/implementlist/service/RybMatterListService.java
+1
-3
dataCenter-manager/src/main/java/com/mortals/xhx/modules/implementlist/service/impl/RybMatterListServiceImpl.java
.../implementlist/service/impl/RybMatterListServiceImpl.java
+8
-7
dataCenter-manager/src/main/java/com/mortals/xhx/modules/supplement/task/SupplementTaskImpl.java
...rtals/xhx/modules/supplement/task/SupplementTaskImpl.java
+2
-6
dataCenter-manager/src/main/resources/sqlmap/module/supplement/supplement.xml
...rc/main/resources/sqlmap/module/supplement/supplement.xml
+3
-3
No files found.
dataCenter-manager/src/main/java/com/mortals/xhx/modules/implementlist/service/RybMatterListService.java
View file @
cea4f206
...
...
@@ -2,10 +2,8 @@ package com.mortals.xhx.modules.implementlist.service;
import
com.mortals.xhx.modules.implementlist.model.RybMatterListEntry
;
import
java.util.Map
;
public
interface
RybMatterListService
{
RybMatterListEntry
getThImplement
(
Map
<
String
,
RybMatterListEntry
>
map
,
String
event_code
);
RybMatterListEntry
getThImplement
(
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 @
cea4f206
...
...
@@ -6,23 +6,24 @@ import com.mortals.xhx.modules.implementlist.model.RybMatterListEntry;
import
com.mortals.xhx.modules.implementlist.service.RybMatterListService
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.
Service
;
import
org.springframework.stereotype.
Component
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@
Service
@
Component
(
"rybMatterListService"
)
@RequiredArgsConstructor
(
onConstructor
=
@__
(
@Autowired
))
public
class
RybMatterListServiceImpl
implements
RybMatterListService
{
@Resource
private
RybMatterDao
rybMatterDao
;
private
final
Cache
<
String
,
Object
>
caffeineCache
;
@Override
public
RybMatterListEntry
getThImplement
(
Map
<
String
,
RybMatterListEntry
>
map
,
String
event_code
)
{
RybMatterListEntry
thImplementList
=
map
.
get
(
event_code
);
public
RybMatterListEntry
getThImplement
(
String
event_code
)
{
caffeineCache
.
getIfPresent
(
event_code
);
RybMatterListEntry
thImplementList
=
(
RybMatterListEntry
)
caffeineCache
.
asMap
().
get
(
event_code
);
if
(
thImplementList
!=
null
)
{
return
thImplementList
;
}
...
...
@@ -31,7 +32,7 @@ public class RybMatterListServiceImpl implements RybMatterListService {
if
(
rybMatterListEntries
.
size
()
>
0
)
{
for
(
RybMatterListEntry
entity
:
rybMatterListEntries
)
{
thImplementList
=
entity
;
map
.
put
(
event_code
,
entity
);
caffeineCache
.
put
(
event_code
,
entity
);
}
}
return
thImplementList
;
...
...
dataCenter-manager/src/main/java/com/mortals/xhx/modules/supplement/task/SupplementTaskImpl.java
View file @
cea4f206
...
...
@@ -34,8 +34,6 @@ 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
;
/**
...
...
@@ -65,8 +63,6 @@ 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.查询上月的表是否存在未清洗的数据 //蓉易办
...
...
@@ -95,7 +91,7 @@ public class SupplementTaskImpl implements ITaskExcuteService {
if
(!
supplementEntities
.
isEmpty
())
{
List
<
SupplementEntity
>
collect
=
supplementEntities
.
parallelStream
().
map
(
e
->
{
//TODO:查询实施清单信息,通过事项编码查询有问题(但因数据库存储的事项数据是条件过滤后的,故暂时不改动查询),后期改动
RybMatterListEntry
thImplement
=
rybMatterListService
.
getThImplement
(
map
,
e
.
getImplCode
());
RybMatterListEntry
thImplement
=
rybMatterListService
.
getThImplement
(
e
.
getImplCode
());
try
{
InformationEntity
informationQuery
=
new
InformationEntity
();
//组装第一次业务数据(清洗后的)
...
...
@@ -313,7 +309,7 @@ public class SupplementTaskImpl implements ITaskExcuteService {
//获取当前时间
supplementQuery
.
setCreateDateEnd
(
DateUtils
.
convertTime2Str
(
new
Date
().
getTime
(),
DateUtils
.
P_yyyy_MM_dd_HH_mm_ss
));
return
supplementService
.
find
(
supplementQuery
,
pageInfo
,
null
).
getList
();
return
supplementService
.
find
(
supplementQuery
,
pageInfo
,
null
).
getList
();
}
}
dataCenter-manager/src/main/resources/sqlmap/module/supplement/supplement.xml
View file @
cea4f206
...
...
@@ -5,7 +5,7 @@
<!-- 字段和属性映射 -->
<resultMap
type=
"SupplementEntity"
id=
"SupplementEntity-Map"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"implName"
column=
"impl
_n
ame"
/>
<result
property=
"implName"
column=
"impl
N
ame"
/>
<result
property=
"implCode"
column=
"impl_code"
/>
<result
property=
"applicationType"
column=
"application_type"
/>
<result
property=
"applicationCardType"
column=
"application_card_type"
/>
...
...
@@ -427,7 +427,7 @@
</foreach>
</update>
<!-- 根据主健查询 -->
<select
id=
"getByKey"
parameterType=
"paramDto"
result
Map=
"SupplementEntity-Map
"
>
<select
id=
"getByKey"
parameterType=
"paramDto"
result
Type=
"com.mortals.xhx.modules.supplement.model.SupplementEntity
"
>
select
<include
refid=
"_columns"
/>
from ${tableName} as a
where a.id=#{condition.id}
...
...
@@ -454,7 +454,7 @@
</trim>
</delete>
<!-- 获取列表 -->
<select
id=
"getList"
parameterType=
"paramDto"
result
Map=
"SupplementEntity-Map
"
>
<select
id=
"getList"
parameterType=
"paramDto"
result
Type=
"com.mortals.xhx.modules.supplement.model.SupplementEntity
"
>
select
<include
refid=
"_columns"
/>
from ${tableName} as a
<trim
suffixOverrides=
"where"
suffix=
""
>
...
...
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