[1078] 临时提交
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.genersoft.iot.vmp.jt1078.bean;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* JT 设备
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "jt808设备")
|
||||
public class JTDevice {
|
||||
|
||||
@@ -102,160 +104,16 @@ public class JTDevice {
|
||||
@Schema(description = "状态")
|
||||
private boolean status;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getProvinceId() {
|
||||
return provinceId;
|
||||
}
|
||||
|
||||
public void setProvinceId(String provinceId) {
|
||||
this.provinceId = provinceId;
|
||||
}
|
||||
|
||||
public String getProvinceText() {
|
||||
return provinceText;
|
||||
}
|
||||
|
||||
public void setProvinceText(String provinceText) {
|
||||
this.provinceText = provinceText;
|
||||
}
|
||||
|
||||
public String getCityId() {
|
||||
return cityId;
|
||||
}
|
||||
|
||||
public void setCityId(String cityId) {
|
||||
this.cityId = cityId;
|
||||
}
|
||||
|
||||
public String getCityText() {
|
||||
return cityText;
|
||||
}
|
||||
|
||||
public void setCityText(String cityText) {
|
||||
this.cityText = cityText;
|
||||
}
|
||||
|
||||
public String getMakerId() {
|
||||
return makerId;
|
||||
}
|
||||
|
||||
public void setMakerId(String makerId) {
|
||||
this.makerId = makerId;
|
||||
}
|
||||
|
||||
public String getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(String model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public String getTerminalId() {
|
||||
return terminalId;
|
||||
}
|
||||
|
||||
public void setTerminalId(String deviceId) {
|
||||
this.terminalId = deviceId;
|
||||
}
|
||||
|
||||
public int getPlateColor() {
|
||||
return plateColor;
|
||||
}
|
||||
|
||||
public void setPlateColor(int plateColor) {
|
||||
this.plateColor = plateColor;
|
||||
}
|
||||
|
||||
public String getPlateNo() {
|
||||
return plateNo;
|
||||
}
|
||||
|
||||
public void setPlateNo(String plateNo) {
|
||||
this.plateNo = plateNo;
|
||||
}
|
||||
|
||||
public String getAuthenticationCode() {
|
||||
return authenticationCode;
|
||||
}
|
||||
|
||||
public void setAuthenticationCode(String authenticationCode) {
|
||||
this.authenticationCode = authenticationCode;
|
||||
}
|
||||
|
||||
public Double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(Double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public Double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(Double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public boolean isStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(boolean status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRegisterTime() {
|
||||
return registerTime;
|
||||
}
|
||||
|
||||
public void setRegisterTime(String registerTime) {
|
||||
this.registerTime = registerTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "JTDevice{" +
|
||||
" 终端手机号='" + phoneNumber + '\'' +
|
||||
", 省域ID='" + provinceId + '\'' +
|
||||
", 省域文字描述='" + provinceText + '\'' +
|
||||
", 市县域ID='" + cityId + '\'' +
|
||||
", 市县域文字描述='" + cityText + '\'' +
|
||||
", 制造商ID='" + makerId + '\'' +
|
||||
", 终端型号='" + model + '\'' +
|
||||
", 终端手机号='" + phoneNumber + '\'' +
|
||||
", 设备ID='" + terminalId + '\'' +
|
||||
", 车牌颜色=" + plateColor +
|
||||
", 车牌='" + plateNo + '\'' +
|
||||
|
||||
@@ -4,9 +4,13 @@ import com.genersoft.iot.vmp.jt1078.util.BCDUtil;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
@Data
|
||||
@Slf4j
|
||||
@Schema(description = "驾驶员身份信息")
|
||||
public class JTDriverInformation {
|
||||
|
||||
@@ -39,12 +43,18 @@ public class JTDriverInformation {
|
||||
@Schema(description = "驾驶员身份证号")
|
||||
private String driverIdNumber;
|
||||
|
||||
public static JTDriverInformation decode(ByteBuf buf) {
|
||||
public static JTDriverInformation decode(ByteBuf buf, boolean is2019) {
|
||||
JTDriverInformation jtDriverInformation = new JTDriverInformation();
|
||||
jtDriverInformation.setStatus(buf.readUnsignedByte());
|
||||
byte[] bytes = new byte[6];
|
||||
buf.readBytes(bytes);
|
||||
jtDriverInformation.setTime(DateUtil.jt1078Toyyyy_MM_dd_HH_mm_ss(BCDUtil.transform(bytes)));
|
||||
String timeStr = BCDUtil.transform(bytes);
|
||||
try {
|
||||
jtDriverInformation.setTime(DateUtil.jt1078Toyyyy_MM_dd_HH_mm_ss(timeStr));
|
||||
}catch (Exception e) {
|
||||
log.error("[JT-驾驶员身份信息] 解码时无法格式化时间: {}", timeStr);
|
||||
}
|
||||
|
||||
if (jtDriverInformation.getStatus() == 1) {
|
||||
jtDriverInformation.setResult((int)buf.readUnsignedByte());
|
||||
int nameLength = buf.readUnsignedByte();
|
||||
@@ -55,76 +65,19 @@ public class JTDriverInformation {
|
||||
certificateIssuanceMechanismNameLength, Charset.forName("GBK")).toString().trim());
|
||||
byte[] bytesForExpire = new byte[4];
|
||||
buf.readBytes(bytesForExpire);
|
||||
jtDriverInformation.setExpire(DateUtil.jt1078dateToyyyy_MM_dd(BCDUtil.transform(bytesForExpire)));
|
||||
jtDriverInformation.setDriverIdNumber(buf.readCharSequence(20, Charset.forName("GBK")).toString().trim());
|
||||
String bytesForExpireStr = BCDUtil.transform(bytesForExpire);
|
||||
try {
|
||||
jtDriverInformation.setExpire(DateUtil.jt1078dateToyyyy_MM_dd(bytesForExpireStr));
|
||||
}catch (Exception e) {
|
||||
log.error("[JT-驾驶员身份信息] 解码时无法格式化时间: {}", bytesForExpireStr);
|
||||
}
|
||||
if (is2019) {
|
||||
jtDriverInformation.setDriverIdNumber(buf.readCharSequence(20, Charset.forName("GBK")).toString().trim());
|
||||
}
|
||||
}
|
||||
return jtDriverInformation;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public Integer getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Integer result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCertificateCode() {
|
||||
return certificateCode;
|
||||
}
|
||||
|
||||
public void setCertificateCode(String certificateCode) {
|
||||
this.certificateCode = certificateCode;
|
||||
}
|
||||
|
||||
public String getCertificateIssuanceMechanismName() {
|
||||
return certificateIssuanceMechanismName;
|
||||
}
|
||||
|
||||
public void setCertificateIssuanceMechanismName(String certificateIssuanceMechanismName) {
|
||||
this.certificateIssuanceMechanismName = certificateIssuanceMechanismName;
|
||||
}
|
||||
|
||||
public String getExpire() {
|
||||
return expire;
|
||||
}
|
||||
|
||||
public void setExpire(String expire) {
|
||||
this.expire = expire;
|
||||
}
|
||||
|
||||
public String getDriverIdNumber() {
|
||||
return driverIdNumber;
|
||||
}
|
||||
|
||||
public void setDriverIdNumber(String driverIdNumber) {
|
||||
this.driverIdNumber = driverIdNumber;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "JTDriverInformation{" +
|
||||
|
||||
@@ -152,6 +152,18 @@ public class JTPositionBaseInfo {
|
||||
this.videoAlarm = videoAlarm;
|
||||
}
|
||||
|
||||
|
||||
public String toSimpleString() {
|
||||
return "简略位置汇报信息: " +
|
||||
" \n 经度:" + longitude +
|
||||
" \n 纬度:" + latitude +
|
||||
" \n 高程: " + altitude +
|
||||
" \n 速度: " + speed +
|
||||
" \n 方向: " + direction +
|
||||
" \n 时间: " + time +
|
||||
" \n";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "位置汇报信息: " +
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.genersoft.iot.vmp.jt1078.bean;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "拍摄命令参数")
|
||||
public class JTShootingCommand {
|
||||
|
||||
@@ -62,86 +64,6 @@ public class JTShootingCommand {
|
||||
return byteBuf;
|
||||
}
|
||||
|
||||
public int getChanelId() {
|
||||
return chanelId;
|
||||
}
|
||||
|
||||
public void setChanelId(int chanelId) {
|
||||
this.chanelId = chanelId;
|
||||
}
|
||||
|
||||
public int getCommand() {
|
||||
return command;
|
||||
}
|
||||
|
||||
public void setCommand(int command) {
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
public int getSave() {
|
||||
return save;
|
||||
}
|
||||
|
||||
public void setSave(int save) {
|
||||
this.save = save;
|
||||
}
|
||||
|
||||
public int getResolvingPower() {
|
||||
return resolvingPower;
|
||||
}
|
||||
|
||||
public void setResolvingPower(int resolvingPower) {
|
||||
this.resolvingPower = resolvingPower;
|
||||
}
|
||||
|
||||
public int getQuality() {
|
||||
return quality;
|
||||
}
|
||||
|
||||
public void setQuality(int quality) {
|
||||
this.quality = quality;
|
||||
}
|
||||
|
||||
public int getBrightness() {
|
||||
return brightness;
|
||||
}
|
||||
|
||||
public void setBrightness(int brightness) {
|
||||
this.brightness = brightness;
|
||||
}
|
||||
|
||||
public int getContrastRatio() {
|
||||
return contrastRatio;
|
||||
}
|
||||
|
||||
public void setContrastRatio(int contrastRatio) {
|
||||
this.contrastRatio = contrastRatio;
|
||||
}
|
||||
|
||||
public int getSaturation() {
|
||||
return saturation;
|
||||
}
|
||||
|
||||
public void setSaturation(int saturation) {
|
||||
this.saturation = saturation;
|
||||
}
|
||||
|
||||
public int getChroma() {
|
||||
return chroma;
|
||||
}
|
||||
|
||||
public void setChroma(int chroma) {
|
||||
this.chroma = chroma;
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(int time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "JTShootingCommand{" +
|
||||
|
||||
Reference in New Issue
Block a user