Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
f3a74eb2
Commit
f3a74eb2
authored
Aug 30, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.1.2970下游数据适配调整
parent
72ade460
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
HistoryDataDealServiceImpl.java
...dule/tcm/biz/service/impl/HistoryDataDealServiceImpl.java
+15
-4
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/HistoryDataDealServiceImpl.java
View file @
f3a74eb2
...
@@ -3,10 +3,13 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
...
@@ -3,10 +3,13 @@ package com.yeejoin.amos.boot.module.tcm.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission
;
import
com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StopWatch
;
import
org.springframework.util.StopWatch
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -29,6 +32,7 @@ public class HistoryDataDealServiceImpl {
...
@@ -29,6 +32,7 @@ public class HistoryDataDealServiceImpl {
this
.
userPermissionService
=
userPermissionService
;
this
.
userPermissionService
=
userPermissionService
;
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
userPermissionUpdate
()
{
public
int
userPermissionUpdate
()
{
log
.
info
(
"刷存量人员资质开始"
);
log
.
info
(
"刷存量人员资质开始"
);
StopWatch
stopWatch
=
new
StopWatch
();
StopWatch
stopWatch
=
new
StopWatch
();
...
@@ -57,16 +61,23 @@ public class HistoryDataDealServiceImpl {
...
@@ -57,16 +61,23 @@ public class HistoryDataDealServiceImpl {
return
allWaitFlushData
.
size
();
return
allWaitFlushData
.
size
();
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Integer
userPersonTypeUpdate
()
{
public
Integer
userPersonTypeUpdate
()
{
log
.
info
(
"刷存量人员类型开始"
);
log
.
info
(
"刷存量人员类型开始"
);
StopWatch
stopWatch
=
new
StopWatch
();
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
stopWatch
.
start
();
List
<
TzsUserInfo
>
users
=
userInfoService
.
list
();
LambdaQueryWrapper
<
TzsUserInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
users
.
forEach
(
u
->{
wrapper
.
select
(
BaseEntity:
:
getSequenceNbr
,
TzsUserInfo:
:
getPost
);
wrapper
.
isNotNull
(
TzsUserInfo:
:
getPost
);
List
<
TzsUserInfo
>
users
=
userInfoService
.
list
(
wrapper
);
users
.
parallelStream
().
forEach
(
u
->{
// 维保人员人员类型去掉,数据规避到作业人员
// 维保人员人员类型去掉,数据规避到作业人员
u
.
setNewPost
(
u
.
getPost
().
replace
(
"6618"
,
"6552"
));
LambdaUpdateWrapper
<
TzsUserInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
TzsUserInfo:
:
getNewPost
,
u
.
getPost
().
replace
(
"6618"
,
"6552"
));
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
u
.
getSequenceNbr
());
userInfoService
.
update
(
updateWrapper
);
});
});
userInfoService
.
saveOrUpdateBatch
(
users
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"刷存量人员类型结束,人员数量:{},耗时:{}秒"
,
users
.
size
(),
stopWatch
.
getTotalTimeSeconds
());
log
.
info
(
"刷存量人员类型结束,人员数量:{},耗时:{}秒"
,
users
.
size
(),
stopWatch
.
getTotalTimeSeconds
());
return
users
.
size
();
return
users
.
size
();
...
...
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