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 112e27de
authored
Nov 22, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:插单优化
1 parent
6bc91fe9
Show 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 @
112e27d
...
@@ -7,6 +7,7 @@ import com.dituhui.pea.order.enums.OrderPeaTagsEnum;
...
@@ -7,6 +7,7 @@ import com.dituhui.pea.order.enums.OrderPeaTagsEnum;
import
com.dituhui.pea.order.enums.ServiceStatusEnum
;
import
com.dituhui.pea.order.enums.ServiceStatusEnum
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -84,9 +85,17 @@ public class OrderUtil {
...
@@ -84,9 +85,17 @@ public class OrderUtil {
* @return
* @return
*/
*/
public
static
Boolean
isDelay
(
OrderInfo
order
)
{
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
()))
{
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
INIT
.
getCode
())
&&
!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
CONTACTED
.
getCode
()))
{
return
false
;
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
())
{
if
(
order
.
getPlanStartTime
().
getTime
()
+
10
*
60
*
1000
<
System
.
currentTimeMillis
())
{
return
true
;
return
true
;
}
}
...
@@ -101,9 +110,17 @@ public class OrderUtil {
...
@@ -101,9 +110,17 @@ public class OrderUtil {
* @return
* @return
*/
*/
public
static
Boolean
isOvertime
(
OrderInfo
order
)
{
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
()))
{
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
STARTED
.
getCode
())
||
ObjectUtil
.
isNotNull
(
order
.
getActualEndTime
()))
{
return
false
;
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
())
{
if
(
order
.
getPlanEndTime
().
getTime
()
+
10
*
60
*
1000
<
System
.
currentTimeMillis
())
{
return
true
;
return
true
;
}
}
...
@@ -118,9 +135,17 @@ public class OrderUtil {
...
@@ -118,9 +135,17 @@ public class OrderUtil {
* @return
* @return
*/
*/
public
static
Boolean
isDelay
(
OrderInfoEntity
order
)
{
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
()))
{
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
INIT
.
getCode
())
&&
!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
CONTACTED
.
getCode
()))
{
return
false
;
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
()))
{
if
(
order
.
getPlanStartTime
().
plusMinutes
(
10
).
isBefore
(
LocalDateTime
.
now
()))
{
return
true
;
return
true
;
}
}
...
@@ -135,9 +160,17 @@ public class OrderUtil {
...
@@ -135,9 +160,17 @@ public class OrderUtil {
* @return
* @return
*/
*/
public
static
Boolean
isOvertime
(
OrderInfoEntity
order
)
{
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
()))
{
if
(!
order
.
getServiceStatus
().
equals
(
ServiceStatusEnum
.
STARTED
.
getCode
())
||
ObjectUtil
.
isNotNull
(
order
.
getActualEndTime
()))
{
return
false
;
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
()))
{
if
(
order
.
getPlanEndTime
().
plusMinutes
(
10
).
isBefore
(
LocalDateTime
.
now
()))
{
return
true
;
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