Commit c2f37e6a by chenxi

实现功能:修改读取实时监测数据接口,增加异常打印

1 parent 3931d931
......@@ -38,14 +38,14 @@ public class GetDataController extends BaseController {
RealTimeReq req = new RealTimeReq();
RealTimeDataReqData data = new RealTimeDataReqData();
data.setPileId(Ocpp16Helper.strToBcd(pileId, data.getPileId()));
data.setGunNumber(Ocpp16Helper.strToBcd(gunNumber, new byte[1])[0]);
data.setGunNumber((byte) 1);
TcpCallback<TcpRsp> tcpRspTcpCallback = ServerMain.getServer().sendSync(req);
TcpRsp tcpRsp = tcpRspTcpCallback.get();
return R.ok().data(tcpRsp);
} catch (Exception e) {
log.error("读取实时监测数据error:{}", e.getMessage());
log.error("读取实时监测数据error:{}", e, e.getMessage());
return R.error();
}
return R.ok();
}
}
......@@ -212,7 +212,8 @@ public class ByteUtils {
* @date 2018年1月17日 上午9:36:49
* @since 1.0.0
*/
public static byte getByte(byte[] buff, int offset) {
public static byte
getByte(byte[] buff, int offset) {
return buff[offset];
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!