Browse Source

话单第三次提交

master
杨雷 3 years ago
parent
commit
f737bbaebc
3 changed files with 32 additions and 35 deletions
  1. +1
    -4
      src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java
  2. +19
    -19
      src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZMessage/GZUpCall.java
  3. +12
    -12
      src/main/java/com/ssjl/zhaobiao/guizhou/entity/IOT/IOTCall.java

+ 1
- 4
src/main/java/com/ssjl/zhaobiao/guizhou/controller/IotController.java View File

@@ -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());


+ 19
- 19
src/main/java/com/ssjl/zhaobiao/guizhou/entity/GZMessage/GZUpCall.java View File

@@ -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;
}


+ 12
- 12
src/main/java/com/ssjl/zhaobiao/guizhou/entity/IOT/IOTCall.java View File

@@ -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;
}
}

Loading…
Cancel
Save