Example Description

Some field data may be meaningless due to different equipment types. If it is not available, it can be ignored

1.Positioning data

    @PostMapping("/receiveLocationData")
    public MBackResult receiveLocationData(@RequestHeader(value = "headerKey", required = true) String headerKey, @RequestBody TerminalLocation param) {
        log.info("ReceiveLocationData:" + JSON.toJSON(param));
        MBackResult result = new MBackResult();
        result.setResult(200);
        return result;
    }

TerminalLocation:

@Data
public class TerminalLocation {
    /**
     * Equipment No
     */
    public String assetId;
    /**
     * longitude(WGS-84)
     */
    public Double longitude = 0.0d;
    /**
     * latitude(WGS-84)
     */
    public Double latitude = 0.0d;
    /**
     * speed(km/h)
     */
    public Integer speed;
    /**
     * direction(0~360)
     */
    public Integer direction = 0;
    /**
     * mileage(km)
     */
    public Long mileage = 0L;
    /**
     * Positioning time(UTC)
     */
    public String gpsTime;
    /**
     * Receiving time(UTC)
     */
    public String recvTime;
    /**
     * Positioning type (0: no positioning; 1: GPS positioning; 2: base station positioning;3:Cells positioning)
     */
    public Integer locType = 0;
    /**
     * GPRS signal
     */
    public Integer cellSignal = 0;
    /**
     * Satellite signal 
     */
    public Integer gnssSignal = 0;
    /**
     * Cell code data, MNC, MCC, LAC, CID
     */
    public String cells;
    /**
     * Power
     */
    public Integer battery;
    /**
     * Voltage(V)
     */
    public String voltage;
    /**
     * Lock/vehicle status JSON
     */
    public String statusJson;
    /**
     * Extension information JSON
     */
    public String expandInfo;
}

Lock/vehicle status JSON

@Data
public class StatusJson {
      /**
     *  Lock status (0: Off 1: On)
     */
    private Integer lockStatus;
    /**
     * Rope locking status (1: pulling out 0: inserting - 1: none)
     */
    private Integer lockRope;
    /**
     * ACC status (1: On 0: Off 1: None)
     */
    private Integer acc;
    /**
     * State of oil cut-off electric switch (1: On 0: Off 1: None)
     */
    private Integer fuelCut;
    /**
     * Door opening/closing status (1: open 0: close - 1: none)
     */
    private Integer door;
    /**
     * Engine status (1: On 0: Off 1: None)
     */
    private Integer engine;
}
}

JSON description of extension information

@Data
public class ExpendInfo {
     /**
     * Temperature - 1000 means none
     */
    private String temperature;
    /**
     * Humidity 0 means none
     */
    private String humidity;
    /**
     * Spare battery (formats:"55,3.88,0")
     */
    private String backBattery;
    /**
     * Oil level value - 1 means none ("- 1, - 1, - 1")
     */
    private String fuels;
    /**
     * acceleration(formats:"x:1;y:-29;z:-2903")
     */
    private String acceleration;
    /**
     * Illuminance(lux)
     */
    private String lux;
    /**
     * pressure(pa)
     */
    private String pressure;
    /**
     * posture(formats:"x:1;y:-29;z:-2903")
     */
    private String posture;
    /**
     * Network type 0: unknown 1:1G 2:2G 3:3G 4:4: G 5:5G Others are not displayed
     */
    private String networkType;

    /**
     * Data type 0: real-time; 1: Supplementary report; 2: Alarm
     */
    private String reportType;
}

2.Alarm data

    @PostMapping("/receiveAlarmData")
    public MBackResult receiveAlarmData(@RequestHeader(value = "headerKey", required = true) String headerKey, @RequestBody TerminalAlarm param) {
        log.info("receiveAlarmData:" + JSON.toJSON(param));
        MBackResult result = new MBackResult();
        result.setResult(200);
        return result;
    }

TerminalAlarm:

@Data
public class TerminalAlarm {
    /**
     * Equipment No
     */
    public String assetId;
    /**
     * Alarm type (refer to the following description of alarm type)
     */
    public int alarmType;
    /**
     *  Time (UTC time)
     */
    public String dateTime;
    /**
     * longitude(WGS-84)
     */
    public Double longitude = 0.0d;
    /**
     * latitude(WGS-84)
     */
    public Double latitude = 0.0d;
    /**
     * speed(km/h)
     */
    public Integer speed;
    /**
     * mileage(km)
     */
    public Long mileage;
    /**
     * Cell code data is displayed in MNC, MCC, LAC and CID formats
     */
    public String cells;
    /**
     * alarm describe
     */
    public String describe;
    /**
     * Serial number of files
     */
    public String fileIndex;
}

3.Event data

    @PostMapping("/receiveEventData")
    public MBackResult receiveEventData(@RequestHeader(value = "headerKey", required = true) String headerKey, @RequestBody TerminalEvent param) {
        log.info("receiveEventData:" + JSON.toJSON(param));
        MBackResult result = new MBackResult();
        result.setResult(200);
        return result;
    }

TerminalEvent:

