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