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 9b3a3543
authored
Nov 22, 2023
by
chamberone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://zhangguoping@gitlab.dituhui.com/bsh/project/pr…
…oject.git into develop
2 parents
6c424532
08e379c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
project-order/src/main/java/com/dituhui/pea/order/utils/OrderUtil.java
project-order/src/main/java/com/dituhui/pea/order/utils/OrderUtil.java
View file @
9b3a354
...
...
@@ -7,6 +7,7 @@ import com.dituhui.pea.order.enums.OrderPeaTagsEnum;
import
com.dituhui.pea.order.enums.ServiceStatusEnum
;
import
org.apache.commons.lang3.StringUtils
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -84,9 +85,17 @@ public class OrderUtil {
* @return
*/
public
static
Boolean
isDelay
(
OrderInfo
order
)
{
if
(
order
.
getDt
().
isBefore
(
LocalDate
.
now
()))
{
return
false
;
}
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
INIT
.
getCode
())
&&
!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
CONTACTED
.
getCode
()))
{
return
false
;
}
if
(
ObjectUtil
.
isNull
(
order
.
getPlanStartTime
()))
{
if
(
order
.
getExpectTimeBegin
().
getTime
()
+
10
*
60
*
1000
<
System
.
currentTimeMillis
())
{
return
true
;
}
}
if
(
order
.
getPlanStartTime
().
getTime
()
+
10
*
60
*
1000
<
System
.
currentTimeMillis
())
{
return
true
;
}
...
...
@@ -101,9 +110,17 @@ public class OrderUtil {
* @return
*/
public
static
Boolean
isOvertime
(
OrderInfo
order
)
{
if
(
order
.
getDt
().
isBefore
(
LocalDate
.
now
()))
{
return
false
;
}
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
STARTED
.
getCode
())
||
ObjectUtil
.
isNotNull
(
order
.
getActualEndTime
()))
{
return
false
;
}
if
(
ObjectUtil
.
isNull
(
order
.
getPlanEndTime
()))
{
if
(
order
.
getExpectTimeEnd
().
getTime
()
+
10
*
60
*
1000
<
System
.
currentTimeMillis
())
{
return
true
;
}
}
if
(
order
.
getPlanEndTime
().
getTime
()
+
10
*
60
*
1000
<
System
.
currentTimeMillis
())
{
return
true
;
}
...
...
@@ -118,9 +135,17 @@ public class OrderUtil {
* @return
*/
public
static
Boolean
isDelay
(
OrderInfoEntity
order
)
{
if
(
order
.
getDt
().
isBefore
(
LocalDate
.
now
()))
{
return
false
;
}
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
INIT
.
getCode
())
&&
!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
CONTACTED
.
getCode
()))
{
return
false
;
}
if
(
ObjectUtil
.
isNull
(
order
.
getPlanEndTime
()))
{
if
(
order
.
getExpectTimeEnd
().
plusMinutes
(
10
).
isBefore
(
LocalDateTime
.
now
()))
{
return
true
;
}
}
if
(
order
.
getPlanStartTime
().
plusMinutes
(
10
).
isBefore
(
LocalDateTime
.
now
()))
{
return
true
;
}
...
...
@@ -135,9 +160,17 @@ public class OrderUtil {
* @return
*/
public
static
Boolean
isOvertime
(
OrderInfoEntity
order
)
{
if
(
order
.
getDt
().
isBefore
(
LocalDate
.
now
()))
{
return
false
;
}
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
STARTED
.
getCode
())
||
ObjectUtil
.
isNotNull
(
order
.
getActualEndTime
()))
{
return
false
;
}
if
(
ObjectUtil
.
isNull
(
order
.
getPlanEndTime
()))
{
if
(
order
.
getExpectTimeEnd
().
plusMinutes
(
10
).
isBefore
(
LocalDateTime
.
now
()))
{
return
true
;
}
}
if
(
order
.
getPlanEndTime
().
plusMinutes
(
10
).
isBefore
(
LocalDateTime
.
now
()))
{
return
true
;
}
...
...
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