Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
refined-platform
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
赵啸非
refined-platform
Commits
474ab7fa
Commit
474ab7fa
authored
Apr 07, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加消息发送
parent
0d451ada
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
22 deletions
+17
-22
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
...ortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
+17
-22
No files found.
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
View file @
474ab7fa
...
...
@@ -120,7 +120,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
List
<
FinPersonInfo
>
finPersonInfos
=
new
ArrayList
<>();
List
<
EndPersonInfo
>
endPersonInfos
=
new
ArrayList
<>();
while
(
true
)
{
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_WAITNUM_LIST_CACHE
,
10
,
TimeUnit
.
SECONDS
);
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_WAITNUM_LIST_CACHE
,
5
,
TimeUnit
.
SECONDS
);
WaitPersonInfo
waitPersonInfo
=
JSON
.
parseObject
(
value
,
WaitPersonInfo
.
class
);
// WaitPersonInfo waitPersonInfo = cacheService.blpop(RedisKey.KEY_WAITNUM_LIST_CACHE,10, WaitPersonInfo.class);
if
(
ObjectUtils
.
isEmpty
(
waitPersonInfo
))
{
...
...
@@ -131,7 +131,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
}
while
(
true
)
{
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_FIN_LIST_CACHE
,
10
,
TimeUnit
.
SECONDS
);
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_FIN_LIST_CACHE
,
5
,
TimeUnit
.
SECONDS
);
FinPersonInfo
finPersonInfo
=
JSON
.
parseObject
(
value
,
FinPersonInfo
.
class
);
// FinPersonInfo finPersonInfo = cacheService.blpop(RedisKey.KEY_FIN_LIST_CACHE,10, FinPersonInfo.class);
if
(
ObjectUtils
.
isEmpty
(
finPersonInfo
))
{
...
...
@@ -142,7 +142,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
}
while
(
true
)
{
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_FIN_DOWORK_LIST_CACHE
,
10
,
TimeUnit
.
SECONDS
);
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_FIN_DOWORK_LIST_CACHE
,
5
,
TimeUnit
.
SECONDS
);
EndPersonInfo
endPersonInfo
=
JSON
.
parseObject
(
value
,
EndPersonInfo
.
class
);
// FinPersonInfo finPersonInfo = cacheService.blpop(RedisKey.KEY_FIN_LIST_CACHE,10, FinPersonInfo.class);
if
(
ObjectUtils
.
isEmpty
(
endPersonInfo
))
{
...
...
@@ -152,6 +152,18 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
}
}
List
<
CpPersonInfo
>
cpPersonInfos
=
new
ArrayList
<>();
while
(
true
)
{
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_CP_LIST_CACHE
,
5
,
TimeUnit
.
SECONDS
);
log
.
info
(
"cp:{}"
,
value
);
CpPersonInfo
cpPersonInfo
=
JSON
.
parseObject
(
value
,
CpPersonInfo
.
class
);
if
(
ObjectUtils
.
isEmpty
(
cpPersonInfo
))
{
break
;
}
else
{
cpPersonInfos
.
add
(
cpPersonInfo
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
waitPersonInfos
))
{
// log.info("waitPersonInfos:{}", JSON.toJSONString(waitPersonInfos));
...
...
@@ -199,7 +211,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
if
(!
ObjectUtils
.
isEmpty
(
finPersonInfo
.
getAvgWaitTime
()))
{
int
avgWait
=
finPersonInfo
.
getAvgWaitTime
()
/
60
;
if
(
avgWait
>
0
&&
diff
>
avgWait
)
{
&&
diff
>
=
avgWait
)
{
//todo 构造发送消息。
AlarmRecordsEntity
recordsEntity
=
new
AlarmRecordsEntity
();
recordsEntity
.
initAttrValue
();
...
...
@@ -242,7 +254,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
if
(!
ObjectUtils
.
isEmpty
(
endPersonInfo
.
getAvgHandleTime
()))
{
int
avgWait
=
endPersonInfo
.
getAvgHandleTime
()
/
60
;
if
(
avgWait
>
0
&&
diff
>
avgWait
)
{
&&
diff
>
=
avgWait
)
{
//todo 构造发送消息。
AlarmRecordsEntity
recordsEntity
=
new
AlarmRecordsEntity
();
recordsEntity
.
initAttrValue
();
...
...
@@ -266,23 +278,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
}
}
}
}).
start
();
//好差评
new
Thread
(()
->
{
List
<
CpPersonInfo
>
cpPersonInfos
=
new
ArrayList
<>();
while
(
true
)
{
String
value
=
redisTemplate
.
opsForList
().
leftPop
(
RedisKey
.
KEY_CP_LIST_CACHE
,
10
,
TimeUnit
.
SECONDS
);
log
.
info
(
"cp:{}"
,
value
);
CpPersonInfo
cpPersonInfo
=
JSON
.
parseObject
(
value
,
CpPersonInfo
.
class
);
if
(
ObjectUtils
.
isEmpty
(
cpPersonInfo
))
{
break
;
}
else
{
cpPersonInfos
.
add
(
cpPersonInfo
);
}
}
// cacheService.select(database);//
if
(!
ObjectUtils
.
isEmpty
(
cpPersonInfos
))
{
log
.
info
(
"cpPersonInfos:{}"
,
JSON
.
toJSONString
(
cpPersonInfos
));
for
(
CpPersonInfo
cpPersonInfo
:
cpPersonInfos
)
{
...
...
@@ -320,7 +316,6 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
}
}).
start
();
}
...
...
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