1078-添加部标通道页面
This commit is contained in:
@@ -20,7 +20,6 @@ public class Header {
|
||||
// 消息体流水号
|
||||
Integer sn;
|
||||
|
||||
|
||||
// 协议版本号
|
||||
Short version = -1;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||
* @email qingtaij@163.com
|
||||
*/
|
||||
public class Cmd {
|
||||
String devId;
|
||||
String phoneNumber;
|
||||
Long packageNo;
|
||||
String msgId;
|
||||
String respId;
|
||||
@@ -18,19 +18,19 @@ public class Cmd {
|
||||
}
|
||||
|
||||
public Cmd(Builder builder) {
|
||||
this.devId = builder.devId;
|
||||
this.phoneNumber = builder.phoneNumber;
|
||||
this.packageNo = builder.packageNo;
|
||||
this.msgId = builder.msgId;
|
||||
this.respId = builder.respId;
|
||||
this.rs = builder.rs;
|
||||
}
|
||||
|
||||
public String getDevId() {
|
||||
return devId;
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
|
||||
public void setDevId(String devId) {
|
||||
this.devId = devId;
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public Long getPackageNo() {
|
||||
@@ -66,14 +66,14 @@ public class Cmd {
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
String devId;
|
||||
String phoneNumber;
|
||||
Long packageNo;
|
||||
String msgId;
|
||||
String respId;
|
||||
Rs rs;
|
||||
|
||||
public Builder setDevId(String devId) {
|
||||
this.devId = devId.replaceFirst("^0*", "");
|
||||
public Builder setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber.replaceFirst("^0*", "");
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class Cmd {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Cmd{" +
|
||||
"devId='" + devId + '\'' +
|
||||
"devId='" + phoneNumber + '\'' +
|
||||
", packageNo=" + packageNo +
|
||||
", msgId='" + msgId + '\'' +
|
||||
", respId='" + respId + '\'' +
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.genersoft.iot.vmp.jt1078.proc.response.Rs;
|
||||
import com.genersoft.iot.vmp.jt1078.service.Ijt1078Service;
|
||||
import com.genersoft.iot.vmp.jt1078.session.Session;
|
||||
import com.genersoft.iot.vmp.utils.CivilCodeUtil;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -43,7 +44,7 @@ public class J0100 extends Re {
|
||||
device.setMakerId(buf.readCharSequence(11, Charset.forName("GBK"))
|
||||
.toString().trim());
|
||||
|
||||
device.setDeviceModel(buf.readCharSequence(30, Charset.forName("GBK"))
|
||||
device.setModel(buf.readCharSequence(30, Charset.forName("GBK"))
|
||||
.toString().trim());
|
||||
|
||||
device.setTerminalId(buf.readCharSequence(30, Charset.forName("GBK"))
|
||||
@@ -62,7 +63,7 @@ public class J0100 extends Re {
|
||||
|
||||
byte[] bytes20 = new byte[20];
|
||||
buf.readBytes(bytes20);
|
||||
device.setDeviceModel(new String(bytes20).trim());
|
||||
device.setModel(new String(bytes20).trim());
|
||||
|
||||
byte[] bytes7 = new byte[7];
|
||||
buf.readBytes(bytes7);
|
||||
@@ -93,6 +94,7 @@ public class J0100 extends Re {
|
||||
deviceInDb.setAuthenticationCode(authenticationCode);
|
||||
deviceInDb.setStatus(true);
|
||||
deviceInDb.setProvinceId(device.getProvinceId());
|
||||
deviceInDb.setRegisterTime(DateUtil.getNow());
|
||||
CivilCodePo provinceCivilCodePo = CivilCodeUtil.INSTANCE.get(device.getProvinceId());
|
||||
if (provinceCivilCodePo != null) {
|
||||
deviceInDb.setProvinceText(provinceCivilCodePo.getName());
|
||||
@@ -103,7 +105,7 @@ public class J0100 extends Re {
|
||||
if (cityCivilCodePo != null) {
|
||||
deviceInDb.setCityText(cityCivilCodePo.getName());
|
||||
}
|
||||
deviceInDb.setDeviceModel(device.getDeviceModel());
|
||||
deviceInDb.setModel(device.getModel());
|
||||
deviceInDb.setMakerId(device.getMakerId());
|
||||
deviceInDb.setTerminalId(device.getTerminalId());
|
||||
// TODO 支持直接展示车牌颜色的描述
|
||||
|
||||
Reference in New Issue
Block a user