diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/bean/JTDeviceConfig.java b/src/main/java/com/genersoft/iot/vmp/jt1078/bean/JTDeviceConfig.java index 1c9ef3502..baae2d8ff 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/bean/JTDeviceConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/bean/JTDeviceConfig.java @@ -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, 2:19200, 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{" + diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/codec/decode/Jt808Decoder.java b/src/main/java/com/genersoft/iot/vmp/jt1078/codec/decode/Jt808Decoder.java index 7368c9fbe..b6e57b518 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/codec/decode/Jt808Decoder.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/codec/decode/Jt808Decoder.java @@ -40,7 +40,7 @@ public class Jt808Decoder extends ByteToMessageDecoder { @Override protected void decode(ChannelHandlerContext ctx, ByteBuf in, List 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); diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808Encoder.java b/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808Encoder.java index 949177db6..6868f642a 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808Encoder.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808Encoder.java @@ -26,7 +26,7 @@ public class Jt808Encoder extends MessageToByteEncoder { List 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); } } diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808EncoderCmd.java b/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808EncoderCmd.java index 095306a56..3513c3857 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808EncoderCmd.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/codec/encode/Jt808EncoderCmd.java @@ -34,7 +34,7 @@ public class Jt808EncoderCmd extends MessageToByteEncoder { List 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); } } diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/proc/request/J0104.java b/src/main/java/com/genersoft/iot/vmp/jt1078/proc/request/J0104.java index 08930a21b..8785d415e 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/proc/request/J0104.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/proc/request/J0104.java @@ -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) { diff --git a/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java index 40f8b302c..0ab865123 100644 --- a/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/jt1078/service/impl/jt1078PlayServiceImpl.java @@ -240,8 +240,8 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService { dynamicTask.startDelay(playKey, () -> { log.info("[1078-点播] 超时, phoneNumber: {}, channelId: {}", phoneNumber, channelId); for (CommonCallback> 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); diff --git a/web/src/api/jtDevice.js b/web/src/api/jtDevice.js index 2089c3528..041d7b6df 100644 --- a/web/src/api/jtDevice.js +++ b/web/src/api/jtDevice.js @@ -139,4 +139,77 @@ export function fillLight(params) { } }) } +export function queryRecordList(params) { + const { phoneNumber, channelId, startTime, endTime } = params + return request({ + method: 'get', + url: '/api/jt1078/record/list', + params: { + phoneNumber: phoneNumber, + channelId: channelId, + startTime: startTime, + endTime: endTime + } + }) +} +export function startPlayback(params) { + const { phoneNumber, channelId, startTime, endTime, type, rate, playbackType, playbackSpeed } = params + return request({ + method: 'get', + url: '/api/jt1078/playback/start/', + params: { + phoneNumber: phoneNumber, + channelId: channelId, + startTime: startTime, + endTime: endTime, + type: type, + rate: rate, + playbackType: playbackType, + playbackSpeed: playbackSpeed + } + }) +} +export function controlPlayback(params) { + const { phoneNumber, channelId, command, playbackSpeed, time } = params + return request({ + method: 'get', + url: '/api/jt1078/playback/control', + params: { + phoneNumber: phoneNumber, + channelId: channelId, + command: command, + playbackSpeed: playbackSpeed, + time: time + } + }) +} +export function stopPlayback(params) { + const { phoneNumber, channelId, streamId } = params + return request({ + method: 'get', + url: '/api/jt1078/playback/stop/', + params: { + phoneNumber: phoneNumber, + channelId: channelId, + streamId: streamId + } + }) +} +export function queryConfig(phoneNumber) { + return request({ + method: 'get', + url: `/api/jt1078/config`, + params: { + phoneNumber: phoneNumber + } + }) +} +export function setConfig(data) { + return request({ + method: 'post', + url: `/api/jt1078/set-config`, + data: data + }) +} + diff --git a/web/src/store/modules/jtDevice.js b/web/src/store/modules/jtDevice.js index b19f55f38..125cab604 100644 --- a/web/src/store/modules/jtDevice.js +++ b/web/src/store/modules/jtDevice.js @@ -1,12 +1,12 @@ import { add, - addChannel, deleteDevice, - deleteDeviceById, fillLight, + addChannel, controlPlayback, deleteDevice, + fillLight, play, ptz, - queryChannels, + queryChannels, queryConfig, queryDeviceById, - queryDevices, - stopPlay, update, + queryDevices, queryRecordList, setConfig, startPlayback, + stopPlay, stopPlayback, update, updateChannel, wiper } from '@/api/jtDevice' @@ -140,6 +140,66 @@ const actions = { reject(error) }) }) + }, + queryConfig({ commit }, phoneNumber) { + return new Promise((resolve, reject) => { + queryConfig(phoneNumber).then(response => { + const { data } = response + resolve(data) + }).catch(error => { + reject(error) + }) + }) + }, + setConfig({ commit }, data) { + return new Promise((resolve, reject) => { + setConfig(data).then(response => { + const { data } = response + resolve(data) + }).catch(error => { + reject(error) + }) + }) + }, + queryRecordList({ commit }, params) { + return new Promise((resolve, reject) => { + queryRecordList(params).then(response => { + const { data } = response + resolve(data) + }).catch(error => { + reject(error) + }) + }) + }, + startPlayback({ commit }, params) { + return new Promise((resolve, reject) => { + startPlayback(params).then(response => { + const { data } = response + resolve(data) + }).catch(error => { + reject(error) + }) + }) + }, + controlPlayback({ commit }, params) { + return new Promise((resolve, reject) => { + controlPlayback(params).then(response => { + const { data } = response + resolve(data) + }).catch(error => { + reject(error) + }) + }) + }, + stopPlayback({ commit }, params) { + return new Promise((resolve, reject) => { + stopPlayback(params).then(response => { + const { data } = response + resolve(data) + }).catch(error => { + reject(error) + }) + }) } } diff --git a/web/src/views/jtDevice/channel/index.vue b/web/src/views/jtDevice/channel/index.vue index ff255cff5..22be1e82a 100755 --- a/web/src/views/jtDevice/channel/index.vue +++ b/web/src/views/jtDevice/channel/index.vue @@ -250,7 +250,7 @@ export default { queryCloudRecords: function(itemData) { const deviceId = this.device.phoneNumber const channelId = itemData.channelId - this.$router.push(`/cloudRecord/detail/rtp/${deviceId}_${channelId}`) + this.$router.push(`/cloudRecord/detail/rtp/jt_${deviceId}_${channelId}`) }, stopDevicePush: function(itemData) { this.$store.dispatch('jtDevice/stopPlay', { diff --git a/web/src/views/jtDevice/channel/record.vue b/web/src/views/jtDevice/channel/record.vue index 09b1c8ac2..711a6aa19 100755 --- a/web/src/views/jtDevice/channel/record.vue +++ b/web/src/views/jtDevice/channel/record.vue @@ -1,73 +1,167 @@ diff --git a/web/src/views/jtDevice/channel/record2.vue b/web/src/views/jtDevice/channel/record2.vue new file mode 100755 index 000000000..4fd01863c --- /dev/null +++ b/web/src/views/jtDevice/channel/record2.vue @@ -0,0 +1,485 @@ + + + + + diff --git a/web/src/views/jtDevice/index.vue b/web/src/views/jtDevice/index.vue index 8e5250c7c..bbf4ae236 100755 --- a/web/src/views/jtDevice/index.vue +++ b/web/src/views/jtDevice/index.vue @@ -1,31 +1,43 @@ diff --git a/web/src/views/jtDevice/list.vue b/web/src/views/jtDevice/list.vue index 0ab4ed1de..fe712b8fa 100755 --- a/web/src/views/jtDevice/list.vue +++ b/web/src/views/jtDevice/list.vue @@ -3,8 +3,8 @@ 新设备 - 接入信息 - + 接入信息 + - - 终端连接 + + @@ -213,6 +213,9 @@ export default { console.log(row) this.$emit('show-channel', row.id) }, + showParam: function(row) { + this.$emit('show-param', row.phoneNumber) + }, add: function() { this.$refs.deviceEdit.openDialog(null, () => { this.$refs.deviceEdit.close() @@ -226,7 +229,7 @@ export default { }, moreClick: function(command, itemData) { if (command === 'params') { - this.$router.push(`/jtDeviceParams/${itemData.phoneNumber}`) + this.showParam(itemData) } else if (command === 'connection') { // this.queryCloudRecords(itemData) } else {