[1078] 合并新UI

This commit is contained in:
lin
2025-05-15 18:32:03 +08:00
parent 5b89145337
commit 592c1c2b71
14 changed files with 1491 additions and 1139 deletions

View File

@@ -3,11 +3,13 @@ package com.genersoft.iot.vmp.jt1078.bean;
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
import com.genersoft.iot.vmp.jt1078.bean.config.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* JT 终端参数设置
*/
@Schema(description = "JT终端参数设置")
@Data
public class JTDeviceConfig {
@ConfigAttribute(id = 0x1, type="Long", description = "终端心跳发送间隔,单位为秒(s)")
@@ -247,7 +249,7 @@ public class JTDeviceConfig {
@ConfigAttribute(id = 0x84, type="Short", description = "车牌颜色,值按照JT/T697-7.2014中的规定,未上牌车辆填0")
private Short licensePlateColor;
@ConfigAttribute(id = 0x90, type="Short", description = "GNSS定位模式")
@ConfigAttribute(id = 0x90, type="GnssPositioningMode", description = "GNSS定位模式")
private JTGnssPositioningMode gnssPositioningMode;
@ConfigAttribute(id = 0x91, type="Short", description = "GNSS 波特率,定义如下: 0: 4800, 1:9600, 219200, 3:38400, 4:57600, 5:115200")
@@ -288,720 +290,6 @@ public class JTDeviceConfig {
@ConfigAttribute(id = 0x103, type="Integer", description = "CAN总线通道2 上传时间间隔 ,单位为秒(s) ,0 表示不上传")
private Integer canUploadIntervalForChannel2;
public JTAnalyzeAlarmParam getAnalyzeAlarmParam() {
return analyzeAlarmParam;
}
public void setAnalyzeAlarmParam(JTAnalyzeAlarmParam analyzeAlarmParam) {
this.analyzeAlarmParam = analyzeAlarmParam;
}
public Long getKeepaliveInterval() {
return keepaliveInterval;
}
public void setKeepaliveInterval(Long keepaliveInterval) {
this.keepaliveInterval = keepaliveInterval;
}
public Long getTcpResponseTimeout() {
return tcpResponseTimeout;
}
public void setTcpResponseTimeout(Long tcpResponseTimeout) {
this.tcpResponseTimeout = tcpResponseTimeout;
}
public Long getTcpRetransmissionCount() {
return tcpRetransmissionCount;
}
public void setTcpRetransmissionCount(Long tcpRetransmissionCount) {
this.tcpRetransmissionCount = tcpRetransmissionCount;
}
public Long getUdpResponseTimeout() {
return udpResponseTimeout;
}
public void setUdpResponseTimeout(Long udpResponseTimeout) {
this.udpResponseTimeout = udpResponseTimeout;
}
public Long getUdpRetransmissionCount() {
return udpRetransmissionCount;
}
public void setUdpRetransmissionCount(Long udpRetransmissionCount) {
this.udpRetransmissionCount = udpRetransmissionCount;
}
public Long getSmsResponseTimeout() {
return smsResponseTimeout;
}
public void setSmsResponseTimeout(Long smsResponseTimeout) {
this.smsResponseTimeout = smsResponseTimeout;
}
public Long getSmsRetransmissionCount() {
return smsRetransmissionCount;
}
public void setSmsRetransmissionCount(Long smsRetransmissionCount) {
this.smsRetransmissionCount = smsRetransmissionCount;
}
public String getApnMaster() {
return apnMaster;
}
public void setApnMaster(String apnMaster) {
this.apnMaster = apnMaster;
}
public String getDialingUsernameMaster() {
return dialingUsernameMaster;
}
public void setDialingUsernameMaster(String dialingUsernameMaster) {
this.dialingUsernameMaster = dialingUsernameMaster;
}
public String getDialingPasswordMaster() {
return dialingPasswordMaster;
}
public void setDialingPasswordMaster(String dialingPasswordMaster) {
this.dialingPasswordMaster = dialingPasswordMaster;
}
public String getAddressMaster() {
return addressMaster;
}
public void setAddressMaster(String addressMaster) {
this.addressMaster = addressMaster;
}
public String getApnBackup() {
return apnBackup;
}
public void setApnBackup(String apnBackup) {
this.apnBackup = apnBackup;
}
public String getDialingUsernameBackup() {
return dialingUsernameBackup;
}
public void setDialingUsernameBackup(String dialingUsernameBackup) {
this.dialingUsernameBackup = dialingUsernameBackup;
}
public String getDialingPasswordBackup() {
return dialingPasswordBackup;
}
public void setDialingPasswordBackup(String dialingPasswordBackup) {
this.dialingPasswordBackup = dialingPasswordBackup;
}
public String getAddressBackup() {
return addressBackup;
}
public void setAddressBackup(String addressBackup) {
this.addressBackup = addressBackup;
}
public String getAddressIcMaster() {
return addressIcMaster;
}
public void setAddressIcMaster(String addressIcMaster) {
this.addressIcMaster = addressIcMaster;
}
public Long getTcpPortIcMaster() {
return tcpPortIcMaster;
}
public void setTcpPortIcMaster(Long tcpPortIcMaster) {
this.tcpPortIcMaster = tcpPortIcMaster;
}
public Long getUdpPortIcMaster() {
return udpPortIcMaster;
}
public void setUdpPortIcMaster(Long udpPortIcMaster) {
this.udpPortIcMaster = udpPortIcMaster;
}
public String getAddressIcBackup() {
return addressIcBackup;
}
public void setAddressIcBackup(String addressIcBackup) {
this.addressIcBackup = addressIcBackup;
}
public Long getLocationReportingStrategy() {
return locationReportingStrategy;
}
public void setLocationReportingStrategy(Long locationReportingStrategy) {
this.locationReportingStrategy = locationReportingStrategy;
}
public Long getLocationReportingPlan() {
return locationReportingPlan;
}
public void setLocationReportingPlan(Long locationReportingPlan) {
this.locationReportingPlan = locationReportingPlan;
}
public Long getReportingIntervalOffline() {
return reportingIntervalOffline;
}
public void setReportingIntervalOffline(Long reportingIntervalOffline) {
this.reportingIntervalOffline = reportingIntervalOffline;
}
public String getApnSlave() {
return apnSlave;
}
public void setApnSlave(String apnSlave) {
this.apnSlave = apnSlave;
}
public String getDialingUsernameSlave() {
return dialingUsernameSlave;
}
public void setDialingUsernameSlave(String dialingUsernameSlave) {
this.dialingUsernameSlave = dialingUsernameSlave;
}
public String getDialingPasswordSlave() {
return dialingPasswordSlave;
}
public void setDialingPasswordSlave(String dialingPasswordSlave) {
this.dialingPasswordSlave = dialingPasswordSlave;
}
public String getAddressSlave() {
return addressSlave;
}
public void setAddressSlave(String addressSlave) {
this.addressSlave = addressSlave;
}
public Long getReportingIntervalDormancy() {
return reportingIntervalDormancy;
}
public void setReportingIntervalDormancy(Long reportingIntervalDormancy) {
this.reportingIntervalDormancy = reportingIntervalDormancy;
}
public Long getReportingIntervalEmergencyAlarm() {
return reportingIntervalEmergencyAlarm;
}
public void setReportingIntervalEmergencyAlarm(Long reportingIntervalEmergencyAlarm) {
this.reportingIntervalEmergencyAlarm = reportingIntervalEmergencyAlarm;
}
public Long getReportingIntervalDefault() {
return reportingIntervalDefault;
}
public void setReportingIntervalDefault(Long reportingIntervalDefault) {
this.reportingIntervalDefault = reportingIntervalDefault;
}
public Long getReportingDistanceDefault() {
return reportingDistanceDefault;
}
public void setReportingDistanceDefault(Long reportingDistanceDefault) {
this.reportingDistanceDefault = reportingDistanceDefault;
}
public Long getReportingDistanceOffline() {
return reportingDistanceOffline;
}
public void setReportingDistanceOffline(Long reportingDistanceOffline) {
this.reportingDistanceOffline = reportingDistanceOffline;
}
public Long getReportingDistanceDormancy() {
return reportingDistanceDormancy;
}
public void setReportingDistanceDormancy(Long reportingDistanceDormancy) {
this.reportingDistanceDormancy = reportingDistanceDormancy;
}
public Long getReportingDistanceEmergencyAlarm() {
return reportingDistanceEmergencyAlarm;
}
public void setReportingDistanceEmergencyAlarm(Long reportingDistanceEmergencyAlarm) {
this.reportingDistanceEmergencyAlarm = reportingDistanceEmergencyAlarm;
}
public Long getInflectionPointAngle() {
return inflectionPointAngle;
}
public void setInflectionPointAngle(Long inflectionPointAngle) {
this.inflectionPointAngle = inflectionPointAngle;
}
public Integer getFenceRadius() {
return fenceRadius;
}
public void setFenceRadius(Integer fenceRadius) {
this.fenceRadius = fenceRadius;
}
public JTIllegalDrivingPeriods getIllegalDrivingPeriods() {
return illegalDrivingPeriods;
}
public void setIllegalDrivingPeriods(JTIllegalDrivingPeriods illegalDrivingPeriods) {
this.illegalDrivingPeriods = illegalDrivingPeriods;
}
public String getPlatformPhoneNumber() {
return platformPhoneNumber;
}
public void setPlatformPhoneNumber(String platformPhoneNumber) {
this.platformPhoneNumber = platformPhoneNumber;
}
public String getPhoneNumberForReset() {
return phoneNumberForReset;
}
public void setPhoneNumberForReset(String phoneNumberForReset) {
this.phoneNumberForReset = phoneNumberForReset;
}
public String getPhoneNumberForFactoryReset() {
return phoneNumberForFactoryReset;
}
public void setPhoneNumberForFactoryReset(String phoneNumberForFactoryReset) {
this.phoneNumberForFactoryReset = phoneNumberForFactoryReset;
}
public String getPhoneNumberForSms() {
return phoneNumberForSms;
}
public void setPhoneNumberForSms(String phoneNumberForSms) {
this.phoneNumberForSms = phoneNumberForSms;
}
public String getPhoneNumberForReceiveTextAlarm() {
return phoneNumberForReceiveTextAlarm;
}
public void setPhoneNumberForReceiveTextAlarm(String phoneNumberForReceiveTextAlarm) {
this.phoneNumberForReceiveTextAlarm = phoneNumberForReceiveTextAlarm;
}
public Long getPhoneAnsweringPolicy() {
return phoneAnsweringPolicy;
}
public void setPhoneAnsweringPolicy(Long phoneAnsweringPolicy) {
this.phoneAnsweringPolicy = phoneAnsweringPolicy;
}
public Long getLongestCallTimeForPerSession() {
return longestCallTimeForPerSession;
}
public void setLongestCallTimeForPerSession(Long longestCallTimeForPerSession) {
this.longestCallTimeForPerSession = longestCallTimeForPerSession;
}
public Long getLongestCallTimeInMonth() {
return longestCallTimeInMonth;
}
public void setLongestCallTimeInMonth(Long longestCallTimeInMonth) {
this.longestCallTimeInMonth = longestCallTimeInMonth;
}
public String getPhoneNumbersForListen() {
return phoneNumbersForListen;
}
public void setPhoneNumbersForListen(String phoneNumbersForListen) {
this.phoneNumbersForListen = phoneNumbersForListen;
}
public String getPrivilegedSMSNumber() {
return privilegedSMSNumber;
}
public void setPrivilegedSMSNumber(String privilegedSMSNumber) {
this.privilegedSMSNumber = privilegedSMSNumber;
}
public Long getAlarmMaskingWord() {
return alarmMaskingWord;
}
public void setAlarmMaskingWord(Long alarmMaskingWord) {
this.alarmMaskingWord = alarmMaskingWord;
}
public Long getAlarmSendsTextSmsSwitch() {
return alarmSendsTextSmsSwitch;
}
public void setAlarmSendsTextSmsSwitch(Long alarmSendsTextSmsSwitch) {
this.alarmSendsTextSmsSwitch = alarmSendsTextSmsSwitch;
}
public Long getAlarmShootingSwitch() {
return alarmShootingSwitch;
}
public void setAlarmShootingSwitch(Long alarmShootingSwitch) {
this.alarmShootingSwitch = alarmShootingSwitch;
}
public Long getAlarmShootingStorageFlags() {
return alarmShootingStorageFlags;
}
public void setAlarmShootingStorageFlags(Long alarmShootingStorageFlags) {
this.alarmShootingStorageFlags = alarmShootingStorageFlags;
}
public Long getKeySign() {
return KeySign;
}
public void setKeySign(Long keySign) {
KeySign = keySign;
}
public Long getMaxSpeed() {
return maxSpeed;
}
public void setMaxSpeed(Long maxSpeed) {
this.maxSpeed = maxSpeed;
}
public Long getOverSpeedDuration() {
return overSpeedDuration;
}
public void setOverSpeedDuration(Long overSpeedDuration) {
this.overSpeedDuration = overSpeedDuration;
}
public Long getContinuousDrivingTimeThreshold() {
return continuousDrivingTimeThreshold;
}
public void setContinuousDrivingTimeThreshold(Long continuousDrivingTimeThreshold) {
this.continuousDrivingTimeThreshold = continuousDrivingTimeThreshold;
}
public Long getCumulativeDrivingTimeThresholdForTheDay() {
return cumulativeDrivingTimeThresholdForTheDay;
}
public void setCumulativeDrivingTimeThresholdForTheDay(Long cumulativeDrivingTimeThresholdForTheDay) {
this.cumulativeDrivingTimeThresholdForTheDay = cumulativeDrivingTimeThresholdForTheDay;
}
public Long getMinimumBreakTime() {
return minimumBreakTime;
}
public void setMinimumBreakTime(Long minimumBreakTime) {
this.minimumBreakTime = minimumBreakTime;
}
public Long getMaximumParkingTime() {
return maximumParkingTime;
}
public void setMaximumParkingTime(Long maximumParkingTime) {
this.maximumParkingTime = maximumParkingTime;
}
public Integer getOverSpeedWarningDifference() {
return overSpeedWarningDifference;
}
public void setOverSpeedWarningDifference(Integer overSpeedWarningDifference) {
this.overSpeedWarningDifference = overSpeedWarningDifference;
}
public Integer getDrowsyDrivingWarningDifference() {
return drowsyDrivingWarningDifference;
}
public void setDrowsyDrivingWarningDifference(Integer drowsyDrivingWarningDifference) {
this.drowsyDrivingWarningDifference = drowsyDrivingWarningDifference;
}
public JTCollisionAlarmParams getCollisionAlarmParams() {
return collisionAlarmParams;
}
public void setCollisionAlarmParams(JTCollisionAlarmParams collisionAlarmParams) {
this.collisionAlarmParams = collisionAlarmParams;
}
public Integer getRolloverAlarm() {
return rolloverAlarm;
}
public void setRolloverAlarm(Integer rolloverAlarm) {
this.rolloverAlarm = rolloverAlarm;
}
public JTCameraTimer getCameraTimer() {
return cameraTimer;
}
public void setCameraTimer(JTCameraTimer cameraTimer) {
this.cameraTimer = cameraTimer;
}
public Long getQualityForVideo() {
return qualityForVideo;
}
public void setQualityForVideo(Long qualityForVideo) {
this.qualityForVideo = qualityForVideo;
}
public Long getBrightness() {
return brightness;
}
public void setBrightness(Long brightness) {
this.brightness = brightness;
}
public Long getContrastRatio() {
return contrastRatio;
}
public void setContrastRatio(Long contrastRatio) {
this.contrastRatio = contrastRatio;
}
public Long getSaturation() {
return saturation;
}
public void setSaturation(Long saturation) {
this.saturation = saturation;
}
public Long getChroma() {
return chroma;
}
public void setChroma(Long chroma) {
this.chroma = chroma;
}
public Long getMileage() {
return mileage;
}
public void setMileage(Long mileage) {
this.mileage = mileage;
}
public Integer getProvincialId() {
return provincialId;
}
public void setProvincialId(Integer provincialId) {
this.provincialId = provincialId;
}
public Integer getCityId() {
return cityId;
}
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public String getLicensePlate() {
return licensePlate;
}
public void setLicensePlate(String licensePlate) {
this.licensePlate = licensePlate;
}
public Short getLicensePlateColor() {
return licensePlateColor;
}
public void setLicensePlateColor(Short licensePlateColor) {
this.licensePlateColor = licensePlateColor;
}
public JTGnssPositioningMode getGnssPositioningMode() {
return gnssPositioningMode;
}
public void setGnssPositioningMode(JTGnssPositioningMode gnssPositioningMode) {
this.gnssPositioningMode = gnssPositioningMode;
}
public Short getGnssBaudRate() {
return gnssBaudRate;
}
public void setGnssBaudRate(Short gnssBaudRate) {
this.gnssBaudRate = gnssBaudRate;
}
public Short getGnssOutputFrequency() {
return gnssOutputFrequency;
}
public void setGnssOutputFrequency(Short gnssOutputFrequency) {
this.gnssOutputFrequency = gnssOutputFrequency;
}
public Long getGnssCollectionFrequency() {
return gnssCollectionFrequency;
}
public void setGnssCollectionFrequency(Long gnssCollectionFrequency) {
this.gnssCollectionFrequency = gnssCollectionFrequency;
}
public Short getGnssDataUploadMethod() {
return gnssDataUploadMethod;
}
public void setGnssDataUploadMethod(Short gnssDataUploadMethod) {
this.gnssDataUploadMethod = gnssDataUploadMethod;
}
public Long getGnssDataUploadMethodUnit() {
return gnssDataUploadMethodUnit;
}
public void setGnssDataUploadMethodUnit(Long gnssDataUploadMethodUnit) {
this.gnssDataUploadMethodUnit = gnssDataUploadMethodUnit;
}
public Long getCanCollectionTimeForChannel1() {
return canCollectionTimeForChannel1;
}
public void setCanCollectionTimeForChannel1(Long canCollectionTimeForChannel1) {
this.canCollectionTimeForChannel1 = canCollectionTimeForChannel1;
}
public Integer getCanUploadIntervalForChannel1() {
return canUploadIntervalForChannel1;
}
public void setCanUploadIntervalForChannel1(Integer canUploadIntervalForChannel1) {
this.canUploadIntervalForChannel1 = canUploadIntervalForChannel1;
}
public Long getCanCollectionTimeForChannel2() {
return canCollectionTimeForChannel2;
}
public void setCanCollectionTimeForChannel2(Long canCollectionTimeForChannel2) {
this.canCollectionTimeForChannel2 = canCollectionTimeForChannel2;
}
public Integer getCanUploadIntervalForChannel2() {
return canUploadIntervalForChannel2;
}
public void setCanUploadIntervalForChannel2(Integer canUploadIntervalForChannel2) {
this.canUploadIntervalForChannel2 = canUploadIntervalForChannel2;
}
public JTVideoParam getVideoParam() {
return videoParam;
}
public void setVideoParam(JTVideoParam videoParam) {
this.videoParam = videoParam;
}
public JTChannelListParam getChannelListParam() {
return channelListParam;
}
public void setChannelListParam(JTChannelListParam channelListParam) {
this.channelListParam = channelListParam;
}
public JTChannelParam getChannelParam() {
return channelParam;
}
public void setChannelParam(JTChannelParam channelParam) {
this.channelParam = channelParam;
}
public JTAlarmRecordingParam getAlarmRecordingParam() {
return alarmRecordingParam;
}
public void setAlarmRecordingParam(JTAlarmRecordingParam alarmRecordingParam) {
this.alarmRecordingParam = alarmRecordingParam;
}
public JTVideoAlarmBit getVideoAlarmBit() {
return videoAlarmBit;
}
public void setVideoAlarmBit(JTVideoAlarmBit videoAlarmBit) {
this.videoAlarmBit = videoAlarmBit;
}
public JTAwakenParam getAwakenParam() {
return awakenParam;
}
public void setAwakenParam(JTAwakenParam awakenParam) {
this.awakenParam = awakenParam;
}
@Override
public String toString() {
return "JTDeviceConfig{" +

View File

@@ -40,7 +40,7 @@ public class Jt808Decoder extends ByteToMessageDecoder {
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
Session session = ctx.channel().attr(Session.KEY).get();
log.info("> {} hex:{}", session, ByteBufUtil.hexDump(in));
log.debug("> {} hex:{}", session, ByteBufUtil.hexDump(in));
try {
ByteBuf buf = unEscapeAndCheck(in);

View File

@@ -26,7 +26,7 @@ public class Jt808Encoder extends MessageToByteEncoder<Rs> {
List<ByteBuf> encodeList = Jt808EncoderCmd.encode(msg, session, session.nextSerialNo());
if(encodeList!=null && !encodeList.isEmpty()){
for (ByteBuf byteBuf : encodeList) {
log.info("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
log.debug("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
out.writeBytes(byteBuf);
}
}

View File

@@ -34,7 +34,7 @@ public class Jt808EncoderCmd extends MessageToByteEncoder<Cmd> {
List<ByteBuf> encodeList = encode(msg, session, cmd.getPackageNo().intValue());
if (encodeList != null && !encodeList.isEmpty()) {
for (ByteBuf byteBuf : encodeList) {
log.info("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
log.debug("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
out.writeBytes(byteBuf);
}
}

View File

@@ -131,6 +131,7 @@ public class J0104 extends Re {
JTChannelListParam channelListParam = JTChannelListParam.decode(buf);
Method methodForChannelListParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTChannelListParam.class);
methodForChannelListParam.invoke(deviceConfig, channelListParam);
continue;
case "ChannelParam":
JTChannelParam channelParam = JTChannelParam.decode(buf);
Method methodForChannelParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTChannelParam.class);
@@ -157,7 +158,7 @@ public class J0104 extends Re {
methodForAwakenParam.invoke(deviceConfig, awakenParamParam);
continue;
default:
System.err.println(field.getGenericType().getTypeName());
System.err.println(field.getGenericType().getTypeName());
continue;
}
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {

View File

@@ -240,8 +240,8 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
dynamicTask.startDelay(playKey, () -> {
log.info("[1078-点播] 超时, phoneNumber {} channelId {}", phoneNumber, channelId);
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
errorCallback.run(new WVPResult<>(InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode(),
InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getMsg(), null));
errorCallback.run(new WVPResult<>(InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode(),
InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getMsg(), null));
}
mediaServerService.closeRTPServer(mediaServer, stream);
subscribe.removeSubscribe(hook);