Commit 9b3a3543 by chamberone

Merge branch 'develop' of https://zhangguoping@gitlab.dituhui.com/bsh/project/pr…

…oject.git into develop
2 parents 6c424532 08e379c0
......@@ -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;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!