新增 车位相机信息表以及相机解析信息逻辑

This commit is contained in:
Lemon
2023-12-11 09:00:58 +08:00
parent 5e4c8c7f84
commit a98a36f04f
10 changed files with 995 additions and 147 deletions

View File

@@ -0,0 +1,206 @@
package com.jsowell.pile.domain;
import com.jsowell.common.annotation.Excel;
import com.jsowell.common.core.domain.BaseEntity;
import lombok.Builder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 【请填写功能名称】对象 pile_camera_info
*
* @author jsowell
* @date 2023-12-09
*/
@Builder
public class PileCameraInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* $column.columnComment
*/
private Long id;
/**
* 设备名称
*/
@Excel(name = "设备名称")
private String deviceName;
/**
* 设备IP地址
*/
@Excel(name = "设备IP地址")
private String deviceIp;
/**
* 设备sn号
*/
@Excel(name = "设备sn号")
private String deviceSn;
/**
* 车牌号
*/
@Excel(name = "车牌号")
private String plateNumber;
/**
* 车位状态
* 01入场02在场04出场08空场10车位异常(=="跨车位报警"和"视频遮挡"时==)20延迟上报出场(预留)40合并出入场(预留)80预入场(预留)100预出场(预留)200入场修正(预留)
*/
@Excel(name = "车位状态 01入场02在场04出场08空场10车位异常(=='跨车位报警'和'视频遮挡'时==)20延迟上报出场(预留)40合并出入场(预留)80预入场(预留)100预出场(预留)200入场修正(预留)")
private String parkingState;
/**
* 车位id
*/
@Excel(name = "车位id")
private Integer zoneId;
/**
* 车位名
*/
@Excel(name = "车位名")
private String zoneName;
/**
* 车牌颜色0:未知;1:蓝色;2:黄色;3:白色;4:黑色;5:绿色;
*/
@Excel(name = "车牌颜色", readConverterExp = "0=:未知;1:蓝色;2:黄色;3:白色;4:黑色;5:绿色;")
private Integer color;
/**
* 车牌类型0:未知车牌1:蓝牌小汽车2:黑牌小汽车3:单排黄牌4:双排黄牌(大车尾牌,农用车)5:警车车牌6:武警车牌7:个性化车牌8:单排军车牌;
* 9:双排军车牌10:使馆车牌11:香港进出中国大陆车牌12:农用车牌13:教练车牌14:澳门进出中国大陆车牌15:双层武警车牌16:武警总队车牌17:双层武警总队车牌18:民航车牌19:新能源车牌20:新能源车牌大21:应急22:领馆
*
*/
@Excel(name = "车牌类型", readConverterExp = "0=:未知车牌1:蓝牌小汽车2:黑牌小汽车3:单排黄牌4:双排黄牌(大车尾牌,农用车)5:警车车牌6:武警车牌7:个性化车牌8:单排军车牌; 9:双排军车牌10:使馆车牌11:香港进出中国大陆车牌12:农用车牌13:教练车牌14:澳门进出中国大陆车牌15:双层武警车牌16:武警总队车牌17:双层武警总队车牌18:民航车牌19:新能源车牌20:新能源车牌大21:应急22:领馆 ")
private Integer plateType;
/**
* 图片base64编码
*/
@Excel(name = "图片base64编码")
private String image;
/**
* $column.columnComment
*/
private String delFlag;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceIp(String deviceIp) {
this.deviceIp = deviceIp;
}
public String getDeviceIp() {
return deviceIp;
}
public void setDeviceSn(String deviceSn) {
this.deviceSn = deviceSn;
}
public String getDeviceSn() {
return deviceSn;
}
public void setPlateNumber(String plateNumber) {
this.plateNumber = plateNumber;
}
public String getPlateNumber() {
return plateNumber;
}
public void setParkingState(String parkingState) {
this.parkingState = parkingState;
}
public String getParkingState() {
return parkingState;
}
public void setZoneId(Integer zoneId) {
this.zoneId = zoneId;
}
public Integer getZoneId() {
return zoneId;
}
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
public String getZoneName() {
return zoneName;
}
public void setColor(Integer color) {
this.color = color;
}
public Integer getColor() {
return color;
}
public void setPlateType(Integer plateType) {
this.plateType = plateType;
}
public Integer getPlateType() {
return plateType;
}
public void setImage(String image) {
this.image = image;
}
public String getImage() {
return image;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
.append("id", getId())
.append("deviceName", getDeviceName())
.append("deviceIp", getDeviceIp())
.append("deviceSn", getDeviceSn())
.append("plateNumber", getPlateNumber())
.append("parkingState", getParkingState())
.append("zoneId", getZoneId())
.append("zoneName", getZoneName())
.append("color", getColor())
.append("plateType", getPlateType())
.append("image", getImage())
.append("createTime", getCreateTime())
.append("delFlag", getDelFlag())
.toString();
}
}

