识别间隔
parent
581a6e2488
commit
35e4548b3e
|
|
@ -13,6 +13,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
@ConfigurationProperties(prefix = "app")
|
@ConfigurationProperties(prefix = "app")
|
||||||
public class AppProperties {
|
public class AppProperties {
|
||||||
|
|
||||||
|
private int inOutGap = 300;
|
||||||
|
|
||||||
private DefaultPlace defaultPlace;
|
private DefaultPlace defaultPlace;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ import com.njzscloud.supervisory.biz.pojo.entity.TruckLocationTrackEntity;
|
||||||
import com.njzscloud.supervisory.biz.service.BizAuditConfigService;
|
import com.njzscloud.supervisory.biz.service.BizAuditConfigService;
|
||||||
import com.njzscloud.supervisory.biz.service.BizWarnService;
|
import com.njzscloud.supervisory.biz.service.BizWarnService;
|
||||||
import com.njzscloud.supervisory.biz.service.TruckLocationTrackService;
|
import com.njzscloud.supervisory.biz.service.TruckLocationTrackService;
|
||||||
|
import com.njzscloud.supervisory.config.AppProperties;
|
||||||
import com.njzscloud.supervisory.constant.Constant;
|
import com.njzscloud.supervisory.constant.Constant;
|
||||||
import com.njzscloud.supervisory.expense.contant.ExpenseItemCategory;
|
import com.njzscloud.supervisory.expense.contant.ExpenseItemCategory;
|
||||||
import com.njzscloud.supervisory.expense.contant.Scope;
|
import com.njzscloud.supervisory.expense.contant.Scope;
|
||||||
|
|
@ -78,6 +79,7 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
||||||
private final ExpenseItemsConfigService expenseItemsConfigService;
|
private final ExpenseItemsConfigService expenseItemsConfigService;
|
||||||
private final TruckLocationTrackService truckLocationTrackService;
|
private final TruckLocationTrackService truckLocationTrackService;
|
||||||
private final BizWarnService bizWarnService;
|
private final BizWarnService bizWarnService;
|
||||||
|
private final AppProperties appProperties;
|
||||||
|
|
||||||
private static void stopTuqiangTrack(String gpsId) {
|
private static void stopTuqiangTrack(String gpsId) {
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
|
|
@ -777,8 +779,12 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
||||||
LocalDateTime inTime = orderCarInOutEntity.getInTime();
|
LocalDateTime inTime = orderCarInOutEntity.getInTime();
|
||||||
|
|
||||||
long interval = Duration.between(inTime, LocalDateTime.now()).toMillis() / 1000;
|
long interval = Duration.between(inTime, LocalDateTime.now()).toMillis() / 1000;
|
||||||
if (interval <= 300) {
|
int inOutGap = appProperties.getInOutGap();
|
||||||
log.warn("车辆进场时间间隔不能小于30秒,订单{}", orderInfoEntity.getSn());
|
if (inOutGap <= 0) {
|
||||||
|
inOutGap = 300;
|
||||||
|
}
|
||||||
|
if (interval <= inOutGap) {
|
||||||
|
log.warn("车辆进场时间间隔不能小于{}秒,订单{}", inOutGap, orderInfoEntity.getSn());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log.info("进道闸转出道闸,订单{}", orderInfoEntity.getSn());
|
log.info("进道闸转出道闸,订单{}", orderInfoEntity.getSn());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue