Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3f126ebb
authored
Nov 16, 2023
by
Ren Ping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:增加服务类消息预警自动任务
1 parent
8df57e96
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
project-order/src/main/java/com/dituhui/pea/order/dao/OrderInfoDao.java
project-order/src/main/java/com/dituhui/pea/order/scheduler/ServiceMsgScheduler.java
project-order/src/main/resources/application-dev.yaml
project-order/src/main/java/com/dituhui/pea/order/dao/OrderInfoDao.java
View file @
3f126eb
...
...
@@ -105,9 +105,10 @@ public interface OrderInfoDao extends JpaRepository<OrderInfoEntity, Long>, JpaS
"and DATE_ADD(NOW(), INTERVAL 10 MINUTE) > plan_end_time and org_branch_id = :orgBranchId"
,
nativeQuery
=
true
)
long
countOvertimeByDtAndOrgBranchId
(
LocalDate
dt
,
String
orgBranchId
);
@Query
(
value
=
"from OrderInfoEntity where orderStatus <> 'CANCELED' and engineerCode is not null"
+
" and planStartTime is not null and planEndTime is not null and planStartTime>?1"
+
" and ((actualStartTime is null and planStartTime<= ?2) "
+
" or (actualStartTime is not null and actualEndTime is null and planEndTime<= ?2))"
)
@Query
(
value
=
"from OrderInfoEntity where orderStatus <> 'CANCELED'"
+
" and engineerCode is not null and engineerCode<>''"
+
" and expectTimeBegin is not null and expectTimeEnd is not null and expectTimeBegin>?1"
+
" and ((actualStartTime is null and expectTimeBegin<= ?2) "
+
" or (actualStartTime is not null and actualEndTime is null and expectTimeEnd<= ?2))"
)
List
<
OrderInfoEntity
>
getDelayOrTimeoutOrder
(
LocalDateTime
today
,
LocalDateTime
now
);
}
project-order/src/main/java/com/dituhui/pea/order/scheduler/ServiceMsgScheduler.java
View file @
3f126eb
...
...
@@ -84,7 +84,7 @@ public class ServiceMsgScheduler {
engineerName
,
orderInfoEntity
.
getEngineerCode
(),
orderInfoEntity
.
getOrderId
(),
DateUtil
.
format
(
orderInfoEntity
.
get
PlanStartTime
(),
"yyyy-MM-dd HH:mm"
)
DateUtil
.
format
(
orderInfoEntity
.
get
ExpectTimeBegin
(),
"yyyy-MM-dd HH:mm"
)
));
}
else
{
//超时
dto
.
setContent
(
String
.
format
(
timeoutContent
,
...
...
@@ -92,7 +92,7 @@ public class ServiceMsgScheduler {
engineerName
,
orderInfoEntity
.
getEngineerCode
(),
orderInfoEntity
.
getOrderId
(),
DateUtil
.
format
(
orderInfoEntity
.
get
PlanEndTime
(),
"yyyy-MM-dd HH:mm"
)
DateUtil
.
format
(
orderInfoEntity
.
get
ExpectTimeEnd
(),
"yyyy-MM-dd HH:mm"
)
));
}
...
...
project-order/src/main/resources/application-dev.yaml
View file @
3f126eb
...
...
@@ -92,4 +92,4 @@ scheduler:
day-offset-begin
:
0
day-offset-end
:
14
service-msg
:
0 40 11,17 * * ?
\ No newline at end of file
service-msg
:
0 35 11,17,15 * * ?
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment