From f737bbaebc599302189a26950e6104919709e359 Mon Sep 17 00:00:00 2001 From: yangl <284428564@QQ.com> Date: Thu, 14 Jan 2021 19:50:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=9D=E5=8D=95=E7=AC=AC=E4=B8=89=E6=AC=A1?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guizhou/controller/IotController.java | 5 +-- .../guizhou/entity/GZMessage/GZUpCall.java | 38 +++++++++---------- .../zhaobiao/guizhou/entity/IOT/IOTCall.java | 24 ++++++------ 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java b/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java index 5766a6d..d46fb33 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java @@ -310,10 +310,7 @@ public class IotController { return "not in device"; } DianxinGzDeviceConfig gzDeviceConfig = dianxinGzDeviceConfigMapper.selectByImei(imei); - if(!isAtLocationTime(gzDeviceConfig.getLocationInterval())){ - log.info(imei + ",wifi not in time"); - return "not in time"; - } + log.info(imei + ",call ,v=" + JSON.toJSONString(call)); GZUpCall calls=new GZUpCall(); calls.setPhoneNumber(call.getPhoneNumber()); diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZMessage/GZUpCall.java b/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZMessage/GZUpCall.java index 837f068..2b43abb 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZMessage/GZUpCall.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZMessage/GZUpCall.java @@ -10,51 +10,51 @@ public class GZUpCall implements IMessageContent { /** * 手机号 */ - private String PhoneNumber; + private String phoneNumber; /** * 通话类型 1 CallOut 0 CallIn */ - private int CallFlag;// + private int callFlag;// /** * 通话时间 */ - private String DateTime ; + private String dateTime; /** * 通话时长 */ - private int Duration; + private int duration; public String getPhoneNumber() { - return PhoneNumber; + return phoneNumber; } public void setPhoneNumber(String phoneNumber) { - PhoneNumber = phoneNumber; + this.phoneNumber = phoneNumber; } public int getCallFlag() { - return CallFlag; + return callFlag; } public void setCallFlag(int callFlag) { - CallFlag = callFlag; + this.callFlag = callFlag; } public String getDateTime() { - return DateTime; + return dateTime; } public void setDateTime(String dateTime) { - DateTime = dateTime; + this.dateTime = dateTime; } public int getDuration() { - return Duration; + return duration; } public void setDuration(int duration) { - Duration = duration; + this.duration = duration; } @Override @@ -77,28 +77,28 @@ public class GZUpCall implements IMessageContent { byte[] list = new byte[18]; int i=0; list[i++] = (byte)getTag(); - byte[] phone=GZUtil.phoneToByte(PhoneNumber); + byte[] phone=GZUtil.phoneToByte(phoneNumber); System.arraycopy(phone, 0, list, i, phone.length); i+=phone.length; - if(CallFlag==1&&Duration>0){ + if(callFlag ==1&& duration >0){ list[i++] = (byte)0x00; } - else if(CallFlag==1&&Duration==0){ + else if(callFlag ==1&& duration ==0){ list[i++] = (byte)0x01; } - else if(CallFlag==0&&Duration>0){ + else if(callFlag ==0&& duration >0){ list[i++] = (byte)0x02; } - else if(CallFlag==0&&Duration==0){ + else if(callFlag ==0&& duration ==0){ list[i++] = (byte)0x03; } else { list[i++] = (byte)0x04; } - byte[] duration= ByteUtil.toByte(Duration, 2); + byte[] duration= ByteUtil.toByte(this.duration, 2); System.arraycopy(duration, 0, list, i, duration.length); i+=duration.length; - byte[] time=ByteUtil.hexToByteArray(DateTime); + byte[] time=ByteUtil.hexToByteArray(dateTime); System.arraycopy(time, 0, list, i, time.length); return list; } diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/entity/IOT/IOTCall.java b/src/main/java/com/ssjl/zhaobiao/guizhou/entity/IOT/IOTCall.java index 98ce5d3..99c3f30 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/entity/IOT/IOTCall.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/entity/IOT/IOTCall.java @@ -1,40 +1,40 @@ package com.ssjl.zhaobiao.guizhou.entity.IOT; public class IOTCall { - private String PhoneNumber; - private int CallFlag;//1 CallOut 0 CallIn - private String DateTime ; - private int Duration; + private String phoneNumber; + private int callFlag;//1 CallOut 0 CallIn + private String dateTime; + private int duration; public String getPhoneNumber() { - return PhoneNumber; + return phoneNumber; } public void setPhoneNumber(String phoneNumber) { - PhoneNumber = phoneNumber; + this.phoneNumber = phoneNumber; } public int getCallFlag() { - return CallFlag; + return callFlag; } public void setCallFlag(int callFlag) { - CallFlag = callFlag; + this.callFlag = callFlag; } public String getDateTime() { - return DateTime; + return dateTime; } public void setDateTime(String dateTime) { - DateTime = dateTime; + this.dateTime = dateTime; } public int getDuration() { - return Duration; + return duration; } public void setDuration(int duration) { - Duration = duration; + this.duration = duration; } }