@Data
public class TerminalEvent {
    /**
     * Event data
     */
    public String assetId;
    /**
     * Event type (1:Unlock;2:Lock;3:Sealing of exit area;;4:Unblock the entrance area;5:Open box(door);6:Close box(door))
     */
    public Integer eventType;
    /**
     * Unlocking type, only for lock on/off events (1: swipe card to unlock 2: remote unlock 3: Bluetooth unlock 4: cut rope to unlock 5: SMS unlock 6: regional trigger)
     */
    public Integer unLockType;
    /**
     * Time (UTC time)
     */
    public String dateTime;
    /**
     * longitude(WGS-84)
     */
    public Double longitude = 0.0d;
    /**
     * latitude(WGS-84)
     */
    public Double latitude = 0.0d;
    /**
     * speed(km/h)
     */
    public Integer speed;
    /**
     * mileage(km)
     */
    public Long mileage;
    /**
     * Cell code data is displayed in MNC, MCC, LAC and CID formats
     */
    public String cells;
    /**
     * Swipe card No,only for lock products
     */
    public String card;
    /**
     * unlock password,only for lock products
     */
    public String password;
}

4.Command response data

    @PostMapping("/receiveInsData")
    public MBackResult receiveInsData(@RequestHeader(value = "headerKey", required = true) String headerKey, @RequestBody TerminalCommand param) {
        log.info("receiveInsData:" + JSON.toJSON(param));
        MBackResult result = new MBackResult();
        result.setResult(200);
        return result;
    }

TerminalCommand:

@Data
public class TerminalCommand {
    /**
     * Equipment No
     */
    public String assetId;
    /**
     * Command type
     */
    public String commandType;
    /**
     * Equipment response content
     */
    public String content;
    /**
     * Time (UTC time)
     */
    public String dateTime;
}

5、Slave Data

     @PostMapping("/receiveLocationData")
     public MBackResult receiveLocationData(@RequestHeader(value = "headerKey", required = true) String headerKey, @RequestBody TerminalLocation param) {
        log.info("ReceiveLocationData:" + JSON.toJSON(param));
        MBackResult result = new MBackResult();
        result.setResult(200);
        return result;
    }

SlaveMachineLocation

    /// <summary>
    /// slave data
    /// </summary>
    public class SlaveMachineLocation
    {
        /// <summary>
        /// Equipment No
        /// </summary>
        public String assetId { get; set; }
        /// <summary>
        /// longitude(WGS-84)
        /// </summary>
        public Double longitude { get; set; } = 0.0;
        /// <summary>
        /// latitude(WGS-84)
        /// </summary>
        public Double latitude { get; set; } = 0.0;
        /// <summary>
        /// speed(km/h)
        /// </summary>
        public Integer speed{ get; set; }
        /// <summary>
        /// direction(0~360)
        /// </summary>
        public Integer direction { get; set; } = 0;
        /// <summary>
        /// mileage(km)
        /// </summary>
        public Long mileage { get; set; } = 0L;
        /// <summary>
        /// Positioning time(UTC)
        /// </summary>
        public String gpsTime { get; set; }
        /// <summary>
        /// Receiving time(UTC)
        /// </summary>
        public String recvTime { get; set; }
        /// <summary>
        /// Slave Positioning time(UTC)
        /// </summary>
        public String subGpsTime { get; set; }
        /// <summary>
        /// Slave Power
        /// </summary>
        public Integer battery { get; set; }
        /// <summary>
        /// Slave Voltage
        /// </summary>
        public String voltage { get; set; }
        /// <summary>
        /// SLAVE Equipment No
        /// </summary>
        public string subAssetID { get; set; }
        /// <summary>
        /// SLAVE Type  1-JT126 , 4-JT709 , 5-JT801 , 6-JT802 
        /// </summary>
        public Integer sensorType { get; set; }
        /// <summary>
        /// For 802 device status data (Json string), other types of device data can be ignored
        /// </summary>
        public string statusJson { get; set; }
        /// <summary>
        /// Slave lock status  0-Off 1-On
        /// </summary>
        public Integer locStatus { get; set; }
        /// <summary>
        /// Slave Rope locking status (1: pulling out 0: inserting - 1: none)
        /// </summary>
        public Integer locRope { get; set; }
        /// <summary>
        ///RSSI
        /// </summary>
        public Integer rssi { get; set; }
        /// <summary>
        /// Slave Temperature - 1000 means none
        /// </summary>
        public Double temperature { get; set; } = -1000.0;
        /// <summary>
        /// Slave Humidity 0 means none
        /// </summary>
        public Integer humidity { get; set; }
        /// <summary>
        /// Slave Event -1:none 0:Lock event 1:BLE unlock event 2:Open back cover waring 3:Lora unlock event 4:Lock rope cut warning 5:Key wake up event 6:Heartbeat packet 7:Charging report event 8/20:Pull out the lock rope event 9:RFID unlock event  10:Illegal RFID unlock warning  14:Sub lock signal lost warning 15:Valve closed event 16:Valve open event 17:Low battery warning 18:Anti-disassembly 19:Disassembly of electronic compartment 21:Lock rope insertion 22:Bluetooth connection 23:Open emergency storage warning 24:Close emergency storage warning 25:Valve abnormally open warning 26:Turn off the knob event 27:Turn on the knob event 28:Unlocking Error 29:Abnormal Motor  30:NFC trigger
        /// </summary>
        public Integer eventType { get; set; } = -1;
        /// <summary>
        /// Slave unlock times
        /// </summary>
        public Integer locTimes { get; set; }
        /// <summary>
        /// Slave Positioning timestamp
        /// </summary>
        public Long subGpsTimestamp { get; set; }
    }
文档更新时间: 2023-12-07 16:35   作者:admin