mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
bugfix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package cn.lihongjie.coal.acDeviceData.dto;
|
||||
|
||||
import cn.lihongjie.coal.acDevice.dto.AcDeviceDto;
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -10,6 +11,9 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class AcDeviceDataDto extends OrgCommonDto {
|
||||
|
||||
private AcDeviceDto device;
|
||||
|
||||
@Comment("原始数据id")
|
||||
private String srcId;
|
||||
|
||||
@@ -36,28 +40,41 @@ public class AcDeviceDataDto extends OrgCommonDto {
|
||||
|
||||
@Comment("方向编码")
|
||||
private String direction;
|
||||
@Comment("方向名称")
|
||||
private String directionName;
|
||||
|
||||
@Comment("操作类型")
|
||||
private String operationType;
|
||||
|
||||
@Comment("车牌类型")
|
||||
private String plateType;
|
||||
@Comment("车牌类型名称")
|
||||
private String plateTypeName;
|
||||
|
||||
@Comment("车牌颜色")
|
||||
private String plateColor;
|
||||
@Comment("车牌颜色名称")
|
||||
private String plateColorName;
|
||||
|
||||
@Comment("通行时间")
|
||||
private LocalDateTime passTime;
|
||||
|
||||
@Comment("车辆颜色")
|
||||
private String vehicleColor;
|
||||
@Comment("车辆颜色名称")
|
||||
private String vehicleColorName;
|
||||
|
||||
private String vehicleShade;
|
||||
|
||||
private String parkingType;
|
||||
@Comment("停车类型名称")
|
||||
private String parkingTypeName;
|
||||
|
||||
@Comment("车辆类型")
|
||||
private String vehicleType;
|
||||
@Comment("车辆类型名称")
|
||||
private String vehicleTypeName;
|
||||
|
||||
|
||||
@Comment("信任度")
|
||||
private String belief;
|
||||
|
||||
@@ -179,6 +179,7 @@ public class PmsListener {
|
||||
var belief = x.get("belief").asText();
|
||||
|
||||
AcDeviceDataEntity deviceData = new AcDeviceDataEntity();
|
||||
deviceData.setOrganizationId(dataCollector.getOrganizationId());
|
||||
deviceData.setDevice(device);
|
||||
deviceData.setSrcId(id);
|
||||
deviceData.setParkNo(parkbelonged);
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface EmDeviceRepository extends BaseRepository<EmDeviceEntity> {
|
||||
value =
|
||||
"select d.id\n"
|
||||
+ "from t_em_device d\n"
|
||||
+ "where (select max(time) from t_em_device_data data where data.device_id = d.id) + (d.\"interval\" * interval '1 minute') <= :now",
|
||||
+ "where (select case when max(time) is null then now() - interval '10000 minute' else max(time) end from t_em_device_data data where data.device_id = d.id) + (d.\"interval\" * interval '1 minute') <= :now",
|
||||
nativeQuery = true)
|
||||
List<String> findNeedToFetchDevice(LocalDateTime now);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user