View File

@@ -81,20 +81,7 @@ public class CameraIdentifyResultsDTO {
@JSONField(name = "product_h")
private ProductH productH;
/**
* 车位信息对象
*/
private Parking parking;
/**
* 车牌信息对象
*/
private Plate plate;
/**
* 识别信息对象
*/
private Reco reco;
@Data
@@ -208,6 +195,22 @@ public class CameraIdentifyResultsDTO {
@JSONField(name = "car_pos")
private CarPos carPos;
/**
* 车位信息对象
*/
private Parking parking;
/**
* 车牌信息对象
*/
private Plate plate;
/**
* 识别信息对象
*/
private Reco reco;
@Data
private static class CarPos{
/**
@@ -224,32 +227,10 @@ public class CameraIdentifyResultsDTO {
*/
private Integer pos;
}
}
@Data
public static class Parking{
private Loc loc;
@Data
private static class Loc{
/**
* 坐标点
*/
@JSONField(name = "point")
private List<Point> pointList;
/**
* 坐标点个数
*/
@JSONField(name = "point_num")
private Integer pointNum;
/**
* 标点坐标系尺寸
*/
@JSONField(name = "reco_zone_size_factor")
private RecoZoneSizeFactor recoZoneSizeFactor;
public static class Parking{
private Loc loc;
/**
* 车位状态
@@ -280,117 +261,144 @@ public class CameraIdentifyResultsDTO {
@JSONField(name = "zone_name")
private String zoneName;
@Data
private static class Point{
// 点x坐标
private Integer x;
// 点y坐标
private Integer y;
}
@Data
private static class RecoZoneSizeFactor{
/**
* 坐标点坐标系尺寸高度
*/
@JSONField(name = "factor_h")
private Integer factorH;
private static class Loc{
/**
* 坐标点坐标系尺寸宽度
* 坐标点
*/
@JSONField(name = "factor_w")
private Integer factorW;
@JSONField(name = "point")
private List<Point> pointList;
/**
* 坐标点个数
*/
@JSONField(name = "point_num")
private Integer pointNum;
/**
* 标点坐标系尺寸
*/
@JSONField(name = "reco_zone_size_factor")
private RecoZoneSizeFactor recoZoneSizeFactor;
@Data
private static class Point{
// 点x坐标
private Integer x;
// 点y坐标
private Integer y;
}
@Data
private static class RecoZoneSizeFactor{
/**
* 坐标点坐标系尺寸高度
*/
@JSONField(name = "factor_h")
private Integer factorH;
/**
* 坐标点坐标系尺寸宽度
*/
@JSONField(name = "factor_w")
private Integer factorW;
}
}
}
@Data
public static class Plate{
/**
* 车牌颜色
*
* 0:未知;
* 1:蓝色;
* 2:黄色;
* 3:白色;
* 4:黑色;
* 5:绿色;
*/
private Integer color;
// 车牌置信度
private Integer confidence;
private Loc loc;
/**
* 车牌
* UTF8后再BASE64编码
* 如果有车牌:真实车牌号
* 如果有车无牌:无牌车
* 如果无车无牌:__无__
* 非机动车:非机动车
*/
private String plate;
/**
* 车牌类型
*
* 0:未知车牌
* 1:蓝牌小汽车
* 2:黑牌小汽车
* 3:单排黄牌
* 4:双排黄牌(大车尾牌,农用车)
* 5:警车车牌
* 6:武警车牌
* 7:个性化车牌
* 8:单排军车牌
* 9:双排军车牌
* 10:使馆车牌
* 11:香港进出中国大陆车牌
* 12:农用车牌
* 13:教练车牌
* 14:澳门进出中国大陆车牌
* 15:双层武警车牌
* 16:武警总队车牌
* 17:双层武警总队车牌
* 18:民航车牌
* 19:新能源车牌
* 20:新能源车牌大
* 21:应急
* 22:领馆
*/
private Integer type;
}
@Data
private static class Reco{
/**
* 识别组id
*/
@JSONField(name = "group_id")
private Integer groupId;
/**
* 识别标志
*/
@JSONField(name = "reco_flag")
private Integer recoFlag;
/**
* 识别id
*/
@JSONField(name = "reco_id")
private Integer recoId;
/**
* 识别时间(字符串格式时间)
*/
@JSONField(name = "reco_time")
private String recoTime;
}
}
@Data
public static class Plate{
/**
* 车牌颜色
*
* 0:未知;
* 1:蓝色;
* 2:黄色;
* 3:白色;
* 4:黑色;
* 5:绿色;
*/
private Integer color;
// 车牌置信度
private Integer confidence;
private Loc loc;
/**
* 车牌
* UTF8后再BASE64编码
* 如果有车牌:真实车牌号
* 如果有车无牌:无牌车
* 如果无车无牌:__无__
* 非机动车:非机动车
*/
private String plate;
/**
* 车牌类型
*
* 0:未知车牌
* 1:蓝牌小汽车
* 2:黑牌小汽车
* 3:单排黄牌
* 4:双排黄牌(大车尾牌,农用车)
* 5:警车车牌
* 6:武警车牌
* 7:个性化车牌
* 8:单排军车牌
* 9:双排军车牌
* 10:使馆车牌
* 11:香港进出中国大陆车牌
* 12:农用车牌
* 13:教练车牌
* 14:澳门进出中国大陆车牌
* 15:双层武警车牌
* 16:武警总队车牌
* 17:双层武警总队车牌
* 18:民航车牌
* 19:新能源车牌
* 20:新能源车牌大
* 21:应急
* 22:领馆
*/
private Integer type;
}
@Data
public static class Reco{
/**
* 识别组id
*/
@JSONField(name = "group_id")
private Integer groupId;
/**
* 识别标志
*/
@JSONField(name = "reco_flag")
private Integer recoFlag;
/**
* 识别id
*/
@JSONField(name = "reco_id")
private Integer recoId;
/**
* 识别时间(字符串格式时间)
*/
@JSONField(name = "reco_time")
private String recoTime;
}

View File

@@ -0,0 +1,63 @@
package com.jsowell.pile.mapper;
import java.util.List;
import com.jsowell.pile.domain.PileCameraInfo;
import org.springframework.stereotype.Repository;
/**
* 【请填写功能名称】Mapper接口
*
* @author jsowell
* @date 2023-12-09
*/
@Repository
public interface PileCameraInfoMapper {
/**
* 查询【请填写功能名称】
*
* @param id 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
public PileCameraInfo selectPileCameraInfoById(Long id);
/**
* 查询【请填写功能名称】列表
*
* @param pileCameraInfo 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<PileCameraInfo> selectPileCameraInfoList(PileCameraInfo pileCameraInfo);
/**
* 新增【请填写功能名称】
*
* @param pileCameraInfo 【请填写功能名称】
* @return 结果
*/
public int insertPileCameraInfo(PileCameraInfo pileCameraInfo);
/**
* 修改【请填写功能名称】
*
* @param pileCameraInfo 【请填写功能名称】
* @return 结果
*/
public int updatePileCameraInfo(PileCameraInfo pileCameraInfo);
/**
* 删除【请填写功能名称】
*
* @param id 【请填写功能名称】主键
* @return 结果
*/
public int deletePileCameraInfoById(Long id);
/**
* 批量删除【请填写功能名称】
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deletePileCameraInfoByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.jsowell.pile.service;
import java.util.List;
import com.jsowell.pile.domain.PileCameraInfo;
/**
* 【请填写功能名称】Service接口
*
* @author jsowell
* @date 2023-12-09
*/
public interface IPileCameraInfoService {
/**
* 查询【请填写功能名称】
*
* @param id 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
public PileCameraInfo selectPileCameraInfoById(Long id);
/**
* 查询【请填写功能名称】列表
*
* @param pileCameraInfo 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<PileCameraInfo> selectPileCameraInfoList(PileCameraInfo pileCameraInfo);
/**
* 新增【请填写功能名称】
*
* @param pileCameraInfo 【请填写功能名称】
* @return 结果
*/
public int insertPileCameraInfo(PileCameraInfo pileCameraInfo);
/**
* 修改【请填写功能名称】
*
* @param pileCameraInfo 【请填写功能名称】
* @return 结果
*/
public int updatePileCameraInfo(PileCameraInfo pileCameraInfo);
/**
* 批量删除【请填写功能名称】
*
* @param ids 需要删除的【请填写功能名称】主键集合
* @return 结果
*/
public int deletePileCameraInfoByIds(Long[] ids);
/**
* 删除【请填写功能名称】信息
*
* @param id 【请填写功能名称】主键
* @return 结果
*/
public int deletePileCameraInfoById(Long id);
}

View File

@@ -0,0 +1,89 @@
package com.jsowell.pile.service.impl;
import java.util.List;
import com.jsowell.common.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jsowell.pile.mapper.PileCameraInfoMapper;
import com.jsowell.pile.domain.PileCameraInfo;
import com.jsowell.pile.service.IPileCameraInfoService;
/**
* 【请填写功能名称】Service业务层处理
*
* @author jsowell
* @date 2023-12-09
*/
@Service
public class PileCameraInfoServiceImpl implements IPileCameraInfoService {
@Autowired
private PileCameraInfoMapper pileCameraInfoMapper;
/**
* 查询【请填写功能名称】
*
* @param id 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
@Override
public PileCameraInfo selectPileCameraInfoById(Long id) {
return pileCameraInfoMapper.selectPileCameraInfoById(id);
}
/**
* 查询【请填写功能名称】列表
*
* @param pileCameraInfo 【请填写功能名称】
* @return 【请填写功能名称】
*/
@Override
public List<PileCameraInfo> selectPileCameraInfoList(PileCameraInfo pileCameraInfo) {
return pileCameraInfoMapper.selectPileCameraInfoList(pileCameraInfo);
}
/**
* 新增【请填写功能名称】
*
* @param pileCameraInfo 【请填写功能名称】
* @return 结果
*/
@Override
public int insertPileCameraInfo(PileCameraInfo pileCameraInfo) {
pileCameraInfo.setCreateTime(DateUtils.getNowDate());
return pileCameraInfoMapper.insertPileCameraInfo(pileCameraInfo);
}
/**
* 修改【请填写功能名称】
*
* @param pileCameraInfo 【请填写功能名称】
* @return 结果
*/
@Override
public int updatePileCameraInfo(PileCameraInfo pileCameraInfo) {
return pileCameraInfoMapper.updatePileCameraInfo(pileCameraInfo);
}
/**
* 批量删除【请填写功能名称】
*
* @param ids 需要删除的【请填写功能名称】主键
* @return 结果
*/
@Override
public int deletePileCameraInfoByIds(Long[] ids) {
return pileCameraInfoMapper.deletePileCameraInfoByIds(ids);
}
/**
* 删除【请填写功能名称】信息
*
* @param id 【请填写功能名称】主键
* @return 结果
*/
@Override
public int deletePileCameraInfoById(Long id) {
return pileCameraInfoMapper.deletePileCameraInfoById(id);
}
}