mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-15 15:28:41 +08:00
update 充电站通信信息
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.pile.service;
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
import com.jsowell.common.core.page.PageResponse;
|
import com.jsowell.common.core.page.PageResponse;
|
||||||
|
import com.jsowell.pile.domain.PileMsgRecord;
|
||||||
import com.jsowell.pile.dto.QueryPileDTO;
|
import com.jsowell.pile.dto.QueryPileDTO;
|
||||||
|
|
||||||
public interface IPileMsgRecordService {
|
public interface IPileMsgRecordService {
|
||||||
@@ -21,4 +22,6 @@ public interface IPileMsgRecordService {
|
|||||||
* 查询充电桩通信日志 分页
|
* 查询充电桩通信日志 分页
|
||||||
*/
|
*/
|
||||||
PageResponse getPileFeedList(QueryPileDTO dto);
|
PageResponse getPileFeedList(QueryPileDTO dto);
|
||||||
|
|
||||||
|
String generateDescription(PileMsgRecord pileMsgRecord);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.jsowell.pile.service.impl;
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
||||||
@@ -82,4 +83,49 @@ public class PileMsgRecordServiceImpl implements IPileMsgRecordService {
|
|||||||
.build();
|
.build();
|
||||||
return pageResponse;
|
return pageResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成展示在后管的描述
|
||||||
|
* @param pileMsgRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String generateDescription(PileMsgRecord pileMsgRecord) {
|
||||||
|
String result = null;
|
||||||
|
|
||||||
|
String frameType = YKCUtils.frameType2Str(pileMsgRecord.getFrameType().getBytes());
|
||||||
|
String jsonMsg = pileMsgRecord.getJsonMsg();
|
||||||
|
switch (frameType) {
|
||||||
|
case "0x01" :
|
||||||
|
result = loginMsg(jsonMsg);
|
||||||
|
break;
|
||||||
|
case "0x31" :
|
||||||
|
result = loginMsg(jsonMsg);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String loginMsg(String jsonMsg) {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(jsonMsg);
|
||||||
|
String iccid = jsonObject.getString("iccid");
|
||||||
|
String programVersion = jsonObject.getString("programVersion");
|
||||||
|
Integer connectorNum = jsonObject.getInteger("connectorNum");
|
||||||
|
String internetConnection = jsonObject.getString("internetConnection");
|
||||||
|
String pileType = jsonObject.getString("pileType");
|
||||||
|
return "SIM卡号:" + iccid + ", " +
|
||||||
|
"设备程序版本:" + programVersion + ", " +
|
||||||
|
"桩类型:" + pileType + ", " +
|
||||||
|
"枪数量:" + connectorNum + ", " +
|
||||||
|
"网络链接类型:" + internetConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String requestStartChargingMsg(String jsonMsg) {
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(jsonMsg);
|
||||||
|
jsonObject.getString("");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user