mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update 充电站通信信息
This commit is contained in:
@@ -93,8 +93,7 @@ public class PileMsgRecordServiceImpl implements IPileMsgRecordService {
|
||||
@Override
|
||||
public String generateDescription(PileMsgRecord pileMsgRecord) {
|
||||
String result = null;
|
||||
|
||||
String frameType = YKCUtils.frameType2Str(pileMsgRecord.getFrameType().getBytes());
|
||||
String frameType = pileMsgRecord.getFrameType();
|
||||
String jsonMsg = pileMsgRecord.getJsonMsg();
|
||||
switch (frameType) {
|
||||
case "0x01" :
|
||||
@@ -112,11 +111,35 @@ public class PileMsgRecordServiceImpl implements IPileMsgRecordService {
|
||||
|
||||
private String loginMsg(String jsonMsg) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(jsonMsg);
|
||||
|
||||
// iccid
|
||||
String iccid = jsonObject.getString("iccid");
|
||||
|
||||
// 设备程序版本
|
||||
String programVersion = jsonObject.getString("programVersion");
|
||||
|
||||
// 枪口数量
|
||||
Integer connectorNum = jsonObject.getInteger("connectorNum");
|
||||
|
||||
// 网络链接类型
|
||||
String internetConnection = jsonObject.getString("internetConnection");
|
||||
if (StringUtils.equals(internetConnection, "00")) {
|
||||
internetConnection = "SIM卡";
|
||||
} else if (StringUtils.equals(internetConnection, "01")) {
|
||||
internetConnection = "LAN";
|
||||
} else if (StringUtils.equals(internetConnection, "02")) {
|
||||
internetConnection = "WAN";
|
||||
} else {
|
||||
internetConnection = "其他";
|
||||
}
|
||||
|
||||
// 桩类型
|
||||
String pileType = jsonObject.getString("pileType");
|
||||
if (StringUtils.equals(pileType, "1")) {
|
||||
pileType = "运营桩";
|
||||
} else {
|
||||
pileType = "个人桩";
|
||||
}
|
||||
return "SIM卡号:" + iccid + ", " +
|
||||
"设备程序版本:" + programVersion + ", " +
|
||||
"桩类型:" + pileType + ", " +
|
||||
|
||||
Reference in New Issue
Block a user