bin před 3 roky
rodič
revize
ca481dc99d
4 změnil soubory, kde provedl 20 přidání a 12 odebrání
  1. +3
    -0
      src/main/java/com/ssjl/zhaobiao/guizhou/handle/GZResponseHandle.java
  2. +8
    -3
      src/main/java/com/ssjl/zhaobiao/guizhou/quartz/job/GZHeartJob.java
  3. +1
    -1
      src/main/java/com/ssjl/zhaobiao/guizhou/quartz/job/GZSyncSetting.java
  4. +8
    -8
      src/main/resources/application.properties

+ 3
- 0
src/main/java/com/ssjl/zhaobiao/guizhou/handle/GZResponseHandle.java Zobrazit soubor

@@ -26,6 +26,9 @@ public class GZResponseHandle {
if(res[1] == (byte)0xFF){
// 常规应答

return null;
}else if(res[0] != (byte)0x7E){
// 非正常应答
return null;
}else {
// 其他命令


+ 8
- 3
src/main/java/com/ssjl/zhaobiao/guizhou/quartz/job/GZHeartJob.java Zobrazit soubor

@@ -42,13 +42,18 @@ public class GZHeartJob extends QuartzJobBean {
String imei = device.getImei();
String phone = device.getPhone();
GpsDeviceStatus gpsDeviceStatus = statusMapper.selectByImei(imei);
String statusStr = gpsDeviceStatus.getDeviceStatus();
IOTDeviceStatus status = IOTDeviceStatus.build(statusStr);
int pow = 50;
if(gpsDeviceStatus != null){
String statusStr = gpsDeviceStatus.getDeviceStatus();
IOTDeviceStatus status = IOTDeviceStatus.build(statusStr);
pow = status.getBattery();
}


DianxinGzDeviceConfig config = configMapper.selectByImei(imei);
GZHeart heart = new GZHeart();
GZDevicePower power = new GZDevicePower();
power.setPower(status.getBattery());
power.setPower(pow);
power.setCharge(false);
heart.setPower(power);
GZDeviceStatus gzStatus = new GZDeviceStatus();


+ 1
- 1
src/main/java/com/ssjl/zhaobiao/guizhou/quartz/job/GZSyncSetting.java Zobrazit soubor

@@ -38,7 +38,7 @@ public class GZSyncSetting extends QuartzJobBean {
GZAskSetting askSetting = new GZAskSetting();
try {
byte[] res = httpUtil.send(device.getImei(), device.getPhone(), askSetting);
//System.out.println(ByteUtil.bytesToHexString(res));
System.out.println(ByteUtil.bytesToHexString(res));
res = (byte[]) responseHandle.process(device.getImei(), res);
// System.out.println(ByteUtil.bytesToHexString(res));
} catch (IOException e) {


+ 8
- 8
src/main/resources/application.properties Zobrazit soubor

@@ -45,15 +45,15 @@ guizhou.protocol=T01.4
#guizhou.device.version=ACB_1001
#guizhou.device.testList= [{ "imei": "862622050253671","phone": "" },{ "imei": "862622050253358","phone": "" },{ "imei": "800115470000678","phone": "" }]

guizhou.factory=zhizhong
guizhou.device.model=RZL600
guizhou.device.version=RZL_2021
guizhou.device.testList= [{ "imei": "862622050654340","phone": "" },{ "imei": "862622050317740","phone": "" }]
#guizhou.factory=zhizhong
#guizhou.device.model=RZL600
#guizhou.device.version=RZL_2021
#guizhou.device.testList= [{ "imei": "862622050654340","phone": "" },{ "imei": "862622050317740","phone": "" }]

#guizhou.factory=zhanneng
#guizhou.device.model=TPE390
#guizhou.device.version=TPE_0056
#guizhou.device.testList= [{ "imei": "862622050925104","phone": "" },{ "imei": "862622050927027","phone": "" }]
guizhou.factory=zhanneng
guizhou.device.model=TPE390
guizhou.device.version=TPE_0056
guizhou.device.testList= [{ "imei": "862622050925104","phone": "" },{ "imei": "862622050927027","phone": "" }]


guizhou.http.url=http://120.24.195.54:24183


Načítá se…
Zrušit
Uložit